/* --- 1. MODERN RESET & VARIABLES --- */
:root {
    /* Brand Colors */
    --brand-teal: #004e5e;
    --brand-teal-light: #0a6c80;
    --brand-teal-dark: #003a47;
    --brand-gold: #d4af37;
    --brand-gold-hover: #b89628;

    /* Neutral Colors */
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --bg-light-accent: #eef2f5;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-heading: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Recommend adding Google Font link in HTML */
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Animation Speeds */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-teal);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* --- 2. UTILITY CLASSES --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--brand-gold);
}

.text-teal {
    color: var(--brand-teal);
}

.section-padding {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-light-accent);
}

.bg-white {
    background-color: var(--bg-white);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    /* Slightly more rounded */
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 0.5rem;
}

.btn-gold {
    background: var(--brand-gold);
    color: var(--brand-teal-dark);
    border: 2px solid var(--brand-gold);
}

.btn-gold:hover {
    background: var(--brand-gold-hover);
    border-color: var(--brand-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: var(--bg-white);
}

.btn-outline:hover {
    border-color: var(--bg-white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-teal {
    background: var(--brand-teal);
    color: var(--bg-white);
    border: 2px solid var(--brand-teal);
}

.btn-teal:hover {
    background: var(--brand-teal-light);
    border-color: var(--brand-teal-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 78, 94, 0.3);
}

/* --- 3. ANIMATIONS --- */
/* Base state for animated elements */
[class*="animate-"] {
    opacity: 0;
    /* transition: opacity 0.6s ease-out, transform 0.6s ease-out; */
    /* Option: use transitions instead of keyframes? Keyframes give more control over bounce/curve */
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trigger animations when in-view */
.animate-fade-in.in-view {
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-scale-in.in-view {
    animation: scaleIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-left.in-view {
    animation: slideInLeft 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-right.in-view {
    animation: slideInRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-up.in-view {
    animation: slideInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}


/* --- 4. HEADER & NAVIGATION --- */
header {
    background: var(--bg-white);
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 5%;
}

.logo-container img {
    height: 65px;
    width: auto;
    transition: transform var(--transition-normal);
}

.logo-container:hover img {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a.nav-link {
    color: var(--brand-teal);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

nav a.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--brand-gold);
    transition: width var(--transition-normal);
}

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

.btn-nav {
    background: var(--brand-gold);
    color: var(--brand-teal-dark);
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.btn-nav:hover {
    background: var(--brand-gold-hover);
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--brand-teal);
    cursor: pointer;
}

/* --- 5. HERO SECTIONS --- */
.hero {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, var(--brand-teal) 0%, #002b36 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--bg-white);
    padding: 4rem 0;
}

/* Abstract background shape */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Page Headers (e.g., Subjects, Tuition) */
.page-header {
    margin-top: var(--header-height);
    background: var(--brand-teal);
    padding: 6rem 0 4rem;
    text-align: center;
    color: var(--bg-white);
}

.page-header h1 {
    font-size: 3rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto;
}

/* --- 6. TRUST BAR --- */
.trust-bar {
    background: var(--bg-white);
    padding: 2.5rem 0;
    margin-top: -3rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border-bottom: 4px solid var(--brand-gold);
}

.trust-item {
    text-align: center;
}

.trust-item h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--brand-teal);
}

.trust-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* --- 7. CARDS & GRIDS --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

/* Subject Cards */
.subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.subject-card img {
    height: 165px;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-normal);
}

.subject-card:hover img {
    transform: scale(1.1);
}

/* Pricing Cards */
.pricing-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card.highlight {
    border: 2px solid var(--brand-gold);
    transform: scale(1.02);
}

.pricing-card.highlight:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--brand-gold);
    color: var(--brand-teal-dark);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--brand-teal);
    margin: 1.5rem 0;
}

.price-tag span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.feature-list {
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-main);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand-gold);
    font-weight: bold;
}

/* --- 8. STEP CARDS --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--brand-teal);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* --- 9. SUBJECT DETAIL SECTIONS --- */
.subject-detail {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.subject-detail:last-child {
    border-bottom: none;
}

.subject-detail.reverse {
    flex-direction: row-reverse;
}

.subject-info {
    flex: 1;
}

.subject-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.subject-img img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 80%;
}

.problem-box {
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #c53030;
}

/* --- 10. FORMS --- */
.form-container {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-teal);
}

/* --- 11. FOOTER --- */
footer {
    background: var(--brand-teal-dark);
    color: var(--bg-white);
    padding: 4rem 0 2rem;
    text-align: center;
}

footer img {
    height: 120px;
    margin: 0 auto 1.5rem;
    opacity: 0.9;
}

footer h3 {
    color: var(--brand-gold);
    margin-bottom: 0.5rem;
}

footer p {
    color: rgba(255, 255, 255, 0.6);
}

/* Social Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--brand-gold);
    color: var(--brand-teal-dark);
    transform: translateY(-3px);
}

/* --- 12. RESPONSIVE --- */
@media (max-width: 900px) {
    :root {
        --header-height: 70px;
    }

    .hamburger {
        display: block;
    }

    /* Mobile Header Logo Adjustment */
    .logo-container img {
        height: 50px;
        /* Scale down proportionally for mobile headers */
    }

    /* Fix: Remove nav from flex flow so Space-Between works for Logo and Hamburger */
    nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        width: 100vw;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: var(--bg-white);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        align-items: stretch;
        width: 100%;
    }

    nav.active ul {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-text h1 {
        font-size: 2.75rem;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .btn-row {
        justify-content: center;
    }

    .subject-detail,
    .subject-detail.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        border-bottom: 2px solid var(--border-color);
        /* Add border on mobile for clarity */
        padding-bottom: 3rem;
        margin-bottom: 3rem;
    }

    .subject-img {
        order: -1;
    }

    .feature-list {
        text-align: left;
        display: inline-block;
    }

    .trust-bar {
        border-radius: 0;
        margin-top: 0;
        gap: 2rem;
        flex-direction: column;
    }
}