/**
 * Enhanced Header styles for SchutzCarr Armored Vehicles theme
 */

/* Status Bar with Security Indicators */
.status-bar {
    background-color: var(--color-bg-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xs) 0;
    position: relative;
    overflow: hidden;
    z-index: var(--z-elevated);
}

/* Security pattern background */
.status-bar:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20L0 20z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

.status-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.03em;
}

/* Secure Hotline with Pulse Effect */
.secure-hotline {
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--spacing-2xs) var(--spacing-xs);
    border-radius: var(--radius-sm);
    background-color: rgba(212, 169, 104, 0.05);
    border: 1px solid rgba(212, 169, 104, 0.1);
}

.secure-hotline:before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent-1);
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 rgba(212, 169, 104, 0.4);
    animation: pulse-dot 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 169, 104, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(212, 169, 104, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 169, 104, 0);
    }
}

.secure-hotline i {
    color: var(--color-accent-1);
    margin-right: var(--spacing-xs);
    font-size: 0.9em;
}

.secure-hotline a {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-fast);
    position: relative;
    padding-bottom: 1px;
}

.secure-hotline a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent-1);
    transition: width var(--transition-medium);
}

.secure-hotline a:hover {
    color: var(--color-accent-1);
}

.secure-hotline a:hover:after {
    width: 100%;
}

/* Inventory Count with Dynamic Display */
.inventory-count {
    color: var(--color-text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-2xs) var(--spacing-xs);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--color-accent-1);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: var(--font-weight-medium);
    display: none !important; /* Hidden by default with !important to override any other styles */
}

/* Show inventory count on tablets and larger screens */
@media (min-width: 769px) {
    .inventory-count {
        display: block !important; /* Show on tablets and larger screens with !important */
    }
}

/* Authentication Area with Security Styling */
.auth-area .auth-link {
    display: flex;
    align-items: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-2xs) var(--spacing-xs);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-area .auth-link i {
    margin-right: var(--spacing-xs);
    color: var(--color-accent-1);
    transition: transform var(--transition-fast);
}

.auth-area .auth-link:hover {
    color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.auth-area .auth-link:hover i {
    transform: rotate(-10deg);
}

/* Main Header with Premium Styling */
.main-header {
    background-color: var(--color-bg-primary);
    padding: 0;
    position: relative;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    min-height: 90px;
    display: flex;
    align-items: center;
}

/* Glass effect for header */
.main-header:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(26, 32, 40, 0.8) 0%, rgba(18, 24, 32, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

/* Tactical pattern overlay */
.main-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0;
}

/* Enhanced Logo Area */
.site-branding {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: var(--spacing-md);
    margin-right: var(--spacing-lg);
    flex: 0 0 auto;
}

/* Logo glow effect */
.site-branding:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 169, 104, 0.1) 0%, rgba(212, 169, 104, 0) 70%);
    filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: -1;
}

.site-branding:hover:after {
    opacity: 1;
}

.site-title {
    margin: 0;
    line-height: 1;
}

.site-title a {
    display: flex;
    align-items: center;
    color: var(--color-text-primary);
    text-decoration: none;
}

.schutzcarr-logo {
    max-height: 70px;
    width: auto;
    transition: all var(--transition-fast);
    margin: 10px 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.schutzcarr-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(212, 169, 104, 0.4));
    transform: scale(1.02);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Header Navigation */
.header-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.main-navigation {
    margin-right: var(--spacing-md);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    margin-right: var(--spacing-sm);
}

.main-navigation a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
}

.main-navigation a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-1);
    transition: all var(--transition-medium);
    transform: translateX(-50%);
    opacity: 0;
}

.main-navigation a:hover:after,
.main-navigation .current-menu-item > a:after {
    width: 70%;
    opacity: 1;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-text-primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    margin-right: var(--spacing-md);
    gap: var(--spacing-sm);
}

/* Language Selector */
.language-selector {
    position: relative;
}

/* Hide mobile language switcher on desktop */
.mobile-language-switcher {
    display: none;
}

.language-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
}

.language-toggle i {
    margin-right: var(--spacing-xs);
    color: var(--color-accent-1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    min-width: 120px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.language-selector:hover .language-dropdown,
.language-dropdown.active {
    display: block;
}

.language-dropdown li {
    list-style: none;
}

.language-dropdown a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.language-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.language-dropdown a.active {
    background-color: rgba(212, 169, 104, 0.2);
    color: var(--color-accent-1);
}

.language-dropdown a.active:before {
    content: "✓ ";
    margin-right: 5px;
}

.language-toggle.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(212, 169, 104, 0.2);
    padding: var(--spacing-xs);
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10000; /* Higher than the menu for proper interaction */
    outline: none; /* Remove outline */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-appearance: none; /* Fix for iOS */
    appearance: none; /* Fix for modern browsers */
}

.menu-toggle:hover, .menu-toggle:focus {
    background-color: rgba(212, 169, 104, 0.1);
    outline: none;
    border-color: rgba(212, 169, 104, 0.4);
}

.menu-toggle:active {
    background-color: rgba(212, 169, 104, 0.15);
    transform: scale(0.95);
}

.menu-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--color-accent-1);
    transition: all 0.3s ease;
    margin: 0 auto;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-accent-1);
    transition: all 0.3s ease;
    left: 0;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

/* X animation when active */
.menu-toggle.active .menu-icon {
    background-color: transparent;
}

.menu-toggle.active .menu-icon::before {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--color-accent-1);
}

.menu-toggle.active .menu-icon::after {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-accent-1);
}

/* Add a subtle glow effect to the active menu toggle */
.menu-toggle.active {
    box-shadow: 0 0 8px rgba(212, 169, 104, 0.3);
    border-color: rgba(212, 169, 104, 0.5);
    background-color: rgba(212, 169, 104, 0.1);
    outline: none;
}

/* Enhanced Hero Section with Split Layout */
.hero-section {
    position: relative;
    padding: var(--spacing-3xl) 0;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Tactical background pattern */
.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -2;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Enhanced animated gradient with more depth */
.animated-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(26, 32, 40, 0.95) 0%,
        rgba(18, 24, 32, 0.98) 50%,
        rgba(13, 18, 24, 0.95) 100%);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

/* Tactical grid overlay */
.tactical-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 169, 104, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 169, 104, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* Tactical scan line effect */
.animated-gradient:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0) 50%);
    background-size: 100% 8px;
    opacity: 0.2;
}

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

/* Split layout hero content */
.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: var(--spacing-xl);
}

/* Hero Text Column */
.hero-text-column {
    flex: 1;
    text-align: left;
    padding-right: var(--spacing-lg);
}

/* Hero Image Column */
.hero-image-column {
    flex: 1;
    position: relative;
}

/* Enhanced logo presentation */
.hero-logo {
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
}

.schutzcarr-logo-hero {
    max-width: 240px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: subtle-float 4s ease-in-out infinite;
}

@keyframes subtle-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Dramatic typography treatment */
.hero-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.1em;
    position: relative;
    line-height: 1.1;
}

.hero-title span {
    display: block;
}

.title-accent {
    color: var(--color-accent-1);
    font-size: 0.8em;
    letter-spacing: 0.15em;
    margin-bottom: 0.2em;
}

.title-main {
    font-size: 1.2em;
    position: relative;
}

.title-secondary {
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

/* Tactical highlight effect */
.title-main:before {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 169, 104, 0) 0%, rgba(212, 169, 104, 0.2) 50%, rgba(212, 169, 104, 0) 100%);
    left: -30px;
    animation: scan-line 3s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scan-line {
    0% {
        left: -30px;
    }
    100% {
        left: 100%;
    }
}

/* Enhanced separator with tactical styling */
.animated-separator {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, rgba(212, 169, 104, 0.8) 0%, rgba(212, 169, 104, 0.3) 100%);
    margin: var(--spacing-md) 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(212, 169, 104, 0.3);
}

.animated-separator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    animation: separatorAnimation 2s ease-in-out infinite;
}

@keyframes separatorAnimation {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-accent-1);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
    line-height: 1.6;
}

/* Hero CTA */
.hero-cta {
    margin-top: var(--spacing-lg);
}

.btn-large {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-md);
}

.btn-tactical-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 169, 104, 0) 0%, rgba(212, 169, 104, 0.2) 50%, rgba(212, 169, 104, 0) 100%);
    animation: btn-tactical-scan 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btn-tactical-scan {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Featured Vehicle SVG Illustration */
.featured-vehicle-illustration {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 169, 104, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform var(--transition-medium);
    background-color: var(--color-bg-secondary);
    aspect-ratio: 4/3;
}

.featured-vehicle-illustration:hover {
    transform: perspective(1000px) rotateY(-2deg);
}

.svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.armored-vehicle-svg {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-medium);
}

.featured-vehicle-illustration:hover .armored-vehicle-svg {
    transform: scale(1.03);
}

/* Tactical overlay effects */
.illustration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Tactical corners */
.tactical-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--color-accent-1);
    opacity: 0.7;
}

.top-left {
    top: 10px;
    left: 10px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.top-right {
    top: 10px;
    right: 10px;
    border-top: 2px solid;
    border-right: 2px solid;
}

.bottom-left {
    bottom: 10px;
    left: 10px;
    border-bottom: 2px solid;
    border-left: 2px solid;
}

.bottom-right {
    bottom: 10px;
    right: 10px;
    border-bottom: 2px solid;
    border-right: 2px solid;
}

/* Vehicle badge */
.vehicle-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(18, 24, 32, 0.9);
    border: 1px solid rgba(212, 169, 104, 0.3);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.protection-level {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-1);
    line-height: 1;
}

.badge-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero-content {
        gap: var(--spacing-md);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-sm);
    }

    .header-actions {
        gap: var(--spacing-xs);
    }

    .header-actions .btn-modern {
        padding: 0.45rem 0.9rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
    }

    .hero-text-column {
        text-align: center;
        padding-right: 0;
        margin-bottom: var(--spacing-xl);
    }

    .animated-separator {
        margin: var(--spacing-md) auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .featured-vehicle-illustration {
        transform: perspective(1000px) rotateY(0);
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 991px) { /* Increased breakpoint to include tablets */
    .hero-section {
        padding: var(--spacing-xl) 0;
    }

    /* Hide the hero logo on mobile devices */
    .hero-logo {
        display: none;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-md);
    }

    .hero-description {
        font-size: var(--font-size-sm);
    }

    .featured-vehicle-illustration {
        max-width: 100%;
        aspect-ratio: 16/10;
    }

    .vehicle-badge {
        padding: var(--spacing-2xs) var(--spacing-xs);
    }

    .protection-level {
        font-size: var(--font-size-md);
    }

    .badge-label {
        font-size: var(--font-size-2xs);
    }

    .status-bar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .secure-hotline, .auth-area {
        margin-bottom: var(--spacing-xs);
    }

    /* Inventory count is hidden with !important in the base styles */

    .header-content {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }

    .site-branding {
        margin: 0 auto;
        padding: 0;
    }

    .schutzcarr-logo {
        max-height: 60px;
        margin: 8px 0;
    }

    .menu-toggle {
        display: block;
        margin-right: auto;
        margin-left: 0;
        position: absolute; /* Back to absolute positioning within the header */
        left: 15px;
        top: 50%; /* Center vertically in the header */
        transform: translateY(-50%); /* Center vertically in the header */
        z-index: 10000; /* Ensure it's above everything */
    }

    .main-navigation {
        position: relative;
        z-index: 1001; /* Higher than the backdrop */
        width: 100%; /* Ensure full width */
    }

    /* Ensure main navigation container has proper positioning */
    .header-navigation {
        position: relative;
    }

    /* Mobile menu - slide-in design from right */
    .main-navigation ul,
    #primary-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 90px;
        right: 0;
        width: 75%; /* Use percentage width for better responsiveness */
        max-width: 280px; /* Maximum width for larger screens */
        background-color: var(--color-bg-primary);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        border-left: 1px solid var(--color-accent-1);
        padding: 15px;
        z-index: 1000;
        transform: translateX(100%);
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        height: auto;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding-left: 20px; /* Reduced padding */
    }

    /* No separate close button - using the hamburger/X toggle instead */

    /* Active state - slide in from right */
    .main-navigation.active ul,
    #primary-menu.active {
        display: flex !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Prevent scrolling when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }

    /* Ensure all menu items are clickable */
    body.mobile-menu-open .main-navigation,
    body.mobile-menu-open #primary-menu,
    body.mobile-menu-open .main-navigation li,
    body.mobile-menu-open .main-navigation a {
        pointer-events: auto !important;
    }

    .main-navigation li {
        margin: 0 0 10px 0;
        width: 100%;
        position: relative;
        z-index: 1001;
    }

    .main-navigation a {
        padding: 12px 15px; /* Simplified padding */
        display: block;
        color: var(--color-text-primary);
        text-align: left; /* Left-aligned text instead of centered */
        font-weight: 600;
        cursor: pointer;
        position: relative;
        z-index: 1001;
        border-radius: 4px; /* Add border radius for better visual appearance */
        transition: all 0.2s ease; /* Smooth transition for hover effects */
    }

    /* Style for home icon in mobile menu */
    .main-navigation a i {
        margin-right: 8px;
        color: var(--color-accent-1);
    }

    /* Simple hover effect */
    .main-navigation a:hover {
        color: var(--color-accent-1);
    }

    .main-navigation a:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(212, 169, 104, 0.3);
    }

    /* Active menu item */
    .main-navigation .current-menu-item a {
        background-color: rgba(212, 169, 104, 0.2);
        color: var(--color-accent-1);
        font-weight: 700;
    }

    .header-navigation {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-top: var(--spacing-md);
    }

    .main-navigation {
        margin-right: 0;
        display: flex;
        justify-content: flex-start;
    }

    /* Hide the Let's Talk button on mobile as it interferes with the menu button */
    .header-actions .btn-modern.btn-primary {
        display: none;
    }

    /* Position the header actions container */
    .header-actions {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header-actions {
        margin-right: 0;
        gap: var(--spacing-xs);
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .header-actions .btn-modern {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }

    .header-actions .btn-modern i {
        margin-right: 0.3rem;
    }

    .language-selector {
        display: none;
    }

    /* Mobile Language Switcher in Menu */
    .mobile-language-switcher {
        border-top: 1px solid rgba(212, 169, 104, 0.2);
        margin-top: 15px;
        padding-top: 15px;
        display: block !important; /* Ensure it's visible in mobile menu */
    }

    .mobile-language-selector {
        width: 100%;
    }

    .mobile-language-label {
        display: flex;
        align-items: center;
        color: var(--color-accent-1);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 10px;
        padding: 8px 15px;
    }

    .mobile-language-label i {
        margin-right: 8px;
        color: var(--color-accent-1);
    }

    .mobile-language-options {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mobile-lang-option {
        display: block;
        padding: 10px 25px;
        color: var(--color-text-secondary);
        text-decoration: none;
        border-radius: 4px;
        transition: all 0.2s ease;
        font-size: 0.9rem;
        border: 1px solid transparent;
    }

    .mobile-lang-option:hover {
        color: var(--color-accent-1);
        background-color: rgba(212, 169, 104, 0.1);
        border-color: rgba(212, 169, 104, 0.2);
    }

    .mobile-lang-option.active {
        color: var(--color-accent-1);
        background-color: rgba(212, 169, 104, 0.15);
        border-color: rgba(212, 169, 104, 0.3);
        font-weight: 600;
    }

    /* Menu toggle position remains the same on smaller screens */
    /* No need to adjust as it's positioned relative to the header */

    /* Adjust mobile menu for smaller screens */
    .main-navigation ul,
    #primary-menu {
        width: 85%; /* Wider percentage on smaller screens */
        padding-left: 15px; /* Reduced padding on smaller screens */
    }

    #primary-menu.active {
        display: flex !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}
