/*
Theme Name: Velas Child (Gobierno)
Theme URI: 
Description: Tema hijo de Velas con diseño institucional moderno (API Campeche)
Author: Antigravity
Author URI: 
Template: velas
Version: 1.0.0
*/

/* 
 * Variables del Gobierno
 */
:root {
    --gob-guinda: #9f2241;
    --gob-guinda-dark: #691c32;
    --gob-gold: #c3965d;
    --gob-gold-light: #ddc9a3;

    /* Overriding Velas variables */
    --accent-color: #9f2241 !important;
    --alternate-color: #c3965d !important;

    --body-font: 'Montserrat', 'Inter', sans-serif !important;
    --heading-font: 'Montserrat', 'Inter', sans-serif !important;
    --menu-font: 'Montserrat', 'Inter', sans-serif !important;
}

body {
    font-family: 'Montserrat', 'Inter', sans-serif;
    color: #333;
}

.gob-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.gob-container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   ENCABEZADO GOBIERNO (CUSTOM HEADER)
   ========================================================================== */

/* Top Bar (Guinda Oscuro) */
.gob-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow when scrolling */
}

.gob-top-bar {
    background-color: var(--gob-guinda-dark);
    color: #ffffff;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 30px; /* Reduced from 45px as requested */
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
}

.gob-top-bar a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    transition: opacity 0.3s ease;
}

.gob-top-bar a:hover {
    opacity: 0.8;
}

.gob-top-logo img {
    height: 30px;
    width: auto;
    display: block;
}

.gob-top-links {
    display: flex;
    align-items: center;
}

/* Secondary Bar Blanca */
.gob-sec-bar {
    background-color: rgba(255, 255, 255, 1);
    color: #333333;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 95px; /* Increased from 85px to fit slightly larger logos */
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    z-index: 999;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.gob-header.scrolled .gob-sec-bar {
    background-color: rgba(255, 255, 255, 0.7); /* Semitransparent */
    backdrop-filter: blur(12px); /* Glassmorphism blur */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.15); /* Stronger shadow on scroll */
}

.gob-sec-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

.gob-sec-title a {
    color: #ffffff !important;
    text-decoration: none;
}

/* Menú de Navegación Custom */
.gob-main-nav {
    display: flex;
    justify-content: center;
}

.gob-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gob-main-menu li {
    position: relative;
}

.gob-main-menu a {
    color: #555555;
    text-decoration: none;
    padding: 0 15px;
    font-size: 17px; /* Adjusted to 17px as requested */
    font-weight: 600;
    line-height: 95px; /* Matched to new bar height */
    display: block;
    transition: all 0.3s ease;
}

.gob-main-menu a:hover {
    color: var(--gob-guinda);
}

/* Submenús */
.gob-main-menu ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 280px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    padding: 6px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
}

.gob-main-menu ul.sub-menu li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

.gob-main-menu ul.sub-menu li::before,
.gob-main-menu ul.sub-menu li::after {
    display: none !important;
    content: none !important;
}

.gob-main-menu li:hover>ul.sub-menu {
    display: block;
}

.gob-main-menu ul.sub-menu a {
    display: block;
    line-height: 1.4;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #444444;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gob-main-menu ul.sub-menu li:last-child a {
    border-bottom: none;
}

.gob-main-menu ul.sub-menu a:hover {
    background-color: rgba(159, 34, 65, 0.05);
    color: var(--gob-guinda);
    padding-left: 24px;
}

/* ==========================================================================
   ESTILOS MODERNOS Y TARJETAS
   ========================================================================== */

/* Hacer las columnas de las tarjetas al 100% para apilarlas (Layout Horizontal) */
.bt_bb_column:has(.bt_bb_card_icon) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 30px;
}

/* Modernizando los elementos de Bold Builder (Tarjetas Misión/Visión Horizontales) */
.bt_bb_card_icon {
    border-radius: 24px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    
    /* Diseño Grid Horizontal */
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    grid-template-rows: auto auto !important;
    column-gap: 50px !important;
    row-gap: 15px !important;
    align-items: center !important;
    text-align: left !important;
    padding: 50px 60px !important; /* Espaciado premium amplio */
    
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* El ícono a la izquierda (ocupa ambas filas) */
.bt_bb_card_icon .bt_bb_icon_holder {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 3 !important;
    margin: 0 !important;
    transform: scale(1.3);
}

/* Título arriba a la derecha */
.bt_bb_card_icon h1,
.bt_bb_card_icon h2,
.bt_bb_card_icon h3,
.bt_bb_card_icon h4,
.bt_bb_card_icon h5,
.bt_bb_card_icon h6,
.bt_bb_card_icon .bt_bb_card_icon_title {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    margin: 0 !important;
    align-self: end !important;
}

/* Contenido de texto abajo a la derecha */
.bt_bb_card_icon .bt_bb_card_icon_content,
.bt_bb_card_icon .bt_bb_card_icon_text {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
    margin: 0 !important;
    align-self: start !important;
    display: block !important;
}

/* Adaptación para celulares (volvemos a vertical si la pantalla es pequeña) */
@media (max-width: 768px) {
    .bt_bb_card_icon {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto !important;
        text-align: center !important;
        padding: 40px 25px !important;
        row-gap: 20px !important;
    }
    .bt_bb_card_icon .bt_bb_icon_holder {
        grid-column: 1 / 2 !important;
        grid-row: 1 / 2 !important;
        margin: 0 auto !important;
    }
    .bt_bb_card_icon h1,
    .bt_bb_card_icon h2,
    .bt_bb_card_icon h3,
    .bt_bb_card_icon h4,
    .bt_bb_card_icon h5,
    .bt_bb_card_icon h6,
    .bt_bb_card_icon .bt_bb_card_icon_title {
        grid-column: 1 / 2 !important;
        grid-row: 2 / 3 !important;
        align-self: center !important;
    }
    .bt_bb_card_icon .bt_bb_card_icon_content,
    .bt_bb_card_icon .bt_bb_card_icon_text {
        grid-column: 1 / 2 !important;
        grid-row: 3 / 4 !important;
        align-self: center !important;
    }
}

.bt_bb_card_icon:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

/* Add a subtle shine effect */
.bt_bb_card_icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    z-index: -1;
}

.bt_bb_card_icon:hover::after {
    left: 200%;
}

/* Modernize the rope icons */
.bt_bb_icon_style_rope .bt_bb_icon_holder::before {
    border: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2) !important;
}

.bt_bb_card_icon .bt_bb_card_icon_text {
    line-height: 1.6;
    font-size: 1.05rem;
    opacity: 0.95;
}

/* Botones */
.bt_bb_button a,
button,
input[type="submit"] {
    border-radius: 25px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease !important;
}

.bt_bb_button a:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Ocultar el menu responsivo original de Velas */
#masthead-responsive {
    display: none !important;
}

/* Botón Hamburguesa Móvil (oculto en escritorio) */
.gob-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10005;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.gob-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--gob-guinda);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animación de 3 líneas a X */
.gob-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.gob-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.gob-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.gob-mobile-menu-footer {
    display: none;
}

/* Mobile Responsiveness for Custom Header */
@media (max-width: 992px) {
    .gob-top-bar {
        padding: 6px 15px;
        height: auto;
        justify-content: center;
    }

    .gob-top-empty {
        display: none;
    }

    .gob-top-links a {
        margin: 0 10px;
        font-size: 14px;
    }

    .gob-sec-bar {
        height: 75px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .gob-sec-logo img {
        height: 60px !important;
    }

    .gob-sec-logo-right {
        display: none !important; /* Ocultar segundo logo en la barra superior móvil */
    }

    .gob-menu-toggle {
        display: flex;
    }

    /* Menú móvil desplegable tipo Drawer con Glassmorphism */
    .gob-main-nav {
        position: fixed;
        top: 105px; /* Altura de la barra fija */
        left: 0;
        width: 100%;
        height: calc(100vh - 105px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 20px 40px 20px;
        overflow-y: auto;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
        z-index: 10000;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }

    .gob-main-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .gob-main-menu {
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin: 0;
        padding: 0;
    }

    .gob-main-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .gob-main-menu a {
        display: block;
        padding: 14px 10px;
        font-size: 1.1rem;
        line-height: 1.3;
        color: #2d3748;
        font-weight: 700;
    }

    .gob-main-menu a:hover,
    .gob-main-menu .current-menu-item a {
        color: var(--gob-guinda);
        background: rgba(159, 34, 65, 0.04);
    }

    .gob-mobile-menu-footer {
        display: block;
        margin-top: 25px;
        padding-top: 15px;
        border-top: 1px solid rgba(0,0,0,0.08);
        width: 100%;
        text-align: center;
    }

    .gob-mobile-menu-footer img {
        height: 50px;
        width: auto;
    }

    body.gob-menu-locked {
        overflow: hidden;
    }
}

/* ==========================================================================
   CUSTOM FOOTER
   ========================================================================== */

.gob-footer {
    background-color: #1a252f;
    padding-top: 30px;
    /* Reduced from 50px */
    font-family: 'Montserrat', sans-serif;
    color: #f4f6f9;
}

.gob-footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 10px 0 20px 0;
    /* Reduced from 20px 0 40px 0 */
}

.footer-logo {
    max-height: 80px;
    object-fit: contain;
}

.footer-divider-vert {
    height: 60px;
    width: 2px;
    background-color: var(--gob-gold);
    display: block;
}

.gob-footer-divider {
    height: 1px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    /* Reduced from 40px */
}

.gob-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 25px;
    /* Reduced from 40px */
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-center-col {
    text-align: center;
}

.footer-col h4 {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 15px;
    /* Reduced from 20px */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col.mt-4 {
    margin-top: 20px;
    /* Reduced from 30px */
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--gob-gold);
}

.footer-col p,
.footer-col a {
    color: #d1d5db;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    text-decoration: none;
}

.footer-col p a:hover {
    color: var(--gob-gold);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--gob-gold);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background-color: var(--gob-guinda);
    transform: translateY(-3px);
}

.gob-footer-copyright {
    background-color: #111822;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

@media (max-width: 768px) {
    .gob-footer-logos {
        flex-direction: column;
        gap: 20px;
    }

    .footer-divider-vert {
        width: 60px;
        height: 2px;
    }

    .gob-footer-links {
        flex-direction: column;
    }

    .footer-col {
        text-align: center;
    }
}

/* ==========================================================================
   INTERIOR PAGES PREMIUM STYLES
   ========================================================================== */

/* 1. Page Header (Hero Banner) */
.gob-page-header {
    position: relative;
    background: linear-gradient(135deg, var(--gob-guinda) 0%, #3a0815 100%);
    padding: 100px 0 80px 0; /* Un tamaño equilibrado */
    color: #fff;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(105, 28, 50, 0.2);
}

/* Efecto de iluminación premium (glow sutil) */
.gob-page-header-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% -20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 120%, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.gob-page-header::before {
    display: none;
}

.gob-page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.gob-page-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #fff !important;
}

.gob-breadcrumbs {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

.gob-breadcrumbs a {
    color: var(--gob-gold);
    text-decoration: none;
    transition: color 0.3s;
}

.gob-breadcrumbs a:hover {
    color: #fff;
}

.gob-breadcrumbs i {
    margin: 0 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Hide original page-header from Velas to avoid duplicates if any */
header.page-header {
    display: none !important;
}


/* 2. Sidebar Redesign */
.widget-area-inner {
    background: #fff;
    border-radius: 20px;
    padding: 25px 20px; /* Reduced padding to give text more room */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.widget-title,
.btSidebar .widget h4 {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px !important;
    position: relative;
    padding-bottom: 15px;
}

.widget-title::after,
.btSidebar .widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gob-gold);
    border-radius: 2px;
}

.widget_nav_menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget_nav_menu ul li {
    margin-bottom: 10px;
    border-bottom: none !important;
    padding: 0 !important;
}

.widget_nav_menu ul li a {
    display: block;
    padding: 10px 15px; /* Reduced from 12px 20px */
    background: #f8fafc;
    border-radius: 12px;
    color: #4a5568 !important;
    font-weight: 600;
    font-size: 0.9rem; /* Reduced from 0.95rem */
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.widget_nav_menu ul li a:hover,
.widget_nav_menu ul li.current-menu-item>a {
    background: #fff;
    color: var(--gob-guinda) !important;
    box-shadow: 0 8px 20px rgba(105, 28, 50, 0.1);
    border-color: rgba(105, 28, 50, 0.1);
    transform: translateX(5px);
}

/* 3. Content Area Typography & Layout */
.site-content {
    padding-bottom: 80px;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
}

.entry-content h2 {
    font-size: 2rem;
}

.entry-content p {
    margin-bottom: 20px;
}

/* Images in content */
.entry-content img {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Accordions (BoldThemes Accordion Override) */
.btAccordion .btAccordionItem {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.btAccordion .btAccordionItem:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--gob-gold);
}

.btAccordion .btAccordionTitle {
    background: #f8fafc;
    padding: 18px 25px !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: var(--text-dark) !important;
    transition: all 0.3s;
    border-bottom: none !important;
}

.btAccordion .btAccordionItem.on .btAccordionTitle {
    background: var(--gob-guinda);
    color: #fff !important;
}

.btAccordion .btAccordionContent {
    padding: 25px !important;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    font-size: 1rem;
    color: #4a5568;
}

/* Table Design */
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 30px 0;
    border: 1px solid #e2e8f0;
}

.entry-content th {
    background: var(--gob-guinda);
    color: #fff;
    font-weight: 700;
    padding: 15px 20px;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.entry-content td {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.entry-content tr:last-child td {
    border-bottom: none;
}

.entry-content tr:hover td {
    background: #f8fafc;
}
/* 3. Page Layout Overrides (Wider & Centered) */
@media (min-width: 1200px) {
    body:not(.home) .site-content, body:not(.home) .site-header-responsive, body:not(.home) .site-content-inner {
        max-width: 1400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Cambiar la barra lateral a la derecha */
/* ==========================================================================
   MICRO-INTERACCIONES (PREMIUM)
   ========================================================================== */

/* Efecto de zoom sutil para imágenes de contenido al pasar el ratón */
.entry-content img, .btImage img, .wp-block-image img {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
}

.entry-content img:hover, .btImage img:hover, .wp-block-image img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Efecto de brillo/sombra de color en las tarjetas de acceso rápido (si existen en la página) */
.gob-card-new:hover {
    box-shadow: 0 15px 30px rgba(159, 34, 65, 0.15) !important;
}

.gob-card-main-icon {
    transition: transform 0.3s ease;
}

.gob-card-new:hover .gob-card-main-icon {
    transform: scale(1.15) rotate(3deg);
}

/* Posicionar Sidebar en el Lado Izquierdo SOLO cuando existe barra lateral */
.site-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.site-content .widget-area {
    order: 1 !important;
    flex: 0 0 300px !important;
    max-width: 300px !important;
    width: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-content .site-main {
    order: 2 !important;
    flex: 1 1 calc(100% - 340px) !important;
    max-width: calc(100% - 340px) !important;
    width: calc(100% - 340px) !important;
    min-width: 0 !important;
}

/* En la portada (Home) o páginas sin sidebar, siempre a pantalla completa 100% */
body.home .site-content,
body.front-page .site-content,
.site-content:not(:has(.widget-area)) {
    display: block !important;
}

body.home .site-content .site-main,
body.front-page .site-content .site-main,
.site-content .site-main:only-child,
.site-content:not(:has(.widget-area)) .site-main {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

@media (max-width: 992px) {
    .site-content {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .site-content .widget-area {
        order: 2 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 30px !important;
    }
    .site-content .site-main {
        order: 1 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
