/* ==========================================================================
   Tripsopedia — site font + navbar + mega menu
   Loaded LAST on every page so these rules win over css/style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Site font — Plus Jakarta Sans
   -------------------------------------------------------------------------- */
body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.btn, .navbar-nav, .nav-link, .dropdown-menu,
input, select, textarea, .form-control, .form-select {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --------------------------------------------------------------------------
   2. Navbar shell
   -------------------------------------------------------------------------- */
.tsp-navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    position: relative;
    z-index: 1000;
}

/* The logo has a fixed 603x413 ratio. Size it by height only so it scales
   cleanly instead of being squashed by the old width/height attributes.
   Specificity has to beat style.css's `.navbar-light .navbar-brand img`. */
.tsp-navbar .navbar-brand .tsp-logo {
    display: block;
    width: auto;
    height: 100px;
    max-width: 230px;
}

.tsp-mobile-partners { display: none; }

.sticky-top.tsp-navbar { padding-top: 6px !important; padding-bottom: 6px !important; }
.sticky-top.tsp-navbar .navbar-brand .tsp-logo { height: 46px; }
.sticky-top.tsp-navbar .enquire-btn { padding: 11px 22px; font-size: 14px; }

.tsp-header-partners {
    display: block;
    width: 145px;
    height: 34px;
    margin-right: 8px;
    padding: 2px 4px;
    border-radius: 2px;
    background: #fff;
    object-fit: contain;
}

.tsp-payment-methods {
    display: inline-block;
    width: 205px;
    max-width: 100%;
    height: auto;
    padding: 3px 6px;
    border-radius: 3px;
    background: #fff;
    vertical-align: middle;
}

.tsp-footer-payments {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.footer .tsp-footer-payments .tsp-payment-label {
    display: block;
    margin: 0 0 8px;
    color: #fff;
}

.footer .tsp-footer-payments .tsp-payment-methods {
    width: 180px;
    max-width: 100%;
    margin: 0;
}

@media (max-width: 767.98px) {
    .footer .tsp-footer-payments .tsp-payment-methods { width: 170px; }
}

@media (max-width: 991.98px) {
    .tsp-navbar .navbar-brand { display: flex; align-items: center; gap: 8px; }
    .tsp-mobile-partners { display: block; width: 104px; height: auto; max-width: 42vw; }
}

@media (max-width: 575.98px) {
    .tsp-navbar .navbar-brand .tsp-logo { height: 72px; max-width: 105px; }
    .tsp-mobile-partners { width: 100px; }
}

.tsp-payment-label {
    margin-right: 10px;
    color: #fff;
    font-size: 13px;
}

.tsp-policy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.tsp-policy-partners {
    width: 250px;
    max-width: 100%;
    height: auto;
    padding: 3px 6px;
    border: 1px solid #eee;
    border-radius: 3px;
    background: #fff;
}

.tsp-policy-footer {
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.tsp-policy-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.tsp-policy-quick-links a { color: #555; }

.tsp-policy-payments {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.tsp-policy-payments .tsp-payment-label {
    display: block;
    margin: 0 0 8px;
    color: #555;
}

/* --------------------------------------------------------------------------
   3. Nav links
   NOTE: css/style.css sets `.navbar-light .navbar-nav .nav-link` to
   color:#FFFFFF !important for its old transparent-over-hero navbar, and
   `.sticky-top.navbar-light ...` back to dark. That made every link invisible
   on the white .tsp-navbar until you scrolled. These rules are equally
   specific but load later, so they win — and they also neutralise the padding
   jump that happened when .sticky-top was toggled.
   -------------------------------------------------------------------------- */
.tsp-navbar .navbar-nav .nav-link {
    position: relative;
    color: #222 !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
    margin: 0 12px;
    padding: 8px 0;
    white-space: nowrap;
    text-transform: uppercase;
    transition: color .3s ease;
}

.sticky-top.tsp-navbar .navbar-nav .nav-link {
    padding: 8px 0;
    color: #222 !important;
}

.tsp-navbar .navbar-nav .nav-link:hover,
.tsp-navbar .navbar-nav .nav-link:focus,
.tsp-navbar .navbar-nav .nav-link.active,
.tsp-navbar .tsp-dd:hover > .nav-link,
.tsp-navbar .tsp-dd:focus-within > .nav-link {
    color: var(--primary) !important;
}

/* Dropdown caret */
.tsp-navbar .tsp-dd > .nav-link { display: inline-flex; align-items: center; gap: 6px; }
.tsp-navbar .tsp-dd > .nav-link .tsp-caret {
    font-size: 10px;
    transition: transform .3s ease;
}
.tsp-navbar .tsp-dd:hover > .nav-link .tsp-caret,
.tsp-navbar .tsp-dd.open > .nav-link .tsp-caret { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   4. Utilities (search + enquire)
   -------------------------------------------------------------------------- */
.tsp-navbar .navbar-utils { display: flex; align-items: center; gap: 18px; margin-left: 20px; }
.tsp-navbar .search-icon { font-size: 18px; color: #333; cursor: pointer; }
.tsp-navbar .search-icon:hover { color: var(--primary); }
.tsp-navbar .enquire-btn {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 26px;
    text-decoration: none;
    white-space: nowrap;
    text-transform: uppercase;
}
.tsp-navbar .enquire-btn:hover { background: var(--secondary); color: #fff; }

/* --------------------------------------------------------------------------
   5. Mega menu
   -------------------------------------------------------------------------- */
.tsp-mega {
    display: none;
    background: #fff;
    border-top: 3px solid var(--primary);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
    padding: 28px 0 30px;
}
.tsp-mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 10px; }
.tsp-mega-col { padding: 0 18px; border-left: 1px solid #e3e3e3; }
.tsp-mega-col:first-child { border-left: 0; }
.tsp-mega-col h6 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 14px;
}
.tsp-mega-col h6 a {
    display: inline-block;
    padding: 0;
    color: inherit;
    font: inherit;
    text-decoration: none;
}
.tsp-mega-col h6 a:hover,
.tsp-mega-col h6 a:focus-visible {
    padding-left: 0;
    color: #14141f;
}
.tsp-mega-col a {
    display: block;
    color: #222;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    padding: 8px 4px;
    text-decoration: none;
    transition: color .25s ease, padding-left .25s ease;
}
.tsp-mega-col a:hover { color: var(--primary); padding-left: 8px; }
.tsp-mega-col a i { font-size: 11px; margin-right: 6px; color: var(--primary); }
.tsp-mega-col .tsp-mega-viewall {
    margin-top: 8px;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid #ececec;
    padding-top: 12px;
}

/* --------------------------------------------------------------------------
   6. Search overlay
   -------------------------------------------------------------------------- */
.tsp-search {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 31, .92);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tsp-search.open { display: flex; }
.tsp-search-inner { width: 100%; max-width: 720px; }
.tsp-search-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.tsp-search-close:hover { color: var(--secondary); }
.tsp-search form { display: flex; gap: 10px; }
.tsp-search input {
    flex: 1;
    border: 0;
    border-bottom: 2px solid var(--primary);
    background: transparent;
    color: #fff;
    font-size: 20px;
    padding: 14px 6px;
}
.tsp-search input::placeholder { color: rgba(255, 255, 255, .55); }
.tsp-search input:focus { outline: none; border-bottom-color: var(--secondary); }
.tsp-search button {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 0 30px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.tsp-search button:hover { background: var(--secondary); }

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .tsp-mega-grid { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
}

@media (min-width: 992px) {
    .tsp-navbar .tsp-dd { position: static; }
    .tsp-navbar .tsp-mega {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 1030;
    }
    .tsp-navbar .tsp-dd:hover > .tsp-mega,
    .tsp-navbar .tsp-dd:focus-within > .tsp-mega { display: block; }

    /* Hover bridge.
       The mega panel is pinned to the bottom of the navbar, but the nav link
       only occupies its own line box in the middle of it. That leaves a ~30px
       band of navbar between the link and the panel which is NOT inside
       .tsp-dd, so sliding the mouse down out of the link dropped :hover and
       the panel slammed shut before you could reach it.
       This invisible strip hangs below the link to close the gap. It hangs off
       the LINK rather than the panel, so it can never intercept clicks meant
       for the menu: .tsp-mega is a later sibling with z-index 1030 and
       therefore always wins hit-testing underneath itself. */
    .tsp-navbar .tsp-dd > .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 48px;
    }
}

/* Nine menu items plus search and the CTA need a little tightening on
   laptop-width screens, otherwise labels wrap onto two lines. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .tsp-navbar .navbar-nav .nav-link { margin: 0 7px; font-size: 14px; }
    .tsp-navbar .navbar-brand .tsp-logo { height: 78px; }
    .tsp-navbar .navbar-utils { margin-left: 12px; gap: 13px; }
    .tsp-navbar .enquire-btn { padding: 12px 18px; font-size: 13.5px; }
}

@media (min-width: 992px) and (max-width: 1151.98px) {
    .tsp-navbar .navbar-nav .nav-link { margin: 0 5px; font-size: 13px; }
    .tsp-navbar .navbar-brand .tsp-logo { height: 66px; }
    .tsp-navbar .navbar-utils { margin-left: 8px; gap: 10px; }
    .tsp-navbar .enquire-btn { padding: 10px 14px; font-size: 12.5px; }
    .tsp-navbar .search-icon { font-size: 16px; }
}

@media (max-width: 991.98px) {
    .tsp-navbar .navbar-nav .nav-link,
    .sticky-top.tsp-navbar .navbar-nav .nav-link {
        color: #222 !important;
        font-size: 15px;
        margin: 0;
        padding: 10px 0;
    }
    .tsp-navbar .tsp-dd > .nav-link { width: 100%; justify-content: space-between; }
    .tsp-navbar .tsp-dd.open > .tsp-mega {
        display: block;
        margin: 6px 0 10px;
        padding: 14px 0;
        box-shadow: none;
        border-top: 0;
        border-left: 3px solid var(--primary);
    }
    .tsp-mega-grid { grid-template-columns: 1fr; }
    .tsp-mega-col { border-left: 0; padding: 0 14px 10px; }
    .tsp-navbar .navbar-utils { margin: 14px 0 6px; justify-content: space-between; }
    .tsp-navbar .enquire-btn { flex: 1; text-align: center; }
    .tsp-navbar .navbar-brand .tsp-logo { height: 48px; }
}

@media (max-width: 575.98px) {
    .tsp-navbar .navbar-brand .tsp-logo {
        flex: 0 0 105px;
        width: 105px;
        height: auto;
        max-width: none;
    }

    .tsp-navbar .navbar-brand .tsp-mobile-partners {
        flex: 0 0 78px;
        width: 78px;
        max-width: none;
    }
}