/* ============================================
   Mesbar Educational Performance - Styles
   Light Theme with Purple/Gold Accents
   Cairo Font | Modern 2026 Design
   ============================================ */

/* ---- Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #FAFBFD;
    color: #1A1A2E;
}

::selection { background-color: #4B2D82; color: #D4A843; }

/* ---- Scrollbar — hidden ---- */
::-webkit-scrollbar { width: 0; height: 0; }
html { scrollbar-width: none; }

/* ---- Scroll Progress Bar ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    z-index: 99999;
    width: 0%;
    background: linear-gradient(to right, #4B2D82, #D4A843);
    transition: width 0.08s linear;
    pointer-events: none;
}

/* ============================================
   Navigation - Light by default
   ============================================ */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: #4B2D82;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: #D4A843;
    background-color: rgba(75, 45, 130, 0.04);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: width 0.3s ease;
    border-radius: 999px;
}

.nav-link:hover::after, .nav-link.active::after { width: 60%; }

/* Nav default (light/transparent) */
#main-nav {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#main-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Hero pages: nav starts transparent with white text */
#main-nav:not(.scrolled):not(.nav-solid) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}
#main-nav:not(.scrolled):not(.nav-solid) .nav-link:hover,
#main-nav:not(.scrolled):not(.nav-solid) .nav-link.active {
    color: #D4A843;
    background-color: rgba(255, 255, 255, 0.08);
}
#main-nav:not(.scrolled):not(.nav-solid) {
    background-color: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
#main-nav:not(.scrolled):not(.nav-solid) .nav-logo-img g {
    fill: white;
}
#main-nav:not(.scrolled):not(.nav-solid) .hamburger-line {
    background-color: white;
}

/* Solid nav pages (non-hero): dark hamburger */
.nav-solid .hamburger-line,
#main-nav.scrolled .hamburger-line {
    background-color: #4B2D82;
}

/* ---- Hamburger Lines ---- */
.hamburger-line {
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: #4B2D82;
    border-radius: 999px;
    transition: all 0.3s ease;
    right: 50%;
    transform: translateX(50%);
}

.menu-open .hamburger-line:nth-child(1) { top: 19px !important; transform: translateX(50%) rotate(45deg); }
.menu-open .hamburger-line:nth-child(2) { opacity: 0; transform: translateX(100%); }
.menu-open .hamburger-line:nth-child(3) { top: 19px !important; transform: translateX(50%) rotate(-45deg); }

/* ---- Mobile Navigation ---- */
.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link:hover { color: #D4A843; padding-right: 0.5rem; }

/* ---- Footer ---- */
.footer-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.footer-link:hover { color: #D4A843; transform: translateX(-4px); }

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}
.social-icon:hover {
    border-color: #D4A843;
    color: #D4A843;
    background-color: rgba(212, 168, 67, 0.1);
    transform: translateY(-2px);
}

/* ---- Scroll Top ---- */
#scroll-top.visible { opacity: 1; visibility: visible; }

/* ---- Page Loader ---- */
#page-loader.loaded { opacity: 0; pointer-events: none; display: none !important; }
#page-loader { transition: opacity 0.5s ease; }

/* ============================================
   Enhanced Animations (2026 Modern)
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}
@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(10px) rotate(-2deg); }
    66% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes dash-rotate { to { transform: rotate(360deg); } }
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0) translateX(-50%); opacity: 1; }
    50% { transform: translateY(12px) translateX(-50%); opacity: 0.5; }
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.4; filter: blur(40px); }
    50% { opacity: 0.7; filter: blur(60px); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes orbit {
    from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}
@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-float { animation: float 8s ease-in-out infinite; }
.animate-float-reverse { animation: float-reverse 10s ease-in-out infinite; }
.animate-pulse-slow { animation: pulse-slow 4s ease-in-out infinite; }
.animate-dash-rotate { animation: dash-rotate 30s linear infinite; }
.scroll-indicator { animation: scroll-bounce 2s ease-in-out infinite; }
.animate-glow { animation: glow-pulse 4s ease-in-out infinite; }
.animate-morph { animation: morph 8s ease-in-out infinite; }
.animate-orbit { animation: orbit 20s linear infinite; }
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* ============================================
   Glassmorphism & Modern Effects
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-dark {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(75, 45, 130, 0.06);
}
.glass-card-dark {
    background: rgba(75, 45, 130, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow effects */
.glow-purple {
    box-shadow: 0 0 30px rgba(75, 45, 130, 0.15), 0 0 60px rgba(75, 45, 130, 0.05);
}
.glow-gold {
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.15), 0 0 60px rgba(212, 168, 67, 0.05);
}

/* Animated background blobs */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: morph 15s ease-in-out infinite, float 20s ease-in-out infinite;
    pointer-events: none;
}
.bg-blob-purple { background: rgba(75, 45, 130, 0.2); }
.bg-blob-gold { background: rgba(212, 168, 67, 0.15); }
.bg-blob-blue { background: rgba(45, 90, 200, 0.1); }

/* Noise texture overlay */
.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Homepage sections — soft hero-matched gradient + animated tint (Services / Featured courses) */
.home-section-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.home-section-hero-bg__base {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        155deg,
        #f4f0fc 0%,
        #faf7ff 22%,
        #fdf9f3 52%,
        #f7f9fc 100%
    );
}
.home-section-hero-bg__tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(75, 45, 130, 0.14) 0%,
        rgba(26, 26, 46, 0.06) 38%,
        rgba(212, 168, 67, 0.11) 72%,
        rgba(75, 45, 130, 0.08) 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 14s ease infinite;
}
/* Slightly warmer gold emphasis for courses band */
.home-section-hero-bg__tint--courses {
    background: linear-gradient(
        125deg,
        rgba(212, 168, 67, 0.12) 0%,
        rgba(75, 45, 130, 0.12) 40%,
        rgba(26, 26, 46, 0.05) 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 17s ease infinite reverse;
}
.home-section-hero-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.home-section-hero-decor .bg-blob {
    opacity: 0.38;
}

/* Gradient border */
.gradient-border {
    position: relative;
    background-clip: padding-box;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #4B2D82, #D4A843, #4B2D82);
    z-index: -1;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

/* ---- Cards ---- */
.service-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0; left: 0;
    height: 3px;
    background: #D4A843;
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: right;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(75, 45, 130, 0.1);
    border-color: rgba(75, 45, 130, 0.08);
}
.service-card:hover::after { transform: scaleX(1); }

.value-card {
    position: relative;
    padding: 2rem;
    border-radius: 1.5rem;
    transition: all 0.4s ease;
    overflow: hidden;
}
.value-card:hover { transform: translateY(-4px); }

.course-card {
    border-radius: 1.5rem;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(75, 45, 130, 0.12);
}
.course-card .course-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.category-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: white;
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #4B2D82, #3A1F6B);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}
.category-card:hover::before { opacity: 1; }
.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(75, 45, 130, 0.15);
}
.category-card > * { position: relative; z-index: 2; }
.category-card:hover .cat-title,
.category-card:hover .cat-count,
.category-card:hover .cat-link { color: white !important; }
.category-card:hover .cat-icon { color: #D4A843 !important; }

/* ---- FAQ ---- */
.faq-item { border-radius: 1rem; overflow: hidden; transition: all 0.3s ease; }
.faq-item.active { box-shadow: 0 8px 30px rgba(75, 45, 130, 0.08); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-toggle svg { transition: transform 0.3s ease; }
.faq-item.active .faq-toggle svg { transform: rotate(45deg); }

/* ---- Form Inputs ---- */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 0.875rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}
.form-input:focus { border-color: #D4A843; box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.1); }
.form-input::placeholder { color: #9CA3AF; }
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.25rem;
    padding-left: 3rem;
}
textarea.form-input { resize: vertical; min-height: 140px; }

/* ---- Utilities ---- */
.counter-number { font-variant-numeric: tabular-nums; }
.gradient-text {
    background: linear-gradient(135deg, #D4A843, #F0B434);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-divider {
    width: 60px; height: 4px;
    background: linear-gradient(to left, #D4A843, #4B2D82);
    border-radius: 999px;
    margin: 0 auto;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #D4A843; color: white;
    padding: 0.875rem 2rem; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none; cursor: pointer; text-decoration: none;
    font-family: 'Cairo', sans-serif;
}
.btn-primary:hover {
    background: #E4C06A; transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 168, 67, 0.3);
}
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: transparent; color: white;
    padding: 0.875rem 2rem; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.9375rem;
    transition: all 0.3s ease;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer; text-decoration: none;
    font-family: 'Cairo', sans-serif;
}
.btn-outline:hover {
    border-color: #D4A843; color: #D4A843;
    background: rgba(212, 168, 67, 0.05);
}

/* ---- Breadcrumb ---- */
.breadcrumb a { color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: color 0.3s; }
.breadcrumb a:hover { color: #D4A843; }
.breadcrumb span { color: #D4A843; }

/* ---- Feature Cards ---- */
.feature-card {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.5rem; background: white; border-radius: 1rem;
    border-right: 4px solid #D4A843;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 30px rgba(75, 45, 130, 0.08);
}

/* ---- Testimonial ---- */
.testimonial-card {
    background: white; border-radius: 1.5rem; padding: 2rem;
    transition: all 0.4s ease; border: 1px solid rgba(0, 0, 0, 0.05);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(75, 45, 130, 0.08);
}

/* ---- Decorations ---- */
.decoration-ring { border: 2px dashed rgba(212, 168, 67, 0.2); border-radius: 50%; animation: dash-rotate 30s linear infinite; }
.decoration-dot { width: 6px; height: 6px; background: #D4A843; border-radius: 50%; opacity: 0.4; }

/* ---- Client Logos Carousel ---- */
@keyframes client-logos-slide {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.client-logos {
    overflow: hidden;
    padding: 16px 0;
    position: relative;
}

.client-logos::before,
.client-logos::after {
    position: absolute;
    top: 0;
    content: '';
    width: 180px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.client-logos::before {
    left: 0;
    background: linear-gradient(to right, var(--logo-fade, #ffffff), transparent);
}

.client-logos::after {
    right: 0;
    background: linear-gradient(to left, var(--logo-fade, #ffffff), transparent);
}

/* Flex wrapper so both tracks sit side-by-side on one horizontal line */
.client-logos-inner {
    display: flex;
    width: max-content;
}

.client-logos-row {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 60px;
    padding: 0 30px;
    animation: client-logos-slide 120s linear infinite;
}

.client-logos:hover .client-logos-row {
    animation-play-state: paused;
}

.client-logos-row img {
    display: block;
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider { position: relative; overflow: hidden; }
/* iOS Safari: background video needs explicit sizing + inline playback hints */
#heroVideoBg {
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-object-fit: cover;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img, .hero-slide .slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-dot.active {
    background: #D4A843;
    border-color: #D4A843;
    width: 32px;
    border-radius: 999px;
}

/* ============================================
   Popup / Modal
   ============================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.popup-overlay.active { opacity: 1; visibility: visible; }
.popup-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}
.popup-overlay.active .popup-content { transform: scale(1) translateY(0); }

/* Ad popup — two-column layout */
.popup-ad-content {
    max-width: 680px;
    display: flex;
    flex-direction: row-reverse; /* image on right in LTR, which is right side visually */
}
.popup-ad-image {
    position: relative;
    width: 45%;
    flex-shrink: 0;
    min-height: 420px;
    overflow: hidden;
    border-radius: 0 1.5rem 1.5rem 0;
}
.popup-ad-body {
    flex: 1;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 560px) {
    .popup-ad-content { flex-direction: column; }
    .popup-ad-image {
        width: 100%;
        min-height: 200px;
        border-radius: 1.5rem 1.5rem 0 0;
    }
    .popup-ad-body { padding: 1.5rem; }
}

/* ============================================
   Blog Cards
   ============================================ */
.blog-card {
    border-radius: 1.5rem;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(75, 45, 130, 0.1);
}
.blog-card .blog-thumb {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.blog-card .blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-thumb img { transform: scale(1.02); }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    color: #4B2D82;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    box-sizing: border-box;
}
.page-btn:hover, .page-btn.active {
    background: #4B2D82;
    color: white;
    border-color: #4B2D82;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-card {
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
}
.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(75, 45, 130, 0.12);
}
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-card:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.gallery-card:hover .gallery-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }

/* ============================================
   Course Filters
   ============================================ */
.font-cairo, .font-cairo input, .font-cairo textarea, .font-cairo select { font-family: 'Cairo', sans-serif; }
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1.5px solid rgba(75, 45, 130, 0.15);
    background: white;
    color: #4B2D82;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
    background: #4B2D82;
    color: white;
    border-color: #4B2D82;
    box-shadow: 0 4px 12px rgba(75, 45, 130, 0.2);
}

/* ---- Testimonials Ticker ---- */
@keyframes testimonials-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}
.testimonials-ticker {
    display: flex;
    width: max-content;
    animation: testimonials-scroll 30s linear infinite;
}
.testimonials-ticker:hover { animation-play-state: paused; }
.testimonials-ticker-group {
    display: flex;
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .service-card { padding: 1.5rem; }
    .hero-title { font-size: 2.5rem !important; line-height: 1.2 !important; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 2rem !important; }
    .nav-link { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
}

/* ---- Page Transition ---- */
main {
    opacity: 0;
    animation: fadeInPage 0.6s ease forwards;
    animation-delay: 0.3s;
}
@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Hover Glow ---- */
.glow-hover { position: relative; }
.glow-hover::before {
    content: '';
    position: absolute; inset: -2px;
    background: linear-gradient(135deg, #4B2D82, #D4A843);
    border-radius: inherit; opacity: 0;
    transition: opacity 0.3s ease; z-index: -1; filter: blur(8px);
}
.glow-hover:hover::before { opacity: 0.2; }

/* ---- Shimmer effect ---- */
.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}
