/* ============================================================
   MASTER HEADER CONTAINER
   ============================================================ */
#MainHeader {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    transition: all 0.3s ease-in-out;
    font-family: 'Montserrat', sans-serif;
     overflow: visible !important;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    background: #b01e4a;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-menu {
    display: flex !important;
    list-style: none !important;
    gap: 25px;
}

.top-menu li {
    position: relative;
}

.top-menu li a {
    color: #fff;
    font-size: 15px;
    text-decoration: none;
}

/* DROPDOWN */
.top-menu .drop-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff !important; /* Ensure solid white background */
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    list-style: none !important;  /* REMOVES BULLETS */
    padding: 10px 0 !important;   /* Adds spacing inside the box */
    margin: 0 !important;
    z-index: 2000;
}

.top-menu .has-drop:hover > .drop-menu {
    display: block !important;
}
/* Ensure the links inside the dropdown are visible */
.top-menu .drop-menu li {
    width: 100%;
    list-style: none !important;
}

.top-menu .drop-menu li a {
    color: #b01e4a !important;   /* Change text color to dark red/pink */
    padding: 10px 20px !important;
    display: block !important;
    font-size: 14px !important;
    text-align: left !important;
}

/* Hover effect for sub-items */
.top-menu .drop-menu li a:hover {
    background-color: #f8f8f8 !important;
}

.top-menu .has-drop:hover > .drop-menu {
    display: block !important;
}
/* ============================================================
   INSTITUTION HEADER
   ============================================================ */
.institution-header {
    background: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* MAIN LAYOUT */
.institution-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* KEY */
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* LOGO */
.college-logo {
    width: 120px;
    height: 120px;
}

/* TEXT BLOCK */
.header-titles {
    flex: 1;
    margin-left: 15px;

    display: flex;
    flex-direction: column;
    align-items: flex-start; /* LOCK LEFT EDGE */
}

/* ================= TITLE FIX ================= */

/* H1 FIXED */
.title-big {
    font-size: 24px;
    font-weight: 800;
    color: #1f3c88;

    margin: 0;
    padding: 0;

    text-indent: 0;
    margin-inline-start: 0;
}

/* OTHER LINES */
.title-normal {
    font-size: 20px;
    font-weight: 600;
    color: #b01e4a;
    margin: 0;
}

.title-small {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* FORCE SAME START POINT */
.header-titles > * {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

/* ============================================================
   YEARS TEXT (EXTREME RIGHT)
   ============================================================ */
.years-box {
    flex-shrink: 0;
    text-align: right;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* NUMBER */
.years {
    font-size: 26px;
    font-weight: 600;
    font-family: "French Script MT", "Brush Script MT", cursive;
    color: #1f3c88;
    line-height: 1;
}

/* TEXT */
.years-text {
    font-size: 11px;
    color: #666;
}

/* ============================================================
   MENU BAR
   ============================================================ */
.menubar-wrapper {
    background: #2b57e5;
    width: 100%;
}

/* ============================================================
   SCROLL EFFECT
   ============================================================ 
body {
    padding-top: 175px;
}

body.scrolled .top-bar,
body.scrolled .institution-header {
    display: none !important;
}

body.scrolled {
    padding-top: 50px;
}
*/
/* ============================================================
   UPDATED RESPONSIVE SECTION
   ============================================================ */
@media (max-width: 768px) {
    /* 1. Reset Top Bar Visibility */
    .top-bar {
        min-height: 30px;
        display: block !important;
        position: relative !important; /* Ensures it stays inside the flow of the header */
        z-index: 1001 !important;
        padding: 5px 0 !important;
        background: #b01e4a !important;
    }

    .top-menu {
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .top-menu li {
        position: relative !important;
    }
    .top-menu li a {
        font-size: 9px !important; /* Very small to fit one line */
        white-space: nowrap;
    }
    /* FIX DROPDOWN VISIBILITY */
    .top-menu .drop-menu {
    position: absolute !important;   /* 👈 key fix */
    top: 100% !important;         /* adjust below top bar */
    right: 0px !important;
    left: auto !important;
    
    max-height: none !important;             /* 👈 prevents cut */
    overflow-y: visible !important;             /* 👈 scroll if more items */

    z-index: 9999 !important;
    background: #fff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    border-radius: 6px;
}
    .top-menu .has-drop:hover>.drop-menu{
        display: block !important;
    }
    .top-bar .container{
        padding: 0 10px !important;
        margin: 0 !important;
    }

    /* 2. Main Header Container */
    .institution-header {
        position: relative !important;
        padding: 10px 0 !important;
    }

    .institution-header .container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    /* 3. The Logo - Circle Fix */
    .college-logo {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important; /* Prevents squishing */
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        object-fit: cover !important;
    }

    /* 4. The Titles - Stop the Overlap */
    .header-titles {
        flex: 1 !important;
        margin: 0 5px !important;
        min-width: 0 !important;
        /*text-align: center !important;*/
    }

    .title-big {
    font-size: 10px !important;   /* Clean & readable */
    font-weight: 700;
    white-space: nowrap !important; /* Keep single line like PC */
    overflow: hidden;              /* Prevent overflow */
    text-overflow: ellipsis;       /* Show ... if needed */
    letter-spacing: 0.3px;
    width: 90%;
}
    /* Adjust sub-titles to match */
    .title-normal {
        font-size: 9px !important;
        white-space: nowrap !important;
    }
    .title-small {
        font-size: 7px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    /* 5. Excellence Badge */
    .excellence-badge, .years-box {
        width: 55px !important;
        height: 55px !important;
        min-width: 55px !important;
        flex-shrink: 0 !important;
    }

    /* 6. CRITICAL: The Body Push */
    /* This must be large enough to hold: 
       Top Bar (~30px) + Institution Header (~80px) + Menubar (~40px) */
    body {
        padding-top: 0px !important; 
    }
}
/*=======================================
/* 🔥 ON SCROLL EFFECT */
body.scrolled .top-bar {
    display: none;
}

/* Shrink header */
body.scrolled .institution-header {
    padding: 5px 0;
}

/* Reduce logo size */
body.scrolled .college-logo {
    width: 50px;
    height: 50px;
}

/* Show only main title */
body.scrolled .title-normal,
body.scrolled .title-small {
    display: none;
}

/* Keep only main name */
body.scrolled .title-big {
    font-size: 16px;
}

/* Make menubar compact */
body.scrolled .menubar-wrapper {
    padding: 5px 0;
}