/* Ajustes responsive finales: escritorio estrecho, tablet y celular */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

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

@media (min-width: 901px) and (max-width: 1100px) {
    .site-footer .footer-grid {
        grid-template-columns: minmax(0, 1fr) 245px;
        gap: 24px;
    }

    .site-footer .footer-intro {
        gap: 22px;
    }

    .site-footer .contact-list {
        padding-left: 18px;
    }

    .site-footer .footer-emblem > img,
    .site-footer .footer-development {
        transform: none;
    }

    .solution-books-grid,
    .authors-equal-grid,
    .cards-grid,
    .olympiads-grid {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .site-footer .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .site-footer .footer-intro {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .site-footer .footer-emblem {
        display: grid;
        width: 100%;
        min-height: 0;
        padding: 20px 0 4px;
        align-content: center;
        justify-items: center;
        border-top: 1px solid rgba(255, 255, 255, .14);
        border-left: 0;
        transform: none;
    }

    .site-footer .footer-emblem > img,
    .site-footer .footer-development {
        transform: none;
    }

    .site-footer .footer-development {
        width: min(100%, 310px);
    }

    .contest-chat .chat-panel {
        width: min(390px, calc(100vw - 24px));
        max-height: calc(100dvh - 100px);
    }

    .contest-chat .chat-messages,
    .contest-chat .chat-suggestions {
        overscroll-behavior: contain;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 24px, 1220px);
    }

    .site-header .header-main {
        gap: 10px;
    }

    .site-header .brand img {
        width: min(270px, 78vw);
        height: auto;
    }

    .site-header .main-nav ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-header .main-nav a {
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .site-footer .footer-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .site-footer .contact-list {
        padding: 18px 0 0;
        border-top: 1px solid rgba(255, 255, 255, .14);
        border-left: 0;
    }

    .site-footer .footer-bottom {
        align-items: center;
        flex-direction: column;
        gap: 3px;
        text-align: center;
    }

    .solution-books-grid,
    .authors-equal-grid,
    .guest-videos-grid,
    .olympiads-grid,
    .purpose-grid,
    .national-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .authors-equal-grid .author-catalog-card {
        min-width: 0;
    }

    .edition-memory-collage {
        width: 100%;
        height: clamp(260px, 82vw, 360px);
    }

    .edition-memory-gallery .edition-memory-stage,
    .edition-memory-gallery .edition-memory-slide,
    .edition-memory-gallery .edition-memory-slide img {
        max-width: 100%;
    }

    .results-pagination {
        flex-wrap: wrap;
    }

    .chat-suggestions.is-category-step,
    .chat-suggestions.is-seat-step {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .site-header .header-actions {
        width: 100%;
        gap: 7px;
    }

    .site-header .header-actions .button {
        min-width: 0;
        padding-inline: 12px;
        font-size: .72rem;
    }

    .people-section .profile-card {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: 0;
    }

    .people-section .profile-image {
        width: min(100%, 230px);
        height: 245px !important;
        min-height: 245px !important;
        margin: 14px auto 0;
    }

    .people-section .profile-content {
        height: auto;
        padding: 18px 16px 20px;
    }

    .photo-grid {
        grid-auto-columns: minmax(250px, 88%);
    }

    .contest-chat {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .contest-chat .chat-toggle {
        width: fit-content;
        min-height: 48px;
        margin-left: auto;
        padding-right: 15px;
    }

    .contest-chat .chat-panel {
        left: 0;
        right: 0;
        bottom: 58px;
        width: auto;
        max-height: calc(100dvh - 84px);
    }

    .chat-suggestions.is-category-step,
    .chat-suggestions.is-seat-step {
        grid-template-columns: minmax(0, 1fr);
    }

    .laptop-winners-list {
        grid-template-columns: minmax(0, 1fr);
    }
}
