/* ============================================
   LEANFLY - MOBILE RESPONSIVENESS FIXES
   Critical fixes for mobile menu and layout
   Add this to the END of responsive.css
   ============================================ */

/* ============================================
   Inline Section Header (Tagline + Title)
   For sections like "Our Story" in about.html
   ============================================ */
.section-header-inline {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.section-header-inline .section-tag {
    display: inline-block;
    background: rgba(218, 65, 65, 0.1);
    color: #da4141;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(218, 65, 65, 0.2);
    white-space: nowrap;
}

.section-header-inline .section-title {
    display: inline-block;
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    color: #FCFCFC;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .section-header-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-header-inline .section-title {
        white-space: normal;
    }
}

/* ============================================
   Centered Section Header (Tagline - Divider - Title)
   Stacked vertically and centered
   ============================================ */
.section-header-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.section-header-center .section-tag {
    display: inline-block;
    background: rgba(218, 65, 65, 0.1);
    color: #da4141;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(218, 65, 65, 0.2);
}

.section-header-center .title-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #da4141, #b83434);
    border-radius: 2px;
    margin: 5px 0;
}

.section-header-center .section-title {
    margin: 5px 0 0 0;
    font-size: clamp(28px, 4vw, 36px);
    color: #FCFCFC;
    font-weight: 700;
    line-height: 1.3;
}

/* ============================================
   CRITICAL: Mobile Menu Toggle Visibility
   ============================================ */
@media (max-width: 767px) {
    /* Force menu toggle to be visible */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(218, 65, 65, 0.2);
        border: 2px solid #da4141;
        color: #FCFCFC !important;
        font-size: 20px;
        border-radius: 8px;
        cursor: pointer;
        backdrop-filter: blur(10px);
        z-index: 1002;
        position: relative;
    }

    .menu-toggle i {
        font-size: 20px;
        color: #FCFCFC !important;
    }

    .menu-toggle:hover {
        background: rgba(218, 65, 65, 0.3) !important;
        border-color: #da4141 !important;
    }

    /* Ensure menu close button is visible when active */
    .menu-close {
        display: none;
    }

    .menu-close.active {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        background: rgba(218, 65, 65, 0.2);
        border: 2px solid #da4141;
        color: #FCFCFC !important;
        font-size: 20px;
        border-radius: 8px;
        cursor: pointer;
        z-index: 1003;
        backdrop-filter: blur(10px);
    }

    .menu-close i {
        color: #FCFCFC !important;
    }

    /* Navigation menu */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, #121212 0%, #0B0C10 100%);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        z-index: 1001;
        padding: 80px 20px 20px;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-menu a {
        color: #FCFCFC !important;
        font-size: clamp(18px, 4vw, 24px);
        font-weight: 600;
        text-transform: uppercase;
        padding: 15px 0;
        text-decoration: none;
    }

    .nav-menu a:hover,
    .nav-menu .current-menu-item a {
        color: #da4141 !important;
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 1000;
        backdrop-filter: blur(5px);
    }

    .nav-overlay.active {
        display: block !important;
    }

    /* Header should stay fixed */
    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
    }

    .site-header.sticky {
        background: rgba(18, 18, 18, 0.98);
    }

    /* Header inner layout */
    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    /* Logo size on mobile */
    .site-logo h1 {
        font-size: 24px !important;
        margin: 0;
    }

    .site-logo a {
        color: #FCFCFC !important;
        text-decoration: none;
    }
}

/* ============================================
   Tablet Responsive (768px - 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .hero-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .mvv-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .faq-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

/* ============================================
   Mobile - General Layout Fixes
   ============================================ */
@media (max-width: 767px) {
    /* Force 1 column layouts */
    .services-grid,
    .features-grid,
    .hero-cards-grid,
    .stats-grid,
    .team-grid,
    .mvv-grid,
    .advantages-grid,
    .faq-grid,
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Section padding */
    section {
        padding: 40px 0 !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Hero section */
    .hero-slider {
        min-height: 100vh;
        height: 100vh;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 42px) !important;
        line-height: 1.2 !important;
    }

    .hero-description {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .hero-badge {
        margin-bottom: 15px !important;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn-hero {
        width: 100%;
        justify-content: center;
    }

    /* Section titles */
    .section-title {
        font-size: clamp(28px, 6vw, 36px) !important;
    }

    .section-description {
        font-size: 15px !important;
    }

    /* Cards */
    .service-card,
    .feature-card,
    .hero-card {
        padding: 25px 20px !important;
    }

    /* Contact form */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 20px;
    }

    /* Social sidebar - hide on mobile or make smaller */
    .social-sidebar {
        right: 10px;
        bottom: 20px;
        top: auto;
        transform: none;
    }

    .social-sidebar-links {
        flex-direction: row;
        padding: 10px 15px;
        width: auto;
        border-radius: 50px;
    }

    .sidebar-brand {
        display: none;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ============================================
   Small Mobile (Max 480px)
   ============================================ */
@media (max-width: 480px) {
    .site-logo h1 {
        font-size: 20px !important;
    }

    .menu-toggle {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .hero-title {
        font-size: 28px !important;
    }

    .hero-description {
        font-size: 14px !important;
    }

    .btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .section-title {
        font-size: 26px !important;
    }

    .card-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
    }
}

/* ============================================
   Fix z-index stacking for mobile menu
   ============================================ */
.site-header {
    z-index: 999;
}

.menu-toggle {
    z-index: 1002;
}

.nav-overlay {
    z-index: 1000;
}

.nav-menu {
    z-index: 1001;
}

.menu-close {
    z-index: 1003;
}

/* ============================================
   Ensure smooth transitions
   ============================================ */
.menu-toggle,
.menu-close,
.nav-menu,
.nav-overlay {
    transition: all 0.3s ease;
}

/* ============================================
   Fix for iOS Safari
   ============================================ */
@supports (-webkit-touch-callout: none) {
    .site-header {
        position: -webkit-sticky;
        position: sticky;
    }

    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }
}
