/* ================================================= */
/* GLOBAL BODY OFFSET (FIXED HEADER STACK)           */
/* ================================================= */
body {
    padding-top: 120px;
    /* 40px highlight + ~80px navbar */
}

body.menu-open {
    overflow: hidden;
}

/*favs icons for social medias*/
/* Social media icons */
.d-flex a {
    color: #fff;
    /* white icons */
    font-size: 18px;
    /* optional */
    transition: opacity 0.2s ease;
}

.d-flex a:hover {
    opacity: 0.8;
    /* subtle hover effect */
}

/* ================================================= */
/* HIGHLIGHT BAR                                    */
/* ================================================= */
.highlight-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: orange;
    color: white;
    display: flex;
    align-items: center;
    padding: 5px 20px;
    overflow: hidden;
    z-index: 10000;
}

.highlight-title {
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.highlight-slide {
    flex: 1;
    position: relative;
    height: 30px;
    overflow: hidden;
}

.highlight-slide p {
    position: absolute;
    width: 100%;
    margin: 0;
    top: 0;
    opacity: 0;
    animation: slideDownText 12s infinite;
}

.highlight-slide p:nth-child(1) {
    animation-delay: 0s;
}

.highlight-slide p:nth-child(2) {
    animation-delay: 4s;
}

.highlight-slide p:nth-child(3) {
    animation-delay: 8s;
}

@keyframes slideDownText {
    0% {
        top: -30px;
        opacity: 0;
    }

    10% {
        top: 0;
        opacity: 1;
    }

    30% {
        top: 0;
        opacity: 1;
    }

    40% {
        top: 30px;
        opacity: 0;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

.highlight-slide a {
    color: white;
    text-decoration: none;
}

/* DESKTOP HOVER SUPPORT */
.site-navbar .navbar-right ul li.show>.dropdown {
    display: grid;
    opacity: 1;
    visibility: visible;
}


/* ================================================= */
/* SITE NAVBAR (NAMESPACED — NO BOOTSTRAP CONFLICT) */
/* ================================================= */
.site-navbar {
    position: fixed;
    top: 40px;
    /* directly below highlight bar */
    left: 0;
    right: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: #0d6efd;
    padding: 10px 20px;
    color: white;
}

/* ---------- LEFT SIDE ---------- */
.site-navbar .navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-navbar .navbar-left img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid white;
}

.site-navbar .college-name {
    font-size: 20px;
    font-weight: bold;
}

.site-navbar .college-motto {
    font-size: 14px;
    font-style: italic;
    color: #ffd700;
}

/* ---------- RIGHT SIDE ---------- */
.site-navbar .navbar-right {
    display: flex;
    align-items: center;
}

.site-navbar .navbar-right>ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
    align-items: center;
}

.site-navbar .navbar-right>ul>li {
    position: relative;
}

.site-navbar .navbar-right ul li>a {
    display: block;
    padding: 10px 12px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.site-navbar .navbar-right ul li>a:hover {
    background-color: #0056b3;
    border-radius: 4px;
}

/* ================================================= */
/* DROPDOWN MENU                                   */
/* ================================================= */
.site-navbar .navbar-right ul li>.dropdown {
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;


    position: absolute;
    top: calc(100% + 4px);
    right: 0;

    background: #fff;
    border-radius: 6px;
    padding: 12px;

    z-index: 1100;
    min-width: 280px;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: visible;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    column-gap: 24px;
    row-gap: 8px;

    transition: opacity 0.2s ease;
}

.site-navbar .navbar-right ul li.active>.dropdown,
.site-navbar .navbar-right ul li.show>.dropdown {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.site-navbar .dropdown .dropdown-column {
    display: flex;
    flex-direction: column;
}

.site-navbar .dropdown .dropdown-subtitle {
    font-weight: bold;
    color: #000;
    padding: 6px;
    font-size: 14px;
    margin-bottom: 4px;
}

.site-navbar .dropdown .dropdown-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-navbar .dropdown .dropdown-links li a {
    display: block;
    padding: 6px 8px;
    color: #000;
    text-decoration: none;
    border-radius: 4px;

    /* 🔽 ADD THESE */
    white-space: normal;
    /* allow text to wrap */
    line-height: 1.4;
    /* better readability */
    word-break: break-word;
    /* prevent overflow */
}

/* Desktop hover fallback */
@media (min-width: 901px) {
    .site-navbar .navbar-right ul li:hover > .dropdown {
        display: grid;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}



.site-navbar .dropdown .dropdown-links li a:hover {
    background: #007bff;
    color: #fff;
}

/* ================================================= */
/* HAMBURGER MENU                                  */
/* ================================================= */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 15px;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
}

/* ================================================= */
/* MOBILE NAVIGATION – PROFESSIONAL & SCROLL SAFE   */
/* ================================================= */
@media (max-width: 900px) {

    /* ---------- Hamburger ---------- */
    .hamburger {
        display: flex;
        cursor: pointer;
        z-index: 10001;
    }

    /* ---------- Navbar wrapper ---------- */
    .site-navbar {
        flex-wrap: wrap;
    }

    /* ---------- Mobile menu container ---------- */
    .site-navbar .navbar-right {
        display: none;
        width: 100%;
        background: #0d6efd;
    }

    /* OPEN STATE */
    .site-navbar .navbar-right.active {
        display: flex;
        flex-direction: column;

        /* 🔥 SCROLL FIX */
        max-height: calc(100vh - 120px); /* highlight + navbar */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---------- Menu list ---------- */
    .site-navbar .navbar-right > ul {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* ---------- Top-level links ---------- */
    .site-navbar .navbar-right ul li > a {
        padding: 14px 16px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* ================================================= */
    /* DROPDOWN (Accordion Style)                        */
    /* ================================================= */

    .site-navbar .navbar-right ul li > .dropdown {
        position: static;
        display: none;

        background: #ffffff;
        color: #000;

        grid-template-columns: 1fr;
        padding: 10px 12px;

        /* 🔥 DROPDOWN SCROLL FIX */
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 6px;
        margin: 6px 10px;
    }

    /* OPEN DROPDOWN */
    .site-navbar .navbar-right ul li.active > .dropdown {
        display: grid;
    }

    /* ---------- Dropdown links ---------- */
    .site-navbar .dropdown .dropdown-links li a {
        padding: 10px 12px;
        font-size: 15px;
        color: #000;
        border-radius: 4px;
        line-height: 1.4;
        white-space: normal;
        word-break: break-word;
    }

    .site-navbar .dropdown .dropdown-links li a:hover {
        background: #007bff;
        color: #fff;
    }
}
