/* public/css/main.css */

/* --- LAYOUT PRINCIPAL --- */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    margin-top: 30px;
}

/* --- HERO SLIDER --- */
.hero-section {
    padding: 30px 20px 0 20px;
    margin-bottom: 20px;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--color-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    height: 400px;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.slide.active {
    opacity: 1;
    z-index: 2;
}
.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-overlay {
    position: absolute;
    left: 5%;
    bottom: 10%;
    background: rgba(0, 0, 0, 0.7);
    padding: 25px;
    border-radius: 10px;
    color: #fff;
    border-left: 5px solid var(--color-gold);
}
.hero-overlay h3 {
    font-weight: 900;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.hero-overlay h4 {
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ddd;
}
.hero-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: all 0.3s;
}
.btn-outline-light {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}
.btn-outline-light:hover {
    background: #fff;
    color: #000;
}

/* --- SECCIÓN PARED DE LADRILLOS --- */
.bg-brick-wall {
    background-color: #e5e5e5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'%3E%3Cpath d='M0 14h60v2H0zm30 15v15h2V15zM0 0h2v15H0zm60 0h-2v15h2z' fill='%23cccccc' fill-opacity='0.6'/%3E%3C/svg%3E");
    padding: 30px;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05), 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.section-title-distressed {
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    font-size: 2rem;
    color: #1a1a1a;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
}
.btn-pill-light {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}
.btn-pill-light:hover {
    background: #f9f9f9;
    color: var(--color-gold);
}

/* --- FILTROS DE COMUNICADOS --- */
.filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}
.filters i {
    color: #666;
    font-size: 1.1rem;
    margin-right: 5px;
}
.btn-filter {
    background-color: #fff;
    color: #444;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}
.btn-filter.active,
.btn-filter:hover {
    background-color: #374151;
    color: #fff;
}

/* --- TARJETAS DE COMUNICADOS (CARDS) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.card-custom {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.card-custom img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.card-body {
    padding: 20px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.badge-category {
    background-color: #374151;
    color: #fff;
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #1a1a1a;
}
.card-date {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 12px;
    font-weight: bold;
}
.card-date i {
    margin-right: 5px;
}
.card-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #f1f1f1;
    padding-top: 15px;
}
.btn-read {
    background-color: #374151;
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
}
.btn-read:hover {
    background-color: var(--color-gold);
}
.card-footer a.ver-mas {
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}
.card-footer a.ver-mas:hover {
    color: var(--color-gold);
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.dot.active, .dot:hover {
    background-color: var(--color-gold);
}

/* --- SIDEBAR WIDGETS (DERECHA) --- */
.widget-box {
    background-color: #4e3424;
    background-image: repeating-linear-gradient(to right, #4e3424 0px, #4e3424 25px, #432d1e 25px, #432d1e 50px);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid #2a1a10;
    border-radius: 10px;
    padding: 40px 20px 20px 20px;
    margin-bottom: 40px;
    position: relative;
    text-align: center;
}
.screw {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #777;
    border-radius: 50%;
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.6), inset -1px -1px 3px rgba(0, 0, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.6);
}
.screw::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #222;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.screw.tl { top: 12px; left: 12px; }
.screw.tr { top: 12px; right: 12px; }
.screw.bl { bottom: 12px; left: 12px; }
.screw.br { bottom: 12px; right: 12px; transform: rotate(90deg); }

.widget-plaque-container {
    display: flex;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
.widget-plaque-string {
    position: absolute;
    top: -20px;
    width: 3px;
    height: 30px;
    background: #d4af37;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 1;
}
.widget-plaque-string::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2.5px;
    width: 8px;
    height: 8px;
    background: #222;
    border-radius: 50%;
    box-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3) inset;
}
.widget-plaque {
    background-color: #a33b3b;
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 8px 30px;
    border-radius: 25px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 6px 8px rgba(0, 0, 0, 0.6);
    border: 3px solid #2a1a10;
    position: relative;
    top: -15px;
    z-index: 2;
    text-shadow: 2px 2px 2px #000;
    text-transform: uppercase;
}
.widget-plaque.wood-light {
    background-color: #d2a679;
    color: #2a1a10;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
}
.widget-plaque.gold {
    background-color: #d4af37;
    color: #1a1a1a;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}
.widget-content-white {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}
.badge-proximo {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #333;
    color: #fff;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}
.widget-content-white h6 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    padding-right: 60px;
}
.widget-content-white p {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
}
.widget-logo-slider {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    height: 120px;
    overflow: hidden;
}
.widget-logo-slider img {
    max-width: 80%;
    height: auto;
    object-fit: contain;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    background: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: background 0.3s;
}
.slider-arrow:hover {
    background: #fff;
}
.slider-arrow.left { left: 5px; }
.slider-arrow.right { right: 5px; }
.btn-dark {
    background: #333;
    color: #fff;
    display: block;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-dark:hover {
    background: var(--color-gold);
}

/* ========================================= */
/* --- RESPONSIVE MAIN CONTENT --- */
/* ========================================= */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .bg-brick-wall {
        padding: 20px 15px;
    }
    .section-title-distressed {
        font-size: 1.5rem;
        text-align: center;
        width: 100%;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .hero-image {
        height: 250px;
        border-radius: 10px 10px 0 0;
    }
    .hero-overlay {
        position: relative;
        left: 0;
        bottom: 0;
        border-radius: 0 0 10px 10px;
        border-left: none;
        border-top: 5px solid var(--color-gold);
    }
}

/* --- MENU SUBMENU Y POPUP FIXES --- */
.navbar-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a1a1a;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: 0 0 4px 4px;
}

.navbar-nav li {
    position: relative;
}

@media (min-width: 993px) {
    .navbar-nav li:hover > .submenu {
        display: block;
    }
}

@media (max-width: 992px) {
    .navbar-nav .submenu {
        position: static;
        box-shadow: none;
        width: 100%;
        background-color: #222;
        padding-left: 15px;
    }
    .navbar-nav li.mobile-open > .submenu {
        display: block;
    }
}

.modal-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-popup-content {
    background: transparent;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-popup-overlay.show .modal-popup-content {
    transform: scale(1);
}

.modal-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.modal-popup-close:hover {
    background: #e2e8f0;
}

.modal-img-web {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 85vh;
    border-radius: 8px;
    border: 3px solid var(--color-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-img-mobile {
    display: none;
    max-width: 100%;
    height: auto;
    max-height: 85vh;
    border-radius: 8px;
    border: 3px solid var(--color-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .modal-img-web { display: none; }
    .modal-img-mobile { display: block; }
}

/* public/css/main.css */

/* --- LAYOUT EXPANDIDO (TODA LA PÁGINA) --- */
.container-expanded { max-width: 96%; margin: 0 auto; padding: 0 20px; }
.main-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; margin-bottom: 50px; margin-top: 30px; }

/* ========================================= */
/* --- HERO SLIDER (EFECTO VIDEO CINEMATOGRÁFICO)--- */
/* ========================================= */
.hero-section { width: 100%; margin-bottom: 40px; padding: 0; }
.hero-container { width: 100%; max-width: 100%; background-color: #000; border-radius: 0; overflow: hidden; position: relative; height: 75vh; min-height: 500px; max-height: 850px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out; z-index: 1; }
.slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transform: scale(1.15); transition: transform 10s ease-out; }
.slide.active .hero-image { transform: scale(1); }
.slide::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%); z-index: 1; }

.hero-overlay { position: absolute; left: 8%; top: 50%; transform: translateY(-50%); background: transparent; padding: 0; color: #fff; z-index: 3; max-width: 800px; }
.hero-overlay h3 { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-weight: 300; font-size: 4rem; margin-bottom: 10px; text-transform: uppercase; line-height: 1.1; text-shadow: 2px 2px 15px rgba(0,0,0,0.8); border-left: 4px solid var(--color-gold); padding-left: 25px; letter-spacing: 2px; opacity: 0; transform: translateY(20px); transition: all 1s ease 0.5s; }
.hero-overlay h3 strong { font-weight: 700; }
.hero-overlay h4 { font-family: 'Segoe UI', Roboto, sans-serif; font-weight: 400; font-size: 1.4rem; margin-bottom: 35px; color: #e2e8f0; padding-left: 30px; text-shadow: 1px 1px 10px rgba(0,0,0,0.9); letter-spacing: 1px; opacity: 0; transform: translateY(20px); transition: all 1s ease 0.7s; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; padding-left: 30px; opacity: 0; transform: translateY(20px); transition: all 1s ease 0.9s; }
.slide.active .hero-overlay h3, .slide.active .hero-overlay h4, .slide.active .hero-buttons { opacity: 1; transform: translateY(0); }

.hero-buttons .btn { padding: 14px 32px; border-radius: 30px; font-weight: 600; font-size: 0.85rem; cursor: pointer; text-align: center; border: none; transition: all 0.4s ease; text-transform: uppercase; letter-spacing: 1.5px; }
.hero-buttons .btn-outline-light { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.6); color: #fff; }
.hero-buttons .btn-outline-light:hover { background: var(--color-gold); border-color: var(--color-gold); color: #000; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4); }

.slider-progress-container { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: rgba(255, 255, 255, 0.15); z-index: 10; }
.slider-progress-bar { height: 100%; width: 0%; background: var(--color-gold); box-shadow: 0 0 10px var(--color-gold); }
.slider-progress-bar.animate { animation: loadSlide 6s linear forwards; }
@keyframes loadSlide { 0% { width: 0%; } 100% { width: 100%; } }

.slider-controls { position: absolute; bottom: 25px; left: 8%; display: flex; gap: 8px; z-index: 10; }
.slider-dot { width: 30px; height: 3px; background: rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.3s ease; }
.slider-dot:hover { background: rgba(255, 255, 255, 0.8); }
.slider-dot.active { background: var(--color-gold); width: 45px; box-shadow: 0 0 8px rgba(212, 175, 55, 0.5); }

/* ========================================= */
/* --- SECCIÓN COMUNICADOS --- */
/* ========================================= */
.bg-brick-wall { background-color: #ffffff; background-image: none; padding: 35px 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06); margin-bottom: 40px; border-top: 4px solid var(--color-gold); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; }
.section-title-distressed { font-family: 'Impact', 'Arial Black', sans-serif; text-transform: uppercase; font-size: 2.3rem; color: #1a1a1a; letter-spacing: 1px; text-shadow: 2px 2px 0px rgba(200, 200, 200, 0.8); margin: 0; }
.btn-pill-light { background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; padding: 10px 22px; border-radius: 25px; font-size: 0.85rem; font-weight: 700; transition: all 0.3s ease; }
.btn-pill-light:hover { background: var(--color-gold); color: #1a1a1a; border-color: var(--color-gold); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3); }

.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.filters i { color: #94a3b8; font-size: 1.1rem; margin-right: 5px; }
.btn-filter { background-color: #f1f5f9; color: #475569; border: none; padding: 8px 20px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; }
.btn-filter.active, .btn-filter:hover { background-color: #1e293b; color: #ffffff; box-shadow: 0 4px 10px rgba(30, 41, 59, 0.15); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; margin-bottom: 20px; }
.card-custom { background: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); border: 1px solid #f1f5f9; overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-custom:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); }
.card-custom img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid #f1f5f9; }
.card-body { padding: 22px 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge-category { background-color: #334155; color: #fff; font-size: 0.65rem; padding: 5px 12px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.card-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; line-height: 1.35; color: #0f172a; }
.card-date { font-size: 0.8rem; color: #64748b; margin-bottom: 12px; font-weight: 600; }
.card-date i { margin-right: 5px; }
.card-text { font-size: 0.95rem; color: #475569; margin-bottom: 25px; flex-grow: 1; line-height: 1.6; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; border-top: 1px solid #f1f5f9; padding-top: 15px; }
.btn-read { background-color: #1e293b; color: #fff; padding: 8px 18px; border-radius: 6px; font-size: 0.85rem; font-weight: 700; text-decoration: none; transition: background-color 0.3s; }
.btn-read:hover { background-color: var(--color-gold); color: #000; }
.card-footer a.ver-mas { font-size: 0.85rem; color: #64748b; font-weight: 700; text-decoration: none; transition: color 0.3s; }
.card-footer a.ver-mas:hover { color: var(--color-gold); }
.pagination-dots { display: flex; justify-content: center; gap: 8px; margin-top: 25px; }
.dot { width: 8px; height: 8px; background-color: #cbd5e1; border-radius: 50%; cursor: pointer; transition: all 0.3s; }
.dot.active, .dot:hover { background-color: var(--color-gold); transform: scale(1.3); }

/* ========================================= */
/* --- SIDEBAR WIDGETS (DERECHA) --- */
/* ========================================= */
.widget-box { background-color: #4e3424; background-image: repeating-linear-gradient(to right, #4e3424 0px, #4e3424 25px, #432d1e 25px, #432d1e 50px); box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.3); border: 3px solid #2a1a10; border-radius: 10px; padding: 40px 20px 20px 20px; margin-bottom: 40px; position: relative; text-align: center; }
.screw { position: absolute; width: 14px; height: 14px; background: #777; border-radius: 50%; box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.6), inset -1px -1px 3px rgba(0, 0, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.6); }
.screw::after { content: ''; position: absolute; top: 50%; left: 15%; right: 15%; height: 2px; background: #222; transform: translateY(-50%) rotate(45deg); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3); }
.screw.tl { top: 12px; left: 12px; } .screw.tr { top: 12px; right: 12px; } .screw.bl { bottom: 12px; left: 12px; } .screw.br { bottom: 12px; right: 12px; transform: rotate(90deg); }
.widget-plaque-container { display: flex; justify-content: center; position: absolute; top: 0; left: 0; width: 100%; }
.widget-plaque-string { position: absolute; top: -20px; width: 3px; height: 30px; background: #d4af37; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); z-index: 1; }
.widget-plaque-string::before { content: ''; position: absolute; top: 0; left: -2.5px; width: 8px; height: 8px; background: #222; border-radius: 50%; box-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3) inset; }
.widget-plaque { background-color: #a33b3b; color: #fff; font-weight: 900; font-size: 1.1rem; padding: 8px 30px; border-radius: 25px; box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 6px 8px rgba(0, 0, 0, 0.6); border: 3px solid #2a1a10; position: relative; top: -15px; z-index: 2; text-shadow: 2px 2px 2px #000; text-transform: uppercase; }
.widget-content-white { background: #f8f9fa; padding: 20px; border-radius: 8px; text-align: left; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); position: relative; }
.badge-proximo { position: absolute; top: 12px; right: 12px; background-color: #333; color: #fff; font-size: 0.65rem; padding: 4px 8px; border-radius: 12px; font-weight: bold; text-transform: uppercase; }
.widget-content-white h6 { font-size: 0.95rem; font-weight: 800; color: #111; margin-bottom: 8px; padding-right: 60px; }
.widget-content-white p { font-size: 0.85rem; color: #555; margin: 0; }

/* --- MENU SUBMENU Y POPUP FIXES --- */
.navbar-nav .submenu { display: none; position: absolute; top: 100%; left: 0; background-color: #1a1a1a; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); min-width: 220px; z-index: 1000; padding: 0; margin: 0; list-style: none; border-radius: 0 0 4px 4px; }
.navbar-nav li { position: relative; }
@media (min-width: 993px) { .navbar-nav li:hover > .submenu { display: block; } }
@media (max-width: 992px) { .navbar-nav .submenu { position: static; box-shadow: none; width: 100%; background-color: #222; padding-left: 15px; } .navbar-nav li.mobile-open > .submenu { display: block; } }
.modal-popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-popup-overlay.show { opacity: 1; visibility: visible; }
.modal-popup-content { background: transparent; position: relative; max-width: 90%; max-height: 90vh; transform: scale(0.9); transition: all 0.3s ease; }
.modal-popup-overlay.show .modal-popup-content { transform: scale(1); }
.modal-popup-close { position: absolute; top: -15px; right: -15px; background: #fff; border: none; border-radius: 50%; width: 35px; height: 35px; font-size: 1.2rem; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); z-index: 10; display: flex; align-items: center; justify-content: center; color: #333; }
.modal-popup-close:hover { background: #e2e8f0; }
.modal-img-web { display: block; max-width: 100%; height: auto; max-height: 85vh; border-radius: 8px; border: 3px solid var(--color-gold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.modal-img-mobile { display: none; max-width: 100%; height: auto; max-height: 85vh; border-radius: 8px; border: 3px solid var(--color-gold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

/* ========================================= */
/* --- AGREGADOS: INICIO PREMIUM CMFB    --- */
/* ========================================= */
.inicio-bienvenida-wrapper { max-width: 1000px; margin: 0 auto 40px auto; padding: 0 20px;}
.inicio-bienvenida-header { background-color: #034d08; color: #fff; text-align: center; padding: 15px; font-family: 'Oswald', 'Impact', sans-serif; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 30px; }
.inicio-bienvenida-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: stretch; }
.inicio-director-card { background: #034d08; padding: 0; text-align: center; border: 2px solid #034d08; }
.inicio-director-card img { width: 100%; height: 380px; object-fit: cover; display: block; background: #e2e8f0; }
.inicio-director-info { padding: 10px; color: #fff; }
.inicio-director-info h4 { margin: 0; font-size: 0.95rem; font-family: 'Oswald', sans-serif; }
.inicio-director-info p { margin: 0; font-size: 0.8rem; font-weight: bold; color: #d4af37; }
.inicio-bienvenida-texto { border: 15px solid #034d08; padding: 30px; background: #fff; display: flex; align-items: center; text-align: center; }
.inicio-bienvenida-texto p { font-family: 'Oswald', sans-serif; font-size: 1.1rem; color: #034d08; line-height: 1.6; margin: 0; text-transform: uppercase; }

.inicio-enlaces-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 20px;}
.inicio-enlace-btn { background-color: #034d08; color: #fff; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 20px; text-decoration: none; font-family: 'Oswald', sans-serif; font-size: 1.2rem; text-transform: uppercase; transition: transform 0.3s, background 0.3s; }
.inicio-enlace-btn:hover { background-color: #1a1a1a; transform: translateY(-5px); color: #d4af37; }
.inicio-enlace-btn i { font-size: 2.5rem; color: #fff; }

.inicio-galeria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.inicio-galeria-item { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.inicio-galeria-title { font-family: 'Oswald', sans-serif; color: #881313; text-align: center; font-size: 1.1rem; padding: 15px; margin: 0; text-transform: uppercase; }
.inicio-galeria-item img { width: 100%; height: 300px; object-fit: cover; display: block; }

.inicio-admision-promo { background-color: #d8d3d0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 50px; }
.inicio-admision-info { padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.inicio-admision-info ul { list-style: none; padding: 0; margin: 0 0 20px 0; font-family: 'Lato', sans-serif; font-size: 0.9rem; color: #881313; }
.inicio-admision-info ul i { margin-right: 5px; }
.inicio-admision-horario { font-family: 'Oswald', sans-serif; color: #034d08; font-size: 1.1rem; margin-bottom: 20px; }
.btn-admision-rojo { background: #881313; color: #fff; padding: 10px 20px; font-family: 'Oswald', sans-serif; font-size: 1rem; border: none; margin-bottom: 10px; width: 80%; cursor: pointer; }
.btn-admision-outline { background: transparent; border: 2px solid #034d08; color: #034d08; padding: 10px 20px; font-family: 'Oswald', sans-serif; font-size: 1rem; width: 80%; cursor: pointer; transition: 0.3s; }
.btn-admision-outline:hover { background: #034d08; color: #fff; }
.inicio-admision-img { width: 100%; height: 100%; min-height: 350px; object-fit: cover; display: block; }
.inicio-admision-tag { font-family: 'Oswald', sans-serif; color: #034d08; font-size: 1.5rem; text-align: center; padding: 20px; margin: 0; }

.eventos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.evento-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; display: flex; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.3s, box-shadow 0.3s; cursor: default; }
.evento-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.evento-fecha-box { background: #1a2238; color: #fff; padding: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 100px; border-right: 4px solid var(--color-gold); text-align: center; }
.evento-fecha-box .dia { font-family: 'Oswald', sans-serif; font-size: 2.2rem; font-weight: 700; line-height: 1; }
.evento-fecha-box .dia i { font-size: 1.8rem; color: var(--color-gold); }
.evento-fecha-box .mes { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; color: #cbd5e1; }
.evento-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.evento-titulo { font-family: 'Oswald', sans-serif; font-size: 1.15rem; color: #0f172a; margin: 0 0 10px 0; line-height: 1.3; text-transform: uppercase; }
.evento-fecha-txt { margin: 0; font-size: 0.85rem; color: #64748b; font-weight: 600; }
.evento-fecha-txt i { color: #881313; margin-right: 5px; }

/* RESPONSIVE GLOBAL */
@media (max-width: 1200px) { .main-grid { grid-template-columns: 1fr 320px; } }
@media (max-width: 1024px) { .main-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
    .inicio-bienvenida-grid, .inicio-enlaces-grid, .inicio-galeria-grid, .inicio-admision-promo { grid-template-columns: 1fr; }
    .inicio-bienvenida-texto { padding: 15px; border-width: 8px; }
    .inicio-director-card img { height: auto; }
}
@media (max-width: 768px) {
    .hero-container { height: 60vh; min-height: 400px; }
    .hero-overlay { left: 5%; right: 5%; }
    .hero-overlay h3 { font-size: 2.2rem; border-left-width: 3px; padding-left: 15px; }
    .hero-overlay h4 { font-size: 1.1rem; padding-left: 15px; }
    .hero-buttons { padding-left: 15px; flex-direction: column; width: 100%; max-width: 300px; }
    .hero-buttons .btn { width: 100%; }
    .slider-controls { left: 50%; transform: translateX(-50%); }
    .bg-brick-wall { padding: 25px 20px; }
    .section-header { justify-content: center; text-align: center; }
    .modal-img-web { display: none; }
    .modal-img-mobile { display: block; }
}

/* =========================================================
   CMFB - CORRECCIÓN FINAL
   NOTICIAS IZQUIERDA + EVENTOS DERECHA
   SIN PESTAÑAS - SIN MADERA
   ========================================================= */

.container.main-grid,
.main-grid {
    width: min(1200px, calc(100% - 40px));
    max-width: 1200px;
    margin: 30px auto 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.main-content-left,
.sidebar-right {
    min-width: 0;
}

/* NOTICIAS */
.cmfb-news-section {
    margin: 0;
    background: #fff !important;
    background-image: none !important;
    border-top: 4px solid #d4af37;
    border-radius: 16px;
    padding: 34px 38px;
    box-shadow: 0 12px 35px rgba(15,23,42,.09);
}

.section-heading-cmfb {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.section-kicker {
    color: #881313;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.news-image-wrap {
    position: relative;
    overflow: hidden;
}

.news-image-wrap img {
    transition: transform .4s ease;
}

.card-custom:hover .news-image-wrap img {
    transform: scale(1.04);
}

.news-image-label {
    position: absolute;
    left: 10px;
    bottom: 9px;
    padding: 5px 9px;
    background: rgba(15,23,42,.9);
    color: #fff;
    border-left: 3px solid #d4af37;
    font-size: .6rem;
    font-weight: 900;
}

.badge-urgent {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: .62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.btn-pill-light {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}


/* =========================================================
   SIDEBAR LIMPIO
   ========================================================= */

.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* AVISOS */
.cmfb-side-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15,23,42,.09);
}

.cmfb-side-title {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cmfb-side-title span {
    font-family: 'Oswald','Arial Narrow',sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.cmfb-red-title {
    background: linear-gradient(135deg,#7f1010,#a51c1c);
    color: #fff;
}

.cmfb-red-title i {
    color: #f4d35e;
    margin-right: 7px;
}

.cmfb-side-content {
    padding: 14px;
}

.cmfb-side-slide {
    min-height: 125px;
    padding: 17px;
    border-radius: 10px;
    background: #f8fafc;
    border-left: 4px solid #881313;
}

.cmfb-side-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #881313;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cmfb-side-slide h3 {
    margin: 0 0 12px;
    color: #111827;
    font-family: 'Oswald','Arial Narrow',sans-serif;
    font-size: .98rem;
    line-height: 1.35;
    text-transform: uppercase;
}

.cmfb-side-slide p {
    margin: 0;
    color: #64748b;
    font-size: .73rem;
    font-weight: 700;
}

.cmfb-side-slide p i {
    color: #881313;
    margin-right: 5px;
}


/* =========================================================
   EVENTOS LATERALES
   ========================================================= */

.cmfb-side-events {
    background:
        radial-gradient(circle at 82% 35%, rgba(212,175,55,.14) 0, rgba(212,175,55,0) 24%),
        linear-gradient(135deg, #071321 0%, #0d1d32 48%, #142941 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(212,175,55,.5);
    box-shadow: 0 15px 35px rgba(15,23,42,.18);
}

.cmfb-events-heading {
    min-height: 85px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.cmfb-events-heading span {
    display: block;
    color: #d4af37;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cmfb-events-heading h2 {
    margin: 0;
    color: #fff;
    font-family: 'Oswald','Arial Narrow',sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.cmfb-events-heading > i {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212,175,55,.6);
    border-radius: 50%;
    color: #d4af37;
    font-size: 1.1rem;
}

.cmfb-side-events-list {
    padding: 12px;
    display: grid;
    gap: 9px;
}

.cmfb-side-event {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr);
    min-height: 92px;
    background: #fff;
    border-radius: 9px;
    overflow: hidden;
}

.cmfb-side-event-date {
    background: #101827;
    border-right: 3px solid #d4af37;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cmfb-side-event-date strong {
    font-family: 'Oswald','Arial Narrow',sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

.cmfb-side-event-date span {
    margin-top: 3px;
    color: #d4af37;
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.cmfb-side-event-info {
    padding: 11px 12px;
    min-width: 0;
}

.cmfb-side-event-info > span {
    color: #881313;
    font-size: .55rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cmfb-side-event-info h3 {
    margin: 4px 0 7px;
    color: #111827;
    font-family: 'Oswald','Arial Narrow',sans-serif;
    font-size: .78rem;
    line-height: 1.25;
    text-transform: uppercase;
}

.cmfb-side-event-info p {
    margin: 0;
    color: #64748b;
    font-size: .61rem;
    font-weight: 700;
}

.cmfb-side-event-info p i {
    color: #881313;
    margin-right: 4px;
}

.cmfb-no-events {
    min-height: 150px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #cbd5e1;
}

.cmfb-no-events i {
    color: #d4af37;
    font-size: 1.8rem;
    margin-bottom: 9px;
}

.cmfb-no-events strong {
    color: #fff;
    font-size: .82rem;
}

.cmfb-no-events span {
    margin-top: 5px;
    color: #94a3b8;
    font-size: .68rem;
}


/* OCULTAR COMPLETAMENTE EL ANTIGUO DISEÑO DE MADERA
   si algún CSS antiguo queda aplicado por otras vistas */
.cmfb-side-card .widget-box,
.cmfb-side-events .widget-box,
.cmfb-side-card .widget-plaque,
.cmfb-side-events .widget-plaque {
    background-image: none !important;
}


/* RESPONSIVE */
@media (max-width: 1100px) {
    .container.main-grid,
    .main-grid {
        grid-template-columns: minmax(0,1fr) 285px;
    }

    .cmfb-news-section {
        padding: 28px;
    }
}

@media (max-width: 900px) {
    .container.main-grid,
    .main-grid {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 760px);
    }

    .sidebar-right {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
        align-items: start;
    }
}

@media (max-width: 600px) {
    .cmfb-news-section {
        padding: 22px 17px;
    }

    .sidebar-right {
        display: flex;
    }

    .cmfb-events-heading {
        padding: 16px;
    }
}


/* =========================================================
   CMFB - EVENTOS LATERAL / FONDO INSTITUCIONAL PREMIUM
   ========================================================= */

.cmfb-side-events {
    position: relative;
    background:
        radial-gradient(circle at 88% 18%, rgba(212,175,55,.18) 0, rgba(212,175,55,0) 25%),
        linear-gradient(135deg, #071321 0%, #0d1d32 48%, #162b44 100%) !important;
    border: 1px solid rgba(212,175,55,.55);
    box-shadow: 0 16px 38px rgba(5,15,30,.24);
}

.cmfb-side-events::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -105px;
    top: -155px;
    border: 1px solid rgba(212,175,55,.16);
    transform: rotate(45deg);
    pointer-events: none;
}

.cmfb-side-events::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 180%;
    right: 86px;
    top: -40%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(212,175,55,.12),
        transparent
    );
    transform: rotate(45deg);
    pointer-events: none;
}

.cmfb-events-heading,
.cmfb-side-events-list {
    position: relative;
    z-index: 2;
}

.cmfb-events-heading {
    background:
        linear-gradient(135deg, rgba(255,255,255,.025), rgba(255,255,255,0)),
        transparent;
}

.cmfb-events-heading h2 {
    font-size: 1.35rem;
    letter-spacing: .5px;
}

.cmfb-events-heading > i {
    box-shadow: 0 0 0 5px rgba(212,175,55,.035);
    background: rgba(255,255,255,.025);
}

.cmfb-side-event {
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 15px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cmfb-side-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,.13);
}

.cmfb-side-event-date {
    background:
        linear-gradient(160deg, #0c1727, #17283e);
}

.cmfb-side-event-info h3 {
    font-size: .82rem;
}

@media (max-width: 600px) {
    .cmfb-side-events::before {
        display: none;
    }

    .cmfb-side-events::after {
        display: none;
    }
}

/* =========================================================
   CMFB WEB FINAL — DISEÑO INSTITUCIONAL PREMIUM
   Se aplica al final para sobrescribir estilos antiguos.
   ========================================================= */

:root {
    --cmfb-navy: #0b1b2e;
    --cmfb-navy-2: #102942;
    --cmfb-gold: #d4af37;
    --cmfb-red: #8d1518;
    --cmfb-ink: #0f172a;
    --cmfb-muted: #64748b;
    --cmfb-paper: #f3f4f2;
}

html { scroll-behavior: smooth; }
body { background: #eef0ee; color: var(--cmfb-ink); }

/* CONTENEDOR PRINCIPAL */
.container.main-grid,
.main-grid {
    width: min(1320px, calc(100% - 48px)) !important;
    max-width: 1320px !important;
    margin: 42px auto 70px !important;
    grid-template-columns: minmax(0, 1fr) 350px !important;
    gap: 30px !important;
    align-items: start !important;
}

.main-content-left,
.sidebar-right { min-width: 0 !important; }

/* NOTICIAS: PARED INSTITUCIONAL */
.cmfb-news-section {
    position: relative !important;
    overflow: hidden !important;
    padding: 38px !important;
    background-color: var(--cmfb-paper) !important;
    background-image:
        linear-gradient(rgba(255,255,255,.72) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.72) 1px, transparent 1px),
        linear-gradient(180deg,#e9ebe9,#f8f9f8) !important;
    background-size: 30px 30px,30px 30px,100% 100% !important;
    border: 1px solid rgba(15,23,42,.08) !important;
    border-top: 5px solid var(--cmfb-gold) !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 50px rgba(15,23,42,.10) !important;
}

.cmfb-news-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    background:
        repeating-linear-gradient(90deg,transparent 0,transparent 58px,rgba(100,116,139,.13) 59px,rgba(100,116,139,.13) 61px,transparent 62px,transparent 88px),
        repeating-linear-gradient(0deg,transparent 0,transparent 28px,rgba(100,116,139,.10) 29px,rgba(100,116,139,.10) 30px);
}

.cmfb-news-section > * { position: relative; z-index: 2; }

.section-heading-cmfb { gap: 5px !important; }
.section-kicker {
    color: var(--cmfb-red) !important;
    font-size: .70rem !important;
    letter-spacing: 2.4px !important;
    font-weight: 900 !important;
}
.section-title-distressed {
    color: #101827 !important;
    font-size: clamp(2.2rem,3.3vw,3rem) !important;
    text-shadow: 2px 2px 0 rgba(255,255,255,.9) !important;
}

.btn-pill-light {
    background: rgba(255,255,255,.94) !important;
    border: 1px solid #dbe2ea !important;
    color: #172033 !important;
    padding: 12px 20px !important;
    box-shadow: 0 7px 18px rgba(15,23,42,.08) !important;
}
.btn-pill-light:hover {
    background: var(--cmfb-gold) !important;
    border-color: var(--cmfb-gold) !important;
    color: #111827 !important;
    transform: translateY(-2px);
}

.filters {
    margin-bottom: 26px !important;
    padding-bottom: 17px !important;
    border-bottom: 1px solid rgba(100,116,139,.20) !important;
}
.btn-filter {
    background: rgba(255,255,255,.88) !important;
    border: 1px solid rgba(226,232,240,.9) !important;
}
.btn-filter.active,
.btn-filter:hover {
    background: var(--cmfb-navy) !important;
    color: #fff !important;
}

.cards-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 22px !important;
}
.card-custom {
    border-radius: 14px !important;
    border: 1px solid #e5eaf0 !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.08) !important;
}
.card-custom:hover {
    transform: translateY(-7px) !important;
    box-shadow: 0 18px 34px rgba(15,23,42,.14) !important;
}
.card-custom img {
    height: 220px !important;
}
.card-body { padding: 21px !important; }
.card-title { color: #101827 !important; font-size: 1.12rem !important; }
.card-text { color: #475569 !important; }
.btn-read { background: var(--cmfb-navy) !important; }
.btn-read:hover { background: var(--cmfb-gold) !important; color: #111827 !important; }

/* SIDEBAR */
.sidebar-right {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    position: sticky;
    top: 20px;
}

/* AVISOS LIMPIO */
.cmfb-side-card {
    background: #fff !important;
    border: 1px solid #dfe5eb !important;
    border-radius: 17px !important;
    box-shadow: 0 15px 35px rgba(15,23,42,.09) !important;
    overflow: hidden !important;
}
.cmfb-side-title {
    min-height: 62px !important;
}
.cmfb-red-title {
    background: linear-gradient(135deg,#7d1013,#a91e22) !important;
}
.cmfb-side-content { padding: 14px !important; }
.cmfb-side-slide {
    min-height: 128px !important;
    background: #f8fafc !important;
    border-left: 4px solid var(--cmfb-red) !important;
    border-radius: 11px !important;
}

/* EVENTOS LATERAL PREMIUM */
.cmfb-side-events {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 17px !important;
    border: 1px solid rgba(212,175,55,.55) !important;
    background:
        radial-gradient(circle at 88% 18%,rgba(212,175,55,.20),transparent 28%),
        linear-gradient(135deg,#071321 0%,#0c1c30 52%,#17304b 100%) !important;
    box-shadow: 0 18px 40px rgba(5,15,30,.22) !important;
}
.cmfb-side-events::before {
    content:"";
    position:absolute;
    width:310px;
    height:310px;
    right:-165px;
    top:-185px;
    border:1px solid rgba(212,175,55,.18);
    transform:rotate(45deg);
    pointer-events:none;
}
.cmfb-side-events::after {
    content:"";
    position:absolute;
    width:1px;
    height:180%;
    right:90px;
    top:-40%;
    background:linear-gradient(to bottom,transparent,rgba(212,175,55,.16),transparent);
    transform:rotate(45deg);
    pointer-events:none;
}
.cmfb-events-heading {
    position:relative !important;
    z-index:2 !important;
    min-height:145px !important;
    padding:25px 22px 20px !important;
    background:transparent !important;
    border-bottom:1px solid rgba(255,255,255,.12) !important;
}
.cmfb-events-heading span {
    color:var(--cmfb-gold) !important;
    letter-spacing:2px !important;
}
.cmfb-events-heading h2 {
    color:#fff !important;
    font-size:2rem !important;
    letter-spacing:.5px !important;
}
.cmfb-events-heading > i {
    width:54px !important;
    height:54px !important;
    margin-top:14px;
    color:var(--cmfb-gold) !important;
    border-color:rgba(212,175,55,.7) !important;
}
.cmfb-side-events-list {
    position:relative;
    z-index:3;
    padding:13px !important;
    background:rgba(255,255,255,.98) !important;
}
.cmfb-side-event {
    min-height:94px !important;
    grid-template-columns:60px minmax(0,1fr) !important;
    border:1px solid #e2e8f0 !important;
    box-shadow:0 6px 15px rgba(15,23,42,.07) !important;
}
.cmfb-side-event-date {
    background:linear-gradient(160deg,#0b1728,#172a42) !important;
    border-right:3px solid var(--cmfb-gold) !important;
}
.cmfb-side-event-date strong { font-size:1.65rem !important; }
.cmfb-side-event-date span { color:var(--cmfb-gold) !important; }
.cmfb-side-event-info h3 { font-size:.80rem !important; }
.cmfb-side-event-info > span { color:var(--cmfb-red) !important; }
.cmfb-no-events {
    position:relative;
    z-index:3;
    background:#fff !important;
    min-height:150px !important;
}

/* ELIMINAR MADERA DE CUALQUIER ELEMENTO ANTIGUO */
.widget-box,
.widget-plaque,
.cmfb-sidebar-events {
    background-image:none !important;
}

/* HERO */
.hero-section { margin-bottom:0 !important; }
.hero-container {
    border-radius:0 !important;
    box-shadow:0 12px 35px rgba(0,0,0,.25) !important;
}
.hero-overlay h3 { letter-spacing:2px !important; }

/* RESPONSIVE */
@media (max-width: 1050px) {
    .container.main-grid,
    .main-grid {
        grid-template-columns:minmax(0,1fr) 300px !important;
        gap:22px !important;
    }
}
@media (max-width: 900px) {
    .container.main-grid,
    .main-grid {
        width:min(calc(100% - 28px),760px) !important;
        grid-template-columns:1fr !important;
    }
    .sidebar-right {
        position:static !important;
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}
@media (max-width: 650px) {
    .container.main-grid,
    .main-grid { width:calc(100% - 18px) !important; }
    .cmfb-news-section { padding:22px 16px !important; }
    .cards-grid { grid-template-columns:1fr !important; }
    .sidebar-right { display:flex !important; }
    .section-title-distressed { font-size:2rem !important; }
    .section-header { align-items:flex-start !important; }
    .card-custom img { height:210px !important; }
}



/* =========================================================
   CMFB — HERO SLIDER PREMIUM
   ========================================================= */

.hero-section {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #0b1220 !important;
}

.hero-container {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: min(72vh, 680px) !important;
    min-height: 500px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #07111e !important;
    box-shadow: 0 16px 38px rgba(0,0,0,.24) !important;
}

.hero-container .slide {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(1.025) !important;
    transition:
        opacity .85s ease,
        transform 7s ease !important;
}

.hero-container .slide.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    z-index: 2 !important;
}

.hero-image {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

.hero-shade {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background:
        linear-gradient(
            90deg,
            rgba(3,10,19,.76) 0%,
            rgba(3,10,19,.48) 28%,
            rgba(3,10,19,.13) 58%,
            rgba(3,10,19,.10) 100%
        ),
        linear-gradient(
            0deg,
            rgba(3,10,19,.66) 0%,
            transparent 32%,
            rgba(3,10,19,.12) 100%
        ) !important;
}

.hero-overlay {
    position: absolute !important;
    z-index: 4 !important;

    left: clamp(34px, 8vw, 120px) !important;
    bottom: clamp(110px, 15vh, 145px) !important;

    width: min(650px, 52vw) !important;
    max-width: 650px !important;

    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-left: 4px solid #d4af37 !important;
    border-radius: 0 !important;

    color: #fff !important;
}

.hero-kicker {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    margin: 0 0 12px 20px !important;

    color: #e3bd3f !important;

    font-family: 'Oswald','Arial Narrow',sans-serif !important;
    font-size: .70rem !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
}

.hero-kicker i {
    font-size: .75rem !important;
}

.hero-overlay h3 {
    margin: 0 0 10px 20px !important;

    color: #fff !important;

    font-family: 'Oswald','Arial Narrow',sans-serif !important;
    font-size: clamp(2.15rem, 4vw, 3.65rem) !important;
    font-weight: 700 !important;

    line-height: 1.02 !important;
    letter-spacing: .8px !important;
    text-transform: uppercase !important;

    text-shadow: 0 3px 18px rgba(0,0,0,.34) !important;
}

.hero-overlay h4 {
    margin: 0 0 20px 20px !important;

    max-width: 610px !important;

    color: rgba(255,255,255,.90) !important;

    font-family: 'Lato',Arial,sans-serif !important;
    font-size: clamp(.95rem, 1.35vw, 1.22rem) !important;
    font-weight: 400 !important;

    line-height: 1.55 !important;
    letter-spacing: .2px !important;
}

.hero-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;

    margin-left: 20px !important;
}

.hero-buttons .btn {
    min-height: 42px !important;

    padding: 10px 17px !important;

    border-radius: 4px !important;

    font-size: .72rem !important;
    font-weight: 800 !important;

    letter-spacing: .4px !important;
    text-transform: uppercase !important;

    text-decoration: none !important;

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease !important;
}

.btn-hero-primary {
    background: #d4af37 !important;
    border: 1px solid #d4af37 !important;
    color: #101827 !important;
}

.btn-hero-primary:hover {
    background: #f0cf57 !important;
    color: #101827 !important;
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background: rgba(8,18,32,.28) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    color: #fff !important;
}

.btn-hero-secondary:hover {
    background: #fff !important;
    color: #101827 !important;
    transform: translateY(-2px);
}


/* Flechas */
.hero-arrow {
    position: absolute !important;
    top: 50% !important;
    z-index: 7 !important;

    width: 42px !important;
    height: 42px !important;

    display: grid !important;
    place-items: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(255,255,255,.40) !important;
    border-radius: 50% !important;

    background: rgba(4,12,22,.35) !important;
    backdrop-filter: blur(8px) !important;

    color: #fff !important;

    cursor: pointer !important;

    opacity: .78 !important;

    transform: translateY(-50%) !important;

    transition:
        opacity .2s ease,
        background .2s ease,
        transform .2s ease !important;
}

.hero-arrow:hover {
    opacity: 1 !important;
    background: rgba(212,175,55,.90) !important;
    color: #111827 !important;
}

.hero-arrow-prev {
    left: 22px !important;
}

.hero-arrow-next {
    right: 22px !important;
}


/* Barra inferior */
.hero-slider-bottom {
    position: absolute !important;
    left: clamp(34px, 8vw, 120px) !important;
    right: clamp(34px, 8vw, 120px) !important;
    bottom: 28px !important;

    z-index: 8 !important;

    display: grid !important;
    grid-template-columns: auto minmax(120px, 1fr) auto !important;
    align-items: center !important;
    gap: 18px !important;

    pointer-events: none !important;
}

.hero-slider-info {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;

    min-width: 54px !important;

    color: #fff !important;

    font-family: 'Oswald','Arial Narrow',sans-serif !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
}

.hero-slider-info span:first-child {
    color: #d4af37 !important;
    font-size: .88rem !important;
}

.hero-slider-separator {
    color: rgba(255,255,255,.40) !important;
}

.hero-slider-track {
    position: relative !important;

    width: 100% !important;
    height: 3px !important;

    overflow: hidden !important;

    background: rgba(255,255,255,.24) !important;
}

.hero-slider-progress {
    width: 0%;
    height: 100%;

    background: #d4af37 !important;

    box-shadow: 0 0 10px rgba(212,175,55,.65);

    transition: width 6.5s linear;
}

.hero-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;

    min-width: 70px !important;

    pointer-events: auto !important;
}

.hero-dot {
    width: 7px !important;
    height: 7px !important;

    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: rgba(255,255,255,.45) !important;

    cursor: pointer !important;

    transition:
        width .25s ease,
        background .25s ease !important;
}

.hero-dot.active {
    width: 24px !important;

    border-radius: 10px !important;

    background: #d4af37 !important;
}


/* Tablet */
@media (max-width: 900px) {

    .hero-container {
        height: 560px !important;
        min-height: 480px !important;
    }

    .hero-overlay {
        left: 6vw !important;
        bottom: 105px !important;
        width: min(650px, 70vw) !important;
    }

    .hero-overlay h3 {
        font-size: clamp(2rem, 5vw, 3rem) !important;
    }

    .hero-slider-bottom {
        left: 6vw !important;
        right: 6vw !important;
    }
}


/* Móvil */
@media (max-width: 600px) {

    .hero-container {
        height: 560px !important;
        min-height: 0 !important;
    }

    .hero-image {
        object-position: center center !important;
    }

    .hero-shade {
        background:
            linear-gradient(
                90deg,
                rgba(3,10,19,.78),
                rgba(3,10,19,.35)
            ),
            linear-gradient(
                0deg,
                rgba(3,10,19,.78),
                transparent 55%
            ) !important;
    }

    .hero-overlay {
        left: 22px !important;
        right: 22px !important;
        bottom: 105px !important;
        width: auto !important;
        max-width: none !important;
    }

    .hero-kicker {
        margin-left: 14px !important;
        font-size: .58rem !important;
        letter-spacing: 1.3px !important;
    }

    .hero-overlay h3 {
        margin-left: 14px !important;

        font-size: 2rem !important;
        line-height: 1.05 !important;
    }

    .hero-overlay h4 {
        margin-left: 14px !important;
        margin-bottom: 16px !important;

        font-size: .88rem !important;
    }

    .hero-buttons {
        margin-left: 14px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .hero-buttons .btn {
        width: auto !important;
    }

    .hero-arrow {
        width: 36px !important;
        height: 36px !important;
    }

    .hero-arrow-prev {
        left: 10px !important;
    }

    .hero-arrow-next {
        right: 10px !important;
    }

    .hero-slider-bottom {
        left: 22px !important;
        right: 22px !important;
        bottom: 20px !important;

        grid-template-columns: auto 1fr !important;
        gap: 10px !important;
    }

    .hero-dots {
        grid-column: 1 / -1 !important;
        justify-content: center !important;
    }
}


/* =========================================================
   AJUSTE FINAL DEL TÍTULO DEL SLIDER
   UNA SOLA LÍNEA EN PC + TIPOGRAFÍA MÁS ELEGANTE
   ========================================================= */

.hero-overlay {
    width: min(900px, 72vw) !important;
    max-width: 900px !important;
}

.hero-overlay h3 {
    font-size: clamp(2rem, 3.15vw, 3.15rem) !important;
    line-height: 1.08 !important;
    letter-spacing: .5px !important;
    white-space: nowrap !important;
    margin-right: 10px !important;
}

/* Evita que el título se vea demasiado grande en pantallas medianas */
@media (max-width: 1100px) {
    .hero-overlay {
        width: min(820px, 72vw) !important;
    }

    .hero-overlay h3 {
        font-size: clamp(1.85rem, 3.2vw, 2.8rem) !important;
    }
}

/* En móvil sí permitimos varias líneas para no romper la pantalla */
@media (max-width: 600px) {
    .hero-overlay {
        width: auto !important;
        max-width: none !important;
    }

    .hero-overlay h3 {
        white-space: normal !important;
        font-size: 2rem !important;
        line-height: 1.05 !important;
    }
}


/* =========================================================
   CMFB — ACCESOS RÁPIDOS INSTITUCIONALES
   Sección administrable desde Editor de Página: Inicio.
   ========================================================= */
.cmfb-home .cmfb-quick-links-section {
    width:min(1180px,calc(100% - 36px));
    margin:18px auto 0;
}

.cmfb-home .cmfb-quick-links {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.cmfb-home .cmfb-quick-link {
    min-height:74px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    padding:13px 20px;
    background:#004b0b;
    border:1px solid rgba(0,0,0,.08);
    color:#fff;
    text-decoration:none;
    text-align:center;
    box-shadow:0 5px 14px rgba(0,0,0,.12);
    transition:transform .2s ease,background-color .2s ease,box-shadow .2s ease;
}

.cmfb-home .cmfb-quick-link:hover {
    background:#006515;
    color:#fff;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.16);
}

.cmfb-home .cmfb-quick-link-icon {
    flex:0 0 auto;
    width:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.8rem;
    line-height:1;
    color:#fff;
}

.cmfb-home .cmfb-quick-link-label {
    display:block;
    font-family:'Oswald','Arial Narrow',Arial,sans-serif;
    font-size:.9rem;
    line-height:1.15;
    font-weight:800;
    letter-spacing:.1px;
    text-transform:uppercase;
}

@media(max-width:900px) {
    .cmfb-home .cmfb-quick-links-section {
        width:min(760px,calc(100% - 28px));
    }

    .cmfb-home .cmfb-quick-links {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px) {
    .cmfb-home .cmfb-quick-links-section {
        width:calc(100% - 20px);
        margin-top:12px;
    }

    .cmfb-home .cmfb-quick-links {
        grid-template-columns:1fr;
        gap:9px;
    }

    .cmfb-home .cmfb-quick-link {
        min-height:64px;
        justify-content:flex-start;
        padding:11px 15px;
    }

    .cmfb-home .cmfb-quick-link-label {
        font-size:.78rem;
    }

    .cmfb-home .cmfb-quick-link-icon {
        width:34px;
        font-size:1.55rem;
    }
}
