
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Makes 1rem = 10px for easier math, scales with user zoom */
    font-size: 62.5%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    /* Base font size is 16px (1.6 * 10px) */
    font-size: 1.6rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    /* Use rem for scalable padding */
}

section {
    padding: 6rem 0;
    /* Use rem */
}

h1 {
    /* NEW: Fluid font size using vw, but clamped for control */
    font-size: clamp(2.8rem, 1.5rem + 3vw, 3.5rem);
    line-height: 1.2;
}

h2 {
    /* NEW: Fluid font size using vw, but clamped for control */
    font-size: clamp(2.4rem, 1.8rem + 2vw, 3.5rem);
    text-align: center;
    color: #0062E6;
    margin-bottom: 4rem;
    /* Use rem */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =======================
 2. SECTION 1: NAVBAR
 ======================== */
/* =======================
   UNIVERSAL NAVBAR CSS
======================== */

/* Variables required for the nav (Include these in your root if not already there) */

/* 1. The Outer Wrapper (Sticky positioning) */
.uni-nav-wrapper {
    background: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
    width: 100%;
}

/* 2. The Inner Box (Black background look) */
.uni-nav-bar-box {
    /* padding: 2vh 2rem; -> Adjusted for consistency */
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.8); /* As per your design */
    width: calc(100% - 4vw);
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 12px;
}

/* 3. Flex Container for Logo and Menu */
.uni-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 4. Logo Image */
.uni-nav-logo-img {
    height: 5vh;
    max-width: 100%;
    display: block;
}

/* 5. Navigation List (UL) */
.uni-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 6. List Items (LI) */
.uni-nav-item {
    margin-left: 2.5rem;
}

/* 7. Links (A) */
.uni-nav-link {
    text-decoration: none;
    color: white; /* Text is white because bg is black */
    font-weight: 600;
    font-size: 1.5rem; 
    padding-top: 1vh;
    transition: color 0.3s ease;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.uni-nav-link:hover {
    color: #0062E6;
}

/* Optional: Shadow when scrolled */
.uni-nav-wrapper.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* =======================
   RESPONSIVE STYLES (Mobile/Tablet)
======================== */
@media (max-width: 900px) {
    .uni-nav-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .uni-nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .uni-nav-item {
        margin-left: 0;
    }
    
    .uni-nav-logo-img {
        height: auto;
        max-height: 40px;
    }
}

/* =======================
 3. SECTION 2: HERO & SEARCH BAR
 ======================== */
#section2-hero {
    position: relative;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden; 
}

.hero-slider-css {
    position: absolute;
    top: 0;
    left: 0;
    width: 500%;
    height: 100%;
    display: flex;
    z-index: -2;
    animation: slideAndHoldFive 20s infinite ease-in-out;
}

.hero-slide {
    /*width: 20%;*/
    height: 100%;
    background-size: cover;
    background-position: center;
}

@keyframes slideAndHoldFive {
    0%, 15% {
        transform: translateX(0%);
    }
    20%, 35% {
        transform: translateX(-20%);
    }
    40%, 55% {
        transform: translateX(-40%);
    }
    60%, 75% {
        transform: translateX(-60%);
    }
    80%, 95% {
        transform: translateX(-80%);
    }
    100% {
        transform: translateX(0%);
    }
}


#section2-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: -1;
}

.hero-content {
    max-width: 700px;
    padding: 0 2rem;
}

#section2-hero h1 {
    /* Overrides the global h1 for this specific case */
    font-size: clamp(3rem, 2rem + 5vw, 4.5rem);
    margin-bottom: 1rem;
}

#section2-hero p {
    font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
    margin-bottom: 2.5rem;
}

.search-area {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    background: #ffffff;
}

.search-area-location {
    display: flex;
    max-width: 800px;
    margin: 30px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    background: #ffffff;
}

.search-area input[type="search"] {
    flex: 1;
    border: none;
    padding: 1.5rem 2rem;
    /* Use rem */
    font-size: 1.6rem;
    /* Use rem */
    outline: none;
    color: #333333;
    min-width: 100px;
    /* Prevents ugly shrinking */
}

.search-area-location input[type="search"] {
    flex: 1;
    border: none;
    padding: 1.5rem 2rem;
    /* Use rem */
    font-size: 1.6rem;
    /* Use rem */
    outline: none;
    color: #333333;
    min-width: 100px;
    /* Prevents ugly shrinking */
}

.search-area button {
    border: none;
    background: #FF9900;
    color: #ffffff;
    padding: 0 2.5rem;
    /* Use rem */
    font-size: 1.6rem;
    /* Use rem */
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Use rem */
}

.search-area-location button {
    border: none;
    background: #FF9900;
    color: #ffffff;
    padding: 0 2.5rem;
    /* Use rem */
    font-size: 1.6rem;
    /* Use rem */
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Use rem */
}

.search-area button:hover {
    background: #e68a00;
}

.search-area-location button:hover {
    background: #e68a00;
}

/* =======================
 4. SECTION 3 & 5: TOP COLLEGES / TOP COURSES
 ======================== */
#section3-top-colleges,
#section5-top-courses {
    background: #f7f9fc;
}

/* NEW: Fully responsive grid. 
   This one class can replace BOTH of your old grid classes */
.card-grid-large {
    display: grid;
    /* This is the magic! Creates a responsive grid automatically. */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(2rem, 1rem + 2vw, 3rem);
    /* Use vw for gap */
}

/* Keep .card-grid-large-college if you want different min-widths */
.card-grid-large-college {
    display: grid;
    grid-auto-flow: column;
    /* This is the magic! Lays out items horizontally */
    grid-auto-columns: 32rem;
    /* Sets a fixed width for each card (320px) */
    gap: 2rem;
    /* Space between cards */
    overflow-x: auto;
    /* Enables horizontal scrolling */
    scroll-snap-type: x mandatory;
    /* Makes the scroll "snap" to cards */
    padding: 1rem;
    /* Adds some space inside the scroll area */

    /* Hides the ugly scrollbar for a cleaner look */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hides scrollbar for Chrome, Safari and Opera */
.card-grid-large-college::-webkit-scrollbar {
    display: none;
}


/* ADD this new rule right below the one you just replaced.
  It tells the cards how to behave inside the new slider.
*/
.card-grid-large-college>.college-card {
    scroll-snap-align: start;
    /* Snaps the start of the card to the start of the view */
}


/* This existing .college-card rule is still 100% correct.
  No changes are needed here.
*/
.college-card {
    background: #ffffff;
    border-radius: 8px;
    /* ...all other styles are correct... */
}

.college-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.college-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.college-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.college-card .card-body {
    padding: 2rem;
    /* Use rem */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.college-card h3 {
    font-size: 1.8rem;
    /* Use rem */
    color: #0062E6;
    margin-bottom: 0.5rem;
}

.college-card .location {
    font-size: 1.4rem;
    /* Use rem */
    color: #666;
    margin-bottom: 1rem;
}

.college-card .card-details p {
    font-size: 1.5rem;
    /* Use rem */
    margin-bottom: 0.5rem;
}

.college-card .card-link {
    display: inline-block;
    text-decoration: none;
    color: #0062E6;
    font-weight: 600;
    margin-top: auto;
    padding-top: 1rem;
    font-size: 1.5rem;
    /* Use rem */
}

.college-card .card-link:hover {
    text-decoration: underline;
}

/* =======================
 5. SECTION 4: BROWSE STREAMS & COURSES
 ======================== */
#section4-browse {
    background: #ffffff;
}

/* NEW: Responsive grid for small cards */
.card-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

/* NEW: Responsive grid for streams */
.streams-card-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}

/* NEW: Responsive grid for cities */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
}

.browse-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    /* Use rem */
    text-decoration: none;
    color: #333333;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* Use rem */
    font-size: 1.5rem;
    /* Use rem */
    min-height: 100px;
    /* Ensures cards have same height */
}

.browse-card:hover {
    background: #0062E6;
    color: #ffffff;
    transform: translateY(-5px);
}

.browse-card i {
    font-size: 2.2rem;
    /* Use rem */
    color: #FF9900;
    transition: color 0.3s ease;
}

.browse-card:hover i {
    color: #ffffff;
}

.city-grid .browse-card {
    padding: 1.5rem 1rem;
    /* Tweak padding for cities */
    font-size: 1.4rem;
    /* Use rem */
    min-height: initial;
    /* Cities don't need a min-height */
}


#section4-browse .sub-heading {
    font-size: 2.2rem;
    /* Use rem */
    margin-top: 4rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* =======================
 6. SECTION 5: TOP COURSES
 ======================== */
/* This section re-uses .card-grid-large and .college-card */


/* =======================
 7. SECTION 6: NEAR YOU (REDESIGNED)
 ======================== */
#section6-near-you {
    position: relative;
    height: auto;
    /* Let content define height */
    min-height: 60vh;
    /* vh is good for a minimum */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    padding: 6rem 0;
    /* Add padding for content */
}

.near-you-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/location-bg.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.content-overlay {
    position: relative;
    z-index: 1;
}

.near-you-card {
    background: rgb(255, 255, 255, 0.4);
    padding: 3rem;
    /* Use rem */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* NEW: Use vw for width but capped */
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    color: #333333;
}

.near-you-card h2 {
    font-size: 2.5rem;
    /* Use rem */
    color: #0062E6;
    margin-bottom: 1.5rem;
}

.near-you-card p {
    font-size: 1.6rem;
    /* Use rem */
    margin-bottom: 2rem;
}

.near-you-card .search-area {
    box-shadow: none;
}

.near-you-card .search-area button {
    background: #0062E6;
}

.near-you-card .search-area button:hover {
    background: #004a80;
}

.near-you-card .sub-heading {
    font-size: 2rem;
    margin-top: 3rem;
}

.near-you-card .search-area-location {
    box-shadow: none;
}

.near-you-card .search-area-location button {
    background: #0062E6;
}

.near-you-card .search-area-location button:hover {
    background: #004a80;
}

/* =======================
 8. FOOTER
 ======================== */
footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 3rem 0;
    /* Use rem */
    font-size: 1.4rem;
}

/* =======================
 9. RESPONSIVE STYLES
 ======================== */

/* NEW: Media query for tablet-sized menu */
@media (max-width: 900px) {
    #section1-navbar .container {
        flex-direction: column;
        gap: 1.5rem;
    }

    #section1-navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    #section1-navbar li {
        margin-left: 0;
    }
}


@media (max-width: 768px) {
    /* Reset html font-size for smaller screens if needed, 
       but 62.5% is usually fine */

    .container {
        padding: 0 1.5rem;
    }

    #section2-hero {
        height: 60vh;
        min-height: 350px;
    }

    .search-area {
        flex-direction: column;
        border-radius: 8px;
    }

    .search-area input[type="search"] {
        border-bottom: 1px solid #ddd;
        text-align: center;
    }

    .search-area button {
        justify-content: center;
        padding: 1.5rem;
        /* Use rem */
    }

    .search-area-location {
        flex-direction: column;
        border-radius: 8px;
    }

    .search-area-location input[type="search"] {
        border-bottom: 1px solid #ddd;
        text-align: center;
    }

    .search-area-location button {
        justify-content: center;
        padding: 1.5rem;
        /* Use rem */
    }

    /* NOTE: We no longer need grid styles here! 
       auto-fit and minmax() already handled it.
    */

    .browse-card {
        padding: 1.5rem;
        /* Use rem */
        font-size: 1.4rem;
        /* Use rem */
    }

    .near-you-card {
        width: 90vw;
        padding: 2rem;
    }


}