/* ==========================================================
   1. VARIABLES Y RESET (Base Editorial)
   ========================================================== */
:root {
    --color-principal: #3a0066; /* Morado A Tiempo */
    --color-hover: #520091;
    --negro-editorial: #1a1a1a;
    --gris-suave: #f0f0f0;
    --texto-sidebar: #444444;
}

.designed-by, .readmore_button, .featured_area { display: none !important; }
.edit-post-visual-editor { background-color: #ffffff; }

p {
    line-height: 1.7 !important;
    margin-bottom: 1.5em !important;
}

/* ==========================================================
   2. NAVEGACIÓN Y HEADER
   ========================================================== */
#website-navigation {
    background: #ffffff;
    height: 60px;
    z-index: 170;
    margin: 0 auto;
    border-bottom: 1px solid #dadada;
    width: 100%;
    position: fixed;
    top: 0; left: 0; right: 0;
    text-align: center;
}

.main-navbar .navbar-nav > li > a {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: #222222 !important;
    font-weight: bold;
}

.navbar-brand-wpz img {
    max-width: 120px;
    height: auto;
    transition: max-width 0.3s ease;
}

@media (min-width: 992px) {
    .navbar-brand-wpz img { max-width: 200px; }
}

/* ==========================================================
   3. TIPOGRAFÍA (Escala Armónica)
   ========================================================== */
h1, .entry-title {
    font-family: "Barlow Black", sans-serif;
    font-size: 2.4rem !important;
    line-height: 1.1;
    margin-bottom: 15px;
    color: #111111 !important;
}

h2, h2.wp-block-heading {
    font-family: "Barlow Extra Bold", sans-serif;
    font-size: 1.8rem !important;
    line-height: 1.2;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--negro-editorial) !important;
}

h3 {
    font-size: 1.4rem !important;
    line-height: 1.3;
    color: #333333;
}

@media screen and (max-width: 600px) {
    h1, .entry-title { font-size: 1.9rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }
}

/* ==========================================================
   4. ENLACES Y CATEGORÍAS
   ========================================================== */
.entry-category a {
    font-family: "Barlow Extra Bold", sans-serif !important;
    color: var(--color-principal) !important;
    text-transform: uppercase;
}

.entry-content p a, .entry-summary p a {
    color: var(--color-principal) !important;
    text-decoration: none;
    border-bottom: 1px solid #d1b3ff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.entry-content p a:hover {
    color: var(--color-hover) !important;
    background-color: rgba(58, 0, 102, 0.05);
}
/* ==========================================================
   5. MULTIMEDIA Y VIDEOS (LLAVE MAESTRA DE CENTRADO)
   ========================================================== */
/* ==========================================================
   5. MULTIMEDIA: TAMAÑO FIJO (600PX) Y CENTRADO TOTAL
   ========================================================== */

/* 1. Ajustamos todos los posibles contenedores de WordPress */
#wp-block-newspack-carousel__1,
.video-container, 
.wp-block-embed, 
.wp-block-embed-youtube, 
figure.wp-block-embed,
.entry-content .wp-block-video {
    max-width: 750px !important; /* Tu medida exacta */
    width: 100% !important;      /* Para que en móviles baje de 600px y no se corte */
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    clear: both !important;
    float: none !important;      /* Mata cualquier alineación lateral previa */
}

/* 2. Forzamos al iframe/video a llenar esos 600px */
.video-container iframe, 
.wp-block-embed iframe, 
.entry-content video,
.wp-block-embed__wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 3. Limpieza de párrafos que envuelven videos (Truco final) */
.entry-content p:has(iframe), 
.entry-content p:has(video) {
    text-align: center !important;
    display: block !important;
}

/* 4. En móvil, dejamos que recupere el ancho completo para que no se vea minúsculo */
@media screen and (max-width: 600px) {
    .video-container, 
    .wp-block-embed, 
    figure.wp-block-embed {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================
   6. SIDEBAR Y WIDGETS
   ========================================================== */
.theiaStickySidebar a, .sidebar a, .widget a {
    color: var(--texto-sidebar) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.theiaStickySidebar a:hover, .widget a:hover { color: var(--color-principal) !important; }

.widget-title, .widget h3 {
    border-left: 4px solid var(--color-principal);
    padding-left: 10px;
    text-transform: uppercase;
    font-size: 1rem !important;
    letter-spacing: 1px;
    color: var(--negro-editorial) !important;
}

/* ==========================================================
   7. ESTRUCTURA Y GRIDS (Lógica Original)
   ========================================================== */
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); }
.cols-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.semanario { display: block; margin: 50px auto; width: 300px; }
.banner { min-width: 938px !important; display: block; }
.banner_programa { height: 100px !important; width: auto; }

/* ==========================================================
   8. RESPONSIVE (Correcciones Móvil)
   ========================================================== */
@media screen and (max-width: 768px) {
    .zona-multimedia-oscura .cols-container {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
    }
    .zona-multimedia-oscura .cols-item { flex: 0 0 85%; scroll-snap-align: center; max-width: none; }
}

@media screen and (max-width: 600px) {
    .site-main article { margin-bottom: 40px !important; border-bottom: 1px solid var(--gris-suave); }
    .entry-content { padding: 0 15px !important; }
    .header_banner, #header_banner, .slider_widgets { display: none; }
    .cols-container { grid-template-columns: 1fr; }
    .custom-logo-link { display: block; max-width: 100px; margin: auto; }
}