/* ==========================================================================
   Estilos Principales del Módulo de Noticias y Calendario (index.php)
   ========================================================================== */

.fcbf-wrap {
    display: flex;
    gap: 25px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    font-size: 1.15rem !important;
}

.fcbf-main {
    flex: 2.4;
    min-width: 300px;
}

.fcbf-side {
    flex: 1;
    min-width: 320px;
}

.fcbf-card {
    border: 1px solid #333 !important;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
    background: #fff;
}

.fcbf-card-hdr,
.fcbf-card-hdr.gris {
    padding: 14px 18px;
    font-weight: 800;
    font-size: 1.25rem !important;
    color: #fff;
    background: linear-gradient(135deg, #008ea3 0%, #005e75 100%) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.fcbf-card-body {
    padding: 20px;
}

.btn-ver-mas {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: .95rem !important;
    font-weight: 700;
    text-decoration: none;
    transition: .2s;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex;
    align-items: center;
}

.btn-ver-mas:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.fcbf-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fcbf-tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .75);
    padding: 6px 12px;
    font-size: 1.15rem !important;
    cursor: pointer;
    transition: .2s;
    position: relative;
    font-weight: 700;
    white-space: nowrap;
}

.fcbf-tab-btn.active {
    color: #fff;
}

.fcbf-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #17a2b8;
}

.nov-item {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 0 !important;
    margin-bottom: 6px;
    display: block !important;
}

.nov-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
}

.nov-date-row {
    width: 100%;
    margin-bottom: 7px !important;
}

.nov-date {
    font-size: 0.92rem !important;
    color: #00838f;
    font-weight: 700;
    display: inline-block;
}

.nov-thumb-wrapper {
    width: 88px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.nov-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nov-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #888;
    font-size: 1.3rem;
}

.nov-title {
    font-weight: 800;
    color: #212529;
    font-size: 1.05rem !important;
    margin-bottom: 2px;
    display: block;
    text-decoration: none;
    line-height: 1.25;
    transition: color 0.2s ease;
    word-break: break-word;
}

.nov-title:hover {
    color: #17a2b8;
}

.nov-excerpt {
    font-size: 0.88rem !important;
    color: #555;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
}

.fcbf-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.nav-arrow {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.4rem !important;
    transition: .2s;
}

.nav-arrow:hover {
    background: #e9ecef;
    color: #17a2b8;
}

.btn-cal-picker {
    background: #f0f2f5;
    border: 1px solid #ccc;
    padding: 7px 16px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 1.2rem !important;
    cursor: pointer;
    text-transform: uppercase;
    transition: .2s;
}

.btn-cal-picker:hover {
    background: #e2e6ea;
    border-color: #333;
}

#calPickerMenu.dropdown-menu.show {
    display: block !important;
    position: absolute;
    z-index: 9999;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.picker-months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.picker-month-btn {
    border: 1px solid #eee;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    font-size: 1rem !important;
    font-weight: 600;
    cursor: pointer;
}

.picker-month-btn:hover {
    background: #f0f0f0;
}

.picker-month-btn.active {
    background: #17a2b8;
    color: #fff;
    border-color: #17a2b8;
}

.picker-year-nav {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    gap: 6px;
}

.picker-year-label {
    font-size: .85rem !important;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.picker-year-select {
    font-weight: 700;
    font-size: 1.1rem !important;
    border: 2px solid #17a2b8;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
}

.fcbf-cal-tbl {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 1.2rem !important;
}

.fcbf-cal-tbl th {
    text-align: center;
    padding: 12px 0;
    color: #444;
    font-weight: 700;
    font-size: 1.15rem !important;
}

.fcbf-cal-tbl td {
    text-align: center;
    padding: 16px 0;
    border: 1px solid #efefef;
    position: relative;
    font-size: 1.25rem !important;
    font-weight: 600;
}

.fcbf-cal-tbl td.otro-mes {
    color: #ccc;
}

.fcbf-cal-tbl td.hoy {
    background: #f8f9fa;
    font-weight: 800;
}

.fcbf-cal-tbl td.con-ev {
    color: #17a2b8;
    font-weight: 800;
    cursor: pointer;
}

.fcbf-cal-tbl td.con-ev::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    background: #ffc107;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .fcbf-wrap {
        gap: 15px;
        margin: 1rem 0;
        font-size: 1rem !important;
    }

    .fcbf-card-hdr {
        font-size: 1.05rem !important;
        padding: 10px 14px;
    }

    .fcbf-card-body {
        padding: 10px;
    }

    .nov-item {
        padding: 8px 0 !important;
        margin-bottom: 6px;
    }

    .nov-date-row {
        margin-bottom: 6px !important;
    }

    .nov-thumb-wrapper {
        width: 70px;
        height: 50px;
        border-radius: 4px;
        flex-shrink: 0;
    }

    .nov-thumb-placeholder {
        font-size: 0.95rem;
    }

    .nov-title {
        font-size: 0.95rem !important;
        line-height: 1.25;
        margin-bottom: 2px;
        word-break: break-word;
    }

    .nov-date {
        font-size: 0.82rem !important;
    }

    .nov-excerpt {
        font-size: 0.82rem !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: 2.5em;
    }

    .novedades-scroll-container {
        max-height: 440px;
        padding-right: 4px;
    }

    .btn-cal-picker {
        font-size: 1rem !important;
        padding: 5px 10px;
    }

    .nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.1rem !important;
    }

    .fcbf-cal-tbl {
        font-size: 1rem !important;
    }

    .fcbf-cal-tbl th {
        font-size: 0.95rem !important;
        padding: 8px 0;
    }

    .fcbf-cal-tbl td {
        font-size: 1.05rem !important;
        padding: 10px 0;
    }

    .fcbf-side {
        width: 100%;
        min-width: 100%;
    }
}

/* Animaciones e Interactividad para Insignias de Conteo */
@keyframes badgePopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.4);
        opacity: 1;
    }

    80% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes badgeGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.8);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(23, 162, 184, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0);
    }
}

.badge-interactive {
    display: inline-block;
    animation: badgePopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.badge-interactive.has-content {
    animation: badgePopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both, badgeGlowPulse 2.5s infinite 1s;
}

.novedades-scroll-container {
    max-height: 580px;
    overflow-y: auto;
    padding-right: 8px;
}

.novedades-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.novedades-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.novedades-scroll-container::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 4px;
}

.novedades-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #117a8b;
}