/* ==========================================================================
           1. VARIABLES & GLOBAL STYLES (Luxury Theme)
           ========================================================================== */
        :root {
            --text-dark: #0f172a;
            --text-light: #ffffff;
            --panel-bg: rgba(30, 41, 59, 0.85); 
            --border-color: rgba(255, 255, 255, 0.15);
            --accent-emerald: #0eb4a0;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Tajawal', 'Urbanist', sans-serif;
            color: var(--text-light);
            min-height: 100vh;
            overflow-x: hidden;
            background: linear-gradient(180deg,
                #e6fffb 0%,   
                #b2f5ea 25%,
                #4fd1c5 60%,
                #0eb4a0 85%,
                #007a74 100%  
            );
            background-attachment: fixed; 
        }

        .page-wrapper {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        /* ==========================================================================
           2. HEADER (الشريط الاحترافي الموحد الجديد المستبدل)
           ========================================================================== */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 45px;
            padding: 20px 40px;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 24px;
            backdrop-filter: blur(15px);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
        }

        .nav-logo {
            font-size: 1.3rem;
            font-weight: 900;
            color: #0f172a;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-logo i {
            color: var(--accent-emerald);
        }

        .nav-links {
            display: flex;
            gap: 25px;
            list-style: none;
        }

        .nav-links a {
            text-decoration: none;
            color: #475569;
            font-size: 1.05rem;
            font-weight: 700;
            transition: color 0.3s ease;
        }

        .nav-links a:hover, .nav-links a.active {
            color: var(--accent-emerald);
        }

        /* ==========================================================================
           3. PAGE TITLE
           ========================================================================== */
        .page-title-section {
            text-align: center;
            margin-bottom: 50px;
        }

        .page-title-section h1 {
            font-size: 3rem;
            font-weight: 900;
            color: #0f172a;
            text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
            margin-bottom: 10px;
        }

        .page-title-section p {
            font-size: 1.2rem;
            color: #1e293b;
            font-weight: 600;
        }

        /* ==========================================================================
           4. CERTIFICATES GALLERY GRID
           ========================================================================== */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
        }

        .certificate-card {
            background: var(--panel-bg);
            border: 2px solid var(--border-color);
            border-radius: 24px;
            padding: 20px;
            backdrop-filter: blur(20px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            cursor: pointer;
        }

        .image-container {
            width: 100%;
            height: 250px;
            border-radius: 16px;
            overflow: hidden;
            background: rgba(15, 23, 42, 0.4); 
            border: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .image-container img {
            width: 100%;
            height: 100%;
            object-fit: contain; 
            transition: transform 0.5s ease;
            padding: 8px;
        }

        .certificate-info {
            margin-top: 20px;
            text-align: center;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            padding-top: 15px;
        }

        .certificate-info h2 {
            font-size: 1.25rem;
            font-weight: 800;
            color: #ffffff;
            margin-bottom: 8px;
            transition: color 0.3s ease;
        }

        .certificate-info p {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.7);
            font-weight: 500;
        }

        /* تأثيرات التحويم على الكروت */
        .certificate-card:hover {
            transform: translateY(-10px);
            border-color: #0eb4a0;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
            background: rgba(15, 23, 42, 0.95);
        }

        .certificate-card:hover .image-container img {
            transform: scale(1.04);
        }

        .certificate-card:hover .certificate-info h2 {
            color: #b2f5ea;
        }

        /* ==========================================================================
           5. MAXIMUM ZOOM LIGHTBOX OVERLAY
           ========================================================================== */
        .lightbox-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(11, 19, 32, 0.97); 
            backdrop-filter: blur(20px);
            display: block; 
            overflow-y: auto; 
            z-index: 99999; 
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
            padding: 60px 20px; 
        }

        .lightbox-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .lightbox-content {
            width: 100%;
            max-width: 1200px; 
            margin: 0 auto;
            display: flex;
            justify-content: center;
            align-items: center;
            transform: scale(0.9);
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .lightbox-overlay.active .lightbox-content {
            transform: scale(1); 
        }

        .lightbox-content img {
            width: 100%;
            height: auto; 
            max-height: none; 
            border-radius: 20px;
            box-shadow: 0 35px 80px rgba(0,0,0,0.8);
            border: 3px solid rgba(255, 255, 255, 0.25);
            display: block;
            background-color: #1e293b;
        }

        .lightbox-close {
            position: fixed;
            top: 20px;
            left: 20px;
            background: #ffffff;
            color: #0f172a;
            border: none;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 25px rgba(0,0,0,0.5);
            transition: all 0.3s ease;
            z-index: 100000;
        }

        .lightbox-close:hover {
            background: #0eb4a0;
            color: white;
            transform: scale(1.1);
        }

        .lightbox-overlay::-webkit-scrollbar {
            width: 10px;
        }
        .lightbox-overlay::-webkit-scrollbar-thumb {
            background: var(--accent-emerald);
            border-radius: 10px;
        }

        /* ==========================================================================
           6. FOOTER
           ========================================================================== */
        footer {
            text-align: center;
            padding-top: 40px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            margin-top: 60px;
        }

        footer p {
            font-size: 0.95rem;
            color: #0f172a;
            font-weight: 700;
        }

        @media (max-width: 600px) {
            header { flex-direction: column !important; gap: 15px !important; padding: 15px 20px !important; border-radius: 20px !important; }
            .nav-links { gap: 15px !important; }
            .page-title-section h1 { font-size: 2.2rem !important; }
            .gallery-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
            .lightbox-close { top: 15px; left: 15px; width: 40px; height: 40px; font-size: 1.2rem; }
            .lightbox-overlay { padding: 80px 10px 40px 10px; }
        }
