.header {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    background: white;
    color: black;
    text-align: left;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100; /* ✅ INCREASED - was 10 */
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.header.hidden {
    transform: translateY(-100%);
}

.header .container {
    width: 92%;
    margin: 0 4%;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
}

.header-spacer {
    height: calc(67px + var(--spacing-md) * 2); /* Logo height + padding top + padding bottom */
}

.logo {
    height: 67px !important; /* force logo size - reduced by 1.2x from 80px */
    width: auto; /* keep aspect ratio */
    display: block; /* remove extra inline gap */
    justify-self: start;
    max-height: 67px !important;
}

.header-nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-self: center;
}

.nav-link {
    color: black;
    text-decoration: none;
    font-size: 1.1rem; /* Increased from var(--font-size-body) */
    /*font-weight: 500;*/
    text-transform: uppercase;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link:active {
    transform: translateY(0);
}

.header-phone {
    justify-self: end;
    color: black;
    font-size: var(--font-size-body);
    /*font-weight: 500;*/
    font-family: var(--font-primary);
}

.header-phone a {
    color: black;
    text-decoration: none;
}

.header-phone a:hover {
    color: black;
    text-decoration: underline;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102; /* ✅ INCREASED - was 21, now above everything */
    position: fixed !important;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    isolation: isolate;
}

.mobile-menu-btn span {
    width: 60px; /* Proportionally larger */
    height: 4px; /* Proportionally larger */
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(14px, 14px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(14px, -14px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: calc(67px + var(--spacing-md) * 2); /* Updated to match reduced header height */
    left: 0;
    right: 0;
    background: white;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 101; /* ✅ INCREASED - was 20, now between header and button */
    opacity: 0;
    visibility: hidden;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

.mobile-menu-content .nav-link {
    font-size: 1.1rem; /* Increased from var(--font-size-body) */
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
}

.mobile-menu-content .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.mobile-menu-phone {
    color: black;
    font-size: var(--font-size-body);
    /*font-weight: 500;*/
    font-family: var(--font-primary);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-phone a {
    color: black;
    text-decoration: none;
}

.mobile-menu-phone a:hover {
    color: black;
    text-decoration: underline;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .header .container {
        grid-template-columns: auto 1fr auto;
        gap: var(--spacing-sm);
    }
    
    .header-nav {
        display: none;
    }
    
    .header-phone {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .header {
        padding: var(--spacing-sm);
    }
    
    .header .container {
        grid-template-columns: auto 1fr auto;
        gap: var(--spacing-sm);
    }
  
    .logo {
        height: 50px; /* Reduced by 1.2x from 60px */
    }
    
    .header-spacer {
        height: calc(50px + var(--spacing-sm) * 2); /* Match mobile header height */
    }
    
    .mobile-menu {
        top: calc(50px + var(--spacing-sm) * 2); /* Smaller header height + padding */
        padding: var(--spacing-md);
    }
    
    .mobile-menu-content .nav-link {
        font-size: 0.9rem;
    }
    
    .mobile-menu-phone {
        font-size: 0.9rem;
    }
}

.header h1 {
    font-size: var(--font-size-h1);
    margin-bottom: var(--spacing-sm);
}

.header p {
    font-size: var(--font-size-body);
    opacity: 0.9;
}
