/* Header Redesign Styles */
header {
    position: fixed !important;
    /* Changed to fixed for better compatibility */
    top: 0;
    left: 0;
    /* Ensure left alignment */
    z-index: 10000;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Add spacing for Desktop to prevent overlap */
main {
    margin-top: 140px;
    /* Approx height of desktop header */
}

.header-top {
    border-bottom: 2px solid #000;
    padding: 10px 0;
    background-color: #fff;
}

.header-top .row.align-items-center {
    display: flex;
    align-items: center;
}


#logo {
    text-align: center;
}

#logo img.logo-main {
    max-height: 100px;
    width: auto;
}

.tagline {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #000;
    margin-top: 5px;
}

.header-contact {
    font-weight: 600;
    color: #000;
    font-size: 14px;
    /* Slightly smaller to fit better */
}

.header-search {
    position: relative;
    border: 1px solid #000;
    padding: 2px 10px;
    /* Slimmer padding */
    border-radius: 4px;
}

.header-search input {
    border: none;
    outline: none;
    width: 90%;
    font-size: 12px;
    font-family: 'Bookman Old Style', serif;
    /* Trying to match font */
}

.header-search button {
    background: none;
    border: none;
    position: absolute;
    right: 5px;
    top: 2px;
    /* Adjusted for slimmer bar */
}

.top-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
    white-space: nowrap;
    /* Prevent wrapping */
}

.top-menu li {
    display: inline-block;
    margin-left: 10px;
    /* Reduced margin */
}

.top-menu li a {
    color: #000;
    font-weight: bold;
    font-family: 'Times New Roman', serif;
    font-size: 13px;
    /* Slightly smaller font to ensure fit */
    text-transform: uppercase;
}

.header-bottom {
    background-color: #fff;
    border-bottom: 2px solid #000;
    padding: 10px 0;
}

.bottom-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
}

.bottom-menu li {
    display: inline-block;
}

.bottom-menu li a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    /* Keep as is from image */
}

/* Response Fixes */
/* Response Fixes */
@media only screen and (max-width: 991px) {

    .header-top .row>div {
        text-align: center;
        margin-bottom: 15px;
    }

    .header-top {
        padding-top: 20px;
    }

    .top-menu,
    .bottom-menu {
        text-align: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .top-menu li,
    .bottom-menu li {
        display: inline-block;
        margin: 5px 8px;
    }

    /* Fix search bar width on mobile */
    .header-search {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Hide elements as per user request */
    /* We also hide their parent columns to remove the margin-bottom gap */
    .header-top .row>div:nth-child(1),
    .header-top .row>div:nth-child(2),
    .header-top .row>div:nth-child(3),
    .header-bottom {
        display: none !important;
    }

    .header-top {
        padding-top: 10px;
        /* Reduced padding */
        padding-bottom: 0;
    }

    /* Fix body content overlap for mobile */
    /* Header is smaller on mobile (hidden elements), so less margin needed */
    main {
        margin-top: 60px !important;
    }
}

/* ==========================================================================
   FORCE STATIC HEADER OVERRIDES
   These rules ensure the header NEVER shrinks, moves, or hides elements
   regardless of scroll position or theme JS classes.
   ========================================================================== */

header,
header.smaller,
header.scroll-light,
header.header-mobile {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* Force elements to remain visible */
header .logo-main,
header.smaller .logo-main,
header.scroll-light .logo-main {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

header .logo-scroll,
header.smaller .logo-scroll,
header.scroll-light .logo-scroll {
    display: none !important;
}

/* Ensure sections inside header don't collapse */
.header-top,
.header-bottom {
    display: block !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    /* Keep original padding */
}

/* Mobile specific hiding overrides (keep them hidden on mobile) */
/* Mobile specific hiding overrides */
@media only screen and (max-width: 991px) {

    /* Enable Flex Wrapping for custom layout */
    .header-top .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    /* 1. Logo: Left, 50% width */
    .header-top .row>div:nth-child(1) {
        display: block !important;
        width: 50% !important;
        text-align: left !important;
        padding-left: 15px !important;
    }

    #logo {
        text-align: left !important;
    }

    /* Internal logo alignment */

    /* 2. Contact: Right, 50% width */
    .header-top .row>div:nth-child(2) {
        display: block !important;
        width: 50% !important;
        text-align: right !important;
        padding-right: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    /* 3. Search: Full width, below */
    .header-top .row>div:nth-child(3) {
        display: block !important;
        width: 100% !important;
        margin-top: 10px !important;
        order: 3 !important;
    }

    /* Hide the bottom menu */
    .header-bottom {
        display: none !important;
    }

    /* Increase margin to fix overlap with new layout height */
    main {
        margin-top: 280px !important;
    }
}