/* =========================================
   1. CSS VARIABLES & ROOT
   ========================================= */
:root {
    --primary: #0a4228;
    --primary-dark: #072d1b;
    --primary-light: #0d5a36;
    --secondary: #c08e46;
    --secondary-light: #d4a868;
    --secondary-dark: #9a7238;
    --white: #ffffff;
    --light: #f9f7f2;
    --light-2: #e8e4d9;
    --dark: #1a1a1a;
    --gray: #6b7280;
    --gray-light: #d1d5db;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 35px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Cairo', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, ol { list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Typography */
h1, h2, h3, h4, h5, h6, .section-title, .page-header h1 {
    font-family: 'Amiri', serif;
    font-weight: 700;
    line-height: 1.3;
}
.text-center { text-align: center; }

/* =========================================
   3. UTILITIES & LAYOUT
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 90px 0; }
.bg-light { background: var(--light-2); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.6rem; color: var(--primary); margin-bottom: 12px; position: relative; display: inline-block; }
.section-title::after {
    content: ''; position: absolute; bottom: -8px; right: 50%; transform: translateX(50%);
    width: 70px; height: 3px; background: var(--secondary); border-radius: 2px;
}
.section-subtitle { color: var(--gray); font-size: 1.15rem; max-width: 650px; margin: 0 auto; }

/* =========================================
   4. BUTTONS
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600;
    transition: var(--transition); font-size: 1rem; white-space: nowrap;
}
.btn-primary { background: var(--secondary); color: var(--white); border: 2px solid var(--secondary); }
.btn-primary:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: var(--white); transform: translateY(-3px); }

.btn-outline-light { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--primary); transform: translateY(-3px); }

.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-link { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.btn-link:hover { color: var(--secondary); gap: 12px; }

/* =========================================
   5. NAVBAR
   ========================================= */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 18px 0; transition: var(--transition); background: transparent;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm); padding: 12px 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

/* Logo Fix - Final & Guaranteed */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 42px; width: auto; max-width: 110px; object-fit: contain; transition: var(--transition); }
.navbar.scrolled .logo-img { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

.nav-menu { display: flex; gap: 28px; align-items: center; }
.nav-link { color: var(--white); font-weight: 600; position: relative; padding: 6px 0; font-size: 1.05rem; }
.navbar.scrolled .nav-link { color: var(--dark); }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 2px;
    background: var(--secondary); transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-buttons { flex-shrink: 0; }
.hamburger { display: none; flex-direction: column; gap: 6px; z-index: 1001; padding: 5px; }
.hamburger span { width: 26px; height: 3px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.navbar.scrolled .hamburger span { background: var(--dark); }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white); overflow: hidden; padding-top: 100px;
}
.hero-bg-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(192,142,70,0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.04) 0%, transparent 35%);
    z-index: 1;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero-title { font-size: 3.4rem; line-height: 1.25; margin-bottom: 22px; }
.hero-title .highlight { color: var(--secondary); display: block; }
.hero-subtitle { font-size: 1.25rem; opacity: 0.92; margin-bottom: 35px; max-width: 520px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats { display: flex; gap: 35px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.15); }
.hero-stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--secondary); line-height: 1; }
.stat-label { font-size: 0.95rem; opacity: 0.85; margin-top: 4px; }

.hero-image { text-align: center; }
.hero-image-wrapper {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); border: 3px solid rgba(192,142,70,0.4);
    transform: perspective(1000px) rotateY(-5deg); transition: var(--transition);
}
.hero-image-wrapper:hover { transform: perspective(1000px) rotateY(0deg) scale(1.02); }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 3; line-height: 0; }
.hero-wave svg { display: block; width: 100%; height: auto; }

/* =========================================
   7. FEATURES & CARDS
   ========================================= */
.features-grid, .programs-grid, .testimonials-slider, .blog-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.feature-card, .program-card, .testimonial-card, .blog-card {
    background: var(--white); padding: 35px 30px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card:hover, .program-card:hover, .testimonial-card:hover, .blog-card:hover {
    transform: translateY(-8px); box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 75px; height: 75px; background: linear-gradient(135deg, var(--light) 0%, var(--light-2) 100%);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px; font-size: 2rem; color: var(--primary); transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--secondary); color: var(--white); transform: scale(1.1) rotate(5deg); }
.feature-card h3, .program-card h3, .blog-card h3 { font-size: 1.4rem; margin-bottom: 12px; color: var(--primary); }
.feature-card p, .program-card p, .blog-card p { color: var(--gray); font-size: 1rem; line-height: 1.7; }

/* Program Cards Special */
.program-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.program-image {
    height: 170px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: var(--secondary);
}
.program-card .content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.program-card p { flex-grow: 1; }
.program-card .btn-link { margin-top: 15px; }

/* =========================================
   8. LEVEL TEST CTA
   ========================================= */
.level-test { background: var(--primary-dark); position: relative; overflow: hidden; }
.test-box {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    border-radius: var(--radius-lg); padding: 60px 40px; text-align: center;
    position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.test-box::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 400px; height: 400px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.test-content { position: relative; z-index: 2; }
.test-content h2 { color: var(--white); font-size: 2.4rem; margin-bottom: 15px; }
.test-content p { color: rgba(255,255,255,0.9); font-size: 1.15rem; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* =========================================
   9. TESTIMONIALS & BLOG
   ========================================= */
.testimonial-card { border-right: 4px solid var(--secondary); }
.testimonial-card::before {
    content: '"'; position: absolute; top: 15px; right: 20px; font-size: 5rem;
    color: var(--secondary); opacity: 0.15; font-family: serif; line-height: 1;
}
.testimonial-text { font-size: 1.1rem; color: var(--gray); margin-bottom: 25px; font-style: italic; line-height: 1.8; }
.testimonial-author { display: flex; align-items: center; gap: 15px; }
.author-avatar {
    width: 55px; height: 55px; background: var(--light-2); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.3rem;
}
.author-info h4 { color: var(--primary); margin-bottom: 2px; font-size: 1.1rem; }
.author-info span { color: var(--gray); font-size: 0.9rem; }

.blog-card { padding: 0; }
.blog-image { height: 180px; background: var(--light-2); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--secondary); }
.blog-content { padding: 25px; }

/* =========================================
   10. FOOTER
   ========================================= */
.footer { background: var(--primary-dark); color: var(--white); padding: 80px 0 25px; position: relative; }
.footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--secondary-light) 50%, var(--secondary) 100%);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
.footer-logo p { opacity: 0.85; margin-bottom: 25px; line-height: 1.8; max-width: 300px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
    width: 42px; height: 42px; background: rgba(255,255,255,0.08); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: var(--transition); font-size: 1.1rem;
}
.social-links a:hover { background: var(--secondary); color: var(--white); transform: translateY(-4px) rotate(5deg); }

.footer h4 { font-size: 1.3rem; margin-bottom: 25px; color: var(--secondary); position: relative; padding-bottom: 12px; }
.footer h4::after {
    content: ''; position: absolute; bottom: 0; right: 0; width: 45px; height: 2px; background: var(--secondary);
}
.footer ul li { margin-bottom: 14px; }
.footer ul a, .footer ul span { opacity: 0.85; transition: var(--transition); display: inline-block; }
.footer ul a:hover { opacity: 1; color: var(--secondary); transform: translateX(-5px); }
.contact-info li { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.contact-info i { color: var(--secondary); width: 24px; font-size: 1.1rem; }

.footer-bottom {
    text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.08);
    opacity: 0.7; font-size: 0.95rem;
}

/* =========================================
   11. FLOATING ELEMENTS
   ========================================= */
.whatsapp-float {
    position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px;
    background: #25D366; color: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2.1rem;
    box-shadow: 0 6px 20px rgba(37,211,102,0.4); z-index: 999; transition: var(--transition);
    animation: wa-pulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.12) rotate(10deg); background: #128C7E; }
@keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.scroll-top {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    background: var(--secondary); color: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    box-shadow: var(--shadow-md); z-index: 999; opacity: 0; visibility: hidden;
    transform: translateY(20px); transition: var(--transition);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary); transform: translateY(-4px); }

/* =========================================
   12. PAGE HEADERS & FORMS
   ========================================= */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white); padding: 150px 0 70px; text-align: center; position: relative; overflow: hidden;
}
.page-header::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(192,142,70,0.15) 0%, transparent 50%);
}
.page-header h1 { font-size: 3.2rem; position: relative; margin-bottom: 12px; }
.page-header p { font-size: 1.25rem; opacity: 0.9; position: relative; }

.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary); }
.form-control {
    width: 100%; padding: 15px 18px; border: 2px solid var(--gray-light); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 1rem; transition: var(--transition); background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(192,142,70,0.15); }
textarea.form-control { resize: vertical; min-height: 130px; }

/* =========================================
   13. AOS ANIMATIONS & UTILITIES
   ========================================= */
[data-aos] { transition-timing-function: ease-out !important; }
.fade-up { transform: translateY(30px); opacity: 0; transition: all 0.8s ease; }
.fade-up.visible { transform: translateY(0); opacity: 1; }

/* =========================================
   14. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-subtitle { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image { max-width: 500px; margin: 0 auto; }
    .hero-image-wrapper { transform: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { font-size: 15px; }
    .section-title { font-size: 2.1rem; }
    .hero-title { font-size: 2.4rem; }
    .section-padding { padding: 70px 0; }
    
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 85%; max-width: 320px; height: 100vh;
        background: var(--white); flex-direction: column; padding: 100px 30px 40px;
        gap: 24px; transition: var(--transition); box-shadow: -5px 0 30px rgba(0,0,0,0.2); z-index: 999;
    }
    .nav-menu.active { right: 0; }
    .nav-link { color: var(--dark); font-size: 1.25rem; width: 100%; text-align: right; padding: 10px 0; border-bottom: 1px solid var(--light-2); }
    .nav-buttons { display: none; }
    .hamburger { display: flex; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
    
    .features-grid, .programs-grid, .testimonials-slider, .blog-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer h4::after { right: 50%; transform: translateX(50%); }
    .social-links { justify-content: center; }
    .contact-info li { justify-content: center; }
    .footer-logo p { margin: 0 auto 20px; }
    
    .whatsapp-float { width: 55px; height: 55px; font-size: 1.8rem; bottom: 25px; left: 25px; }
    .scroll-top { width: 45px; height: 45px; font-size: 1.2rem; bottom: 25px; right: 25px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.9rem; }
    .hero-stats { flex-direction: column; gap: 15px; align-items: center; }
    .btn-lg { padding: 14px 24px; font-size: 1rem; width: 100%; }
    .hero-buttons { flex-direction: column; }
    .logo-img { height: 36px; max-width: 95px; }
    .test-box { padding: 40px 25px; }
    .test-content h2 { font-size: 1.8rem; }
}

/* Print Styles */
@media print {
    .navbar, .whatsapp-float, .scroll-top, .hero-wave, .cta, .footer { display: none !important; }
    body { background: #fff; color: #000; }
    .hero { min-height: auto; padding: 20px 0; background: #fff; color: #000; }
    .hero-title, .section-title { color: #000; }
}