/* =========================================================
   UNC Responsive System v1
   Base segura para contenido administrado por el plugin.
   Piloto inicial: pagina de Investigacion.
   ========================================================= */

:root {
    --unc-rs-content-wide: 90rem;
    --unc-rs-content-normal: 74rem;

    --unc-rs-gutter:
        clamp(1rem, 3vw, 2.5rem);

    --unc-rs-section-space:
        clamp(2rem, 5vw, 5rem);

    --unc-rs-control-min:
        2.75rem;
}

/*
 * La base queda aislada a Investigacion.
 * No afecta Home, Institucional, Oferta, Programas,
 * Tecnicos, Admisiones ni otras paginas.
 */
body.unc-investigacion-page
.unc-research-page,
body.unc-investigacion-page
.unc-research-page > * {
    min-inline-size: 0;
    max-inline-size: 100%;
}

/*
 * Permite que los hijos de Grid y Flex reduzcan su ancho
 * sin invadir columnas vecinas.
 */
body.unc-investigacion-page
.unc-research-page :where(*) {
    min-inline-size: 0;
}

/*
 * Medios flexibles sin deformacion.
 */
body.unc-investigacion-page
.unc-research-page
:where(img, picture, video, canvas, iframe) {
    max-inline-size: 100%;
}

body.unc-investigacion-page
.unc-research-page
:where(img, video) {
    block-size: auto;
}

/*
 * Evita que enlaces, URLs o palabras extensas
 * provoquen scroll horizontal.
 */
body.unc-investigacion-page
.unc-research-page
:where(p, h1, h2, h3, h4, h5, h6, li, a, td, th) {
    overflow-wrap: break-word;
}

/*
 * Formularios dentro del ancho disponible.
 */
body.unc-investigacion-page
.unc-research-page
:where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    button
) {
    max-inline-size: 100%;
}

body.unc-investigacion-page
.unc-research-page
:where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
) {
    font-size: 1rem;
}

/*
 * Altura minima accesible en controles principales.
 */
body.unc-investigacion-page
.unc-research-page
:where(
    .unc-standard-hero__button,
    .unc-ps-button,
    .unc-ps-index a,
    button
) {
    min-block-size: var(--unc-rs-control-min);
}

/* Movil pequeno: 320 a 479 px. */
@media (max-width: 479px) {
    :root {
        --unc-rs-gutter: 1rem;
        --unc-rs-section-space:
            clamp(1.75rem, 9vw, 2.75rem);
    }
}

/* Movil amplio: 480 a 767 px. */
@media (min-width: 480px) and (max-width: 767px) {
    :root {
        --unc-rs-gutter:
            clamp(1rem, 4vw, 1.5rem);
    }
}

/* Tablet: 768 a 1023 px. */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --unc-rs-gutter:
            clamp(1.5rem, 3vw, 2rem);
    }
}

/* Escritorio pequeno: 1024 a 1279 px. */
@media (min-width: 1024px) and (max-width: 1279px) {
    :root {
        --unc-rs-gutter:
            clamp(1.5rem, 2.5vw, 2rem);
    }
}

/* Escritorio compacto: 1280 a 1439 px. */
@media (min-width: 1280px) and (max-width: 1439px) {
    :root {
        --unc-rs-gutter:
            clamp(1.75rem, 2.2vw, 2.25rem);
    }
}

/* Escritorio normal: 1440 a 1919 px. */
@media (min-width: 1440px) and (max-width: 1919px) {
    :root {
        --unc-rs-gutter: 2.5rem;
    }
}

/* Escritorio amplio: 1920 px o superior. */
@media (min-width: 1920px) {
    :root {
        --unc-rs-gutter: 3rem;
    }
}
