@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1B4332; /* Deep Emerald */
    --primary-light: #2D6A4F;
    --secondary-color: #D4AF37; /* Gold */
    --accent-color: #BC9A2C;
    --text-dark: #1F2937;
    --text-light: #F9FAFB;
    --background-cream: #FDFBF7;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-cream);
    direction: rtl; /* Arabic support */
    overflow-x: hidden;
}

h1, h2, h3, h4, .arabic-font {
    font-family: 'Amiri', serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
/* Header & Nav */
header {
    background: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 2px solid transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-bottom: 2px solid var(--secondary-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

@media (max-width: 768px) {
    nav {
        height: 60px; /* Reduced further */
    }
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white); /* White in transparent mode */
    transition: var(--transition);
}

header.scrolled .logo {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
}

header.scrolled .nav-links a {
    color: var(--text-dark);
}

.nav-links a:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(27, 67, 50, 0.85), rgba(27, 67, 50, 0.7)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.about-img img {
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 5px solid transparent;
}

.course-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--secondary-color);
}

.course-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: block;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Facebook Float */
.facebook-float {
    position: fixed;
    bottom: 115px; /* Positioned above WhatsApp */
    right: 40px;
    background-color: #1877F2;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.2);
    z-index: 1000;
}

@media (max-width: 768px) {
    .whatsapp-float, .facebook-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        right: 20px;
    }
    .whatsapp-float { bottom: 20px; }
    .facebook-float { bottom: 80px; }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
    text-align: center;
}

.footer-content {
    margin-bottom: 40px;
}

.copy {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Improvements */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }

    section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }

    /* Hamburger Menu Button */
    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: var(--transition);
        background-color: var(--white); /* White in transparent mode */
    }

    header.scrolled .menu-toggle .bar {
        background-color: var(--primary-color);
    }

    .logo {
        font-size: 0.95rem; /* Smaller to fit on one line */
        line-height: 1;
        max-width: none;
        white-space: nowrap; /* Forced one line */
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 60px; /* Matching new header height */
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        padding: 50px 0;
        gap: 25px;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    #mobile-menu.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #mobile-menu.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Content adjustments */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .about-text .section-title {
        text-align: center !important;
        margin-bottom: 30px;
    }

    .about-img img {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        border-radius: 12px;
        border: none;
        box-shadow: var(--shadow);
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        background-attachment: scroll; /* Fixed bg sometimes looks laggy on mobile */
        padding-top: 60px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        text-align: center;
    }
}
