/* SECCIÓN PRINCIPAL — Fondo institucional */
.news-carousel-section {
    width: 100%;
    padding: 40px 0;
    margin: 0;
    background: linear-gradient(180deg, #F8FAFB 0%, #FAFBFC 100%);
    box-sizing: border-box;
}

.news-carousel-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ENCABEZADO — Línea vertical + título + línea horizontal */
.news-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 40px;
}

.news-header__accent {
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #1B365D 0%, #2563EB 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.news-header__title {
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748B;
    margin: 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.news-header__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #E2E8F0 0%, transparent 100%);
}

/* GRID ESTÁTICO — Para ≤3 noticias (sin carrusel) */
.news-static-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 40px;
    box-sizing: border-box;
}

/* LAYOUT CARRUSEL — Flexbox: [flecha] [swiper] [flecha] */
.news-carousel-layout {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    box-sizing: border-box;
}

/* FLECHAS DE NAVEGACIÓN — Z-index alto para estar siempre encima */
.news-arrow {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    color: #334155;
}

.news-arrow:hover {
    background: #FAFBFC;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: #1B365D;
}

.news-arrow svg {
    width: 16px;
    height: 16px;
}

.news-arrow.swiper-button-disabled {
    opacity: 0.25;
    pointer-events: none;
}

.news-arrow.swiper-button-lock {
    display: none;
}

/* CONTENEDOR WRAPPER — Clip visual que respeta sombras */
.news-swiper-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 12px 4px;
    margin: -12px -4px;
}

/* SWIPER CONTENEDOR — Dentro del wrapper */
.news-swiper {
    width: 100%;
    overflow: visible;
}

.news-swiper .swiper-wrapper {
    align-items: stretch;
}

.news-swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* TARJETA — Altura uniforme con zonas fijas */
.news-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 480px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-card:hover {
    box-shadow: 0 8px 24px rgba(27, 54, 93, 0.12), 0 16px 48px rgba(27, 54, 93, 0.06);
    border-color: #1B365D;
}

/* ZONA 1 — Contenido superior (título + línea + descripción) */
.news-card__content {
    display: flex;
    flex-direction: column;
    padding: 24px 24px 0;
    flex: 0 0 auto;
}

/* TÍTULO — Nunca truncado, altura variable */
.news-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.news-card:hover .news-card__title {
    color: #1B365D;
}

/* LÍNEA DECORATIVA — Siempre debajo del título */
.news-card__divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #1B365D 0%, rgba(27, 54, 93, 0.15) 100%);
    border-radius: 2px;
    margin: 16px 0;
    flex-shrink: 0;
}

/* DESCRIPCIÓN — Altura fija con clamp */
.news-card__description {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.6em * 3);
}

/* ZONA 2 — Imagen (altura fija, empuja footer abajo) */
.news-card__image {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #FAFBFC;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    margin-top: auto;
    flex-shrink: 0;
    overflow: hidden;
}

.news-card__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card__image img {
    transform: scale(1.03);
}

/* Placeholder cuando no hay imagen */
.news-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #CBD5E1;
}

.news-card__placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.news-card__placeholder span {
    font-size: 0.8125rem;
    color: #94A3B8;
}

/* ZONA 3 — Footer (siempre al fondo) */
.news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px 20px;
    background: #FFFFFF;
    flex-shrink: 0;
}

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1B365D;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card__link:hover {
    color: #2563EB;
}

.news-card__link-arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.news-card__link:hover .news-card__link-arrow {
    transform: translateX(3px);
}

.news-card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    color: #64748B;
    font-weight: 500;
}

.news-card__date svg {
    width: 14px;
    height: 14px;
    color: #94A3B8;
}

/* PAGINACIÓN (Dots) */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 0 40px;
}

.news-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #CBD5E1;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-pagination .swiper-pagination-bullet:hover {
    background: #94A3B8;
}

.news-pagination .swiper-pagination-bullet-active {
    background: #1B365D;
    transform: scale(1.2);
}

.news-pagination.swiper-pagination-lock {
    display: none;
}

/* ==========================================================================
   RESPONSIVE — Tablet (≤1280px)
   ========================================================================== */
@media(max-width: 1280px) {
    .news-header {
        padding: 0 32px;
    }

    .news-static-grid {
        padding: 0 32px;
    }

    .news-carousel-layout {
        padding-left: 20px;
        padding-right: 20px;
        gap: 12px;
    }

    .news-card {
        min-height: 460px;
    }

    .news-card__title {
        font-size: 1.375rem;
    }
}

/* ==========================================================================
   RESPONSIVE — Tablet pequeña (≤1024px)
   ========================================================================== */
@media(max-width: 1024px) {
    .news-carousel-section {
        padding: 32px 0;
    }

    .news-arrow {
        width: 44px;
        height: 44px;
    }

    .news-arrow svg {
        width: 18px;
        height: 18px;
    }

    .news-card {
        min-height: 440px;
    }

    .news-card__image {
        height: 140px;
    }
}

/* ==========================================================================
   RESPONSIVE — Móvil (≤768px) — Sin flechas, solo swipe
   ========================================================================== */
@media(max-width: 768px) {
    .news-header {
        padding: 0 20px;
        margin-bottom: 20px;
    }

    .news-header__accent {
        height: 16px;
    }

    .news-header__title {
        font-size: 0.6875rem;
    }

    .news-static-grid {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Ocultar flechas en móvil */
    .news-arrow {
        display: none !important;
    }

    .news-carousel-layout {
        padding: 8px 20px;
        gap: 0;
    }

    .news-card {
        min-height: 420px;
    }

    .news-card__content {
        padding: 20px 20px 0;
    }

    .news-card__title {
        font-size: 1.25rem;
    }

    .news-card__divider {
        width: 40px;
        height: 2.5px;
        margin: 12px 0;
    }

    .news-card__description {
        font-size: 0.875rem;
        -webkit-line-clamp: 3;
        min-height: calc(1.6em * 3);
    }

    .news-card__image {
        height: 130px;
        padding: 12px;
    }

    .news-card__footer {
        padding: 14px 20px 18px;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .news-card__link {
        font-size: 0.875rem;
    }

    .news-card__date {
        font-size: 0.8125rem;
    }

    .news-pagination {
        margin-top: 20px;
        padding: 0 20px;
    }
}

/* ==========================================================================
   RESPONSIVE — Móvil pequeño (≤480px)
   ========================================================================== */
@media(max-width: 480px) {
    .news-header {
        padding: 0 16px;
    }

    .news-static-grid {
        padding: 0 16px;
    }

    .news-carousel-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .news-card {
        min-height: 400px;
    }

    .news-card__content {
        padding: 18px 18px 0;
    }

    .news-card__title {
        font-size: 1.125rem;
    }

    .news-card__image {
        height: 120px;
    }

    .news-card__footer {
        padding: 12px 18px 16px;
    }
}
