/* ============================================
   Emanalhashmi Certificates Plugin - Styles
   ============================================ */

:root {
    --emanalhashmi-gold: #D4A574;
    --emanalhashmi-dark-gold: #C19A6B;
    --emanalhashmi-cream: #FFF8E7;
    --emanalhashmi-deep-black: #0A0A0A;
    --emanalhashmi-white: #FFFFFF;
    --emanalhashmi-gray-300: #D1D5DB;
    --emanalhashmi-gray-400: #9CA3AF;
    --emanalhashmi-gray-600: #4B5563;
}

/* ============================================
   Main Wrapper
   ============================================ */

.emanalhashmi-certificates-wrapper {
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, var(--emanalhashmi-deep-black) 0%, #1a1a1a 100%);
    color: var(--emanalhashmi-white);
    padding: 60px 20px;
    margin: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Background decorations */
.emanalhashmi-certificates-wrapper::before,
.emanalhashmi-certificates-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.1;
    z-index: 0;
}

.emanalhashmi-certificates-wrapper::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--emanalhashmi-gold) 0%, transparent 70%);
    top: 20%;
    right: 10%;
}

.emanalhashmi-certificates-wrapper::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--emanalhashmi-gold) 0%, transparent 70%);
    bottom: 10%;
    left: 5%;
}

/* ============================================
   Header
   ============================================ */

.emanalhashmi-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 60px;
}

.emanalhashmi-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.emanalhashmi-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emanalhashmi-gold);
    opacity: 0.8;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.emanalhashmi-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.emanalhashmi-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.emanalhashmi-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emanalhashmi-gold) 0%, var(--emanalhashmi-cream) 50%, var(--emanalhashmi-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 32px;
    letter-spacing: -2px;
}

/* ============================================
   Filters
   ============================================ */

.emanalhashmi-filters {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 60px;
}

.emanalhashmi-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: var(--emanalhashmi-gold);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.emanalhashmi-filter-toggle:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: rgba(212, 165, 116, 0.5);
}

.emanalhashmi-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    animation: slideIn 0.6s ease-out;
}

.emanalhashmi-filter-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(212, 165, 116, 0.3);
    background: rgba(212, 165, 116, 0.1);
    color: var(--emanalhashmi-gold);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.emanalhashmi-filter-btn:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: rgba(212, 165, 116, 0.5);
}

.emanalhashmi-filter-btn.active {
    background: var(--emanalhashmi-gold);
    color: var(--emanalhashmi-deep-black);
    border-color: var(--emanalhashmi-gold);
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
    transform: scale(1.05);
}

.emanalhashmi-results-info {
    color: var(--emanalhashmi-gray-400);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* ============================================
   Gallery Grid
   ============================================ */

.emanalhashmi-gallery {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

/* ============================================
   Card
   ============================================ */

.emanalhashmi-card {
    background: var(--emanalhashmi-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(212, 165, 116, 0.1);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.6s ease-out backwards;
}

.emanalhashmi-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(212, 165, 116, 0.3);
}

.emanalhashmi-card-image {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    overflow: hidden;
}

.emanalhashmi-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.emanalhashmi-card:hover .emanalhashmi-card-image img {
    transform: scale(1.1);
}

.emanalhashmi-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.emanalhashmi-card-badge-year {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(212, 165, 116, 0.95);
    color: var(--emanalhashmi-deep-black);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.emanalhashmi-card-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.emanalhashmi-click-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
}

.emanalhashmi-card:hover .emanalhashmi-click-hint {
    opacity: 1;
}

.emanalhashmi-click-hint div:first-child {
    font-size: 24px;
}

.emanalhashmi-click-hint div:last-child {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.emanalhashmi-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.emanalhashmi-card-issuer {
    font-size: 0.8rem;
    color: var(--emanalhashmi-gold);
    font-weight: 700;
    margin-bottom: 12px;
    margin: 0 0 12px 0;
}

.emanalhashmi-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--emanalhashmi-deep-black);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    margin: 0 0 12px 0;
}

.emanalhashmi-card:hover .emanalhashmi-card-title {
    color: var(--emanalhashmi-gold);
}

.emanalhashmi-card-description {
    font-size: 0.95rem;
    color: var(--emanalhashmi-gray-600);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.emanalhashmi-card-footer {
    height: 3px;
    background: linear-gradient(90deg, var(--emanalhashmi-gold), var(--emanalhashmi-dark-gold), var(--emanalhashmi-gold));
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right;
}

.emanalhashmi-card:hover .emanalhashmi-card-footer {
    transform: scaleX(1);
}

/* ============================================
   Empty State
   ============================================ */

.emanalhashmi-empty-state {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.emanalhashmi-empty-state h3 {
    color: var(--emanalhashmi-gray-400);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.emanalhashmi-empty-state p {
    color: var(--emanalhashmi-gray-400);
}

/* ============================================
   Modal
   ============================================ */

.emanalhashmi-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.emanalhashmi-modal.hidden {
    display: none !important;
}

.emanalhashmi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: black;
    opacity: 0.8;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.emanalhashmi-modal-content {
    position: relative;
    max-width: 1000px;
    width: 95%;
    background: var(--emanalhashmi-white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    z-index: 10000;
}

.emanalhashmi-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 48px;
    height: 48px;
    background: var(--emanalhashmi-gold);
    color: var(--emanalhashmi-deep-black);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.emanalhashmi-modal-close:hover {
    background: var(--emanalhashmi-dark-gold);
    transform: scale(1.1);
}

.emanalhashmi-modal-image-section {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    overflow: hidden;
}

.emanalhashmi-modal-image-container {
    position: relative;
    overflow: hidden;
    flex: 1;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emanalhashmi-modal-image-nav {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    justify-content: center;
}

.emanalhashmi-modal-body {
    flex: 0 0 45%;
    overflow-y: auto;
    padding: 32px;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.emanalhashmi-modal-section {
    margin-bottom: 32px;
}

.emanalhashmi-modal-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--emanalhashmi-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.emanalhashmi-modal-issuer {
    font-size: 28px;
    font-weight: bold;
    color: var(--emanalhashmi-deep-black);
    margin-bottom: 24px;
}

.emanalhashmi-modal-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--emanalhashmi-deep-black);
    line-height: 1.2;
    margin-bottom: 24px;
}

.emanalhashmi-modal-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--emanalhashmi-gold), var(--emanalhashmi-dark-gold), var(--emanalhashmi-gold));
    border-radius: 1px;
    margin-bottom: 24px;
}

.emanalhashmi-modal-description {
    font-size: 18px;
    color: var(--emanalhashmi-gray-600);
    line-height: 1.8;
    margin-bottom: 24px;
}

.emanalhashmi-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 2px solid var(--emanalhashmi-gray-300);
}

.emanalhashmi-modal-detail {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, transparent 100%);
    padding: 16px;
    border-radius: 12px;
}

.emanalhashmi-modal-detail-label {
    font-size: 11px;
    font-weight: bold;
    color: var(--emanalhashmi-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.emanalhashmi-modal-detail-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--emanalhashmi-deep-black);
}

.emanalhashmi-modal-buttons {
    border-top: 2px solid var(--emanalhashmi-gray-300);
    padding: 24px 32px;
    background: #f9fafb;
    display: flex;
    gap: 16px;
}

.emanalhashmi-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.emanalhashmi-modal-image-nav .emanalhashmi-modal-btn-close {
    background: #e5e7eb;
    color: #374151;
    min-width: 100px;
}

.emanalhashmi-modal-image-nav .emanalhashmi-modal-btn-close:hover {
    background: #d1d5db;
}

.emanalhashmi-modal-btn-prev,
.emanalhashmi-modal-btn-next {
    background: var(--emanalhashmi-gold);
    color: var(--emanalhashmi-deep-black);
    font-weight: 600;
    min-width: 110px;
}

.emanalhashmi-modal-btn-prev:hover,
.emanalhashmi-modal-btn-next:hover {
    background: var(--emanalhashmi-dark-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.emanalhashmi-modal-btn-prev:disabled,
.emanalhashmi-modal-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .emanalhashmi-certificates-wrapper {
        padding: 40px 15px;
    }

    .emanalhashmi-title {
        font-size: 2.5rem;
    }

    .emanalhashmi-gallery {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .emanalhashmi-filter-buttons {
        gap: 8px;
    }

    .emanalhashmi-filter-btn,
    .emanalhashmi-filter-toggle {
        font-size: 14px;
        padding: 8px 16px;
    }

    .emanalhashmi-modal-content {
        max-width: 95vw;
        width: 95vw;
        border-radius: 20px;
        flex-direction: column;
        max-height: 95vh;
    }

    .emanalhashmi-modal-image-section {
        flex: 0 0 auto;
        max-height: 45vh;
    }

    .emanalhashmi-modal-image-container {
        flex: 1;
        min-height: 300px;
    }

    .emanalhashmi-modal-body {
        padding: 24px;
        flex: 1;
    }

    .emanalhashmi-modal-title {
        font-size: 28px;
    }

    .emanalhashmi-modal-issuer {
        font-size: 20px;
    }

    .emanalhashmi-modal-grid {
        grid-template-columns: 1fr;
    }

    .emanalhashmi-modal-image-nav {
        padding: 16px;
        gap: 8px;
    }

    .emanalhashmi-modal-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .emanalhashmi-certificates-wrapper {
        padding: 30px 10px;
    }

    .emanalhashmi-title {
        font-size: 2rem;
    }

    .emanalhashmi-card-image {
        height: 220px;
    }

    .emanalhashmi-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .emanalhashmi-modal-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 16px;
        right: 16px;
    }

    .emanalhashmi-modal-body {
        padding: 16px;
        flex: 1;
    }

    .emanalhashmi-modal-image-nav {
        padding: 12px;
        gap: 6px;
    }

    .emanalhashmi-modal-btn {
        padding: 8px 10px;
        font-size: 11px;
        min-width: auto;
    }
}

/* RTL Adjustments */
.emanalhashmi-certificates-wrapper {
    direction: rtl;
    text-align: right;
}

.emanalhashmi-card-badge-year,
.emanalhashmi-modal-close {
    direction: ltr;
}

/* Print styles */
@media print {
    .emanalhashmi-filters,
    .emanalhashmi-modal {
        display: none !important;
    }
}
