/**
 * Bay Area Service Hub - Header & Footer
 * Premium Site-Wide Navigation & Footer Design
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ========================================
   DESIGN SYSTEM VARIABLES
   ======================================== */

:root {
    /* Primary Colors */
    --bash-primary: #194FAD;
    --bash-primary-dark: #0F3A82;
    --bash-primary-light: #5A9BFF;
    --bash-primary-ultra-light: #EBF2FF;

    /* Success/Trust */
    --bash-success: #22C55E;
    --bash-success-dark: #16A34A;

    /* Text */
    --bash-text-primary: #0F172A;
    --bash-text-secondary: #475569;
    --bash-text-muted: #94A3B8;

    /* Surfaces */
    --bash-bg-primary: #FFFFFF;
    --bash-bg-secondary: #F8FAFC;

    /* Borders */
    --bash-border: #E2E8F0;
    --bash-border-light: #F1F5F9;

    /* Shadows */
    --bash-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --bash-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07);
    --bash-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1);

    /* Radii */
    --bash-radius-sm: 6px;
    --bash-radius: 10px;
    --bash-radius-lg: 16px;
    --bash-radius-full: 9999px;

    /* Header Height */
    --bash-header-height: 80px;
}

/* ========================================
   CUSTOM HEADER
   ======================================== */

/* Custom Header Container */
.bash-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Adjust header when WordPress admin bar is present */
.admin-bar .bash-site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .bash-site-header {
        top: 46px; /* Admin bar is taller on mobile */
    }
}

/* Scrolled state */
.bash-site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--bash-shadow);
}

.bash-site-header.scrolled .bash-header-logo {
    color: var(--bash-text-primary);
}

.bash-site-header.scrolled .bash-header-nav-link {
    color: var(--bash-text-secondary);
}

.bash-site-header.scrolled .bash-header-nav-link:hover {
    color: var(--bash-primary);
}

/* Header Inner */
.bash-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: var(--bash-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.bash-header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.bash-header-logo:hover {
    color: white;
    opacity: 0.85;
}

.bash-site-header.light .bash-header-logo:hover,
.bash-site-header.scrolled .bash-header-logo:hover {
    color: var(--bash-primary);
    opacity: 1;
}

.bash-header-logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: var(--bash-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bash-shadow-sm);
}

.bash-header-logo-icon svg {
    width: 24px;
    height: 24px;
    color: var(--bash-primary);
}

.bash-header-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bash-header-logo-text span {
    opacity: 0.85;
    font-weight: 600;
}

/* Navigation */
.bash-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* WordPress Menu Styles */
.bash-header-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bash-header-menu > li {
    position: relative;
}

.bash-header-menu > li > a {
    display: block;
    padding: 10px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--bash-radius);
    transition: all 0.2s ease;
}

.bash-header-menu > li > a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.bash-site-header.scrolled .bash-header-menu > li > a {
    color: var(--bash-text-secondary);
}

.bash-site-header.scrolled .bash-header-menu > li > a:hover {
    color: var(--bash-primary);
    background: var(--bash-primary-ultra-light);
}

.bash-site-header.light .bash-header-menu > li > a {
    color: var(--bash-text-secondary);
}

.bash-site-header.light .bash-header-menu > li > a:hover {
    color: var(--bash-primary);
    background: var(--bash-primary-ultra-light);
}

/* Dropdown/Submenu styling */
.bash-header-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.bash-header-menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.bash-header-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 200px;
    background: white;
    border-radius: var(--bash-radius-lg);
    box-shadow: var(--bash-shadow-lg);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.bash-header-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.bash-header-menu .sub-menu li a {
    display: block;
    padding: 12px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--bash-text-secondary);
    text-decoration: none;
    border-radius: var(--bash-radius);
    transition: all 0.15s ease;
}

.bash-header-menu .sub-menu li a:hover {
    background: var(--bash-primary-ultra-light);
    color: var(--bash-primary);
}

/* Legacy nav link styles (kept for CTA) */
.bash-header-nav-link {
    padding: 10px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--bash-radius);
    transition: all 0.2s ease;
}

.bash-header-nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.bash-site-header.scrolled .bash-header-nav-link:hover {
    background: var(--bash-primary-ultra-light);
}

/* CTA Button */
.bash-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bash-success);
    color: white;
    border-radius: var(--bash-radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    margin-left: 16px;
}

.bash-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

/* Mobile Menu Toggle - use !important to override GeneratePress button defaults */
button.bash-header-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none;
    border-radius: var(--bash-radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.bash-site-header.scrolled button.bash-header-mobile-toggle {
    background: var(--bash-bg-secondary) !important;
}

/* Mobile hamburger icon - CSS-based lines (more reliable than SVG) */
.bash-mobile-toggle-icon {
    width: 24px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bash-mobile-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.bash-site-header.scrolled .bash-mobile-toggle-line {
    background: var(--bash-text-primary);
}

/* Mobile Navigation */
.bash-mobile-nav {
    display: none;
    position: fixed;
    top: var(--bash-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 24px;
    z-index: 999;
    overflow-y: auto;
}

/* Adjust mobile nav when admin bar is present */
.admin-bar .bash-mobile-nav {
    top: calc(var(--bash-header-height) + 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .bash-mobile-nav {
        top: calc(var(--bash-header-height) + 46px);
    }
}

.bash-mobile-nav.active {
    display: block;
}

/* WordPress Mobile Menu Styles */
.bash-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bash-mobile-menu li a {
    display: block;
    padding: 16px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--bash-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--bash-border-light);
}

.bash-mobile-menu li a:hover {
    color: var(--bash-primary-dark);
}

 /* Mobile submenu - hidden by default */                                                
 .bash-mobile-menu .sub-menu {                                                           
    list-style: none;                                                                   
    margin: 0;                                                                          
    padding: 0 0 0 20px;                                                                
    display: none;                                                                      
}                                                                                       
                                                                                        
/* Show submenu when parent has submenu-open class */                                   
.bash-mobile-menu .menu-item-has-children.submenu-open > .sub-menu {                    
    display: block;                                                                     
}                                                                                       
                                                                                        
.bash-mobile-menu .sub-menu li a {                                                      
    font-size: 16px;                                                                    
    font-weight: 500;                                                                   
    color: var(--bash-text-secondary);                                                  
    padding: 12px 0;                                                                    
    display: block;                                                                     
}                                                                                       
                                                                                        
/* Chevron indicator for items with submenus */                                         
.bash-mobile-menu .menu-item-has-children > a {                                         
    display: flex;                                                                      
    justify-content: space-between;                                                     
    align-items: center;                                                                
}                                                                                       
                                                                                        
.bash-mobile-menu .menu-item-has-children > a::after {                                  
    content: '';                                                                        
    width: 8px;                                                                         
    height: 8px;                                                                        
    border-right: 2px solid currentColor;                                               
    border-bottom: 2px solid currentColor;                                              
    transform: rotate(45deg);                                                           
    transition: transform 0.2s ease;                                                    
}                                                                                       
                                                                                        
/* Rotate chevron when open */                                                          
.bash-mobile-menu .menu-item-has-children.submenu-open > a::after {                     
    transform: rotate(-135deg);                                                         
} 

/* Legacy mobile link styles */
.bash-mobile-nav-link {
    display: block;
    padding: 16px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--bash-text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--bash-border-light);
}

.bash-mobile-nav-link:hover {
    color: var(--bash-primary);
}

.bash-mobile-nav-cta {
    display: block;
    margin-top: 24px;
    padding: 16px 24px;
    background: var(--bash-success);
    color: white;
    border-radius: var(--bash-radius-lg);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

/* Body padding to account for fixed header (non-front-page only) */
body:not(.home) {
    padding-top: var(--bash-header-height);
}

/* Admin bar adjustment for body padding */
body.admin-bar:not(.home) {
    padding-top: calc(var(--bash-header-height) + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar:not(.home) {
        padding-top: calc(var(--bash-header-height) + 46px);
    }
}

/* ========================================
   CUSTOM FOOTER
   ======================================== */

/* Custom Footer */
.bash-site-footer {
    background: linear-gradient(180deg, #0F172A 0%, #0A1628 100%);
    color: white;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.bash-site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.bash-footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 32px 40px;
}

/* Footer Top - Grid */
.bash-footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Brand Column */
.bash-footer-brand {
    max-width: 300px;
}

.bash-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
}

.bash-footer-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--bash-primary);
    border-radius: var(--bash-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bash-footer-logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.bash-footer-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.bash-footer-tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Footer Social Icons */
.bash-footer-social {
    display: flex;
    gap: 12px;
}

.bash-footer-social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--bash-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bash-footer-social-link:hover {
    background: var(--bash-primary);
    transform: translateY(-2px);
}

.bash-footer-social-link svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Footer Link Columns */
.bash-footer-column {

}

.bash-footer-column-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.bash-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bash-footer-links li {
    margin-bottom: 14px;
}

.bash-footer-links a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bash-footer-links a:hover {
    color: white;
    padding-left: 4px;
}

/* Footer Contact Info */
.bash-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.bash-footer-contact-icon {
    width: 20px;
    height: 20px;
    color: var(--bash-primary-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.bash-footer-contact-item a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bash-footer-contact-item a:hover {
    color: white;
}

/* Footer Bottom */
.bash-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
}

.bash-footer-copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.bash-footer-copyright a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bash-footer-copyright a:hover {
    color: white;
}

.bash-footer-legal {
    display: flex;
    gap: 24px;
}

.bash-footer-legal a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bash-footer-legal a:hover {
    color: white;
}

/* Trust Badge in Footer */
.bash-footer-trust {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--bash-radius);
    margin-top: 32px;
}

.bash-footer-trust-icon {
    width: 40px;
    height: 40px;
    background: var(--bash-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bash-footer-trust-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.bash-footer-trust-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.bash-footer-trust-text strong {
    color: white;
    font-weight: 600;
}

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

@media (max-width: 1024px) {
    .bash-footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .bash-footer-brand {
        grid-column: span 2;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .bash-header-inner {
        padding: 0 20px;
    }

    .bash-header-nav {
        display: none;
    }

    .bash-header-cta {
        display: none;
    }

    button.bash-header-mobile-toggle {
        display: flex;
    }

    .bash-footer-inner {
        padding: 60px 20px 32px;
    }

    .bash-footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .bash-footer-brand {
        grid-column: span 1;
    }

    .bash-footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .bash-footer-legal {
        justify-content: center;
    }
}

/* ========================================
   ALTERNATE HEADER STATES
   ======================================== */

/* Light header for non-hero pages */
.bash-site-header.light {
    background: white;
    box-shadow: var(--bash-shadow-sm);
}

.bash-site-header.light .bash-header-logo {
    color: var(--bash-text-primary);
}

.bash-site-header.light .bash-header-nav-link {
    color: var(--bash-text-secondary);
}

.bash-site-header.light .bash-header-nav-link:hover {
    color: var(--bash-primary);
    background: var(--bash-primary-ultra-light);
}

.bash-site-header.light button.bash-header-mobile-toggle {
    background: var(--bash-bg-secondary) !important;
}

.bash-site-header.light .bash-mobile-toggle-line {
    background: var(--bash-text-primary);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .bash-site-header,
    .bash-site-footer {
        display: none !important;
    }

    body {
        padding-top: 0;
    }
}
