/* Frosted header override - loads after skin.css to ensure proper styling */

/* DEFAULT STATE: Always use the compact, solid white style (previously "scrolled" state) */
header.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px !important;
    min-height: 50px !important;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 1) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: none;
    z-index: 1000;
    isolation: isolate;
    overflow: visible;
}

/* Ensure the navbar inside has proper height */
header.fixed-top .navbar,
header.fixed-top .navbar-default,
header.fixed-top .navbar-main {
    position: relative;
    z-index: 3;
    background: transparent !important;
    min-height: 50px !important;
    height: 50px !important;
    margin-bottom: 0 !important;
}

/* Force show the scrolled logo and hide the unscrolled logo */
header.fixed-top .scroll-hide {
    display: none !important;
}

header.fixed-top .scroll-show {
    display: block !important;
    opacity: 1 !important;
}

/* Frost overlay element - always hidden now */
header.fixed-top .frost-overlay {
    display: none !important;
}

/* Nav links: dark blue always with proper vertical alignment */
header.fixed-top .navbar .navbar-nav > li > a {
    color: #00537F !important;
    line-height: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Nav links hover: white */
header.fixed-top .navbar .navbar-nav > li:hover > a,
header.fixed-top .navbar .navbar-nav > li > a:hover {
    color: #ffffff !important;
}

/* Ensure navbar brand (logo) is properly aligned with reduced size */
header.fixed-top .navbar-brand {
    height: 50px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 30px !important;
    display: flex !important;
    align-items: center !important;
}

header.fixed-top .navbar-brand img {
    max-height: 30px !important;
    width: auto !important;
}

/* Custom area button alignment - full height button with centered text */
header.fixed-top .custom-area {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
}

header.fixed-top .custom-area .btn {
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure navigation elements are properly aligned */

header.fixed-top .navbar-nav {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
}

/* Logo drop shadow always */
/*header.fixed-top .navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)) !important;
}*/

/* Fallback for browsers without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    header.fixed-top {
        background: rgba(255, 255, 255, 1) !important;
    }
}

/* Firefox-specific fallback */
@-moz-document url-prefix() {
    header.fixed-top {
        background: rgba(255, 255, 255, 1) !important;
    }
}

.navbar-form{
    display:none;
}

/* Header image area - adjust top margin to sit directly below the compact navbar */
.header-title{
    margin-top: 50px !important; /* Match the header height */
    width: 100%;
    position: relative;
    overflow: hidden;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: clamp(220px, 35vh, 420px);
    display: block;
}

/* Background IMG fallback (for browsers that prefer an actual image element) */
.header-title .header-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* preserve aspect ratio and crop */
    object-position: center center;
    display: block;
    z-index: 0;
}

/* Ensure content sits above the background image */
.header-title > .container,
.header-title .title-base {
    position: relative;
    z-index: 2;
}

/* Optionally adjust for smaller screens so header isn't too tall */
@media (max-width: 991px) {
    .header-title {
        margin-top: 50px !important;
        min-height: clamp(180px, 30vh, 320px);
    }
}

@media (max-width: 767px) {
    .header-title {
        margin-top: 50px !important;
        min-height: clamp(140px, 28vh, 260px);
    }
}

/* Mobile/Responsive fixes - hide nav by default, show only when expanded */
@media (max-width: 992px) {
    /* CRITICAL: Override skin.css line 2175 - must have higher specificity */
    header.fixed-top.scroll-change .navbar-default .navbar-collapse,
    header.fixed-top .navbar-default .navbar-collapse,
    header.fixed-top .navbar-collapse.collapse {
        padding: 0 !important;
        overflow: visible !important;
        border: none !important;
    }
    
    /* IMPORTANT: Default collapsed state - menu hidden */
    header.fixed-top .navbar-collapse.collapse:not(.in) {
        display: block !important;
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    /* When menu is opening or open */
    header.fixed-top .navbar-collapse.collapse.in,
    header.fixed-top .navbar-collapse.collapsing {
        display: block !important;
        max-height: 1000px !important;
        height: auto !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1) !important;
        padding: 15px !important;
        transition: max-height 0.35s ease !important;
        margin-top: -10px !important;
        position: relative !important;
    }
    
    /* Stack navigation vertically in mobile */
    header.fixed-top .navbar-nav {
        display: block !important;
        height: auto !important;
        margin: 0 !important;
        width: 100% !important;
        float: none !important;
    }
    
    header.fixed-top .navbar-nav > li {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }
    
    header.fixed-top .navbar-nav > li > a {
        display: block !important;
        height: auto !important;
        padding: 15px !important;
        text-align: left !important;
        border-bottom: 1px solid #e0e0e0 !important;
        border-right: none !important;
        border-left: none !important;
        border-top: none !important;
    }
    
    /* Reset first child border from skin.css */
    header.fixed-top .navbar .navbar-nav > li:first-child > a {
        border-left: none !important;
        border-top: none !important;
    }
    
    /* Hide navbar-right wrapper behavior on mobile */
    header.fixed-top .nav.navbar-nav.navbar-right {
        display: block !important;
        float: none !important;
    }
    
    header.fixed-top .navbar-right,
    header.fixed-top .navbar .navbar-right {
        float: none !important;
        margin-top: 0 !important;
    }
    
    /* Hide "Secure It Now" button in mobile menu */
    header.fixed-top .custom-area {
        display: none !important;
    }
    
    /* Ensure hamburger icon is visible and vertically centered */
    header.fixed-top .navbar-toggle {
        display: block !important;
        margin-right: 15px !important;
        margin-top: 5px !important;
        float: right !important;
        border: none !important;
    }
    
    /* Dropdown menus in mobile */
    header.fixed-top .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: auto !important;
        margin-top: 0 !important;
        background-color: #f5f5f5 !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    
    header.fixed-top .navbar-nav .dropdown-menu > li > a {
        padding: 10px 15px 10px 30px !important;
    }
}