/* Menší desktop / větší tablet */

@media (max-width: 1180px) {
    :root {
        --page-pad: clamp(28px, 5vw, 48px);
        --header-height: 76px;
    }

    .site-header {
        padding-top: 16px;
        padding-bottom: 16px;
        grid-template-columns: minmax(0, 1fr) 66px;
        gap: 20px;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        width: min(170px, 52vw);
    }

    .theme-toggle {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        gap: clamp(14px, 4vw, 30px);
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

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

    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
        gap: 54px;
    }

    .hero-copy {
        width: min(100%, 760px);
        max-width: 760px;
    }

    .hero-frame {
        width: min(100%, 680px);
        justify-self: center;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        width: min(100%, 560px);
    }
}

/* Tablety */

@media (max-width: 1080px) {
    .dot-nav {
        display: none;
    }
}

@media (max-width: 980px) {
    :root {
        --page-pad: clamp(18px, 4.5vw, 34px);
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    section,
    .site-header,
    footer {
        padding-left: var(--page-pad);
        padding-right: var(--page-pad);
    }

    .section-heading,
    .contact-copy {
        width: min(100%, 720px);
        max-width: 720px;
    }

    .episode-slider {
        width: min(100%, 560px);
        margin-inline: auto;
        grid-template-columns: 1fr;
    }

    .episode-content {
        min-height: 0;
    }

    .gallery-section {
        width: 100%;
    }

    .newspaper-gallery {
        margin-inline: auto;
        padding-inline: 0;
    }

    .editorial-grid.gallery-grid {
        width: min(100%, 620px);
        max-width: 620px;
        margin-inline: auto;
        grid-template-columns: 1fr;
        gap: clamp(22px, 5vw, 34px);
    }

    .editorial-item,
    .editorial-item.large,
    .editorial-item.wide,
    .editorial-item.vertical {
        grid-column: 1 / -1;
    }

    .editorial-item p {
        overflow-wrap: normal;
        word-break: normal;
    }
}

/* Mobily */

@media (max-width: 768px) {
    :root {
        --page-pad: 20px;
        --header-height: 116px;
    }

    body {
        padding-top: var(--header-height);
    }

    .site-header {
        position: fixed;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        padding-top: 14px;
        padding-bottom: 14px;
        grid-template-columns: minmax(0, 1fr) 66px;
        overflow: visible;
    }

    .brand {
        width: min(150px, 48vw);
    }

    .theme-toggle {
        min-height: 34px;
        padding-inline: 10px;
    }

    .site-nav {
        width: 100%;
        min-width: 0;
        gap: clamp(14px, 5vw, 28px);
    }

    .site-nav a,
    .text-link,
    .school-link,
    .theme-toggle,
    .button {
        font-size: 0.72rem;
    }

    section {
        padding-top: 82px;
        padding-bottom: 82px;
        scroll-margin-top: calc(var(--header-height) + 12px);
    }

    .section-heading {
        margin-bottom: 34px;
    }

    .section-heading h2,
    .contact-copy h2 {
        font-size: clamp(2.45rem, 12vw, 3.25rem);
        line-height: 1.14;
        overflow-wrap: anywhere;
    }

    .eyebrow {
        margin-bottom: 14px;
        font-size: 0.72rem;
    }

    .hero-section {
        padding-top: 54px;
        padding-bottom: 86px;
        gap: 38px;
    }

    .hero-logo {
        margin-bottom: 24px;
    }

    .hero-logo img {
        width: min(100%, 520px);
    }

    .hero-lead {
        max-width: 100%;
        font-size: clamp(1rem, 4.2vw, 1.08rem);
        line-height: 1.7;
    }

    .hero-actions {
        width: min(100%, 340px);
        margin-top: 28px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-actions .button,
    .hero-actions .text-link {
        width: 100%;
        justify-content: center;
    }

    .text-link {
        min-height: 42px;
        border: 1px solid var(--line-color);
    }

    .hero-facts {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 38px;
    }

    .hero-facts div {
        display: grid;
        grid-template-columns: 92px 1fr;
        align-items: baseline;
        gap: 12px;
    }

    .hero-facts dt {
        margin-bottom: 0;
    }

    .hero-frame {
        width: min(100%, 420px);
        min-height: 0;
        aspect-ratio: 4 / 5;
        padding: 8px;
    }

    .frame-overlay {
        width: calc(100% - 16px);
        margin: 8px;
        padding: 12px 14px;
    }

    .play-mark {
        width: 34px;
        height: 34px;
    }

    .episode-slider {
        width: min(100%, 440px);
    }

    .episode-content {
        padding: 18px;
        gap: 14px;
    }

    .episode-content h3 {
        font-size: clamp(1.28rem, 6.2vw, 1.52rem);
        line-height: 1.08;
    }

    .episode-content p {
        font-size: 0.92rem;
    }

    .gallery-section {
        padding-top: 120px;
        padding-bottom: 90px;
    }

    .gallery-section > h2 {
        margin-bottom: 42px;
    }

    .newspaper-gallery {
        margin-top: 0;
        padding-top: 42px;
        padding-inline: 0;
    }

    .editorial-grid.gallery-grid {
        width: min(100%, 560px);
        max-width: 560px;
        gap: 24px;
    }

    .editorial-item p {
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .contact-panel {
        width: min(100%, 440px);
        max-width: 100%;
        padding: 20px;
    }

    .contact-copy p:not(.eyebrow) {
        font-size: 0.98rem;
    }

    .email-link {
        font-size: 1rem;
    }

    #contactForm input,
    #contactForm textarea {
        font-size: 16px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-signature span {
        display: block;
        margin: 6px 0 0;
    }

    .video-overlay,
    .image-overlay {
        padding: 18px;
    }

    .video-overlay iframe {
        width: 100%;
        max-width: 100%;
    }

    .image-overlay {
        padding-bottom: 84px;
    }

    .image-overlay img {
        max-width: 92vw;
        max-height: 74svh;
    }

    .overlay-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .image-caption {
        max-width: 92vw;
        font-size: 0.72rem;
    }

    .image-nav {
        top: auto;
        bottom: 20px;
        width: 34px;
        height: 34px;
        font-size: 1.75rem;
        opacity: 0.5;
        transform: none;
    }

    .image-nav-prev {
        left: 14px;
    }

    .image-nav-next {
        right: 14px;
    }

    .image-counter {
        font-size: 0.62rem;
    }
}

/* Menší telefony */

@media (max-width: 560px) {
    :root {
        --page-pad: 18px;
    }

    .site-header {
        gap: 10px 14px;
        grid-template-columns: minmax(0, 1fr) 62px;
    }

    .brand {
        width: min(142px, 52vw);
    }

    .theme-toggle {
        width: 62px;
        flex-basis: 62px;
        min-height: 32px;
        padding-inline: 8px;
    }

    .site-nav {
        gap: 16px;
    }

    .hero-actions,
    .episode-slider,
    .editorial-grid.gallery-grid,
    .contact-panel {
        width: 100%;
        max-width: 100%;
    }

    .editorial-item,
    .editorial-item.large,
    .editorial-item.wide,
    .editorial-item.vertical {
        grid-column: 1 / -1;
    }
}
