/* 1. FILTROS Y SELECTS (Año / Mes) */
.filtros-publicaciones {
    margin-bottom: 5px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filtro-grupo label {
    font-weight: 600;
    margin-right: 5px;
    color: #334155;
}

.form-select-custom,
.select-custom {
    display: inline-block;
    width: auto;
    min-width: 160px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-select-custom:focus,
.select-custom:focus {
    border-color: #0284c7;
}

/* 2. TARJETAS DEL CARRUSEL Y TEXTO */
.titulo-seccion-publicaciones {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 2.8rem;
    color: #0d2c40;
}

.carrusel-noticias .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

.carrusel-noticias .slick-slide {
    height: auto !important;
    padding: 10px 12px !important;
    box-sizing: border-box;
}

.carrusel-noticias .slick-slide>div {
    height: 100%;
}

.card-noticia {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-noticia:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card-noticia-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.noticia-fecha {
    font-weight: 600;
    color: #0284c7;
    font-size: 0.90rem;
    margin-bottom: 6px;
}

.noticia-titulo,
.card-noticia h3 {
    font-family: "Open Sans", sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.noticia-texto,
.card-noticia p {
    font-family: "Open Sans", sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: #64748b !important;
    line-height: 1.25 !important;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.75em !important;
}

/* 3. CONTENEDORES MULTIMEDIA */
.noticia-media-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    position: relative;
}

.noticia-media-wrapper img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 6px;
}

.noticia-media-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 6px;
}

#detalle-media-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f3f4f6;
}

#detalle-media-wrapper img,
#detalle-media-wrapper video,
#detalle-media-wrapper iframe {
    width: 100%;
    height: auto;
    display: block;
}

.contenedor-imagen-detalle img {
    max-height: 400px;
    object-fit: contain;
    width: 100%;
}

/* 4. BOTONES DE ACCIÓN Y DETALLE */
.btn-ver-detalle {
    display: inline-flex;
    align-items: center;
    color: #0284c7 !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    margin-top: auto;
}

.btn-ver-detalle:hover {
    color: #0369a1 !important;
    transform: translateX(4px);
}

.detalle-botones {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin-top: 25px !important;
    width: 100% !important;
}

.detalle-btn,
.detalle-botones a,
.detalle-botones button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    height: 42px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.detalle-btn i,
.detalle-botones i {
    font-size: 1rem !important;
    line-height: 1 !important;
}

.btn-tienda {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2) !important;
}

.btn-tienda:hover {
    background-color: #0369a1 !important;
    border-color: #0369a1 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.35) !important;
}

.btn-linkedin {
    background-color: #0a66c2 !important;
    color: #ffffff !important;
    border-color: #0a66c2 !important;
}

.btn-linkedin:hover {
    background-color: #0a66c2 !important;
    color: #ffffff !important;
    border-color: #0a66c2 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(10, 102, 194, 0.25) !important;
}

.btn-interesa {
    background-color: #1b314e !important;
    color: #ffffff !important;
    border-color: #1b314e !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn-interesa:hover {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2) !important;
}

/* 5. MINIATURA Y MODAL EMERGENTE DE VIDEO */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #000;
}

.video-thumbnail-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
    border-radius: 8px;
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    z-index: 5;
}

.play-btn-overlay::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 19px solid #ffffff;
    margin-left: 5px;
}

.video-thumbnail-container:hover .play-btn-overlay {
    background: rgba(2, 132, 199, 0.95);
    transform: translate(-50%, -50%) scale(1.12);
}

.video-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.video-modal-content {
    position: relative;
    width: min(750px, 90vw);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    animation: aparecerVideo 0.2s ease;
}

@keyframes aparecerVideo {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-content iframe {
    display: block;
    width: 100%;
    height: 420px;
    border: none;
}

.close-modal {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 28px;
    line-height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.close-modal:hover {
    background: rgba(220, 38, 38, 0.9);
    transform: scale(1.08);
}

/* 6. PAGE HEADER Y DETALLES DE TEXTO */
.page-header-wrap {
    width: 100%;
    min-height: 35px;
    background-color: #b6d1e6;
    padding: 20px 0;
    margin-bottom: 25px;
}

.page-header-wrap .page-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-header-wrap h1,
.page-header-wrap h2 {
    font-family: "Open Sans", sans-serif !important;
    font-size: 33px;
    font-weight: 300;
    color: #22170c;
    margin-top: 0;
    margin-bottom: 25px;
}

.page-header-wrap h6,
.page-header-wrap p {
    font-family: "Open Sans", sans-serif !important;
    font-size: 13px;
    font-weight: 400;
    color: #423f37;
    margin-top: 14px;
    margin-bottom: 5px;
}

#detalle-titulo {
    font-family: "Open Sans", sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    margin-bottom: 15px !important;
}

#detalle-texto {
    font-family: "Open Sans", sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    margin-bottom: 25px !important;
}

/* 7. RESPONSIVIDAD */
@media (max-width: 768px) {
    .video-modal-content {
        width: 92vw;
    }

    .video-modal-content iframe {
        height: 52vw;
        max-height: 420px;
    }
}

@media (max-width: 576px) {

    .detalle-botones {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .detalle-btn,
    .detalle-botones a {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        width: 94vw;
    }

    .video-modal-content iframe {
        height: 53vw;
    }

    .play-btn-overlay {
        width: 58px;
        height: 58px;
    }

    .play-btn-overlay::after {
        border-top-width: 10px;
        border-bottom-width: 10px;
        border-left-width: 16px;
    }
}