/* Mobile-First Responsive Design */

/* Touch-friendly navigation */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease;
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-container::after {
        content: '☰';
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }
    
    .nav-container.active::after {
        content: '✕';
    }
}

/* Mobile gallery optimizations */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0 10px;
    }
    
    .card {
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .card img {
        height: 250px;
    }
    
    .search-input {
        width: 100%;
        max-width: none;
        margin: 0 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Mobile modal enhancements */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 10px;
    }
    
    .modal img {
        max-height: 70vh;
        width: 100%;
        object-fit: contain;
    }
    
    .modal-nav {
        font-size: 2.5rem;
        padding: 15px 20px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
    }
    
    .prev {
        left: 10px;
    }
    
    .next {
        right: 10px;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 35px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .caption {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    .cta-button {
        padding: 15px 35px;
        font-size: 1.1rem;
        min-height: 44px; /* iOS touch target */
    }
    
    .lang-btn {
        padding: 10px 15px;
        min-height: 44px;
        font-size: 1rem;
    }
}

/* Hero section mobile */
@media (max-width: 768px) {
    .hero {
        margin-top: 80px;
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* Video mobile optimization */
@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .artist-video {
        width: 100%;
        height: auto;
        max-height: 250px;
    }
}

/* Prevent horizontal scroll */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .modal {
        -webkit-overflow-scrolling: touch;
    }
    
    input, textarea {
        font-size: 16px; /* Prevents zoom */
    }
    
    .card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .modal-nav {
        touch-action: manipulation;
    }
    
    .card {
        will-change: transform;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .modal img {
        max-height: 85vh;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}