/* ===== RESET AND BASE STYLES ===== */
.site-header * {
    box-sizing: border-box;
}

/* ===== BASE HEADER STYLES ===== */
.site-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Default state - transparent background with white text */
.site-header:not(.navigation-fixed):not(.inner) {
    background: transparent !important;
}

.site-header:not(.navigation-fixed):not(.inner) .menu-wrap > ul > li > a,
.site-header:not(.navigation-fixed):not(.inner) .phone h3,
.site-header:not(.navigation-fixed):not(.inner) .phone h4,
.site-header:not(.navigation-fixed):not(.inner) .call-btn {
    color: white !important;
}

/* Scrolled/Fixed state - white background with dark text */
.site-header.navigation-fixed,
.site-header.inner {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed !important;
}

.site-header.navigation-fixed .menu-wrap > ul > li > a,
.site-header.inner .menu-wrap > ul > li > a,
.site-header.navigation-fixed .phone h3,
.site-header.inner .phone h3,
.site-header.navigation-fixed .phone h4,
.site-header.inner .phone h4,
.site-header.navigation-fixed .call-btn,
.site-header.inner .call-btn {
    color: #694a3c !important;
}

/* ===== MOBILE STYLES (< 768px) ===== */
@media (max-width: 767px) {
    .site-header {
        position: fixed !important;
        height: 80px !important;
        display: flex !important;
        align-items: center;
        padding: 0 15px;
        background: white !important;
    }
    
    /* Logo styling - overlapping on mobile too */
    .site-header .logo {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        flex: 1;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        z-index: 10;
    }
    
    .site-header .logo img {
        height: 100px !important;
        width: auto !important;
        max-width: 150px;
        margin-top: -10px;
        position: relative;
        z-index: 10;
    }
    
    /* Mobile controls */
    .site-header .col-contacts {
        width: auto !important;
        display: flex !important;
        align-items: center;
        gap: 15px;
        padding: 0 !important;
        margin: 0 !important;
        position: static !important;
    }
    
    /* Hamburger menu */
    .menu-toggle {
        display: block !important;
        width: 30px;
        height: 30px;
        padding: 0;
        background: transparent;
        border: none;
        position: relative;
        cursor: pointer;
    }
    
    .menu-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background: #694a3c;
        margin: 5px auto;
        transition: 0.3s;
    }
    
    /* Call button */
    .site-header .call-btn {
        color: #e96840 !important;
        font-size: 22px;
        padding: 5px !important;
        margin: 0 !important;
    }
    
    /* Hide desktop elements */
    .site-header .menu-wrap,
    .site-header .phone,
    .site-header .hidden-xs {
        display: none !important;
    }
    
    /* Mobile menu */
    .mobile-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        z-index: 998;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .nav-open .mobile-menu {
        left: 0 !important;
    }
    
    .mobile-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-menu ul li {
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu ul li a {
        display: block;
        padding: 15px 20px;
        color: #694a3c;
        text-decoration: none;
        font-family: 'Crimson Text', serif;
        font-size: 18px;
    }
    
    .mobile-menu ul li a:hover {
        background: #f5f5f5;
        color: #e96840;
    }
    
    /* Body padding */
    body {
        padding-top: 80px !important;
    }
}

/* ===== TABLET STYLES (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .site-header {
        height: 80px !important;
        display: flex !important;
        align-items: center;
        padding: 0 15px;
    }
    
    /* Default transparent state for tablet */
    .site-header:not(.navigation-fixed):not(.inner) {
        background: transparent !important;
    }
    
    /* Fixed/scrolled state for tablet */
    .site-header.navigation-fixed,
    .site-header.inner {
        background: rgba(255, 255, 255, 0.95) !important;
        position: fixed !important;
    }
    
    .site-header .logo {
        position: static !important;
        transform: none !important;
        top: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
    }
    
    .site-header .logo img {
        height: 60px !important;
        width: auto;
    }
    
    /* Main container */
    .site-header .logo + div {
        flex: 1;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: auto !important;
        padding: 0 20px;
        /*overflow: hidden;*/
    }
    
    .site-header .menu-wrap {
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        width: auto !important;
        background: transparent !important;
        border: none !important;
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .site-header .menu-wrap > ul {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        float: none !important;
        list-style: none !important;
    }
    
    .site-header .menu-wrap > ul > li {
        list-style: none !important;
        margin: 0;
        position: relative;
    }
    
    .site-header .menu-wrap > ul > li > a {
        padding: 8px 10px !important;
        font-size: 14px !important;
        background: transparent !important;
        text-decoration: none;
        text-transform: uppercase;
        display: block;
        position: relative;
    }
    
    /* Remove underline effect on tablet */
    .site-header .menu-wrap > ul > li > a:before {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    body.header-fixed {
        padding-top: 80px !important;
    }
}

/* ===== DESKTOP STYLES (992px+) ===== */
@media (min-width: 992px) {
    .site-header {
        height: 100px !important;
        display: flex !important;
        align-items: center;
        padding: 0 30px;
    }
    
    /* Logo styling - overlapping effect */
    .site-header .logo {
        flex: 0 0 auto;
        position: relative !important;
        transform: none !important;
        top: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        z-index: 10;
    }
    
    .site-header .logo img {
        width: auto;
        max-width: 200px;
        margin-top: 75px !important;
        position: relative;
        z-index: 10;
    }
    
    /* Main container */
    .site-header .logo + div {
        flex: 1;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: auto !important;
        padding: 0 20px;
        /*overflow: hidden;*/
        background: transparent !important;
    }
    
    /* Navigation menu */
    .site-header .menu-wrap {
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        top: auto !important;
        background: transparent !important;
        border: none !important;
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .site-header .menu-wrap > ul {
        display: flex !important;
        align-items: center;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        float: none !important;
        flex-wrap: wrap;
        justify-content: center;
        background: transparent !important;
    }
    
    .site-header .menu-wrap > ul > li {
        position: relative;
        margin: 0;
        list-style: none !important;
    }
    
    .site-header .menu-wrap > ul > li > a {
        display: block;
        padding: 12px 14px !important;
        background: transparent !important;
        text-decoration: none;
        font-size: 14px;
        text-transform: uppercase;
        transition: color 0.3s ease;
        position: relative;
        white-space: nowrap;
        font-family: 'Crimson Text', serif;
    }
    
    .site-header .menu-wrap > ul > li > a:hover {
        color: #e96840 !important;
    }
    
    /* Underline effect - only on hover */
    .site-header .menu-wrap > ul > li > a:before {
        content: "";
        position: absolute;
        z-index: 1;
        left: 0;
        right: 0;
        bottom: 0;
        background: #e96840;
        height: 3px;
        opacity: 0;
        transform: translateY(3px);
        transition: all 0.3s ease-out;
        max-width: 100%;
        margin: auto;
    }
    
    .site-header .menu-wrap > ul > li > a:hover:before,
    .site-header .menu-wrap > ul > li:hover > a:before {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Dropdown styles - FIXED */
    .site-header .dropdown {
        position: relative !important;
    }
    
    .site-header .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0;
        min-width: 220px;
        background: white !important;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: none !important;
        z-index: 1000;
        padding: 0;
        list-style: none !important;
        margin: 0 !important;
    }
    
    /* Make dropdown visible on hover */
    .site-header li.dropdown:hover > .dropdown-menu,
    .site-header .dropdown:hover .dropdown-menu {
        display: block !important;
    }
    
    .site-header .dropdown-menu li {
        margin: 0;
        list-style: none !important;
    }
    
    .site-header .dropdown-menu a {
        display: block;
        padding: 10px 20px !important;
        color: #694a3c !important;
        background: transparent !important;
        text-decoration: none;
        font-size: 14px;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .site-header .dropdown-menu a:hover {
        background: #f5f5f5 !important;
        color: #e96840 !important;
    }
    
    /* Remove underline from dropdown items */
    .site-header .dropdown-menu a:before {
        display: none !important;
    }
    
    /* Phone section */
    .site-header .phone {
        flex: 0 0 auto;
        text-align: right;
        padding: 0;
        background: transparent !important;
    }
    
    .site-header .phone h4 {
        font-size: 11px !important;
        margin: 0 0 5px 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: normal;
        font-family: 'Crimson Text', serif;
    }
    
    .site-header .phone h3 {
        font-size: 20px !important;
        margin: 0;
        font-family: 'Crimson Text', serif;
        font-weight: bold;
    }
    
    /* Remove body padding for transparent header */
    body {
        padding-top: 0 !important;
    }
    
    /* Add padding when header is fixed */
    body.header-fixed {
        padding-top: 100px !important;
    }
}

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .site-header .menu-wrap > ul > li > a {
        padding: 12px 16px !important;
        font-size: 15px;
    }
    
    .site-header .phone h3 {
        font-size: 22px !important;
    }
}

/* ===== HELPER CLASSES ===== */

/* Remove transforms on vertical-center */
.site-header .vertical-center {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
}

/* Fix column classes */
.site-header [class*="col-"] {
    position: relative !important;
    float: none !important;
}

/* Dropdown arrow */
.site-header .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Hide mobile elements on larger screens */
@media (min-width: 768px) {
    .menu-toggle,
    .site-header .visible-xs {
        display: none !important;
    }
}

/* Ensure text is readable */
.site-header a {
    text-decoration: none !important;
}

/* Fix logo display */
.site-header .logo a {
    display: block;
    line-height: 0;
}

.site-header .logo img {
    display: block;
    margin: 0;
}

/* Remove any list styles */
.site-header ul,
.site-header ul li {
    list-style: none !important;
    list-style-type: none !important;
}

/* Ensure proper color inheritance */
.site-header .dropdown-toggle {
    color: inherit !important;
}

/* Remove any default backgrounds */
.site-header,
.site-header > div,
.site-header .menu-wrap,
.site-header .menu-wrap > ul,
.site-header .logo,
.site-header .phone {
    background: transparent !important;
}

/* Only add background on scrolled state */
.site-header.navigation-fixed,
.site-header.inner {
    background: rgba(255, 255, 255, 0.95) !important;
}