/**
 * Washington Home Improvements - Modern Header Styles
 * Eye-catching design with orange, dark blue, and baby blue accents
 */

/* ========================================
   TOP INFO BAR - DARK BLUE WITH ORANGE ACCENTS
   ======================================== */

.header-top-bar {
    background: linear-gradient(135deg, #1a2332 0%, #0f1823 100%);
    border-bottom: 2px solid #87CEEB;
    padding: 12px 0;
    position: relative;
    overflow: hidden;
}

.header-top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(135, 206, 235, 0.15) 50%,
        transparent 100%);
    animation: shimmerBar 4s ease-in-out infinite;
}

@keyframes shimmerBar {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(50%); }
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.top-bar-centered {
    justify-content: center;
    gap: 15px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.top-bar-item:hover {
    color: #87CEEB;
    transform: translateY(-2px);
}

.top-bar-icon {
    font-size: 1rem;
}

.top-bar-divider {
    color: rgba(135, 206, 235, 0.4);
    font-weight: 300;
}

/* Business Hours in Top Bar */
.top-bar-hours {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-hours-full {
    display: inline;
}

.top-bar-hours-short {
    display: none;
}

.desktop-only-location {
    display: flex;
}

.top-bar-text-badge {
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border: 2px solid #87CEEB;
    border-radius: 20px;
    background: rgba(135, 206, 235, 0.3);
    white-space: nowrap;
}

/* Mobile visibility fix */
@media (max-width: 640px) {
    .top-bar-text-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        border-width: 1.5px;
    }
}

/* ========================================
   MAIN NAVIGATION - WHITE WITH COLORED ACCENTS
   ======================================== */

.site-header-modern {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-nav-modern {
    background: white;
    position: relative;
    padding: 0;
}

/* Desktop Feature Bar - REMOVED (Business hours now in top bar) */

.nav-background-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #ff9100 0%,
        #87CEEB 50%,
        #ff9100 100%);
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-wrapper-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   LOGO - BOLD & MODERN
   ======================================== */

.logo-modern {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo-link-modern {
    text-decoration: none;
    display: flex;
    align-items: center;
    line-height: 0;
}

/* Logo Image Styles */
.logo-image-modern {
    display: block;
    max-width: 100%;
    height: auto;
    width: 105px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-link-modern:hover .logo-image-modern {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(255, 145, 0, 0.3));
}

@media (max-width: 968px) {
    .logo-image-modern {
        width: 85px;
    }

    .logo-modern {
        margin-right: 15px;
    }

    .nav-wrapper-modern {
        padding: 18px 20px;
    }
}

@media (max-width: 640px) {
    .logo-image-modern {
        width: 70px;
    }

    .logo-modern {
        margin-right: 10px;
    }

    .nav-wrapper-modern {
        padding: 18px 15px;
    }
}

/* ========================================
   DESKTOP NAVIGATION MENU
   ======================================== */

.nav-menu-modern {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-items-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-items-modern > li {
    margin: 0;
    position: relative;
}

.nav-items-modern > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a2332;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-items-modern > li > a::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, #ff9100, #ff7c00);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-items-modern > li > a:hover {
    color: #ff9100;
    background: rgba(255, 145, 0, 0.05);
}

.nav-items-modern > li > a:hover::before {
    transform: scaleX(1);
}

.nav-items-modern li.current-menu-item > a,
.nav-items-modern li.current_page_item > a {
    color: #ff9100;
    background: rgba(255, 145, 0, 0.1);
}

.nav-items-modern li.current-menu-item > a::before,
.nav-items-modern li.current_page_item > a::before {
    transform: scaleX(1);
}

.nav-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.menu-item-has-children-modern:hover .nav-arrow {
    transform: rotate(180deg);
}

/* ========================================
   MEGA MENU - MODERN DROPDOWN
   ======================================== */

.menu-item-has-children-modern {
    position: relative;
}

.mega-menu-modern {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(26, 35, 50, 0.15);
    padding: 24px;
    min-width: 650px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 145, 0, 0.1);
    z-index: 1000;
}

.mega-menu-modern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ff9100;
}

.menu-item-has-children-modern:hover .mega-menu-modern {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mega-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 145, 0, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 10px;
    min-height: 120px;
}

.mega-menu-item:hover {
    background: linear-gradient(135deg, #ff9100 0%, #ff7c00 100%);
    border-color: #ff9100;
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(255, 145, 0, 0.3);
}

.mega-menu-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mega-menu-item:hover .mega-menu-image {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 4px 12px rgba(255, 145, 0, 0.4));
}

.mega-menu-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a2332;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.mega-menu-item:hover .mega-menu-title {
    color: white;
}

/* ========================================
   CTA BUTTON - ORANGE GRADIENT
   ======================================== */

.btn-cta-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #ff9100 0%, #ff7c00 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(255, 145, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-cta-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-cta-modern:hover::before {
    left: 100%;
}

.btn-cta-modern:hover {
    background: linear-gradient(135deg, #ff7c00 0%, #ff9100 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.6);
}

.btn-cta-icon {
    font-size: 1.25rem;
}

/* ========================================
   NAV ACTIONS - CTA + MOBILE TOGGLE
   ======================================== */

.nav-actions-modern {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle-modern {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.toggle-line {
    width: 28px;
    height: 3px;
    background: #1a2332;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle-modern[aria-expanded="true"] .toggle-line:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
    background: #ff9100;
}

.mobile-toggle-modern[aria-expanded="true"] .toggle-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle-modern[aria-expanded="true"] .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
    background: #ff9100;
}

/* ========================================
   MOBILE MENU - MODERN SLIDE-IN PANEL
   ======================================== */

.mobile-menu-modern {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    overflow: hidden;
}

.mobile-menu-modern[aria-hidden="false"] {
    display: block;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.mobile-menu-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.9);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    touch-action: none;
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, #1a2332 0%, #0f1823 100%);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid rgba(255, 145, 0, 0.3);
    flex-shrink: 0;
}

/* Mobile Logo */
.mobile-menu-logo {
    display: flex;
    align-items: center;
}

.mobile-menu-logo a {
    display: block;
    line-height: 0;
}

.mobile-logo-image {
    display: block;
    max-width: 100%;
    height: auto;
    width: 90px;
    transition: transform 0.3s ease;
}

.mobile-menu-logo a:hover .mobile-logo-image {
    transform: scale(1.05);
}

.mobile-menu-close-modern {
    width: 40px;
    height: 40px;
    background: rgba(255, 145, 0, 0.2);
    border: 2px solid #ff9100;
    border-radius: 50%;
    color: #ff9100;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close-modern:hover {
    background: #ff9100;
    color: white;
    transform: rotate(90deg);
}

.mobile-menu-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
    touch-action: pan-y;
}

.mobile-nav-items-modern {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-items-modern > li {
    margin: 0;
    border-bottom: 1px solid rgba(135, 206, 235, 0.1);
}

.mobile-nav-items-modern > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-items-modern > li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: #ff9100;
    transition: height 0.3s ease;
}

.mobile-nav-items-modern > li > a:hover {
    background: rgba(255, 145, 0, 0.1);
    padding-left: 28px;
    color: #ff9100;
}

.mobile-nav-items-modern > li > a:hover::before {
    height: 100%;
}

.mobile-nav-items-modern li.current-menu-item > a,
.mobile-nav-items-modern li.current_page_item > a {
    background: rgba(255, 145, 0, 0.2);
    color: #ff9100;
    padding-left: 28px;
}

.mobile-nav-items-modern li.current-menu-item > a::before,
.mobile-nav-items-modern li.current_page_item > a::before {
    height: 100%;
}

/* Services menu item - ensure visibility */
.mobile-nav-items-modern .menu-item-has-children > a {
    color: white;
}

.mobile-nav-items-modern .menu-item-has-children > a:hover {
    color: #87CEEB;
}

/* Mobile Submenu */
.mobile-nav-items-modern .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
}

.mobile-nav-items-modern .sub-menu li {
    border-bottom: 1px solid rgba(135, 206, 235, 0.1);
}

.mobile-nav-items-modern .sub-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px 16px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #87CEEB;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav-items-modern .sub-menu img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(1.2);
    transition: transform 0.3s ease;
}

.mobile-nav-items-modern .sub-menu a:hover {
    background: rgba(255, 145, 0, 0.15);
    color: #ff9100;
    padding-left: 36px;
}

.mobile-nav-items-modern .sub-menu a:hover img {
    transform: scale(1.1);
}

/* Mobile CTA Section */
.mobile-menu-cta {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid rgba(255, 145, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-cta-phone {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(135, 206, 235, 0.3);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-cta-phone:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #87CEEB;
    transform: translateY(-2px);
}

.mobile-cta-icon {
    font-size: 2rem;
}

.mobile-cta-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-cta-label {
    font-size: 0.75rem;
    color: #87CEEB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-cta-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.mobile-cta-quote {
    display: block;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #ff9100 0%, #ff7c00 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(255, 145, 0, 0.4);
    transition: all 0.3s ease;
}

.mobile-cta-quote:hover {
    background: linear-gradient(135deg, #ff7c00 0%, #ff9100 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 968px) {
    /* Hide desktop-only elements */
    .desktop-nav {
        display: none !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-toggle-modern {
        display: flex;
    }

    .btn-cta-modern .btn-cta-text {
        display: none;
    }

    .btn-cta-modern {
        padding: 14px 18px;
    }

    .nav-wrapper-modern {
        gap: 16px;
    }

    .nav-actions-modern {
        gap: 12px;
    }

    /* Fix mobile menu overlap */
    .mobile-menu-panel {
        padding-top: 0;
    }

    .mobile-menu-header {
        padding: 20px;
    }

    .mobile-menu-body {
        padding: 16px 20px;
    }

    /* Mobile submenu items - show icons */
    .mobile-nav-items-modern .sub-menu {
        display: block !important;
    }

    .mobile-nav-items-modern .sub-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px 12px 36px;
    }

    .mobile-nav-items-modern .sub-menu img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .header-top-bar {
        padding: 8px 0;
    }

    .top-bar-left {
        gap: 8px;
        font-size: 0.75rem;
    }

    .top-bar-item {
        font-size: 0.75rem;
    }

    .top-bar-text-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .top-bar-divider {
        display: none;
    }

    /* Hide location on mobile */
    .desktop-only-location {
        display: none !important;
    }

    /* Hide hours completely on mobile */
    .top-bar-hours {
        display: none !important;
    }

    /* Make phone number fit on one line */
    .top-bar-item {
        font-size: 0.75rem;
        gap: 4px;
    }

    .top-bar-icon {
        display: none;
    }

    .top-bar-divider {
        display: none;
    }

    .logo-main {
        font-size: 1.125rem;
    }

    .logo-sub {
        font-size: 0.7rem;
    }

    .nav-wrapper-modern {
        padding: 12px 0;
        gap: 12px;
    }

    .nav-actions-modern {
        gap: 8px;
    }

    .btn-cta-modern {
        padding: 12px 16px;
    }

    .btn-cta-icon {
        font-size: 1.125rem;
    }

    .mobile-toggle-modern {
        padding: 6px;
    }

    .toggle-line {
        width: 24px;
        height: 2.5px;
    }

    .mobile-menu-panel {
        width: 92%;
    }

    .mobile-nav-items-modern .sub-menu img {
        width: 36px;
        height: 36px;
    }

    .mobile-nav-items-modern .sub-menu a {
        padding: 14px 16px 14px 28px;
        gap: 12px;
        font-size: 0.85rem;
    }
}
