/* ══════════════════════════════════════════════
   RC-29 — Archive Noticias
   Figma: Recoplast - Noticias (nodeId 90:359)
   BEM: .noticias-hero / .archive-noticias

   Layout banner de referencia (1600px viewport):
     max-width 1600px + padding-inline 100px → banner de 1400px
     Border-radius: 20px | Height: 444px
     Overlay: rgba(0,78,90,0.80)
══════════════════════════════════════════════ */

/* ── Wrapper principal del archive ── */
.archive-noticias {
    background: #FAFAFA;
    padding-bottom: 80px;
}

/* ══════════════════════════════════════════════
   HERO — Banner superior
══════════════════════════════════════════════ */

.noticias-hero {}

/* Mismo patrón de contenedor que site-footer__inner */
.noticias-hero__inner {
    max-width: 1600px;
    margin-inline: auto;
    padding-inline: 100px;
}

/* El banner: imagen de fondo + overlay + contenido */
.noticias-hero__banner {
    position: relative;
    border-radius: 20px;
    min-height: 444px;
    background-color: #004E5A; /* fallback sin imagen */
    background-size: cover;
    background-position: center;
    overflow: hidden;

    /* Flex column: nav arriba → content abajo (space-between) */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px 68px;
}

/* Overlay teal semitransparente sobre la foto */
.noticias-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 78, 90, 0.80);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* Contenido relativo: por encima del overlay */
.noticias-hero__nav,
.noticias-hero__content {
    position: relative;
    z-index: 1;
}

/* ── Botón "Volver al inicio" ── */
.noticias-hero__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.174;
    transition: opacity 0.2s ease;
}

.noticias-hero__back-btn:hover {
    opacity: 0.75;
}

.noticias-hero__back-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.noticias-hero__back-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ── Título + bajada ── */
.noticias-hero__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 760px;
}

.noticias-hero__title {
    font-family: 'Roboto', sans-serif;
    font-weight: 800;
    font-size: 48px;
    color: #FFFFFF;
    letter-spacing: 1px;
    line-height: 1.333;
    margin: 0;
}

.noticias-hero__description {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #FFFFFF;
    line-height: 30px;
    letter-spacing: -0.15px;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    margin: 0;
}


/* ══════════════════════════════════════════════
   GRID DE NOTICIAS
══════════════════════════════════════════════ */

.archive-noticias__content {
    margin-top: 56px;
}

/* ══════════════════════════════════════════════
   GRID DE NOTICIAS — RC-30
══════════════════════════════════════════════ */

.noticias-grid {
    display: grid;
    grid-template-columns: repeat( 2, 599px );
    column-gap: 40px;
    row-gap: 57px;
    justify-content: center;
}

/* ══════════════════════════════════════════════
   NOTICIA CARD — RC-30
   Figma: componente "Blog 1" nodeId 91:37
   Dimensiones: 599px × 281px | gap 40 × 57px
══════════════════════════════════════════════ */

.noticia-card {
    display: flex;
    flex-direction: row;
    background: #EEEEEE;
    border-radius: 15px;
    overflow: hidden;
    height: 281px;
    transform: translateZ(0);
    isolation: isolate;
}

/* Imagen izquierda */
.noticia-card__img-wrapper {
    flex-shrink: 0;
    width: 240px;
    position: relative;
    overflow: hidden;
}

.noticia-card__img-link {
    display: block;
    height: 100%;
}

.noticia-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-card__img {
    transform: scale(1.04);
}

/* Contenido derecha */
.noticia-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

/* Fecha + Título */
.noticia-card__meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.noticia-card__date {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #004E5A;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.noticia-card__title {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #004E5A;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-card__title a {
    color: inherit;
    text-decoration: none;
}

.noticia-card__title a:hover,
.noticia-card__title a:focus-visible {
    text-decoration: underline;
}

/* Descripción */
.noticia-card__excerpt {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #4E4F4F;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón Ghost */
.noticia-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid #004E5A;
    border-radius: 66px;
    color: #004E5A;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    align-self: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.noticia-card__cta:hover,
.noticia-card__cta:focus-visible {
    background-color: #004E5A;
    color: #FFFFFF;
}

/* ══════════════════════════════════════════════
   PAGINACIÓN — RC-31
   Botón Main: bg #004E5A | radius 66px | 20px Roboto Medium
   Figma nodeId 91:360
══════════════════════════════════════════════ */

.noticias-loadmore {
    display: flex;
    justify-content: center;
    margin-top: 56px;
    padding-bottom: 24px;
}

.noticias-loadmore__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #004E5A;
    color: #FFFFFF;
    border: none;
    border-radius: 66px;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: normal;
    white-space: nowrap;
    cursor: pointer;
    min-height: 44px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.noticias-loadmore__btn:hover,
.noticias-loadmore__btn:focus-visible {
    background-color: #003840;
    outline: 2px solid #004E5A;
    outline-offset: 3px;
}

.noticias-loadmore__btn:disabled,
.noticias-loadmore__btn[aria-busy="true"] {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Responsive ── */
@media ( max-width: 768px ) {
    .noticias-loadmore {
        margin-top: 36px;
    }

    .noticias-loadmore__btn {
        font-size: 17px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */

/* ── ≤ 1300px ── */
@media ( max-width: 1300px ) {
    .noticias-hero__inner {
        padding-inline: 40px;
    }

    .noticias-hero__banner {
        padding-inline: 40px;
    }

    .noticias-hero__title {
        font-size: 40px;
    }
}

/* ── ≤ 1024px ── */
@media ( max-width: 1024px ) {
    .noticias-grid {
        /* min() previene overflow en tablets de 600-640px */
        grid-template-columns: min( 599px, 100% );
    }

    .noticias-hero__inner {
        padding-inline: 32px;
    }

    .noticias-hero__banner {
        padding-inline: 32px;
        min-height: 380px;
    }

    .noticias-hero__title {
        font-size: 34px;
    }

    .noticias-hero__description {
        font-size: 18px;
        line-height: 26px;
    }
}

/* ── ≤ 768px — Mobile ── */
@media ( max-width: 768px ) {
    /* Grid: columna única, centrada, con padding lateral 40px y gap ≥ 20px */
    .noticias-grid {
        grid-template-columns: 1fr;
        row-gap: 35px;
        padding-inline: 40px;
        justify-content: center;
    }

    /* Card: layout vertical */
    .noticia-card {
        flex-direction: column;
        height: auto;
        border-radius: 12px;
    }

    /* Imagen superior */
    .noticia-card__img-wrapper {
        width: 100%;
        height: 200px;
    }

    /* Body */
    .noticia-card__body {
        padding: 16px;
        gap: 12px;
    }

    .noticia-card__date {
        font-size: 13px;
        letter-spacing: 1.3px;
    }

    .noticia-card__title {
        font-size: 20px;
    }

    .noticia-card__excerpt {
        font-size: 15px;
        line-height: 1.45;
    }

    .noticia-card__cta {
        font-size: 15px;
        padding: 8px 18px;
    }

    .noticias-hero {
        padding-top: 16px;
    }

    .noticias-hero__inner {
        padding-inline: 20px;
    }

    .noticias-hero__banner {
        min-height: 300px;
        padding: 24px;
        border-radius: 14px;
        gap: 32px;
    }

    .noticias-hero__overlay {
        border-radius: 14px;
    }

    .noticias-hero__title {
        font-size: 26px;
        letter-spacing: 0.5px;
        line-height: 1.25;
    }

    .noticias-hero__description {
        font-size: 18px;
        line-height: 26px;
    }

    .noticias-hero__back-btn {
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    .archive-noticias__content {
        margin-top: 36px;
    }
}

/* ── ≤ 480px ── */
@media ( max-width: 480px ) {
    /* Card pequeño móvil */
    .noticias-grid {
        row-gap: 35px;
        padding-inline: 20px; /* 20px container gutter + 20px = ~40px del borde */
    }

    .noticia-card {
        border-radius: 10px;
    }

    .noticia-card__img-wrapper {
        height: 175px;
    }

    .noticia-card__body {
        padding: 14px;
        gap: 10px;
    }

    .noticia-card__title {
        font-size: 18px;
    }

    .noticia-card__excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .noticia-card__cta {
        font-size: 14px;
        padding: 7px 16px;
        gap: 8px;
    }

    .noticias-hero {
        padding-top: 12px;
    }

    .noticias-hero__inner {
        padding-inline: 16px;
    }

    .noticias-hero__banner {
        min-height: 260px;
        padding: 20px;
        border-radius: 12px;
    }

    .noticias-hero__overlay {
        border-radius: 12px;
    }

    .noticias-hero__title {
        font-size: 22px;
    }

    .noticias-hero__description {
        font-size: 16px;
        line-height: 24px;
    }
}
