/* Global responsive pass for tablets and phones. */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

.nav-container,
.container,
.page-container,
.featured-container,
.murals-container,
.main-techniques-container,
.materials-container,
.techniques-container,
.art-treasures-container,
.contact-container,
.faq-container,
.content-container,
.timeline-container,
.figures-container,
.famous-painters-container,
.cultural-impact-container,
.managed-section-inner,
.detail-content,
.art-heritage-container,
.art-categories-section {
    width: min(100%, 1200px);
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
}

@media (max-width: 1180px) {
    .header {
        position: sticky;
    }

    .nav-container {
        justify-content: center;
        gap: 14px;
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .logo {
        height: 36px;
    }

    .site-prefix-icon {
        width: 40px;
        height: 40px;
        margin-left: 0;
        margin-right: 4px;
    }

    .nav-container nav {
        width: 100%;
    }

    .nav-menu {
        display: flex !important;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-menu li a {
        display: block;
        padding: 6px 10px;
        font-size: 13px;
    }

    .banner {
        margin-top: 0;
        height: clamp(360px, 58vw, 500px);
    }
}

@media (max-width: 900px) {
    .banner-title {
        max-width: 90vw;
        font-size: clamp(28px, 8vw, 40px) !important;
    }

    .banner-subtitle {
        max-width: 88vw;
        font-size: clamp(14px, 4vw, 18px) !important;
    }

    .home-hero-brand {
        left: 18px !important;
        right: 18px !important;
        bottom: 54px !important;
        max-width: calc(100vw - 36px) !important;
    }

    .home-hero-brand-names span {
        width: auto;
        max-width: 100%;
        white-space: normal;
        font-size: clamp(24px, 8vw, 34px);
    }

    .home-hero-brand-subtexts span {
        font-size: 13px;
    }

    .carousel-dots {
        bottom: 18px;
    }

    .section-title {
        font-size: clamp(24px, 7vw, 32px);
        margin-bottom: 26px;
    }

    .section-subtitle {
        margin-top: -14px;
        margin-bottom: 32px;
        font-size: 14px;
    }

    .art-showcase,
    .art-right-column,
    .art-text-image,
    .artwork-content,
    .featured-artwork .artwork-content,
    .famous-murals-grid,
    .murals-row,
    .techniques-grid,
    .comparison-grid,
    .materials-grid,
    .social-comparison-grid,
    .cards-grid,
    .art-grid,
    .category-grid,
    .categories-grid,
    .culture-gallery,
    .contact-cards,
    .profile-contact-layout,
    .contact-profile-card,
    .faq-grid,
    .culture-section,
    .culture-grid,
    .heritage-grid,
    .expression-container,
    .expression-content,
    .impact-grid,
    .painters-grid,
    .timeline-bottom,
    .timeline-content,
    .managed-content-card,
    .managed-timeline-item,
    .detail-layout,
    .detail-layout.media-left,
    .detail-layout.media-right,
    .detail-main,
    .detail-gallery-grid,
    .related-grid,
    .figures-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .art-heritage-section,
    .featured-section,
    .famous-murals,
    .techniques-section,
    .contact-section,
    .culture-section,
    .timeline-section,
    .managed-page-section,
    .managed-timeline-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .art-heritage-section .art-showcase {
        padding-top: 110px;
    }

    .art-main-image,
    .art-right-main-image,
    .art-right-gallery-item,
    .artwork-image img,
    .main-technique-image,
    .featured-artwork img,
    .silk-road-map,
    .expression-image,
    .managed-content-media,
    .managed-timeline-media,
    .detail-media,
    .detail-gallery-grid img {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    .art-main-image,
    .art-right-main-image,
    .art-right-gallery-item,
    .managed-content-media,
    .managed-timeline-media,
    .detail-media {
        aspect-ratio: 4 / 3;
        overflow: hidden;
    }

    .art-main-image img,
    .art-right-main-image img,
    .art-right-gallery-item img,
    .managed-content-media img,
    .managed-timeline-media img,
    .detail-media img {
        width: 100%;
        height: 100% !important;
        object-fit: cover;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline {
        width: 100%;
    }

    .timeline::before {
        left: 18px !important;
        transform: none !important;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        display: block !important;
        transform: none !important;
        margin-bottom: 28px !important;
        padding-left: 34px;
    }

    .timeline-dot {
        left: 18px !important;
        top: 28px !important;
        transform: translate(-50%, 0) !important;
    }

    .timeline-content {
        width: 100% !important;
        margin: 0 0 18px !important;
        padding: 22px !important;
    }

    .timeline-date {
        margin: 8px 0 0 !important;
        white-space: normal;
    }

    .timeline-title-text {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .timeline-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3;
        align-self: stretch !important;
    }

    .art-image-caption,
    .art-image-caption-main,
    .art-image-caption-side,
    .art-image-caption-dark,
    .art-image-caption-light {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
    }

    .module-detail-inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .module-detail-media,
    .module-detail-media img,
    .module-detail-media video,
    .module-detail-media iframe {
        min-height: 0 !important;
    }

    .module-detail-body {
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        padding: 20px !important;
    }

    .module-detail-body::before {
        display: none !important;
    }

    .module-detail-kicker,
    .module-detail-body h3,
    .module-detail-link {
        margin: 0 0 10px !important;
    }
}

@media (max-width: 640px) {
    .nav-container {
        justify-content: flex-start;
    }

    .nav-container nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-container nav::-webkit-scrollbar {
        display: none;
    }

    .nav-menu {
        display: flex !important;
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .nav-menu li {
        flex: 0 0 auto;
    }

    .banner {
        height: 72vh;
        min-height: 420px;
    }

    .carousel-nav {
        display: none;
    }

    .carousel-dot {
        width: 9px;
        height: 9px;
    }

    .home-hero-brand {
        bottom: 46px !important;
    }

    .home-hero-brand-subtexts {
        max-height: 124px;
        overflow: hidden;
    }

    .art-heritage-section .art-showcase {
        padding-top: 104px;
    }

    .art-heritage-section .art-heritage-container > .section-title {
        max-width: calc(100vw - 32px);
        font-size: clamp(26px, 8vw, 34px);
    }

    .art-heritage-section .art-heritage-container > .section-subtitle {
        max-width: calc(100vw - 32px);
    }

    .category-card,
    .art-card,
    .mural-card,
    .technique-card,
    .technique-detail-card,
    .comparison-card,
    .material-card,
    .painter-card,
    .artist-card,
    .history-card,
    .culture-card,
    .period-card,
    .event-card,
    .figure-card,
    .featured-artwork,
    .module-detail-card,
    .managed-content-card,
    .managed-timeline-item,
    .contact-card {
        border-radius: 6px;
    }

    .banner-overlay {
        padding: 0 16px;
        text-align: center;
    }

    .banner-btn,
    .artwork-btn,
    .learn-more-btn,
    .module-detail-link {
        max-width: 100%;
        white-space: normal;
    }

    .mural-overlay {
        padding: 16px !important;
    }

    .mural-overlay h3,
    .module-detail-body h3,
    .managed-content-body h3,
    .managed-timeline-body h3 {
        overflow-wrap: anywhere;
    }

    .mural-overlay p,
    .module-detail-body p,
    .managed-content-body p,
    .managed-timeline-body p,
    .artwork-info p,
    .technique-content p,
    .comparison-content p,
    .material-content p {
        overflow-wrap: break-word;
    }

    .module-detail-card,
    .managed-content-card,
    .managed-timeline-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .detail-hero,
    .detail-hero img {
        height: 320px !important;
        min-height: 320px !important;
    }

    .viewer-dialog {
        width: 100vw;
        height: 100vh;
        padding: 12px;
    }

    .viewer-image {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 150px);
    }
}
