/* ============================================================
   GLOBAL CSS — Ahlul Bayt Quran Academy
   Shared styles for header, footer, nav, and common components
   ============================================================ */

/* ── Local Fonts ── */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/InterVariable-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Amiri';
    src: url('../fonts/Amiri-Regular-subset.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ── Sticky Nav — explicit rules so injected nav sticks on ALL devices ── */
#global-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    /* overflow must stay visible so desktop dropdown menus can escape */
    overflow: visible;
}

#global-header nav {
    position: relative;
    background: #ffffff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    width: 100%;
    overflow: visible;
}

/* Mobile menu — drops below the sticky nav */
#mobile-menu {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background: #ffffff;
    z-index: 9998;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-top: 2px solid #16a34a;
}


:root {
    --primary-green: #1a5d1a;
    --secondary-gold: #d4af37;
    --neutral-cream: #fefbf6;
    --dark-text: #2d3748;
    --light-text: #718096;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: clip;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--neutral-cream);
    width: 100%;
    max-width: 100vw;
}

.hero-bg {
    background: linear-gradient(135deg, rgba(26, 93, 26, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
}

.islamic-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.1'%3E%3Cpath d='M30 30c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zm0 0c0 11.046 8.954 20 20 20s20-8.954 20-20-8.954-20-20-20-20 8.954-20 20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-card {
    min-height: 200px;
}

.faq-item {
    transition: all 0.3s ease;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.active {
    max-height: 500px;
}

/* Nav Link */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}



/* Scroll To Top */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Testimonial Carousel */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    flex: 0 0 100%;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .testimonial-slide {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .testimonial-slide {
        flex: 0 0 33.333%;
    }
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #1a5d1a;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Course Dropdown */
.courses-dropdown {
    position: relative;
}

.courses-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.courses-dropdown:hover .courses-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.courses-dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.courses-dropdown-content a:hover {
    background-color: #f7fafc;
    color: #1a5d1a;
}

.courses-dropdown-content a:last-child {
    border-bottom: none;
}

/* Mobile Courses Dropdown */
.mobile-courses-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-courses-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-courses-dropdown.active {
    max-height: 500px;
}

.mobile-courses-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-courses-dropdown a:hover {
    background-color: #f7fafc;
    border-left-color: #1a5d1a;
    color: #1a5d1a;
}

/* Mobile About Dropdown */
.mobile-about-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-about-dropdown.active {
    max-height: 300px;
}

.mobile-about-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-about-dropdown a:hover {
    background-color: #f7fafc;
    border-left-color: #1a5d1a;
    color: #1a5d1a;
}

/* Mobile Teacher Dropdown */
.mobile-teacher-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-teacher-dropdown.active {
    max-height: 300px;
}

.mobile-teacher-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-teacher-dropdown a:hover {
    background-color: #f7fafc;
    border-left-color: #1a5d1a;
    color: #1a5d1a;
}

/* Mobile Blogs Dropdown */
.mobile-blogs-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-blogs-dropdown.active {
    max-height: 400px;
}

.mobile-blogs-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.mobile-blogs-dropdown a:hover {
    background-color: #f7fafc;
    border-left-color: #1a5d1a;
    color: #1a5d1a;
}
