.recent-posts-window {
    overflow: hidden;
    width: 100%;
}

.recent-posts-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    will-change: transform;
}

.recent-post-card {
    background: #fdf6d6;
    border-radius: 8px;
    width: 50%;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
    margin: 0;
    /* Controlado por padding externo si se desea, o dejar pegajoso */
    border: 10px solid transparent;
    /* Truco para gap con transform */
    background-clip: padding-box;
}

.recent-post-date {
    background: #3185cb;
    color: #fff;
    position: absolute;
    top: -5px;
    left: -15px;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-family: 'Lobster Two', cursive;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.recent-post-date:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 5px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #266b9f transparent transparent transparent;
}

.recent-post-date .day {
    font-size: 28px;
    line-height: 1;
    display: block;
}

.recent-post-date .month-year {
    font-size: 14px;
    display: block;
}

.recent-post-content {
    padding: 25px;
    display: flex;
    gap: 20px;
    flex: 1;
}

.recent-post-image {
    width: 160px;
    flex-shrink: 0;
}

.recent-post-image img {
    width: 100%;
    border-radius: 12px;
    height: 160px;
    object-fit: cover;
}

.recent-post-text {
    flex: 1;
}

.recent-post-text h3 {
    margin-top: 0;
    font-size: 28px;
    margin-bottom: 10px;
    color: #a2825c;
    font-family: 'Lobster Two', cursive;
}

.recent-post-text p {
    font-size: 14px;
    color: #a2825c;
    margin-bottom: 10px;
}

.recent-post-footer {
    background: #f8e5b4;
    padding: 10px 25px;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    /* Alineado a la derecha */
    align-items: center;
}


.read-more-btn {
    background: #3185cb;
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    font-family: 'Lobster Two', cursive;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #ff633c;
}

.recent-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.recent-posts-nav span {
    background: #f8e5b4;
    color: #a2825c;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    font-weight: bold;
}

.recent-posts-nav span:hover {
    background: #3185cb;
    color: #fff;
}

.modulo-ultimas-noticias {
    width: 100%;
    background-color: #E9E9E9;
    padding: 60px 0 60px 0;
    /* Espaciado extra generoso abajo solicitado */
    border-radius: 0;
    /* Sin puntas redondeadas por petición */
    margin-bottom: 0;
    /* Eliminado el margen para que se pegue al siguiente módulo */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Responsive de Noticias */
@media (max-width: 900px) {
    .recent-posts-container {
        /* Mantenemos row para que funcione el slider horizontal */
        flex-direction: row;
        gap: 0;
    }

    .recent-post-card {
        width: 100% !important;
        flex-shrink: 0;
        margin: 0;
        border: 10px solid transparent;
        /* Gap simulando desktop */
        transform: none !important;
    }

    .recent-post-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 20px 25px 20px;
    }

    .recent-post-image {
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
    }

    .recent-post-image img {
        height: 220px;
        border-radius: 12px;
    }

    .recent-post-date {
        left: 50%;
        top: -15px;
        transform: translateX(-50%);
    }

    .recent-post-date:after {
        display: none;
        /* Quitamos el pico en movil para centrar mejor */
    }

    .recent-post-text h3 {
        font-size: 26px;
    }

    .recent-posts-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-bottom: 40px;
    }

    .recent-posts-nav {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 32px !important;
    }

    .recent-post-text h3 {
        font-size: 24px;
    }
}

/* LIGHTBOX PARA NOTICIAS */
.news-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 117, 178, 0.85);
    /* Mismo azul que Actividades Recientes */
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.news-lightbox.active {
    display: flex;
    opacity: 1;
}

.news-lightbox-content {
    background-color: #fdf6d6;
    /* Color de la card original */
    max-width: 1150px;
    /* Ancho igual al slider solicitado */
    width: 95%;
    max-height: 85vh;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease-out;
}

/* Scrollbar Profesional */
.news-lightbox-content::-webkit-scrollbar {
    width: 14px;
    /* Un poco más ancho solicitado */
}

.news-lightbox-content::-webkit-scrollbar-track {
    background: #f8e5b4;
    /* Restaurado el color crema original */
    border-radius: 0 12px 12px 0;
}

.news-lightbox-content::-webkit-scrollbar-thumb {
    background: #3185cb;
    border-radius: 10px;
    border: 3px solid #f8e5b4;
    /* Borde para que respire con el fondo naranja */
}

.news-lightbox-content::-webkit-scrollbar-thumb:hover {
    background: #ff633c;
}

.news-lightbox-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
}

.news-lightbox-info {
    padding: 30px 40px 40px 40px;
}

.news-lightbox-title {
    font-family: 'Lobster Two', cursive;
    font-size: 36px;
    color: #a2825c;
    margin-top: 0;
    margin-bottom: 10px;
}

.news-lightbox-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #fee6b4;
}

.news-lightbox-date {
    font-size: 14px;
    color: #3185cb;
    font-weight: bold;
}

.share-btn-wa {
    background: #25D366;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.share-btn-wa:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

/* Botones de Navegación del Lightbox */
.lb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(49, 133, 203, 0.9);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lb-nav-btn:hover:not(:disabled) {
    background: #ff633c;
    transform: translateY(-50%) scale(1.1);
}

.lb-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lb-prev {
    left: 20px;
}

.lb-next {
    right: 20px;
}

@media (max-width: 900px) {
    .lb-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .lb-prev {
        left: 10px;
    }

    .lb-next {
        right: 10px;
    }
}

.news-lightbox-text {
    font-size: 16px;
    color: #a2825c;
    line-height: 1.7;
}

.news-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3185cb;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.news-lightbox-close.alert {
    background-color: #ff0000 !important;
    color: #ffffff !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}