/* =========================================================
   ESFECOL — RESPONSIVE PATCH
   Este bloque se carga AL FINAL de main.css.
   No reemplaza ni modifica los estilos desktop.
========================================================= */

/* TABLET / LAPTOP */
@media (max-width: 1100px) {
    .container {
        width: min(calc(100% - 48px), var(--container));
    }

    .main-nav__list {
        gap: 18px;
    }

    .site-header__actions {
        margin-left: 20px;
        gap: 12px;
    }

    .header-cta {
        padding-inline: 18px;
    }

    .hero__content {
        gap: 40px;
    }

    .hero__main {
        max-width: 610px;
    }

    .hero__quick-links {
        width: 260px;
        flex-shrink: 0;
    }

    .why-czech__grid,
    .programs__header {
        gap: 48px;
    }

    .programs__cards {
        gap: 16px;
    }
}

/* MOBILE NAV + GENERAL TABLET */
@media (max-width: 900px) {
    :root {
        --header-height: 78px;
    }

    .container {
        width: calc(100% - 40px);
        max-width: var(--container);
    }

    /* Header */
    .site-header {
        height: var(--header-height);
    }

    .site-header__inner {
        position: relative;
    }

    .brand .custom-logo {
        max-width: 220px;
        max-height: 62px;
    }

    .brand__name {
        font-size: 26px;
    }

    .brand__tagline {
        display: none;
    }

    .site-header__actions {
        margin-left: auto;
        gap: 10px;
    }

    .header-divider,
    .search-toggle {
        display: none;
    }

    .header-cta {
        min-height: 44px;
        padding: 0 15px;
        border-radius: 9px;
        font-size: 13px;
    }

    .header-cta .arrow {
        display: none;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 61;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        width: 42px;
        height: 42px;
        margin-left: 4px;
        padding: 8px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-toggle span:not(.screen-reader-text) {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--esfecol-blue);
        border-radius: 2px;
    }

    .main-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 60;
        display: none;
        margin: 0;
        padding: 18px 20px 24px;
        background: var(--white);
        border-top: 1px solid rgba(1,38,119,.08);
        box-shadow: 0 18px 35px rgba(0,0,0,.10);
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav__list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
    }

    .main-nav__list a {
        display: block;
        width: 100%;
        padding: 14px 4px;
        font-size: 15px;
    }

    /* Hero */
    .hero {
        min-height: auto;
    }

    .hero__background {
        background-position: center center;
    }

    .hero__overlay {
        /* Ajusta aquí la intensidad azul del hero móvil: valores menores revelan más la foto. */
        background:
            linear-gradient(
                90deg,
                rgba(1, 38, 119, .84) 0%,
                rgba(1, 38, 119, .68) 53%,
                rgba(1, 38, 119, .42) 100%
            );
    }

    .hero__content {
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 42px;
        padding-top: 58px;
        padding-bottom: 80px;
    }

    .hero__main {
        width: 100%;
        max-width: 720px;
    }

    .eyebrow {
        margin-bottom: 22px;
        gap: 12px;
        font-size: 11px;
        letter-spacing: .20em;
    }

    .eyebrow span {
        width: 52px;
    }

    .hero h1 {
        max-width: 680px;
        font-size: clamp(44px, 8vw, 64px);
        line-height: 1;
    }

    .hero__description {
        max-width: 620px;
        margin-top: 24px;
        font-size: 16px;
        line-height: 1.6;
    }

    .hero__buttons {
        gap: 12px;
        margin-top: 28px;
    }

    .button {
        min-height: 58px;
        padding-inline: 22px;
    }

    .hero__highlights {
        margin-top: 45px;
    }

    .hero__quick-links {
        width: 100%;
        max-width: 620px;
        margin: 0;
    }

    .hero__quick-links .quick-link + .quick-link {
        margin-top: 10px;
    }

    /* Sections */
    .why-czech__grid,
    .programs__header {
        grid-template-columns: 1fr;
    }

    .why-czech__intro,
    .programs__intro {
        max-width: 720px;
    }

    .why-czech__benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prague-section {
        grid-template-columns: 1fr;
    }

    .prague-section__image,
    .prague-section__content {
        min-height: 400px;
    }

    .prague-section__content-inner {
        width: min(calc(100% - 40px), 650px);
    }

    .programs__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .testimonials__inner {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 30px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .testimonials__stats {
        grid-column: auto;
        width: 100%;
        justify-self: stretch;
    }

    .testimonials__carousel {
        max-width: 680px;
    }

    .final-cta__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        min-height: auto;
        padding: 18px 0;
    }
}

/* PHONE */
@media (max-width: 600px) {
    :root {
        --header-height: 72px;
    }

    .container {
        width: calc(100% - 30px);
        max-width: 100%;
    }

    /* Base responsive: ningún bloque o control debe ampliar el ancho del viewport. */
    .site-header__inner,
    .page-container,
    .content-card,
    .content-card__body,
    .hero__main,
    .why-czech__intro,
    .programs__intro,
    .final-cta__content {
        min-width: 0;
        max-width: 100%;
    }

    .content-card img,
    .content-card iframe,
    .content-card video,
    .wp-block-embed,
    .wp-block-embed iframe {
        max-width: 100%;
    }

    /* El margen explícito evita que CTAs de ancho completo lleguen al borde del viewport. */
    .hero__content.container {
        width: auto;
        min-width: 0;
        max-width: none;
        margin-inline: 16px;
    }

    /* El margen explícito evita que CTAs de ancho completo lleguen al borde del viewport. */
    .hero__content.container {
        width: auto;
        min-width: 0;
        margin-inline: 16px;
    }

    /* Header */
    .site-header {
        height: var(--header-height);
        box-shadow: 0 1px 0 rgba(1, 38, 119, .08);
    }

    .site-header__inner {
        justify-content: space-between;
    }

    .brand .custom-logo {
        max-width: min(45vw, 190px);
        max-height: 50px;
    }

    .brand__name {
        font-size: 23px;
    }

    .header-cta {
        flex: 0 1 auto;
        max-width: 100%;
        min-height: 44px;
        padding: 0 14px;
        font-size: 12px;
        border-radius: 10px;
        box-shadow: 0 5px 14px rgba(1, 38, 119, .18);
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        margin-left: 0;
        border-radius: 8px;
    }

    .main-nav {
        top: var(--header-height);
        padding: 12px 15px 20px;
    }

    /* Hero */
    .hero__content {
        gap: 0;
        padding-top: 52px;
        padding-bottom: 44px;
    }

    .eyebrow {
        margin-bottom: 18px;
        font-size: 10px;
        letter-spacing: .16em;
    }

    .eyebrow span {
        width: 40px;
    }

    .hero h1 {
        font-size: clamp(39px, 11.2vw, 52px);
        line-height: 1.02;
        letter-spacing: -.05em;
    }

    .hero__description {
        margin-top: 22px;
        font-size: 15px;
        line-height: 1.6;
    }

    .hero__buttons {
        width: 100%;
        min-width: 0;
        gap: 12px;
        margin-top: 28px;
    }

    .button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        min-height: 62px;
        padding-inline: 22px;
        border-radius: 12px;
        font-size: 16px;
    }

    /* Todos los CTA, incluidos los insertados desde WordPress, respetan el ancho útil. */
    .hero .button,
    .section-button,
    .final-cta__button,
    .wp-block-button,
    .wp-block-button__link,
    .wp-element-button,
    .content-card input[type="submit"],
    .content-card input[type="button"],
    .content-card button:not(.menu-toggle):not(.search-toggle) {
        inline-size: 100%;
        max-inline-size: 100%;
        min-inline-size: 0;
        box-sizing: border-box;
    }

    .content-card input,
    .content-card select,
    .content-card textarea {
        max-inline-size: 100%;
        box-sizing: border-box;
    }

    .button--light {
        justify-content: space-between;
        box-shadow: 0 10px 24px rgba(0, 17, 66, .18);
    }

    .button--light span:last-child {
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        border-radius: 50%;
        background: rgba(1, 38, 119, .08);
        font-size: 20px;
        transition: transform .2s ease, background .2s ease;
    }

    .button--light:active span:last-child {
        transform: translateX(3px);
    }

    .button--outline {
        border-color: rgba(255, 255, 255, .78);
        background: rgba(1, 29, 92, .18);
    }

    .button:focus-visible,
    .header-cta:focus-visible,
    .menu-toggle:focus-visible {
        outline: 3px solid var(--white);
        outline-offset: 3px;
    }

    .header-cta:focus-visible,
    .menu-toggle:focus-visible {
        outline-color: var(--esfecol-royal);
    }

    .hero__highlights {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 38px;
    }

    .hero-highlight,
    .hero-highlight:last-child {
        width: 100%;
        gap: 16px;
        padding: 16px 0;
        margin: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.28);
    }

    .hero-highlight:first-child {
        padding-top: 0;
    }

    .hero-highlight:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .hero-highlight__icon {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
        border-color: rgba(255, 255, 255, .72);
        background: rgba(255, 255, 255, .06);
    }

    .hero-highlight__icon svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.5;
    }

    .hero-highlight > span:last-child {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.38;
    }

    .hero__quick-links {
        max-width: none;
    }

    .quick-link {
        min-height: 66px;
        padding: 14px 16px;
        grid-template-columns: 32px 1fr auto;
        gap: 12px;
    }

    .quick-link__icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .quick-link__text {
        font-size: 14px;
    }

    .quick-link__arrow {
        font-size: 21px;
    }

    /* Generic pages */
    .page-container {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .content-card__body {
        line-height: 1.65;
    }

    /* Why Czech */
    .why-czech {
        padding: 60px 0 65px;
    }

    .why-czech__grid {
        gap: 38px;
    }

    .why-czech__benefits {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .benefit {
        min-height: 0;
        padding: 24px 18px;
    }

    /* Prague */
    .prague-section__image {
        min-height: 300px;
    }

    .prague-section__content {
        min-height: 0;
    }

    .prague-section__content-inner {
        width: calc(100% - 30px);
        padding: 55px 0;
    }

    .prague-section__play {
        bottom: 20px;
    }

    /* Programs */
    .programs {
        padding: 60px 0;
    }

    .programs__header {
        gap: 34px;
    }

    .programs__cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .program-card {
        min-height: 245px;
        padding: 28px 22px 40px;
    }

    .program-card__icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .program-card__icon img {
        width: 42px;
        height: 42px;
    }

    .program-card p {
        max-width: 280px;
    }

    .section-button {
        width: 100%;
        min-width: 0;
    }

    /* Testimonials */
    .testimonials__inner {
        gap: 26px;
        padding-top: 34px;
        padding-bottom: 34px;
    }

    .testimonial {
        align-items: flex-start;
        gap: 16px;
    }

    .testimonial__content {
        min-width: 0;
    }

    .testimonial__quote {
        font-size: 12px;
        line-height: 1.6;
    }

    .testimonials__controls {
        margin-top: 16px;
    }

    .testimonial__photo {
        flex: 0 0 82px;
        width: 82px;
        height: 82px;
    }

    .testimonial__photo img {
        width: 82px;
        height: 82px;
    }

    .testimonial__quote-icon {
        width: 29px;
        height: 29px;
        font-size: 18px;
    }

    .testimonials__stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .testimonial-stat {
        min-height: 0;
        padding: 12px 0;
        border-left: 0;
        border-top: 1px solid rgba(1,38,119,.14);
    }

    .testimonial-stat:first-child {
        border-top: 0;
    }

    /* Final CTA */
    .final-cta {
        padding: 34px 0;
    }

    .final-cta__content {
        gap: 20px;
        padding: 0;
    }

    .final-cta__button {
        width: 100%;
        min-width: 0;
    }

    /* Footer */
    .site-footer {
        padding: 42px 0;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .site-footer__legal {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button,
    .button--light span:last-child,
    .header-cta {
        transition: none;
    }
}

/* =========================================================
   FOOTER — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    /* =====================================================
       FOOTER BASE
    ===================================================== */

    .site-footer {
        position: relative;
        overflow: hidden;
        padding: 0;
        background: #002d69;
    }


    /* =====================================================
       BACKGROUND
       Skyline concentrado en la parte inferior
    ===================================================== */

    .site-footer__backdrop {
        display: block;
        position: absolute;
        z-index: -2;
        inset: 0 0 59px;

        background:
            linear-gradient(
                180deg,
                rgba(0, 39, 93, .98) 0%,
                rgba(0, 39, 93, .97) 50%,
                rgba(0, 39, 93, .84) 73%,
                rgba(0, 39, 93, .60) 100%
            ),
            url('../images/fondo-footer-desktop.png')
                82% bottom / auto 70% no-repeat;
    }

    .site-footer__backdrop::after {
        position: absolute;
        inset: 0;
        content: '';

        background: linear-gradient(
            180deg,
            rgba(0, 20, 62, .04) 0%,
            rgba(0, 24, 72, .08) 65%,
            rgba(0, 24, 72, .28) 100%
        );
    }


    /* =====================================================
       CONTENEDORES
    ===================================================== */

    .site-footer .container {
        width: calc(100% - 36px);
        max-width: none;
        margin-inline: auto;
    }

    .site-footer__content {
        padding: 21px 0 0;
    }

    .site-footer__main {
        display: block;
    }


    /* =====================================================
       MARCA — CENTRADA
    ===================================================== */

    .site-footer__brand {
        position: relative;

        display: flex;
        flex-direction: column;
        align-items: center;

        width: 100%;
        margin: 0;
        padding: 0 0 18px;
    }

    .site-footer__brand::after {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;

        width: 100%;
        height: 1px;

        content: '';

        background: rgba(255, 255, 255, .42);
    }

    .site-footer__brand > a {
        display: block;
    }

    .site-footer__brand img {
        display: block;

        width: 190px;
        height: auto;
        min-height: 0;

        object-fit: contain;
    }


    /* =====================================================
       MOTTO — CENTRADO
    ===================================================== */

    .site-footer__motto {
        margin: 10px 0 0;

        color: var(--white);

        font-family: cursive;
        font-size: 17px;
        font-style: italic;
        font-weight: 700;
        line-height: 1.12;

        text-align: center;

        transform: rotate(-5deg);
    }

    .site-footer__motto::after {
        display: block;

        width: 52px;
        height: 3px;

        margin: 7px auto 0;

        content: '';

        border-radius: 10px;
        background: var(--accent-green);
    }
    .site-footer__motto {
        margin: 10px 0 0;

        font-family: 'Caveat', cursive;
        font-size: 20px;
        font-weight: 600;
        font-style: normal;
        line-height: 1.02;
        text-align: center;

        transform: rotate(-4deg);
    }

    /* =====================================================
       PRAGA TE ESPERA
       Oculto en mobile
    ===================================================== */

    .site-footer__praga {
        display: none;
    }


    /* =====================================================
       COLUMNAS
    ===================================================== */

    .site-footer__links {
        display: block;
        padding: 0;
    }


    /* =====================================================
       ACORDEONES
    ===================================================== */

    .site-footer__group {
        min-width: 0;

        border-top: 1px solid rgba(255, 255, 255, .40);
    }

    .site-footer__group:first-child {
        border-top: 0;
    }

    .site-footer__heading {
        width: 100%;
        min-height: 40px;

        margin: 0;
        padding: 0;

        cursor: pointer;

        color: var(--white);

        font-size: 11px;
        font-weight: 800;
        line-height: 1.2;
    }

    .site-footer__toggle {
        position: relative;

        display: block;

        width: 17px;
        height: 17px;
    }

    .site-footer__toggle::before,
    .site-footer__toggle::after {
        position: absolute;

        top: 8px;
        left: 1px;

        width: 14px;
        height: 1px;

        content: '';

        background: currentColor;
    }

    .site-footer__toggle::after {
        transform: rotate(90deg);
        transition: transform .2s ease;
    }

    .site-footer__heading[aria-expanded="true"]
    .site-footer__toggle::after {
        transform: rotate(0);
    }


    /* =====================================================
       CONTENIDO DE ACORDEONES
    ===================================================== */

    .site-footer__group ul {
        display: none;

        padding: 0 0 13px;
        margin: 0;

        list-style: none;
    }

    .site-footer__heading[aria-expanded="true"] + ul {
        display: block;
    }

    .site-footer__group li + li {
        margin-top: 7px;
    }

    .site-footer__group a {
        color: rgba(255, 255, 255, .92);
        font-size: 10px;
        line-height: 1.25;
    }


    /* =====================================================
       CONTACTO
    ===================================================== */

    .site-footer__contact-icon {
        width: 20px;
        font-size: 12px;
    }


    /* =====================================================
       REDES SOCIALES — CENTRADAS
    ===================================================== */

    .site-footer__social {
        min-width: 0;

        padding: 0;

        border-top: 1px solid rgba(255, 255, 255, .40);
    }

    .site-footer__heading--static {
        min-height: 40px;
        margin: 0;

        cursor: default;
    }

    .site-footer__heading--static::after {
        display: block;

        width: 17px;
        height: 17px;

        content: '+';

        color: var(--white);

        font-size: 20px;
        font-weight: 300;
        line-height: 15px;

        text-align: center;
    }

    .site-footer__social-links {
        display: flex;
        justify-content: center;

        gap: 13px;

        padding: 3px 0 12px;
    }

    .site-footer__social-links a {
        display: grid;

        width: 30px;
        height: 30px;

        place-items: center;

        border-radius: 50%;

        color: var(--white);
        background: #1f6fc1;
    }

    .site-footer__social-links svg {
        width: 15px;
        height: 15px;
    }

    .site-footer__social-message {
        width: 145px;
        max-width: 145px;

        margin: 0 auto;
        padding: 9px 0 14px;

        border-top: 1px solid rgba(255, 255, 255, .55);

        color: var(--white);

        font-size: 9px;
        font-weight: 600;
        line-height: 1.25;

        text-align: center;
    }
    .site-footer__social-message {
        width: 150px;
        max-width: 150px;
        padding-top: 9px;
        padding-bottom: 14px;

        margin-left: auto !important;
        margin-right: auto !important;

        text-align: center;
    }
    .site-footer__social-message {
        width: 150px;
        max-width: 150px;

        margin-left: auto !important;
        margin-right: auto !important;

        padding-top: 9px;
        padding-bottom: 14px;

        border-top: 1px solid rgba(255, 255, 255, .55);

        color: var(--white);

        font-family: 'Caveat', cursive;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.05;

        text-align: center;
    }
    .site-footer__praga-title {
        font-family: 'Caveat', cursive;
        font-size: 25px;
        font-weight: 700;
        font-style: normal;
        line-height: .85;
        text-align: right;
        transform: rotate(-4deg);
    }
    /* =====================================================
       BARRA INFERIOR
    ===================================================== */

    .site-footer__bottom {
        position: relative;
        z-index: 2;

        border-top: 1px solid rgba(255, 255, 255, .40);

        background: rgba(0, 25, 73, .92);
    }

    .site-footer__bottom .container {
        width: calc(100% - 30px);
    }

    .site-footer__bottom-inner {
        display: block;

        min-height: 62px;

        padding: 9px 0 8px;

        color: rgba(255, 255, 255, .92);

        font-size: 8px;
        text-align: center;
    }

    .site-footer__bottom p {
        max-width: 190px;

        margin: 0 auto 7px;

        line-height: 1.25;
    }

    .site-footer__bottom nav {
        display: flex;
        justify-content: center;

        gap: 14px;
    }

    .site-footer__bottom a {
        font-size: 8px;
    }
}

/* SMALL PHONES */
@media (max-width: 380px) {
    .container {
        width: calc(100% - 24px);
    }

    .brand .custom-logo {
        max-width: 148px;
    }

    .header-cta {
        padding: 0 11px;
        font-size: 11px;
    }

    .menu-toggle {
        width: 38px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero__description {
        font-size: 14px;
    }

    .quick-link {
        min-height: 62px;
        padding-inline: 13px;
    }
}

/* Prevent accidental horizontal overflow caused by long content */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
