/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --mobile-content-max: 450px;
    }

    .section {
        padding-left: clamp(14px, 3.6vw, 24px);
        padding-right: clamp(14px, 3.6vw, 24px);
    }

    /* Ограничение вешаем на весь хаб, иначе табы шире панели квиза. */
    #quiz .interactive-hub,
    #music .music-featured-row,
    #biography .bio-content,
    #music .music-tracks-container,
    #gallery .gallery-grid,
    #contacts .contacts-content,
    #toggle-section .toggle-content,
    #media-hub .media-hub-shell {
        width: min(100%, var(--mobile-content-max));
        margin-left: auto;
        margin-right: auto;
    }

    #gallery .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #latest-release .releases-grid.two-columns,
    #latest-release .releases-grid.two-columns .release-card,
    #latest-release #recent-release-card,
    #latest-release #tiktok-side-widget {
        width: min(100%, var(--mobile-content-max));
        margin-left: auto;
        margin-right: auto;
    }

    #latest-release .releases-grid.two-columns {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 901px) and (max-width: 1024px) {
    :root {
        --mobile-content-max: 680px;
    }
}

@media (max-width: 1024px) {
    /* Global Spacing */
    :root {
        --section-padding-y: 3rem;
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Release Section: компактная раскладка живёт в static/styles/sections/releases.css */

    /* Show Section */
    .show-card, .show-card.no-show {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hero cards are styled only in static/styles/hero/hero-cards.css */

    
    .show-details h3 {
        text-align: left !important;
        font-size: 1.2rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }
    
    .venue-details {
        align-items: flex-start !important;
        text-align: left !important;
    }
    
    .venue-details span {
        text-align: left;
        font-size: 0.85rem;
    }
    
    #upcoming-show-ticket-btn {
        justify-content: center;
        width: 100%;
        display: flex;
        margin-top: 0;
        height: 36px;
        padding: 0.5rem 1rem;
    }
    

    .show-date {
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }

    .show-details {
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important; /* Remove min-width constraint */
        text-align: center !important;
    }
    
    .show-details h3 {
        text-align: center !important;
        width: 100%;
        font-size: 1.5rem; /* Reduce font size for mobile */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .venue-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100%;
    }
    
    .venue-details span {
        margin-left: 0 !important; /* Override inline style */
        display: block;
        text-align: center;
    }

    #upcoming-show-ticket-btn {
        width: 100%;
        text-align: center;
        margin-top: var(--spacing-sm);
        display: flex;
        justify-content: center;
    }

    /* Bio Section */
    .bio-content {
        padding: var(--spacing-md);
    }

    /* Gallery Section */
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--spacing-md);
    }

    /* Disable hover effects on mobile to prevent accidental triggering during scroll */
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
    
    .gallery-item:hover .gallery-item-overlay {
        opacity: 0;
    }
    
    .gallery-item:hover .view-btn {
        opacity: 0;
        transform: translateY(10px);
    }
    
    /* Optional: Show overlay on active state (press) if desired, 
       but kept minimal to avoid scroll interference */
    .gallery-item:active .gallery-item-overlay {
        opacity: 1;
        transition: opacity 0.1s;
    }
    
    /* Modal */
    /* Кнопка закрытия — обычный flex-элемент шапки (modal-shell.css);
       относительных смещений быть не должно, иначе она наезжает на контент. */
}

@media (max-width: 480px) {
    .loader-numbers {
        font-size: 3rem;
    }
}
