/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (min-width: 2000px) {
    html {
        font-size: 18px;
    }

    .container {
        max-width: var(--wide-width);
        padding: 0 calc(var(--section-pad-x) + 0.5rem);
    }

    .header-container {
        max-width: calc(var(--wide-width) + 400px);
        padding: 0 calc(var(--section-pad-x) + 0.5rem);
    }

    .header-content {
        gap: 1.5rem;
    }

    .main-nav {
        gap: 3.2rem;
    }

    .nav-link {
        font-size: 1.22rem;
        letter-spacing: 0.13em;
    }

    .logo-img {
        height: 70px;
    }

    .section-content {
        max-width: var(--wide-content-width);
    }

    .maps-page-section {
        padding: 7.5rem 0 2.5rem;
    }

    .single-map-block {
        max-width: var(--container-width);
        padding: 1.75rem;
    }

    .single-map-frame iframe {
        height: min(52vh, 620px);
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    html {
        font-size: 16px;
    }

    .container,
    .header-container {
        padding: 0 1.5rem;
    }

    .header-content {
        gap: 0.9rem;
    }

    .logo-img {
        height: 52px;
    }

    .main-nav {
        gap: 1.4rem;
        margin-left: 1rem;
    }

    .nav-link {
        font-size: 1rem;
        letter-spacing: 0.09em;
    }

    .section-content {
        max-width: min(860px, var(--content-width));
    }

    .hero-section,
    .index-hero-svg-section {
        min-height: min(760px, calc(100dvh - 86px));
    }

    .index-hero-svg {
        width: min(980px, 100vw);
        height: auto;
        max-height: min(760px, calc(100dvh - 86px));
        object-fit: contain;
    }

    .maps-page-section {
        padding: 6rem 0 2rem;
    }

    .single-map-block {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: var(--header-height-mobile-safe);
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-height: var(--header-height-mobile-safe);
        padding-top: max(0px, var(--safe-area-top));
        padding-left: max(0px, var(--safe-area-left));
        padding-right: max(0px, var(--safe-area-right));
    }

    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 0.15em;
    }

    .hero-subtitle {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.6;
    }
    
    .hero-label {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
        white-space: normal;
        line-height: 1.6;
    }

    .hero-section {
        min-height: 100vh;
        padding: 0;
    }

    .hero-content {
        padding: 2rem 1rem;
        margin-top: -8rem;
        width: 90%;
        max-width: 90%;
    }

    .cover-panel,
    .cover-content {
        min-height: 460px;
    }

    .hero-logo-container {
        width: 180px;
        height: 180px;
        margin: 0 0 1rem;
    }

    .hero-location {
        font-size: 0.75rem;
    }

    .hero-pattern-bg {
        width: 300px;
        height: 450px;
    }

    .content-section {
        padding: 2.5rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .header-content {
        gap: 0.75rem;
        padding: 0 1rem;
        align-items: center;
        justify-content: flex-start;
    }

    .header-logo {
        order: 1;
        margin-right: 0.15rem;
    }

    .main-nav {
        display: flex;
        gap: 1.05rem;
        margin-left: 0.35rem;
        flex: 1;
        justify-content: flex-start;
        flex-wrap: nowrap;
        order: 3;
    }

    .nav-link {
        font-size: 0.95rem;
        letter-spacing: 0.07em;
    }

    .theme-switcher {
        display: inline-flex;
        order: 2;
        margin: 0 0.35rem 0 0.1rem;
        gap: 0.25rem;
    }

    .logo-img {
        height: 45px;
    }

    .menu-wrapper {
        margin-left: auto;
        order: 4;
    }

    .burger-menu {
        padding: 0.25rem;
    }

    .burger-line {
        width: 25px;
        height: 2px;
    }

    .menu-content {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        top: calc(var(--header-height-mobile-safe) - 16px);
    }

    .menu-title {
        font-size: 1rem;
        padding: 1rem 1.25rem 0.75rem;
    }

    .chapter-link {
        font-size: 0.8125rem;
        padding: 0.75rem 1.25rem;
        padding-left: 2.25rem;
        line-height: 1.5;
    }

    .chapter-link::before {
        left: 1rem;
        font-size: 0.875rem;
    }

    .chapter-link:hover {
        padding-left: 2.75rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .ouv-content {
        padding: 1.5rem 1.25rem;
    }

    .criteria-item {
        padding: 1.5rem 1.25rem;
    }

    .materials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Scroll arrows mobile */
    .scroll-arrow-left {
        left: 2%;
    }
    
    .scroll-arrow-right {
        right: 2%;
    }
    
    .scroll-down-arrow {
        width: 35px;
        height: 55px;
    }
    
    .arrow-line {
        width: 3px;
        height: 25px;
    }
    
    .arrow-line:first-child {
        transform: rotate(45deg) translateX(9px);
    }
    
    .arrow-line:last-child {
        transform: rotate(-45deg) translateX(-9px);
    }
    
    /* Justification page mobile */
    .justification-page-section {
        padding: 3rem 0 2.5rem;
    }
    
    .justification-page-section h1 {
        font-size: 2rem;
    }
    
    .justification-page-section h2 {
        font-size: 1.5rem;
    }
    
    .criterion-box {
        padding: 1.5rem 1.25rem;
    }
    
    .criterion-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        top: -12px;
        left: 1.5rem;
    }
    
    /* About and Contacts mobile */
    .about-content p {
        font-size: 1rem;
        text-align: left;
    }
    
    .contacts-content h3 {
        font-size: 1.25rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }

    /* Home mobile: keep ABOUT section below the initial hero viewport */
    body.home-page .about-section {
        margin-top: clamp(7rem, 24vh, 14rem);
    }
    
    /* Download section mobile */
    .download-main-content p {
        font-size: 1rem;
    }
    
    .download-box {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .download-file-info h3 {
        font-size: 1.25rem;
    }
    
    .btn-download-main {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
        width: 100%;
    }
    
    /* Maps page mobile */
    .maps-page-section h1 {
        font-size: 2rem;
    }
    
    .maps-page-section h2 {
        font-size: 1.5rem;
    }
    
    .map-category-card {
        padding: 1.5rem;
    }
    
    .map-category-card h3 {
        font-size: 1.25rem;
    }
    
    /* White arrow on justification page mobile */
    .scroll-arrow-center-white {
        width: 50px;
        height: 75px;
    }
    
    .arrow-line-white {
        width: 4px;
        height: 38px;
    }
    
    .arrow-line-white:first-child {
        transform: rotate(45deg) translateX(13px);
    }
    
    .arrow-line-white:last-child {
        transform: rotate(-45deg) translateX(-13px);
    }
}

@media (max-width: 480px) {
    body {
        padding-top: var(--header-height-mobile-sm);
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 0.12em;
    }

    .hero-subtitle {
        font-size: 0.6875rem;
        white-space: normal;
    }
    
    .hero-label {
        font-size: 0.6875rem;
    }

    .hero-logo-container {
        width: 150px;
        height: 150px;
    }

    .hero-pattern-bg {
        width: 240px;
        height: 360px;
    }
    
    .hero-content {
        padding: 1.5rem 0.75rem;
        width: 95%;
        max-width: 95%;
    }

    .cover-panel,
    .cover-content {
        min-height: 380px;
    }
    
    .hero-location {
        font-size: 0.6875rem;
    }

    .btn-download {
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
    }

    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }

    .header-content {
        padding: 0 0.65rem;
        gap: 0.35rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    /* Hide scroll arrows on very small screens */
    .scroll-arrow-left,
    .scroll-arrow-right {
        display: none;
    }
    
    /* Keep center white arrow but make it smaller */
    .scroll-arrow-center-white {
        width: 40px;
        height: 60px;
    }
    
    .arrow-line-white {
        width: 3px;
        height: 30px;
    }
    
    .arrow-line-white:first-child {
        transform: rotate(45deg) translateX(10px);
    }
    
    .arrow-line-white:last-child {
        transform: rotate(-45deg) translateX(-10px);
    }
    
    /* Justification page */
    .justification-page-section h1 {
        font-size: 1.75rem;
    }
    
    .criterion-box {
        padding: 1.25rem 1rem;
    }
    
    .criterion-number {
        width: 35px;
        height: 35px;
        font-size: 1.125rem;
    }
    
    /* Download section */
    .download-box {
        padding: 1.25rem;
    }
    
    .download-file-info h3 {
        font-size: 1.125rem;
    }
    
    .file-description {
        font-size: 0.875rem;
        word-break: break-all;
    }
    
    /* Maps categories */
    .map-category-card {
        padding: 1.25rem;
    }
    
    .map-category-card h3 {
        font-size: 1.125rem;
    }
    
    /* Contact info */
    .contact-info {
        padding: 1.25rem;
    }
}


@media (max-width: 768px) {
    .hero-section,
    .index-hero-svg-section {
        min-height: calc(100dvh - var(--header-height-mobile-safe));
        height: calc(100dvh - var(--header-height-mobile-safe));
    }

    .index-hero-svg-section {
        display: flex;
        align-items: stretch;
        justify-content: center;
    }

    .index-hero-svg {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: center center;
        margin-inline: auto;
        margin-top: 0;
        transform: none;
    }

    .maps-page-section {
        padding: 5.25rem 0 1.25rem;
    }

    .single-map-block {
        max-width: 100%;
        padding: 1rem;
    }

    .single-map-frame iframe {
        height: min(52vh, 320px);
    }

    .btn-view-maps {
        width: 100%;
        text-align: center;
    }

    .photo-page-section h1 {
        font-size: 2rem;
    }

    .radio-btns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer {
        margin-top: 28px;
        overflow: hidden;
    }

    .footer-ornament,
    .footer-landscape-image {
        width: 165%;
        max-width: none;
        margin-left: -32.5%;
    }
}

@media (max-width: 900px) {
    .header-content {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: var(--header-height-mobile-sm-safe);
    }

    .hero-section,
    .index-hero-svg-section {
        min-height: calc(100dvh - var(--header-height-mobile-sm-safe));
        height: calc(100dvh - var(--header-height-mobile-sm-safe));
    }

    .main-nav {
        display: flex;
        gap: 0.75rem;
        margin-left: 0.2rem;
    }

    .nav-link {
        font-size: 0.82rem;
        letter-spacing: 0.05em;
    }

    .theme-switcher {
        margin: 0 0.25rem 0 0.05rem;
    }

    .index-hero-svg-section {
        display: flex;
        align-items: stretch;
        justify-content: center;
    }

    .index-hero-svg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        margin-inline: auto;
        margin-top: 0;
        transform: none;
    }

    body.home-page .about-section {
        margin-top: clamp(6rem, 22vh, 12rem);
    }

    .single-map-frame iframe {
        height: min(45vh, 260px);
    }

    .radio-btns {
        grid-template-columns: 1fr;
    }

    .footer-ornament,
    .footer-landscape-image {
        width: 190%;
        margin-left: -45%;
    }
}
