/* Mobile-First Responsive Styles */

/* Base mobile styles */
@media (max-width: 767px) {
    :root {
        --header-height: 60px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Navigation */
    .nav-links {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 1rem;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: var(--text-main);
        font-size: 1.5rem;
        cursor: pointer;
        margin-left: 1rem;
    }
    
    /* Hero Section */
    .hero-content {
        flex-direction: column;
        padding-top: 2rem;
        padding-bottom: 3rem;
    }
    
    .hero-text {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-btns .btn {
        width: 100%;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Mobile Showcase */
    .mobile-showcase-container {
        padding: 0 1rem;
        margin: 0 -1rem; /* Compensate for container padding */
    }
    
    .mobile-frame {
        width: 280px !important;
        height: auto !important;
        min-height: 500px;
        aspect-ratio: 9/16;
        margin: 0 0.5rem;
    }
    
    .mobile-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Gallery Adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .gallery-item {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        height: auto;
        aspect-ratio: auto;
    }
    
    .gallery-item img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
        padding: 0.5rem;
        background: var(--bg-surface);
        border-radius: var(--radius-md);
    }
    
    .gallery-overlay {
        display: none; /* Hide overlay on mobile for better touch */
    }
    
    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* General */
    .section {
        padding: 3rem 0;
    }
    
    .section-header {
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Desktop styles */
@media (min-width: 992px) {
    .mobile-menu-btn,
    .mobile-bottom-nav {
        display: none;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-surface);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.5rem 0;
    flex: 1;
    transition: all 0.2s ease;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.mobile-nav-item.active,
.mobile-nav-item:active {
    color: var(--primary);
}

.mobile-nav-item span {
    display: block;
    margin-top: 0.2rem;
}

/* Add padding to body to prevent content from being hidden behind the bottom nav */
@media (max-width: 991px) {
    body {
        padding-bottom: 60px;
    }
}

/* Prevent zoom on input focus on mobile */
@supports (-webkit-overflow-scrolling: touch) {
    input, textarea {
        font-size: 16px !important;
    }
}

/* Fix for iOS viewport units */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}

/* Ensure proper scaling on mobile */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Fix for mobile tap highlight */
a, button, input, textarea, select {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text size adjustment */
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Fix for iOS viewport units */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}
