﻿/* ==========================================================================
   Universal Responsive Header Optimization (down to 320px screen width)
   ========================================================================== */

/* Prevent horizontal scrollbar on small devices */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Base Header container */
.th-header {
    width: 100%;
    position: relative;
    z-index: 1000;
}

/* Top bar cleanup on mobile */
@media (max-width: 991px) {
    .menu-top {
        display: none !important; /* On mobile, keep clean single header bar */
    }
    
    .th-header.header-absolute {
        position: relative !important;
        background: #ffffff;
    }
    
    .sticky-wrapper {
        background: #ffffff;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
        border-bottom: 1px solid #edf4f0;
        padding: 8px 0;
    }
    
    .sticky-wrapper.sticky {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        z-index: 9999 !important;
        padding: 6px 0 !important;
    }
    
    /* Ensure mobile logo is visible in sticky bar */
    .header-logo.style1 {
        display: block !important;
    }
    
    .header-logo.style1 img,
    .logo__adjestment {
        max-height: 44px !important;
        width: auto !important;
        max-width: 190px !important;
        object-fit: contain;
    }
    
    /* Mobile Right Controls: Hamburger + Mobile Call button */
    .nav__styling_items {
        padding: 0 4px;
    }
    
    .th-menu-toggle {
        width: 42px !important;
        height: 42px !important;
        line-height: 42px !important;
        border-radius: 10px !important;
        background: #f0fdf4 !important;
        border: 1.5px solid #c6f6d5 !important;
        color: #1e7046 !important;
        font-size: 18px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        transition: all 0.25s ease !important;
        cursor: pointer;
    }
    
    .th-menu-toggle:hover,
    .th-menu-toggle:active {
        background: #1e7046 !important;
        color: #ffffff !important;
        border-color: #1e7046 !important;
        transform: scale(1.05);
    }
}

/* Extra small mobile screens (e.g. 320px - 380px) */
@media (max-width: 420px) {
    .header-logo.style1 img,
    .logo__adjestment {
        max-height: 38px !important;
        max-width: 155px !important;
    }
    
    .th-menu-toggle {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 340px) {
    .header-logo.style1 img,
    .logo__adjestment {
        max-height: 34px !important;
        max-width: 135px !important;
    }
    
    .th-menu-toggle {
        width: 36px !important;
        height: 36px !important;
        font-size: 15px !important;
    }
}

/* ==========================================================================
   MOBILE MENU DRAWER STYLING
   ========================================================================== */
.th-menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(6, 23, 14, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.th-menu-wrapper.th-body-visible {
    opacity: 1;
    visibility: visible;
}

.th-menu-area {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: #ffffff;
    padding: 30px 24px 40px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.th-menu-wrapper.th-body-visible .th-menu-area {
    transform: translateX(0);
}

.th-menu-wrapper .th-menu-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #f1f5f3 !important;
    color: #1e7046 !important;
    border: none !important;
    font-size: 16px !important;
}

.th-menu-wrapper .mobile-logo {
    margin-bottom: 25px;
    text-align: left;
}

.th-menu-wrapper .mobile-logo img {
    max-height: 42px;
    width: auto;
}

.th-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.th-mobile-menu ul li {
    border-bottom: 1px solid #f0f6f2;
}

.th-mobile-menu ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
    color: #1c3829;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.th-mobile-menu ul li a:hover,
.th-mobile-menu ul li a.active {
    color: #1e7046;
    padding-left: 6px;
    font-weight: 700;
}

/* Mobile Quick Contact Card at bottom of Drawer */
.mobile-drawer-contact {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid #e5ede8;
    text-align: left;
}

.mobile-drawer-btn-emergency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1e7046;
    color: #ffffff !important;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(30, 112, 70, 0.25);
}

.mobile-drawer-info {
    font-size: 12px;
    color: #647d70;
    line-height: 1.5;
}
