/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #FFC107;
    --primary-dark: #FFA000;
    --secondary-color: #1976D2;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-heading: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}

.header.sticky {
    box-shadow: var(--shadow-hover);
}

.header-content {
    /* Use flexible padding instead of fixed left margin so header centers on small screens */
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.logo {
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: var(--spacing-xs) 0;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--secondary-color);
    outline: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-shrink: 0;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    outline: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--bg-light);
    outline: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 1001;
    margin-left: 0;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    /* Responsive hero height: scales with viewport but caps to comfortable max */
    /* increased hero height */
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem) 0;
    overflow: visible !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: heroSlide 18s infinite ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    /* Black overlay */
    z-index: 0;
    /* sit above background but behind content */
}

/* Slideshow Animation */
@keyframes heroSlide {
    0% {
        background-image: url('assets/bg-image/scl1.webp');
    }

    33% {
        background-image: url('assets/bg-image/scl5.jpg');
    }

    66% {
        background-image: url('assets/bg-image/scl2.jfif');
    }

    100% {
        background-image: url('assets/bg-image/scl4.avif');
    }
}

#globalLoader {
    /* loader is hidden by default; toggled visible by JS when needed */
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: white;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--bg-white);
    max-width: 800px;
    padding: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out;
    margin: 0 auto;
    align-self: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.hero-image {
    max-width: 150px;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}


.search-tabs .tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    padding: 10px 10px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    /* ★ MUST */
}

.search-tabs .tab.active {
    color: #ffffff;
    font-weight: 700;
}

.search-tabs .tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    /* ★ Change this from -4px */
    width: 100%;
    height: 1.5px;
    background: #ffffff;
    border-radius: 4px;
}


/* Search input box inside the blue hero search */
.school-search-box {
    background: linear-gradient(180deg, #02102c 100%);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    color: #fff;
}

.search-input-box {
    display: flex;
    width: 100%;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 10px;
}

.search-input-box input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border: none;
    outline: none;
    color: var(--text-dark);
}

.search-red-btn {
    background: #e63946;
    color: #fff;
    padding: 0 1rem;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-red-btn:hover {
    background: #c92632;
}

.search-tabs {
    display: flex;
    gap: 1rem;
    position: relative;
}

/* make hero search compact on small screens */
@media (max-width: 768px) {
    .school-search-box {
        padding: 0.9rem;
    }

    .search-tabs {
        gap: 0.6rem;
    }

    .search-input-box input {
        padding: 0.6rem 0.8rem;
    }
}

/* Board block - matches location-select styling */
.board-select {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
    height: 48px;
    padding: 0 12px;
    min-width: 180px;
    flex: 0 0 200px;
}

.board-icon {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

/* Remove native arrow and style select */
.board-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 6px 8px;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.search-wrapper {
    display: flex;
    background-color: var(--bg-white);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--shadow-hover);
    max-width: 700px;
    margin: 0 auto;
}

.search-icon {
    color: var(--text-light);
    padding: 0.75rem 1rem;
    align-self: center;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-dark);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background-color: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: var(--font-body);
}

.search-btn:hover,
.search-btn:focus {
    background-color: var(--primary-dark);
    transform: scale(1.05);
    outline: none;
}

.search-bar-form {
    width: 100%;
}

.search-bar-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

/* Location block */
.location-select {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
    height: 48px;
    padding: 0 12px;
    min-width: 200px;
    flex: 0 0 220px;
}

.location-select .location-icon {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

/* Remove native arrow and style select */
.location-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 6px 8px;
    width: 100%;
    outline: none;
    cursor: pointer;
}

/* Search block */
.search-section {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
    height: 48px;
    padding: 0 12px;
    flex: 1 1 auto;
    min-width: 250px;
    max-width: 500px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.search-section:focus-within {
    border-color: var(--primary-color);
}

/* left search icon inside input */
.search-left-icon {
    color: var(--text-light);
    font-size: 18px;
    flex-shrink: 0;
    padding: 0 8px;
    margin-right: 4px;
}

/* KEEP your existing ID `searchInput` - style applied here */
#searchInput {
    border: none;
    outline: none;
    font-size: 0.95rem;
    padding: 8px 6px;
    background: transparent;
    width: 100%;
    min-width: 150px;
    flex: 1;
    font-family: var(--font-body);
    color: var(--text-dark);
}

#searchInput:focus,
.search-btn:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .search-bar-inner {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .location-select,
    .board-select,
    .search-section {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
    }

    .search-btn {
        height: 44px;
        padding: 10px 16px;
        border-radius: 10px;
        margin-right: 0;
    }

    .search-section {
        padding: 0 10px;
    }
}

/* Small tweak for very small screens */
@media (max-width: 480px) {

    .location-select,
    .board-select {
        padding: 0 10px;
    }

    .search-left-icon,
    .location-select .location-icon,
    .board-select .board-icon {
        font-size: 15px;
    }

    #searchInput {
        font-size: 0.95rem;
    }
}

/* ============================================
   CITIES SECTION
   ============================================ */
.cities-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-light);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--text-dark);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.city-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.city-card:hover,
.city-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.10);
    outline: none;
}

.city-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.city-info {
    padding: 1rem;
    text-align: center;
}

.city-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.city-link {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-top: var(--spacing-xs);
}

.footer-logo {
    height: clamp(32px, 3.5vh, 48px);
    width: auto;
    display: block;
}

.site-logo {
    height: clamp(36px, 4.5vh, 56px);
    width: auto;
    display: block;
}

.city-link:hover,
.city-link:focus {
    text-decoration: underline;
    outline: none;
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-light);
    min-height: 400px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.results-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* Premium card refinements for dynamically-generated cards inside #schoolsGrid */
#schoolsGrid>div,
#schoolsGrid .group,
#schoolsGrid .school-card,
#schoolsGrid .bg-white.rounded-lg,
#schoolsGrid .bg-white.rounded-2xl {
    border-radius: 14px !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08) !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background-clip: padding-box;
}

#schoolsGrid>div:hover,
#schoolsGrid .group:hover,
#schoolsGrid .school-card:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12) !important;
}

/* Ensure header images cover and are responsive */
#schoolsGrid img,
#schoolsGrid .relative img,
.city-card .city-image,
.school-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
}

/* Fix card content spacing and ensure footer button sticks to bottom */
#schoolsGrid .p-5,
#schoolsGrid .p-6,
#schoolsGrid .school-info,
#schoolsGrid .card-content {
    padding: 1rem !important;
}

/* Keep long text from breaking layout */
.truncate-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Facilities icons uniform size */
#schoolsGrid .w-6.h-6,
#schoolsGrid .w-6.h-6 i,
#schoolsGrid .flex-shrink-0 i {
    width: 20px;
    height: 20px;
    font-size: 12px;
}

/* City cards: premium look */
.city-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}

.city-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.10);
}

.city-image {
    height: 160px;
    object-fit: cover;
}

.city-info {
    padding: 1rem;
}

/* Make hero height responsive */
@media (max-width: 1200px) {
    .hero {
        /* larger hero on large tablets / small laptops */
        min-height: 80vh;
    }
}

@media (max-width: 768px) {
    .hero {
        /* increased for tablets */
        min-height: 70vh;
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* Small screens: tighter card paddings and readable text */
@media (max-width: 480px) {

    #schoolsGrid>div,
    #schoolsGrid .school-card,
    .city-card {
        border-radius: 10px !important;
        box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06) !important;
    }

    .hero {
        /* increased for small screens */
        min-height: 50vh;
    }
}

/* Override any inline left-margin used in dynamic placeholders so cards stay centered */
#schoolsGrid .w-full.h-40 {
    margin-left: 0 !important;
}

/* Ensure text inside dynamic gradient placeholders scales on small screens */
#schoolsGrid .w-full.h-40 {
    padding: 0.75rem;
}

#schoolsGrid .w-full.h-40,
#schoolsGrid .w-full.h-40>* {
    white-space: normal;
    word-break: break-word;
}

.school-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.school-card:hover,
.school-card:focus-within {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.school-image {
    width: 100%;
    /* Use aspect-ratio so images scale responsively without hard-coded heights */
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.school-info {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.school-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-xs);
}

.school-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.school-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.school-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: var(--spacing-xs) 0;
    line-height: 1.5;
    flex: 1;
}

.school-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    margin: var(--spacing-xs) 0;
}

.school-location i {
    color: var(--secondary-color);
}

.school-btn {
    margin-top: var(--spacing-sm);
    padding: 0.625rem 1rem;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

.school-btn:hover,
.school-btn:focus {
    background-color: #1565C0;
    transform: translateY(-2px);
    outline: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--bg-white);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-section a:hover,
.footer-section a:focus {
    opacity: 1;
    color: var(--primary-color);
    outline: none;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        -webkit-align-items: center; /* Safari fix */
        justify-content: center;
        margin: 0; /* Reset any margins */
        height: 44px; /* Fixed height for touch target */
        width: 44px;
        padding: 0; /* Remove padding to use flex centering */
    }

    .header-content {
        display: flex;
        align-items: center;
        -webkit-align-items: center; /* Safari fix */
        justify-content: space-between;
        flex-wrap: nowrap; /* Prevent wrapping on mobile */
        height: 70px; /* Consistent height matching nav offset */
        padding: 0 var(--spacing-sm); /* Remove vertical padding */
    }
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow);
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-list.active {
        transform: translateX(0);
    }

    .header-actions {
        gap: var(--spacing-xs);
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .search-wrapper {
        flex-direction: column;
        border-radius: 8px;
        padding: var(--spacing-sm);
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 4px;
    }

    .cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--spacing-sm);
    }

    .schools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .header-content {
        padding: var(--spacing-xs) 0;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .header-actions {
        display: none;
    }

    .hero {
        /* increased for mobile devices */
        min-height: 55vh;
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .schools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip to main content link (hidden by default, visible on focus) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: var(--bg-white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   ABOUT US PAGE STYLES
   ============================================ */

/* About Hero */
.about-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bg-white);
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.about-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: aboutHeroSlide 24s infinite ease-in-out;
    z-index: -2;
}

@keyframes aboutHeroSlide {

    /* using available / verified images; duplicates used as fallbacks */
    0% {
        background-image: url('assets/about-hero/bul-2.jfif');
    }

    33% {
        background-image: url('assets/about-hero/bul-2.jfif');
    }

    66% {
        background-image: url('assets/about-hero/bul-2.jfif');
    }

    100% {
        background-image: url('assets/about-hero/bul-2.jfif');
    }
}

.about-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.about-hero-content {
    max-width: 800px;
    padding: var(--spacing-md);
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 10;
}

.about-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.about-title .highlight {
    color: var(--primary-color);
}

.about-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Mission Section */
.mission-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-white);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.mission-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.icon-box {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto var(--spacing-md);
    transition: var(--transition);
}

.mission-card:hover .icon-box {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: rotateY(360deg);
}

.mission-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.mission-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Stats Section */
.stats-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    margin: var(--spacing-xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    text-align: center;
}

.stat-item {
    padding: var(--spacing-md);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Story Section */
.story-section {
    padding: var(--spacing-xl) 0;
}

.story-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.story-text {
    flex: 1;
    min-width: 300px;
}

.story-text h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.story-text h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.story-text p {
    margin-bottom: var(--spacing-md);
    font-size: 1.05rem;
    color: var(--text-light);
}

.story-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.story-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
}

.story-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    z-index: -1;
}

/* Team Section */
.team-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.team-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.member-img {
    height: 250px;
    overflow: hidden;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-card:hover .member-img img {
    transform: scale(1.1);
}

.member-info {
    padding: var(--spacing-md);
}

.member-info h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.member-info span {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

.social-links a {
    width: 35px;
    height: 35px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--bg-white);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .about-title {
        font-size: 2.5rem;
    }

    .story-content {
        flex-direction: column;
    }

    .story-image::before {
        display: none;
    }
}

/* Select2 overrides to match site styles (48px height, rounded corners) */
.select2-container--default .select2-selection--single {
    height: 48px;
    border-radius: 10px;
    background: var(--bg-white);
    border: none;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
    padding: 6px 10px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 16px !important;
    color: var(--text-dark);
    font-family: var(--font-body);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 8px;
}

/* ensure dropdown width behaves well inside flex */
.select2-container {
    width: 100% !important;
}

/* Make sure the original select is visually hidden when Select2 is active
   (Select2 will handle the visible UI) */
.location-select select {
    display: block;
    /* keep it available for forms; Select2 hides it visually */
}

/* Small responsive tweak for Select2 on mobile */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        height: 48px;
        border-radius: 10px;
    }
}

/* Anti-gravity floating animation */
@keyframes float-modal {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float-modal {
    animation: float-modal 6s ease-in-out infinite;
}

/* ============================================
   NEW SECTIONS STYLES
   ============================================ */

/* Hide Scrollbar */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Swiper Custom Buttons */
.swiper-button-prev-custom.swiper-button-disabled,
.swiper-button-next-custom.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* FAQ Transition */
.faq-content {
    transition: all 0.3s ease-in-out;
}

/* Board Card Snap */
.snap-x {
    scroll-snap-type: x mandatory;
}


.snap-center {
    scroll-snap-align: center;
}

/* ============================================
   AI CHAT WIDGET STYLES
   ============================================ */
.ai-chat-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;
    transition: all 0.3s ease;
    animation: floatChat 3s ease-in-out infinite;
}

.ai-chat-float:hover {
    transform: scale(1.1);
}

@keyframes floatChat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.hidden { display: none !important; }

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-chat-header {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.ai-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9fafb;
}

.ai-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.user-msg {
    align-self: flex-end;
    max-width: 80%;
}

.ai-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.msg-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ai-msg .msg-bubble {
    background: white;
    color: #374151;
    border-top-left-radius: 2px;
}

.user-msg .msg-bubble {
    background: #4f46e5;
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-chat-footer {
    padding: 10px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

#aiChatInput {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

#aiChatInput:focus {
    border-color: #4f46e5;
}

#aiChatSend {
    width: 40px;
    height: 40px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

#aiChatSend:hover {
    background: #4338ca;
    transform: scale(1.05);
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
/* Custom Scrollbar for Compare List */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
