/* Design System & Variables */
:root {
    --primary-color: #08068b;
    --primary-light: #1a17c2;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-lg: 16px;
    --radius-md: 8px;
    --transition: all 0.3s ease;
    --container-width: 1100px;
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 20px;
    width: 100%;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.highlight {
    color: var(--text-color);
    font-weight: 400;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Hero */
.hero {
    height: calc(100vh - 80px);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('hero_math_academy.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 35px;
    color: var(--text-color);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
    /* Fix: prevents all cards from stretching to the tallest one's height */
}

.course-card {
    background: var(--bg-white);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.course-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.course-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Accordion */
.accordion {
    margin-top: auto;
}

.accordion-header {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    padding-top: 15px;
}

.accordion-item.active ion-icon {
    transform: rotate(180deg);
}

.accordion-content ul {
    padding-left: 5px;
}

.accordion-content li {
    font-size: 0.85rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.accordion-content li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.class-item ion-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.class-item h3 {
    margin-bottom: 15px;
}

/* Map */
.map-container {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    padding: 10px;
}

.team-card {
    min-width: calc(25% - 15px);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
}

.team-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #e0e0e0;
}

.team-card h4 {
    margin-top: 15px;
    color: var(--primary-color);
}

.team-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

@media (max-width: 991px) {
    .team-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 576px) {
    .team-card {
        min-width: 100%;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social ion-icon {
    font-size: 2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .hero-text h1 {
        font-size: 2.8rem;
    }

    .classes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: block;
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        transition: var(--transition);
        padding: 40px 20px;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .section {
        padding: 60px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}