/* Mobile Styles - Uses Design System Variables */
/* Import design system first - this file extends it for mobile */
@import url('design-system.css');

@media (max-width: 768px) {

    /* Use semantic background colors - no overrides */
    :root {
        --section-py: var(--section-py-mobile);
    }

    body {
        /* Force light mode on mobile - use system variables */
        background-color: var(--bg-white);
        color: var(--text-secondary);
    }

    /* Ensure hero sections work properly on mobile */
    .hero {
        min-height: auto;
        padding: 120px 5% 60px;
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        width: 100%;
    }

    /* Mobile Navigation */
    .site-nav {
        padding: 12px 5%;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        color: var(--text-primary) !important;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        color: inherit;
    }

    /* Fix "How it works" section */
    #how-it-works {
        background: var(--bg-white);
    }

    #how-it-works h2,
    #how-it-works h3 {
        color: var(--text-primary);
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .process-step {
        background: var(--bg-cream);
        padding: 24px;
        border-radius: var(--radius-xl);
    }

    .step-number {
        background: var(--brand-secondary);
        color: white;
    }

    /* Mobile grids */
    .bento-grid,
    .product-grid,
    .catalog-grid,
    .strategic-5-col {
        grid-template-columns: 1fr;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.75rem;
    }

    /* Forms on mobile */
    .form-input,
    .form-select {
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    /* Buttons full width on mobile */
    .btn {
        width: 100%;
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-top: 1px solid var(--border-subtle);
        padding: 8px;
        justify-content: space-around;
        z-index: var(--z-fixed);
        backdrop-filter: blur(10px);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 12px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.75rem;
    }

    .bottom-nav-item.active {
        color: var(--brand-primary);
    }

    .bottom-nav-icon {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }

    /* Footer adjustments */
    .site-footer {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    /* Container adjustments */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Wizard/booking mobile */
    .wizard-container {
        border-radius: var(--radius-xl);
        margin: 0;
        width: 100%;
    }

    .wizard-header {
        padding: 20px;
    }

    .wizard-body {
        padding: 20px;
    }
}

/* Pull to Refresh (for PWA) */
.ptr-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: var(--text-muted);
    z-index: 10;
    text-align: center;
    height: 50px;
}

/* Swipe Actions */
.swipe-container {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.swipe-action {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: white;
}

.swipe-action.left {
    left: 0;
    background: var(--brand-primary);
}

.swipe-action.right {
    right: 0;
    background: var(--color-error);
}

/* Offline Banner */
.offline-banner {
    display: none;
    background: var(--color-error);
    color: white;
    text-align: center;
    padding: 8px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    font-size: var(--text-sm);
}

/* Share API Integration */
.share-button {
    display: none;
}

@media (max-width: 768px) {
    .share-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        background: var(--bg-offwhite);
        border: 1px solid var(--border-subtle);
        cursor: pointer;
    }

    .share-button svg {
        width: 18px;
        height: 18px;
        color: var(--text-muted);
    }
}

/* Mobile spacing utilities */
@media (max-width: 768px) {
    .mobile-mt-0 {
        margin-top: 0;
    }

    .mobile-mt-2 {
        margin-top: var(--space-2);
    }

    .mobile-mt-4 {
        margin-top: var(--space-4);
    }

    .mobile-mb-0 {
        margin-bottom: 0;
    }

    .mobile-mb-2 {
        margin-bottom: var(--space-2);
    }

    .mobile-mb-4 {
        margin-bottom: var(--space-4);
    }

    .mobile-p-2 {
        padding: var(--space-2);
    }

    .mobile-p-4 {
        padding: var(--space-4);
    }

    .mobile-hidden {
        display: none !important;
    }
}

/* Improved touch targets */
@media (max-width: 768px) {

    body {
        padding-bottom: 80px;
    }

    .btn-primary,
    .nav-links a,
    .catalog-card button,
    .everly-btn {
        min-height: 48px !important;
        padding: 14px 28px !important;
        margin: 8px 0 !important;
        font-size: 1rem !important;
        border-radius: 100px !important;
    }

    .faq-question {
        min-height: 44px;
        padding: 16px;
        font-size: 1rem;
        margin: 8px 0;
    }


    /* Spacing for clickable elements */
    .nav-links a,
    .footer a {
        display: block;
        padding: 12px;
        margin: 8px 0;
    }

    /* Font size adjustments */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    /* Mobile navigation improvements */
    .mobile-menu {
        padding: 16px !important;
    }

    .mobile-menu a {
        display: block;
        padding: 16px;
        border-bottom: 1px solid var(--glass-border);
    }

    /* Form element improvements */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents iOS zoom */
        padding: 12px !important;
    }

    /* Card layout adjustments */
    .glass-card {
        padding: 24px !important;
        margin: 16px 0 !important;
        border-radius: 16px !important;
    }

    /* Image optimizations */
    .hero-image {
        max-height: 300px;
        overflow: hidden;
    }

    /* Better spacing */
    section {
        padding: 60px 24px !important;
    }

    /* Mobile-specific grid adjustments */
    .catalog-grid,
    .everly-grid,
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Improved mobile table display */
    .price-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile-friendly FAQ */
    .faq-item {
        margin: 12px 0;
        border: 1px solid var(--glass-border);
        border-radius: 12px;
    }

    .faq-question {
        padding: 20px 16px;
        font-weight: 600;
    }

    /* Loading states for better UX */
    .loading {
        min-height: 48px;
        position: relative;
    }

    .loading::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        animation: loading 1.5s infinite;
    }

    /* Hero Section Mobile Overrides */
    .hero {
        flex-direction: column !important;
        padding: 100px 5% 40px !important;
        min-height: auto !important;
        text-align: center !important;
        gap: 24px !important;
    }

    .hero-content {
        width: 100% !important;
        z-index: 2;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .hero h1 {
        font-size: 1.8rem !important;
        color: #1A1638 !important;
    }

    .hero .hero-subtitle {
        font-size: 1rem !important;
        color: #1A1638 !important;
    }

    .hero-image-container {
        width: 100% !important;
        flex: none !important;
    }

    .hero-image-container img {
        max-width: 100% !important;
        height: auto !important;
    }

    .hero .trust-indicators {
        color: #1A1638 !important;
        flex-direction: column;
        gap: 12px !important;
    }

    .hero .trust-indicators span:nth-child(2) {
        display: none !important;
    }

    /* Fixed: Remove weird gap and border-radius from Navbar */
    #main-nav {
        margin: 0 !important;
        border-radius: 0 !important;
        top: 0 !important;
        padding: 12px 5% !important;
    }
}

/* Dark mode disabled - using light theme only */
/* @media (prefers-color-scheme: dark) - REMOVED */

/* Animation keyframes */
@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}