/* --- news.css --- */
/* Contenedor principal */
.news-section {
    padding: 32px;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Slider container */
.full-slider-container {
    position: relative;
    max-width: 1100px;
    margin: 24px auto;
    /* overflow: hidden; Removed to show arrows */
    /* Para evitar scroll horizontal en pantallas pequeñas si las flechas salen: */
    /* En mobile las flechas se ocultan con media query, así que seguro. */
}

/* Enlace/Botón "Leer noticia" */
.news-link-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #e37b2f;
    color: #e37b2f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.news-link-btn:hover {
    background-color: #e37b2f;
    color: #fff;
}

/* Flechas */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 100;
}

/* style simple arrows with pseudo elements */
.nav-btn.prev {
    left: -10px;
}

.nav-btn.next {
    right: -10px;
}

.nav-btn::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-top: 3px solid #222;
    border-right: 3px solid #222;
    transform-origin: center;
    margin: 12px auto;
}

.nav-btn.prev::before {
    transform: rotate(-135deg);
}

.nav-btn.next::before {
    transform: rotate(45deg);
}

/* Slider viewport */
.full-slider {
    position: relative;
    height: 360px;
    /* ajustable según el diseño de las cards */
    margin: 0;
    overflow: visible;
    /* permitimos ver las cards parcialmente fuera */
}

/* Cada slide */
.slide {
    position: absolute;
    top: 50%;
    left: 0;
    width: 320px;
    /* ancho estándar de card */
    max-width: 28%;
    transform: translateY(-50%);
    transition: transform 360ms cubic-bezier(.2, .9, .2, 1), opacity 240ms ease;
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    cursor: pointer;
}

/* Estado activo / lado / oculto */
.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 30;
}

.slide.side {
    opacity: 0.9;
    pointer-events: auto;
    z-index: 20;
}

.slide.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

/* Card interna */
.news-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(8, 10, 20, 0.06);
    padding: 18px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.news-card h2 {
    font-size: 16px;
    margin: 0 0 8px;
    text-transform: none;
}

.news-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    display: inline-block;
}

.news-card p {
    margin: 0;
    color: #222;
    line-height: 1.3;
    font-size: 14px;
}

/* Popup */
.popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

.popup .popup-content {
    width: min(880px, 92%);
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#popup-close {
    float: right;
    cursor: pointer;
    font-size: 22px;
}

/* Responsive */
/* Responsive */
@media (max-width: 900px) {
    .full-slider {
        height: 480px;
    }

    .slide {
        width: 60vw;
        max-width: 340px;
    }
}

@media (max-width: 600px) {
    .news-section {
        padding: 20px 16px;
    }

    .full-slider {
        height: 450px;
        /* Más altura para acomodar texto vertical si fluye */
    }

    .slide {
        width: 80vw;
        max-width: none;
    }

    /* Ocultamos flechas en móvil, usamos swipe */
    .nav-btn {
        display: none;
    }

    .news-card {
        padding: 20px;
    }

    .news-card h2 {
        font-size: 18px;
    }

    .news-card p {
        font-size: 15px;
    }
}