/* Dhani Finance premium responsive header */
:root {
    --df-blue: #07359f;
    --df-blue-dark: #06266f;
    --df-red: #a80000;
    --df-red-dark: #820000;
    --df-ink: #121826;
    --df-muted: #5d6678;
    --df-line: #e7ebf2;
    --df-bg: #ffffff;
    --df-soft: #f6f8fc;
    --df-shadow: 0 18px 44px rgba(18, 24, 38, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: var(--df-bg);
    font-family: Arial, Helvetica, sans-serif;
}

.header-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.header-top {
    color: #fff;
    background: linear-gradient(90deg, var(--df-blue-dark), var(--df-blue));
    font-size: 14px;
    font-weight: 700;
}

.header-top__inner {
    min-height: 34px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.header-top__item {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.header-top__item:hover,
.header-top__item:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.header-top__icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--df-red);
    background: #fff;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}

.header-top__notice {
    min-width: 0;
    margin: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-main {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--df-line);
    box-shadow: 0 8px 24px rgba(18, 24, 38, 0.08);
    backdrop-filter: blur(14px);
}

.header-main__inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand__logo {
    width: 132px;
    max-width: 100%;
    height: 52px;
    display: block;
    object-fit: contain;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.nav-link,
.nav-link--button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 13px;
    color: var(--df-ink);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: 800 13.5px/1 Arial, Helvetica, sans-serif;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--df-red);
    background: #fff2f2;
    outline: 0;
}

.nav-link__chevron {
    color: var(--df-red);
    font-size: 16px;
    line-height: 1;
    transition: transform 160ms ease;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown.is-open .nav-link__chevron,
.nav-dropdown:hover .nav-link__chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    min-width: 282px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--df-line);
    border-radius: 8px;
    box-shadow: var(--df-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid var(--df-line);
    border-top: 1px solid var(--df-line);
    transform: translateX(-50%) rotate(45deg);
}

.dropdown-menu a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    color: #2d3444;
    border-radius: 6px;
    font-size: 14.5px;
    line-height: 1.25;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    color: var(--df-red);
    background: var(--df-soft);
    padding-left: 16px;
    outline: 0;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.apply-btn {
    min-width: 126px;
    height: 44px;
    margin-left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: #fff;
    background: linear-gradient(180deg, #c40000, var(--df-red));
    border-radius: 5px;
    box-shadow: 0 10px 22px rgba(168, 0, 0, 0.22);
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.apply-btn:hover,
.apply-btn:focus-visible {
    color: #fff;
    background: linear-gradient(180deg, #b10000, var(--df-red-dark));
    box-shadow: 0 12px 28px rgba(168, 0, 0, 0.30);
    transform: translateY(-1px);
    outline: 0;
}

.nav-toggle {
    width: 46px;
    height: 46px;
    display: none;
    place-items: center;
    gap: 5px;
    padding: 11px;
    background: #fff;
    border: 1px solid var(--df-line);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(18, 24, 38, 0.08);
    cursor: pointer;
}

.nav-toggle span {
    width: 23px;
    height: 2px;
    display: block;
    background: var(--df-ink);
    border-radius: 99px;
    transition: transform 170ms ease, opacity 170ms ease;
}

.site-header.is-nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.is-nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) {

    .nav-link,
    .nav-link--button {
        padding-inline: 9px;
        font-size: 12.8px;
    }

    .apply-btn {
        min-width: 116px;
        margin-left: 8px;
        font-size: 16px;
    }
}

@media (max-width: 980px) {
    .header-main__inner {
        min-height: 70px;
    }

    .nav-toggle {
        display: grid;
    }

    .primary-nav {
        position: absolute;
        top: 104px;
        left: 0;
        right: 0;
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 2px;
        max-height: calc(100vh - 104px);
        padding: 12px 18px 18px;
        overflow-y: auto;
        background: #fff;
        border-bottom: 1px solid var(--df-line);
        box-shadow: var(--df-shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    }

    .site-header.is-nav-open .primary-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link,
    .nav-link--button {
        width: 100%;
        min-height: 48px;
        justify-content: space-between;
        padding: 0 12px;
        border-radius: 6px;
        font-size: 14px;
        text-align: left;
    }

    .dropdown-menu {
        position: static;
        min-width: 100%;
        display: none;
        margin: 0 0 6px;
        padding: 4px 0 4px 12px;
        border: 0;
        border-left: 2px solid #dfe5ef;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-dropdown.is-open .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        min-height: 40px;
        padding: 9px 12px;
    }

    .apply-btn {
        width: 100%;
        height: 46px;
        margin: 10px 0 0;
    }
}

@media (max-width: 640px) {
    .header-shell {
        width: min(100% - 22px, 1180px);
    }

    .header-top__inner {
        min-height: 42px;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 5px 0;
    }

    .header-top__notice,
    .header-top__email {
        display: none;
    }

    .header-top__item {
        justify-content: center;
        font-size: 13.5px;
    }

    .brand {
        min-width: 110px;
    }

    .brand__logo {
        width: 114px;
        height: 46px;
    }

    .primary-nav {
        top: 112px;
        max-height: calc(100vh - 112px);
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}