/* RESET & VARIABLES */
:root {
    --primary-blue: #0A192F;
    --accent-yellow: #FFD700;
    --text-dark: #333;
    --white: #ffffff;
    --gray: #f4f4f4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; line-height: 1.6; color: var(--text-dark); }
html { scroll-behavior: smooth; }

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* LOGO & SLOGAN LAYOUT */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 70px; /* Slightly smaller to balance with 2 lines of text */
    border-radius: 50%;
    border: 2px solid #eee;
}

.logo-text-group {
    display: flex;
    flex-direction: column; /* Stacks name and slogan */
    justify-content: center;
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.slogan {
    font-size: 0.75rem; /* Small and elegant */
    color: #666;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* MOBILE ADJUSTMENT */
@media (max-width: 768px) {
    .slogan {
        display: none; /* Hide slogan on phones to save space */
    }
    .brand-name {
        font-size: 1.2rem;
    }
    .logo img {
        height: 50px;
    }
}

.nav-links { list-style: none; display: flex; align-items: center; }
.nav-links li { margin-left: 2rem; }
.nav-links a { text-decoration: none; color: var(--primary-blue); font-weight: 600; font-size: 1rem; transition: color 0.3s; }
.nav-links a:hover { color: #555; }

.btn-nav {
    background-color: var(--primary-blue);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

/* HAMBURGER ICON (Hidden on Desktop) */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--primary-blue); }

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('images/hero-bg.jpg'); /* We will add a background image later */
    background-color: var(--primary-blue);
    background-size: cover;
    background-position: center;
    color: var(--white);
    min-height: 90vh; /* Better for mobile than height: 80vh */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; color: var(--accent-yellow); line-height: 1.2; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 2rem auto; }

.btn-primary { background-color: var(--accent-yellow); color: var(--primary-blue); padding: 1rem 2rem; text-decoration: none; font-weight: bold; border-radius: 5px; border: none; cursor: pointer; display: inline-block; transition: transform 0.2s; }
.btn-secondary { background-color: transparent; color: var(--white); border: 2px solid var(--white); padding: 1rem 2rem; text-decoration: none; font-weight: bold; border-radius: 5px; margin-left: 10px; display: inline-block; }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-3px); }

/* SECTIONS */
.section { padding: 5rem 5%; }
.bg-light { background-color: var(--gray); }
.section-title { text-align: center; font-size: 2.5rem; color: var(--primary-blue); margin-bottom: 3rem; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
/* TEACHER GAO PHOTO */
.about-image img {
    width: 100%;             /* Fills the container width */
    max-width: 400px;        /* Stops it from getting too huge on big screens */
    border-radius: 15px;     /* Nice rounded corners */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* A professional shadow pop */
    display: block;
    margin: 0 auto;          /* Centers the image */
    object-fit: cover;       /* Ensures the face isn't stretched */
}
.highlight { color: var(--primary-blue); font-weight: 700; margin-bottom: 1rem; }
.values-list { list-style: none; margin-top: 1rem; }
.values-list li { margin-bottom: 0.5rem; }

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-top: 5px solid var(--accent-yellow); transition: transform 0.3s; }
.service-card:hover { transform: translateY(-5px); }
.badge { background: var(--primary-blue); color: var(--white); padding: 2px 8px; font-size: 0.8rem; border-radius: 4px; margin-left: 10px; vertical-align: middle;}
.price { font-size: 1.2rem; font-weight: bold; color: var(--primary-blue); margin: 10px 0; }
.service-card ul li { margin-bottom: 8px; }
.service-card ul li::before { content: "•"; color: var(--accent-yellow); font-weight: bold; display: inline-block; width: 1em; }

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 4rem;
    align-items: start; /* CRITICAL: This pulls the form UP to the top */
    margin-top: 2rem;
}
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 5px; font-family: inherit; }
/* CENTER THE BUTTON */
.contact-form button {
    width: auto; /* Lets the button be its natural size */
    min-width: 200px; /* Ensures it's not too small */
    display: block;
    margin: 1rem auto 0 auto; /* Centers the button in the middle of the form */
}

/* CENTER THE FORM HEADING */
.contact-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* FOOTER */
footer { background: var(--primary-blue); color: var(--white); text-align: center; padding: 2rem; margin-top: auto; }

/* =========================================
   MOBILE RESPONSIVENESS (MEDIA QUERIES)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar Mobile Styles */
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px; /* Below the navbar */
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding-bottom: 2rem;
    }

    .nav-links.active { left: 0; }
    .nav-links li { margin: 1.5rem 0; }

    /* Hero Mobile Adjustments */
    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { display: flex; flex-direction: column; gap: 10px; }
    .btn-secondary { margin-left: 0; }

    /* Grid Stacking for Mobile */
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    /* Order Change: Put Image on top of text in About section on mobile */
    .about-image { order: -1; }

    .section { padding: 3rem 5%; }
}

/* REVIEW SLIDER ANIMATION */
.slider {
    height: 350px;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slider::before, .slider::after {
    background: linear-gradient(to right, white 0%, rgba(255,255,255,0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 100px; /* Fades the edges so it looks professional */
    z-index: 2;
}

.slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}

.slider::before {
    left: 0;
    top: 0;
}

.slide-track {
    animation: scroll 40s linear infinite; /* Adjust speed here (40s is nice and slow) */
    display: flex;
    width: calc(350px * 10); /* Width of slide x Number of slides */
}

.slide {
    height: 300px;
    width: 350px; /* Width of each card */
    padding: 15px;
}

.review-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #eee;
}

.review-card p {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.review-card h4 {
    color: var(--primary-blue);
    font-weight: 700;
    margin-top: auto; /* Pushes name to bottom */
}

.stars {
    color: var(--accent-yellow);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* THE ANIMATION KEYFRAMES */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-350px * 5)); } /* Moves half the total width */
}

/* PAUSE ON HOVER (Optional - nice for reading) */
.slide-track:hover {
    animation-play-state: paused;
}

/* MOBILE ADJUSTMENT */
@media (max-width: 768px) {
    .slider::before, .slider::after {
        width: 50px; /* Smaller fade on phone */
    }
}

/* ABOUT SECTION STYLES */
.lead-text {
    text-align: center;
    font-size: 1.3rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.value-item h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

/* PACKAGES GRID */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.package-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.package-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-yellow);
}

.pkg-header h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.pkg-header span {
    display: block;
    color: #666;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.pkg-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: #555;
    flex-grow: 1; /* Makes all cards align buttons at the bottom */
}

.package-card ul {
    list-style: none;
    margin-bottom: 2rem;
}

.package-card ul li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.package-card ul li::before {
    content: "✓";
    color: var(--accent-yellow);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Popular Card Styles */
.popular {
    border: 2px solid var(--primary-blue);
    transform: scale(1.02);
}

.badge-pop {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Button Styles for Cards */
.btn-outline {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

.full-width {
    display: block;
    text-align: center;
    width: 100%;
}

/* Special Homeschool Card */
.special {
    background: #fffbf0; /* Slight yellow tint */
    border: 1px solid var(--accent-yellow);
}

/* FAQ SECTION STYLES */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-item summary {
    padding: 1.2rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-blue);
    list-style: none; /* Hides default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    transition: background 0.3s;
}

.faq-item summary:hover {
    background-color: #f9f9f9;
}

/* Custom "Plus" Icon for the question */
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-yellow);
    font-weight: bold;
    transition: transform 0.3s;
}

/* Rotate icon when open */
.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.2rem 1.2rem 1.2rem;
    color: #555;
    line-height: 1.6;
    border-top: 1px solid #f0f0f0;
    margin-top: 0;
}

/* CURRICULUM TRUST BAR */
.trust-bar {
    background-color: #ffffff;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.trust-bar p {
    color: #666;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; /* Space between the logos */
    flex-wrap: wrap;
}

.logo-row img {
    height: 60px; /* Sets the height */
    width: auto;
    object-fit: contain;
    /* Optional: Makes them grey until hover. Delete these 3 lines if you want color always. */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-row img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .logo-row {
        gap: 20px;
    }
    .logo-row img {
        height: 45px;
    }
}

/* CONTACT SECTION LOGO */
.contact-logo {
    height: 100px; /* Nice visible size */
    margin-bottom: 1.5rem; /* Space between logo and text */
    border-radius: 50%; /* Circle shape */
    border: 4px solid #f4f4f4; /* Subtle border to make it pop */
    display: block; /* Ensures it sits on its own line */
}

/* CONTACT BADGES - PERFECTLY CENTERED */
.contact-badges {
    width: fit-content;  /* Shrinks the box to fit the content exactly */
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;  /* Centers the text inside the box */
}

.contact-badges p {
    font-size: 0.8rem;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.contact-badges .logo-row {
    justify-content: center; /* Centers images inside the box */
    gap: 15px;
}

.contact-badges img {
    height: 45px;
    opacity: 0.8;
}

/* Make sure the logos fit nicely in the contact column */
.contact-info .logo-row img {
    height: 50px; /* Slightly smaller to fit the column */
    margin-right: 15px; /* Space between them */
}

/* ACTIVE LINK HIGHLIGHTING */
.nav-links a.active {
    color: var(--primary-blue) !important; /* Forces it to turn blue */
    font-weight: 700;
    position: relative;
}

/* Optional: Adds a little yellow dot under the active link */
.nav-links a.active::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--accent-yellow);
    border-radius: 50%;
    margin: 3px auto 0; /* Centers the dot */
}

/* Prevent the Contact Button from changing weirdly */
.nav-links a.btn-primary.active {
    color: white !important; /* Keep text white */
    background: var(--accent-yellow); /* Change button color when active */
    border-color: var(--accent-yellow);
}

/* MOBILE TWEAK: Smaller, cleaner slogan */
@media screen and (max-width: 768px) {
    .logo .slogan {
        display: block !important;
        font-size: 0.55rem;       /* Much smaller (approx 9px) */
        line-height: 1.1;         /* Tighter line spacing */
        margin-top: 3px;
        font-weight: 400;         /* Normal weight (not bold) makes it look cleaner */
        color: #666;              /* Slightly softer grey helps hierarchy */
        max-width: 160px;         /* Keeps it from hitting the menu button */
    }

    .logo-text-group {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .navbar {
        padding: 0.5rem 1rem;     /* Reduces the fat padding around the bar */
        min-height: 60px; 
    }
}

/* TABLET FIXES (iPad View) */
@media screen and (max-width: 1024px) {
    
    /* 1. Fix the Squashed Navbar Button */
    .nav-links {
        gap: 15px; /* Brings links closer together to save space */
    }
    
    .nav-links a {
        font-size: 0.9rem; /* Slightly smaller text */
    }

    .btn-nav {
        padding: 0.6rem 1.2rem;
        white-space: nowrap; /* CRITICAL: Forces "Contact Us" to stay on one line */
        min-width: auto;
    }

    /* 2. Fix the "Messy" About Grid */
    .values-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Switch to 2 columns (2x2 grid) */
        gap: 2rem;
    }
    
    /* Center the items if they aren't already */
    .value-item {
        text-align: center;
        padding: 1rem;
    }
    
    /* 3. Fix the "About Company" text width */
    .about-company {
        width: 100%;
        margin-bottom: 3rem;
    }
}

/* --- TABLET / iPAD ONLY (Between Phone and Desktop) --- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    
    /* 1. Navbar Fixes for iPad */
    .nav-links { gap: 15px; }
    .nav-links a { font-size: 0.9rem; }
    .btn-nav { white-space: nowrap; }

    /* 2. About Section Fixes */
    .values-grid { 
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2x2 Grid */
        gap: 2rem; 
    }
    .about-company { width: 100%; margin-bottom: 3rem; }

    /* 3. Packages Grid (2x2 Box) */
    .packages-grid {
        display: grid;
        grid-template-columns: 1fr 1fr !important; /* Forces 2 columns on Tablet */
        gap: 20px;
    }

    /* Reset the "Popular" card styling for tablet */
    .package-card.popular {
        transform: none !important;
    }
}