/* About Page Mobile Navigation Fixes */
/* Fixes hamburger button alignment and duplicate close button issues */

@media screen and (max-width: 768px) {
    
    /* Fix hamburger menu button alignment */
    .navbar .menu-toggle {
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 30px !important;
        height: 25px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        z-index: 1004 !important;
        cursor: pointer !important;
    }
    
    .navbar .menu-toggle span {
        width: 100% !important;
        height: 3px !important;
        background: white !important;
        transition: all 0.3s ease !important;
        border-radius: 2px !important;
    }
    
    /* Ensure navbar has proper layout */
    .navbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
        height: 60px !important;
        position: relative !important;
    }
    
    /* Center the logo properly */
    .navbar .logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 1001 !important;
    }
    
    .navbar .logo img {
        height: 50px !important;
        max-height: 50px !important;
        width: auto !important;
    }
    
    /* Position quote button on right */
    .navbar .quote-button {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1002 !important;
    }
    
    .navbar .quote-button .cta-button {
        font-size: 0.85rem !important;
        padding: 8px 15px !important;
    }
    
    /* Fix sidebar close button - ensure only one is visible */
    .sidenav .sidenav-close {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 1005 !important;
    }
    
    .sidenav .sidenav-close span {
        position: absolute !important;
        width: 20px !important;
        height: 2px !important;
        background-color: white !important;
        transition: all 0.3s ease !important;
    }
    
    .sidenav .sidenav-close span:first-child {
        transform: rotate(45deg) !important;
    }
    
    .sidenav .sidenav-close span:last-child {
        transform: rotate(-45deg) !important;
    }
    
    /* Hide any duplicate close buttons that might exist */
    .sidenav .sidenav-close:nth-of-type(n+2) {
        display: none !important;
    }
    
    /* Sidebar layout fixes - use homepage full-screen styling */
    .sidenav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background-color: var(--primary-color) !important;
        z-index: 10010 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        padding: 80px 20px 20px 20px !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .sidenav.active {
        transform: translateX(0) !important;
    }
    
    /* Ensure nav overlay covers everything when active */
    .nav-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        z-index: 10005 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }
    
    .nav-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    .sidenav .nav-links {
        padding: 0 !important;
        margin-bottom: 40px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .sidenav .nav-links a {
        display: block !important;
        padding: 20px 0 !important;
        font-size: 1.2rem !important;
        color: white !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        transition: background-color 0.3s ease !important;
    }
    
    .sidenav .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
        padding-left: 10px !important;
    }
    
    .sidenav .nav-links a:last-child {
        border-bottom: none !important;
    }
    
    /* Contact info styling in mobile nav */
    .sidenav-contact-info {
        margin: 40px 0 30px 0 !important;
        text-align: center !important;
    }
    
    /* Hide hero content overlay on mobile and show mobile text section below video */
    .hero.about-hero .hero-content {
        display: none !important;
    }
    
    /* Mobile hero text section styling */
    .hero-text-mobile {
        display: block !important;
        padding: 60px 20px !important;
        background-color: var(--primary-color) !important;
        color: white !important;
        text-align: center !important;
    }
    
    .hero-text-mobile h1 {
        font-size: 2.5rem !important;
        font-weight: 700 !important;
        margin-bottom: 15px !important;
        color: white !important;
        line-height: 1.2 !important;
    }
    
    .hero-text-mobile p {
        font-size: 1.1rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin: 0 auto !important;
        line-height: 1.4 !important;
        max-width: 600px !important;
    }
    
    /* Mobile Tab Navigation Fixes - All tabs visible without overlapping */
    .about-tabs-container {
        padding: 0 8px !important;
        overflow: visible !important;
    }
    
    .about-tabs.wide-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        padding: 15px 2px !important;
        gap: 6px !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    .tab-item {
        font-size: 0.75rem !important;
        padding: 8px 6px !important;
        white-space: normal !important;
        flex: 0 1 auto !important;
        flex-shrink: 1 !important;
        letter-spacing: 0.2px !important;
        text-transform: uppercase !important;
        border-radius: 4px !important;
        text-align: center !important;
        margin: 0 !important;
        min-width: 60px !important;
        max-width: 90px !important;
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    .tab-item:hover {
        background-color: rgba(59, 130, 246, 0.1) !important;
    }
    
    .tab-item.active {
        background-color: rgba(59, 130, 246, 0.15) !important;
        color: var(--primary-color) !important;
        font-weight: 600 !important;
    }
    
    .tab-item.active:after {
        bottom: 2px !important;
        width: 12px !important;
        height: 2px !important;
    }
}
