/* =====================================================
   RIMS HEADER.CSS  (clean, in sequence)

   1. Global
   2. Page loader
   3. Header base
   4. Top bar
   5. Brand
   6. Navigation + dropdown + apply button
   7. Mobile toggle (hidden on desktop)
   8. Responsive: Tablet > Mobile > Small mobile
===================================================== */
/* #c9a227 by chatgpt */
/* #ff751f by logo */
/* =====================================================
   1. GLOBAL (stops sideways scroll)
===================================================== */

/* advetisments */
.rims-admission-ticker {
    width: 100%;
    overflow: hidden;
    
    white-space: nowrap;
    position: relative;
}

.rims-admission-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    animation: rimsAdmissionMove 22s linear infinite;
}

.rims-admission-text {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 2px 55px;
    
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rims-admission-text i {
    /* color: #ffffff; */
    font-size: 15px;
}

@keyframes rimsAdmissionMove {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}

@media (max-width: 767.98px) {

    .rims-admission-text {
        padding: 6px 35px;
        font-size: 11px;
        letter-spacing: 0.7px;
    }

    .rims-admission-text i {
        font-size: 13px;
    }

}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}


/* =====================================================
   2. PAGE LOADER
===================================================== */

#pageLoader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#pageLoader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}


/* =====================================================
   3. HEADER BASE
===================================================== */

.rims-header {
    background: #ffffff;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid #e9edf0;
}


/* =====================================================
   4. TOP BAR
===================================================== */

.rims-topbar {
    background: #0b1f3a;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}

.rims-topbar-inner {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rims-top-left,
.rims-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rims-topbar a,
.rims-topbar span {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    transition: .25s ease;
}

.rims-topbar a:hover {
    color: #c9a227;
}

.rims-topbar i {
    color: #c9a227;
    margin-right: 5px;
}


/* Smooth hide of topbar + brand (desktop scroll) */

.rims-topbar,
.rims-brand-area {
    transition: transform 0.35s ease, opacity 0.25s ease;
    will-change: transform;
}

.rims-topbar.rims-header-hidden,
.rims-brand-area.rims-header-hidden {
    transform: translateY(100%);
    opacity: 0;
}


/* =====================================================
   5. BRAND
===================================================== */

.rims-brand-area {
    background: #ffffff;
}

.rims-brand {
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rims-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    color: #0b1f3a;
}

/* Logo */

.rims-logo {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rims-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Brand text */

.rims-brand-content {
    text-align: center;
}

.rims-brand-content h1 {
    margin: 0;
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: .035em;
    color: #0b1f3a;
}

/* Small-mobile brand: hidden by default (desktop + tablet + mobile) */
.rims-brand-content-litlemob {
    display: none;
}

.rims-brand-content h1 span {
    display: block;
    font-size: 17px;
    margin-top: 3px;
    letter-spacing: .075em;
    font-family: "Playfair Display", "Times New Roman", serif;
}

.rims-brand-content p {
    margin: 7px 0 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .28em;
    color: #9a7b19;
    font-family: "Playfair Display", "Times New Roman", serif;
}


/* =====================================================
   6. NAVIGATION
===================================================== */

.rims-navigation {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    min-height: 50px;
    background: #ffffff;
    border-top: 1px solid #f0f2f3;
    border-bottom: 1px solid #e9edf0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.rims-navigation.rims-nav-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.rims-nav-wrapper {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rims-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.rims-nav-menu>li {
    position: relative;
}

/* Nav links */

.rims-nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border-radius: 8px;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.25s ease;
}

.rims-nav-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 2px;
    background: #c49a45;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.rims-nav-link:hover::after,
.rims-nav-link.active::after {
    transform: scaleX(1);
}

.rims-nav-link i {
    font-size: 9px;
    transition: transform .25s ease;
}


/* ---------- Dropdown ---------- */

.rims-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    width: 245px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e7ebed;
    border-radius: 13px;
    box-shadow: 0 18px 45px rgba(11, 31, 58, .13);
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
}

.rims-dropdown:hover .rims-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.rims-dropdown:hover>.rims-nav-link i {
    transform: rotate(180deg);
}

.rims-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #000000;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: .2s ease;
}

.rims-dropdown-menu a i {
    width: 19px;
    color: #b28d20;
    font-size: 13px;
}

.rims-dropdown-menu a:hover {
    background: #f3f6f7;
    color: #0b1f3a;
}


/* ---------- Apply button ---------- */

.rims-apply-wrapper {
    margin-left: 8px;
}

.rims-apply-btn {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 19px;
    border-radius: 8px;
    background: #0b1f3a;

    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    transition: all .25s ease;
}

.rims-apply-btn:hover {
    background: #b9972e;
    color: #ffffff;
    transform: translateY(-1px);
}

.rims-apply-btn i {
    font-size: 11px;
}


/* =====================================================
   7. MOBILE TOGGLE BUTTON (hidden on desktop)
===================================================== */

.rims-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #e2e7e9;
    border-radius: 9px;
    background: #ffffff;
    color: #0b1f3a;
    font-size: 21px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


/* =====================================================
   8a. TABLET  (max 1100px)
===================================================== */

@media (max-width: 1100px) {

    .rims-nav-link {
        padding: 0 10px;
        font-size: 11px;
    }

    .rims-brand-content h1 {
        font-size: 20px;
    }

    .rims-brand-content h1 span {
        font-size: 15px;
    }
}


/* =====================================================
   8b. MOBILE  (max 991px)
===================================================== */

@media (max-width: 991px) {

    /* Header height variables (used for fixed header + body space) */
    :root {
        --rims-topbar-h: 36px;
        --rims-brand-h: 72px;
    }

    /* ---------- Header: fixed, never hides ---------- */

    .rims-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999;
        transform: none !important;
    }

    /* Push page content below the fixed header */
    body {
        padding-top: calc(var(--rims-topbar-h) + var(--rims-brand-h));
    }

    /* Never hide anything on mobile */
    .rims-topbar,
    .rims-brand-area,
    .rims-topbar.rims-header-hidden,
    .rims-brand-area.rims-header-hidden {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* ---------- Top bar ---------- */

    .rims-topbar {
        height: 36px;
        font-size: 10px;
    }

    .rims-topbar .container {
        height: 100%;
    }

    .rims-topbar-inner {
        height: 36px;
        min-height: 36px;
        justify-content: center;
    }

    .rims-top-left {
        display: none;
    }

    .rims-top-right {
        gap: 12px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    /* ---------- Brand ---------- */

    .rims-brand-area {
        position: relative;
        height: var(--rims-brand-h);
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    }

    .rims-brand {
        position: relative;
        min-height: 72px;
        padding: 8px 56px 8px 0;
        /* space on right for menu button */
        justify-content: flex-start;
    }

    .rims-brand-link {
        min-width: 0;
        max-width: 100%;
        gap: 10px;
    }

    .rims-logo {
        width: 68px;
        height: 68px;
    }

    .rims-brand-content {
        min-width: 0;
        text-align: left;
    }

    .rims-brand-content h1 {
        font-size: 20px;
        font-weight: 900;
        line-height: 1.2;
        letter-spacing: .04em;
        white-space: normal;
        font-family: "Playfair Display", "Times New Roman", serif;
        /* font-family: "Manrope", sans-serif;      */
        /* font-family: "Times New Roman", Times, serif; */
        /* text wraps = no overflow */
    }

    .rims-brand-content p {
        font-size: 10px;
        letter-spacing: .20em;
        margin-top: 1px;
        font-family: "Playfair Display", "Times New Roman", serif;
    }

    /* ---------- Menu button ---------- */

    .rims-menu-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 42px;
        height: 42px;
        z-index: 10;
    }

    /* ---------- Navigation (zero height, only holds the dropdown) ---------- */

    .rims-navigation,
    .rims-navigation.rims-nav-scrolled {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        height: 0;
        min-height: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        z-index: 5;
    }

    .rims-nav-wrapper {
        display: block;
        height: 0;
        min-height: 0;
    }

    /* ---------- Mobile menu ---------- */

    .rims-nav-menu {
        display: none;
        position: absolute;
        top: 0;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        overflow-x: hidden !important;
        /* no sideways movement */
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 3px;
        padding: 12px 0 16px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    }

    .rims-nav-menu.show {
        display: flex;
    }

    .rims-nav-menu>li {
        width: 100%;
        max-width: 100%;
    }

    .rims-nav-link {
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
        min-height: 45px;
        padding: 0 15px;
        font-size: 15px;
        font-family: "Playfair Display", "Times New Roman", serif;
    }

    /* ---------- Dropdown (stays inside the menu) ---------- */

    .rims-nav-menu .rims-dropdown-menu,
    .rims-nav-menu .rims-dropdown:hover .rims-dropdown-menu {
        position: static !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
        overflow: hidden;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0 0 0 15px;
        background: #fafbfb;

    }

    .rims-nav-menu .rims-dropdown-menu {
        display: none;
    }

    .rims-nav-menu .rims-dropdown.open .rims-dropdown-menu {
        display: block;
    }

    .rims-dropdown-menu a {
        white-space: normal;
        word-break: break-word;

    }

    /* ---------- Apply button ---------- */

    .rims-apply-wrapper {
        margin: 7px 15px 0;
    }

    .rims-apply-btn {

        width: 90%;
        font-size: 14px;

    }
}


/* =====================================================
   8c. SMALL MOBILE  (max 575px)
===================================================== */

/* =====================================================
   8c. SMALL MOBILE  (max 575px)
===================================================== */

@media (max-width: 575px) {

    :root {
        --rims-topbar-h: 36px;
        --rims-brand-h: 64px;
    }

    /* ---------- Top bar ---------- */

    .rims-top-right {
        gap: 10px;
    }

    .rims-top-right a {
        font-size: 9px;
    }

    /* ---------- Brand ---------- */

    .rims-brand {
        min-height: 64px;
        padding: 6px 52px 6px 0;
    }

    .rims-logo {
        width: 58px;
        height: 58px;
    }

    /* Swap brand text: hide normal, show small-mobile */
    .rims-brand-content:not(.rims-brand-content-litlemob) {
        display: none;
    }

    .rims-brand-content-litlemob {
        display: block;
        min-width: 0;
        text-align: left;
    }

    .rims-brand-content-litlemob h1 {
        font-size: 15.5px;
        white-space: normal;
        font-family: "Playfair Display", "Times New Roman", serif;
    }

    .rims-brand-content-litlemob p {
        font-size: 10px;
        letter-spacing: .15em;
        margin-top: 1px;
        font-family: "Playfair Display", "Times New Roman", serif;

    }

    /* ---------- Menu button ---------- */

    .rims-menu-toggle {
        width: 40px;
        height: 40px;
    }

    /* ---------- Mobile menu ---------- */

    .rims-nav-menu {
        max-height: calc(100vh - 64px);
        max-height: calc(100dvh - 64px);
    }
}