/*
Theme Name: LAOMS-V2
Theme URI: https://laoms.org
Author: Roberto Holguín Carrillo
Description: Tema para LAOMS-V2.
Version: 2.5
*/

/* =========================
   VARIABLES & GLOBALES
   ========================= */
:root {
    --primary: #5160ac;   /* Azul botones*/
    --dark: #161661;      /* Texto oscuro */
    --light: #f8fafc;     /* Fondo claro */
    --footer-bg: #111827; /* Azul muy oscuro footer */
    --white: #ffffff;
    --gray: #64748b;
}

* {
    box-sizing: border-box; 
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: #788efd; }
img { max-width: 100%; height: auto; display: block; }
.site-content { background: linear-gradient(to bottom, #fff, #bcc8ff 60%, var(--footer-bg)); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

input[type="submit"] {
	width: auto;
	padding: 10px 20px;
	background-color: var(--primary);
	border: none;
	border-radius: 8px;
	color: white;
	font-size: 15px;
	cursor: pointer;
	transition: background-color 0.3s;
}

input[type="submit"]:hover {
	background-color: #788efd;
}

input[type="text"]:not(.input-moderno),
input[type="email"]:not(.input-moderno) {
	padding: 10px 0px;
	border: 1px solid #b0b5cc;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 10px;
}



/* =========================
   HEADER & NAVEGACIÓN
   ========================= */

/* Contenedor principal: Alineación hacia abajo (flex-end) 
   para que iconos y texto compartan la misma línea base */
.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    padding: 20px 0; 
    /*border-bottom: 1px solid #eee; */
    position: relative;
}

/* --- BLOQUE IZQUIERDA: ICONOS SOCIALES --- */
.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 5px; /* Ajuste óptico para alinear con el texto */
}

.social-icons a {
    color: var(--dark);
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--primary);
}

.social-icons svg {
    width: 20px;  /* Mismo tamaño que la lupa */
    height: 20px;
    display: block;
}

/* --- BLOQUE CENTRAL: BRANDING --- */
.site-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-branding img {
    width: 125px; /* Ancho solicitado */
    height: auto;
    margin-bottom: 10px;
    display: block;
}

.site-branding a { 
    font-weight: 800; 
    color: var(--dark); 
    text-decoration: none;
    font-size: 18px;
    line-height: 1.2;
}

/* --- MENÚ PRINCIPAL (Sin cambios según tu código original) --- */
.main-navigation {
    margin-top: 10px;
    background-color: #f6f8ff;
	/*margin-bottom: 34px;*/
	border: solid 0.5px #e4e9ff;
}

.main-navigation ul { 
    display: flex; 
    gap: 30px; 
    list-style: none; 
    padding: 0; 
    margin: 0;
    justify-content: center; 
    font-weight: 600; 
    font-size: 14px; 
}

.main-navigation li { 
    position: relative; 
}

.main-navigation a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #586084;
}

/* Dropdown (Submenú) */
.main-navigation ul ul {
    display: none;
    position: absolute;
    /* Configuración por defecto para el primer desplegable (hacia abajo) */
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 999;
    flex-direction: column;
    border-top: 3px solid var(--primary);
    padding: 10px 0;
    text-align: left;
}

/* Lógica para el Tercer Nivel (Hijo del hijo) - A la derecha */
@media (min-width: 769px) {
    .main-navigation ul ul ul {
        left: 100%;
        top: -13px !important; 
        margin-left: -1px; 
        border-top: 3px solid var(--dark);
    }
}

.main-navigation ul li:hover > ul {
    display: block;
    animation: fadeIn 0.3s ease;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    border-bottom: 1px solid #f1f1f1;
}

.main-navigation ul ul a:hover {
    background-color: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

/* =========================
   BUSCADOR EXPANDIBLE (DERECHA)
   ========================= */
.header-actions {
    display: flex;
    align-items: flex-end; /* Alineado a la base */
    padding-bottom: 5px;   /* Ajuste para alinear con el texto central */
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Botón Lupa */
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0; /* Eliminamos padding para control total */
    color: var(--dark);
    z-index: 20;
    position: relative;
    display: flex;
    align-items: center;
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-btn:hover {
    color: var(--primary);
}

/* Caja del Input (Oculta por defecto) */
.search-box-wrapper {
    position: absolute;
    right: 100%; 
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    height: 40px;
    display: flex;
    align-items: center;
    width: 0; 
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent; 
    border-radius: 4px;
}

/* Estado Activo (Abierto) */
.search-box-wrapper.active {
    width: 250px;
    opacity: 1;
    visibility: visible;
    border-color: #ccc;
    padding-right: 10px;
    margin-right: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-field {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 15px;
    font-size: 14px;
    color: #333;
    height: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   HERO SECTION
   ========================= */
.cat-tag {
    display: inline-block;       
    width: fit-content;          /* Ajuste al texto */
    background: var(--primary);
    color: #fff;
    padding: 5px 10px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1;
}

.cat-tag:hover {
    color: #fff; 
    background: #788efd;
}

.hero-section {
	margin-top: 40px;
}
.hero-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 20px; 
    margin-top: 20px; 
}

/* Columna Izquierda */
.hero-main { 
    position: relative; 
    height: 500px; 
    overflow: hidden; 
    border-radius: 2px; 
}

/* Columna Derecha (Alineación perfecta) */
.hero-side { 
    display: flex;               
    flex-direction: column;      
    justify-content: space-between; /* Distribuye espacio igual arriba/abajo */
    height: 500px;               
}

/* Cuadros pequeños */
.hero-small { 
    position: relative; 
    height: 240px; 
    border-radius: 2px; 
    overflow: hidden; 
    width: 100%;
}

/* Imágenes y Enlaces */
.hero-main a, .hero-small a { 
    display: block; 
    height: 100%; 
}

.hero-main img, .hero-small img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
    transition: transform 0.5s ease;
}

.hero-main:hover img, .hero-small:hover img { transform: scale(1.05); }

/* Texto sobre imagen */
.hero-content { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    padding: 20px; 
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: #fff; 
    width: 100%; 
    box-sizing: border-box; 
    pointer-events: none; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinea etiqueta a la izquierda */
}

.hero-content h2, .hero-content h3 {
    margin: 5px 0;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-content a, .hero-content .cat-tag { pointer-events: auto; text-decoration: none; }
.date { font-size: 12px; color: #595959; margin-top: 5px; }

/* --- AJUSTES DE HOVER HERO --- */

.hero-content h2 a:hover,
.hero-content h3 a:hover {
    color: #d1d5db; /* Gris claro */
}

.hero-content .date {
	color:#fff;
}
/* =========================================
   ESTILOS COMPARTIDOS: SECCIONES GRISES
   (Finances, Trending, Startups)
   ========================================= */

/* 1. Fondos para las secciones */
.finances-section,
.trending-section,
.startups-wrapper {
    padding: 60px 0;
    width: 100%;
    margin-bottom: 0;
}

/* 2. Título con Línea y Enlace (Estilo uniforme para todas) */
.finances-section .section-title,
.trending-section .section-title,
.startups-wrapper .section-title {
    display: flex;
    align-items: center;
    border-bottom: none;
    margin-bottom: 30px;
    width: 100%;
}

.section-title h2, 
.section-title span { /* Abarca h2 o span según uses en el PHP */
    font-size: 28px;
    margin: 0;
    color: var(--dark);
    font-weight: 700;
    order: 1;
    white-space: nowrap;
}

/* La línea central */
/*.finances-section .section-title::after {
	background: #807e7e;
}
*/    
.finances-section .section-title::after, 
.trending-section .section-title::after,
.startups-wrapper .section-title::after {
    content: "";
    background: #8695d9;
    height: 1px;
    flex-grow: 1;
    margin: 0 20px;
    order: 2;
}

/* El enlace View All (si existe) */
.view-all-link, 
.section-title a {
    font-size: 13px;
    font-weight: bold;
    color: var(--dark);
    text-transform: uppercase;
    white-space: nowrap;
    order: 3;
    text-decoration: none;
}

.section-title a:hover {
	color: #788efd;
}

/* =========================================
   ESPECÍFICO: STARTUPS (Convirtiendo articulos en tarjetas)
   ========================================= */
/* 1. Título*/

.startups-wrapper .section-title {
    display: flex;
    align-items: center;
    border-bottom: none;
    margin-bottom: 30px;
}

.startups-wrapper article {
    padding: 0;      /* IMPORTANTE: Quitamos el relleno para que la imagen toque los bordes */
    border: none;    /* El borde lo pone la clase .card */
    box-shadow: none;
}

/* 3. Sidebar (Fondo blanco y borde idéntico a las tarjetas) */
.sidebar-widget {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.04);
    /* Opcional: Widget tenga sombra al pasar el mouse 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    */
}

.sidebar-widget-portada {
    background: #fff;
    padding: padding: 1px 0 10px 27px;
    margin-bottom: 30px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.04);
    /* Opcional: Widget tenga sombra al pasar el mouse 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    */
}
.sidebar-widget:hover {
    /*
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    */
}

.widget-title {
	margin: 0px;
}


/* =========================================
   ESTILOS DE FINANCES (Fondo Gris y Tarjetas Blancas)
   Copia y pega esto en tu CSS
   ========================================= */

/* 3. La Tarjeta (El cuadro blanco) */
.card {
    background-color: #ffffff; 
    border-radius: 2px;          
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;    
    height: 100%;              
}

.card:hover {
    transform: translateY(-5px);               /* Se levanta al pasar el mouse */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);  
}

/* 4. La Imagen (Parte superior) */
.card-img-link {
    display: block;
    height: 220px;             /* Altura fija para uniformidad */
    overflow: hidden;
    position: relative;
}

.card-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* Ajuste perfecto sin deformar */
    transition: transform 0.5s ease;
}

.card:hover .card-img-link img {
    transform: scale(1.05);    /* Zoom suave en la imagen */
}

/* 5. El Cuerpo del Texto (Aquí está el "recuadro blanco" con padding) */
.card-body {
    padding: 25px;             /* Espacio interno alrededor del texto */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Estilos de los textos internos */
.card-body .cat-tag {
    margin-bottom: 15px;
    font-size: 10px;
    letter-spacing: 1px;
    align-self: flex-start;
}

.card-body h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}

.card-body h3 a { 
    color: #1e293b; 
    text-decoration: none;
}
.card-body h3 a:hover { color: #788efd; }

/* Fecha al final */
.card-meta {
    margin-top: auto;          /* Empuja la fecha siempre al fondo */
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================
   ESTILOS SINGLE POST (ENTRADAS)
   ========================= */
   
.main-column-single { background: white; padding: 40px; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.04); height: fit-content; }

/* Container que agrupa todo el contenido */
.container-single { max-width: 1200px; margin: 0 auto; padding: 15px 0 40px;  }

/* Estructura Sidebar en Single */
.sidebar {
  margin-left: -12px;
}
.content-sidebar-wrapper { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.content-sidebar-wrapper-single { display: grid; grid-template-columns: 2.3fr 1fr; gap: 0px; }

/* Header del Post */
.entry-header { margin-bottom: 30px; }
.entry-title { font-size: 36px; margin: 15px 0; line-height: 1.2; color: var(--dark); }
.entry-meta { font-size: 14px; color: var(--gray); font-weight: 500; }
.entry-meta .author { color: var(--primary); }
.sep { margin: 0 5px; }

/* Imagen Destacada */
.entry-thumbnail { margin-bottom: 30px; }
.entry-thumbnail img { width: 100%; border-radius: 4px; }

/* Contenido del Post */
.entry-content { font-size: 18px; line-height: 1.8; margin-bottom: 40px; }
.entry-content p { margin-bottom: 20px; }
.entry-content h2 { font-size: 26px; margin-top: 40px; margin-bottom: 20px; }

/* Navegación "Next" */
.post-navigation-next { text-align: right; margin: 40px 0; }
.nav-label { font-size: 12px; font-weight: bold; color: var(--gray); text-transform: uppercase; margin-bottom: 5px; }
.nav-title { font-size: 18px; font-weight: bold; color: var(--dark); }
.section-divider { border: 0; border-top: 1px solid #eee; margin: 40px 0; }

/* Sección Must Read */
.must-read-title { font-size: 24px; margin-bottom: 25px; border-left: 4px solid var(--primary); padding-left: 15px; }
.must-read-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.must-read-item img { width: 100%; height: 180px; object-fit: cover; border-radius: 2px; margin-bottom: 15px; }
.must-read-item h4 { font-size: 18px; margin: 0 0 10px; line-height: 1.4; }
.mr-meta { font-size: 12px; color: var(--primary); }

/* Comentarios */
.comments-section-wrapper { margin-top: 60px; }
.comment-reply-title { font-size: 24px; margin-bottom: 20px; display: block; }
.comment-notes { font-size: 14px; color: var(--gray); margin-bottom: 20px; }
.comment-form label { display: block; margin-bottom: 5px; font-weight: bold; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 20px; font-family: inherit; }
.form-submit .submit { width: auto; padding: 15px 34px; background-color: var(--primary); border: none; border-radius: 8px; color: white; font-size: 16px; cursor: pointer; transition: background-color 0.3s; }
.form-submit .submit:hover { background-color: #788efd; }


/* Post sin Sidebar / 900px */

.full-width-wrapper { margin: 0 auto; background:white; padding: 50px 40px 40px; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.04); height: fit-content; }
.w-900 { max-width: 900px; }

/* =========================
   OTRAS SECCIONES Y WIDGETS
   ========================= */
/*section { margin-bottom: 60px; }
.section-title { font-size: 22px; border-bottom: 2px solid #ddd; padding-bottom: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; }
.section-title span { border-bottom: 2px solid var(--dark); padding-bottom: 10px; margin-bottom: -12px; display: inline-block; }
*/
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Newsletter */
.newsletter-section { background: var(--primary); color: white; display: grid; grid-template-columns: 1fr 2fr; align-items: center; overflow: hidden; margin-bottom: 60px;}
.nl-image img { height: 300px; width: 100%; object-fit: cover; }
.nl-form { padding: 40px; }
.nl-form input { padding: 10px; width: 60%; border: none; margin-right: 10px; }
.nl-form button { padding: 10px 20px; background: #000; color: white; border: none; cursor: pointer; }

/* Trending */
.trending-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.trend-item { position: relative; height: 150px; border-radius: 4px; overflow: hidden; }
.trend-label { position: absolute; bottom: 10px; left: 10px; color: white; font-weight: bold; text-shadow: 1px 1px 2px black; }


/* =========================
   FOOTER
   ========================= */
   
.site-footer { background: var(--footer-bg); color: #ccc; padding: 60px 0 20px; font-size: 14px; border-top: 1px solid #333; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; margin-bottom: 20px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; }

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

/* Estilos para el campo de texto (Input) */
.input-moderno {
  width: 100% ;
  padding: 15px;
  background-color: transparent;
  border: 1px solid white;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 15px;
}

/* Estilos para el texto de ayuda (placeholder) */
.input-moderno::placeholder {
  color: #ccc;
}

/* Estilos para el botón */
.boton-moderno {
  width: 100%;
  padding: 15px;
  background-color: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.boton-moderno:hover {
  background-color: #788efd;
}

/* =========================
   RESPONSIVE (MEDIA QUERIES)
   ========================= */

.menu-toggle {
    display: none;          /* Oculto en escritorio por defecto */
    background: var(--dark);
    color: var(--white);
    border: none;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 0;       /* Pegado al menú al abrirse */
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: var(--primary);
}

.menu-toggle span {
    margin-right: 10px;     /* Espacio entre icono y texto */
    font-size: 18px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tablets y Móviles (< 768px) */

/* =========================
   RESPONSIVE: MÓVIL FULL SCREEN
   ========================= */
@media (max-width: 768px) {

    /* 1. Header Layout */
    .top-bar { flex-direction: column; gap: 15px; }
    .header-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Botón Hamburguesa */
    .menu-toggle {
        display: block;
        background: transparent;
        color: var(--dark);
        border: none;
        padding: 0;
        cursor: pointer;
    }
    .menu-toggle svg { width: 32px; height: 32px; }

    /* 2. CONTENEDOR PRINCIPAL (FONDO AZUL) */
    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary); /* Azul */
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        display: block !important;
        overflow-y: auto; /* Scroll permitido */
    }

    /* Estado Abierto */
    .main-navigation.toggled {
        transform: translateX(0);
    }

    /* Ocultamos el botón hamburguesa dentro del menú si se coló */
    .main-navigation .menu-toggle { display: none; }

    /* 3. LISTA DEL MENÚ (FORZAR VERTICAL) */
    .main-navigation > ul {
        display: flex !important;
        flex-direction: column !important; /* <--- ESTA ES LA CLAVE */
        width: 100% !important;
        margin: 0 !important;
        padding: 60px 0 20px 0 !important; /* 60px arriba para dejar espacio a la X */
        box-shadow: none;
        background: transparent;
    }

    /* 4. ITEMS (LI) - Contenedor de Texto y Flecha */
    .main-navigation li {
        width: 100%;
        display: flex;
        flex-wrap: wrap; /* Para que el submenú caiga abajo */
        justify-content: space-between; /* Texto a la izq, Flecha a la der */
        align-items: center;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        position: relative;
    }

    /* 5. ENLACES (TEXTO) */
    .main-navigation a {
        flex-grow: 1; /* Ocupa todo el espacio menos la flecha */
        padding: 20px 25px;
        color: white;
        font-size: 18px;
        font-weight: 600;
        text-decoration: none;
        display: block;
    }
    
    .main-navigation a:hover {
        background-color: rgba(255,255,255,0.1);
    }

    /* 6. FLECHA (Botón generado por JS) */
    .mobile-arrow {
        width: 60px;
        height: 60px; /* Cuadrado para fácil toque */
        background: rgba(0,0,0,0.1);
        border: none;
        border-left: 1px solid rgba(255,255,255,0.1);
        color: white;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
    
    /* Icono dentro de la flecha */
    .mobile-arrow span {
        display: block;
        transition: transform 0.3s;
    }

    /* Flecha Activa (Rotada) */
    .mobile-arrow.active {
        background-color: rgba(0,0,0,0.3);
    }
    .mobile-arrow.active span {
        transform: rotate(180deg);
    }

    /* 7. SUBMENÚS (FONDO BLANCO) */
    .main-navigation ul ul {
        display: none; /* Oculto por defecto */
        width: 100%;
        background-color: #ffffff !important; /* Fondo Blanco forzado */
        margin: 0;
        padding: 0;
        flex-direction: column;
    }

    /* Mostrar Submenú */
    .main-navigation ul ul.open {
        display: block !important;
    }

    /* Estilos enlaces Submenú */
    .main-navigation ul ul a {
        color: var(--dark) !important; /* Texto oscuro */
        font-weight: normal;
        padding-left: 40px; /* Indentación */
        font-size: 16px;
        border-bottom: 1px solid #eee;
    }
    
    /* El submenú no debe tener flechas extrañas */
    .main-navigation ul ul li {
        display: block;
    }

    /* 8. BOTÓN CERRAR (X) */
    .mobile-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 50%; /* Círculo */
        color: white;
        font-size: 24px;
        line-height: 1; /* Centrado vertical */
        cursor: pointer;
        z-index: 10001;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-close-btn:hover {
        background: rgba(255,255,255,0.2);
        border-color: white;
    }
    
    /* Ajustes generales de layout móvil */
    .hero-section { margin-top: 0; }
    .hero-grid, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .hero-side { display: none; } /* Opcional: simplificar hero en móvil */
    .hero-main { height: 250px; }
}

@media (max-width: 480px) {
    .site-branding a { font-size: 20px; }
    .trending-grid { grid-template-columns: 1fr; }
    .must-read-grid { grid-template-columns: 1fr; }
    .search-box-wrapper.active { width: 180px; }
}

/* =========================================
   ESTILOS CATEGORÍA (2 COLUMNAS)
   ========================================= */

/* Wrapper Principal */
.cat-layout-wrapper {
    max_width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Helvetica', 'Arial', sans-serif; 
    box-sizing: border-box;
    overflow-x: hidden;
}

.cat-layout-wrapper *, 
.cat-layout-wrapper *::before, 
.cat-layout-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.cat-layout-header { margin-bottom: 30px; }
.cat-layout-title { 
    font-size: 32px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px; 
    margin-bottom: 10px; 
}

/* =========================================
   PRIMERA HILERA (TOP 3 - SE MANTIENE IGUAL)
   ========================================= */
.cat-layout-top-grid {
    display: grid;
    /* 3 Columnas arriba: Lateral, Central (Hero), Lateral */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); 
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

.cat-layout-top-card {
    background: #fff;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cat-layout-img-box {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}
.cat-layout-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-layout-content-box { padding: 15px; }
.cat-layout-entry-title { font-size: 18px; margin: 0 0 10px 0; line-height: 1.3; }
.cat-layout-entry-title a { text-decoration: none; color: #333; transition: color 0.2s; }
.cat-layout-entry-title a:hover { color: #2563eb; }
.cat-layout-meta { font-size: 12px; color: #777; }

/* =========================================
   HERO (CENTRO ARRIBA)
   ========================================= */
.cat-layout-hero {
    position: relative;
    border: none;
    min-height: 300px; 
}

.cat-layout-hero .cat-layout-img-box {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

.cat-layout-hero .cat-layout-img-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.cat-layout-hero .cat-layout-content-box {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.cat-layout-hero .cat-layout-entry-title a {
    color: #fff; 
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.cat-layout-hero .cat-layout-meta { color: #ddd; margin-top: 10px; }

/* =========================================
   GRID INFERIOR (2 COLUMNAS)
   ========================================= */
.cat-layout-main-grid {
    display: grid;
    /* CAMBIO PRINCIPAL: Ahora son 2 columnas (repeat 2) */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
}

.cat-layout-grid-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    width: 100%;
}

.cat-layout-grid-img-box {
    position: relative;
    height: 250px; /* Aumentado ligeramente ya que las tarjetas son más anchas */
    width: 100%;
    overflow: hidden;
}
.cat-layout-grid-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cat-layout-grid-content {
    padding: 25px; /* Más padding porque la tarjeta es más grande */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cat-layout-grid-title { font-size: 22px; margin-bottom: 12px; line-height: 1.3; }
.cat-layout-grid-title a { text-decoration: none; color: #111; }

.cat-layout-excerpt {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.cat-layout-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.cat-layout-date { font-size: 13px; color: #888; }

.cat-layout-btn {
    background: #222;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 2px;
    transition: background 0.3s;
    font-weight: bold;
}
.cat-layout-btn:hover { background: #555; }

/* =========================================
   PAGINACIÓN
   ========================================= */
.cat-layout-pagination { margin: 50px; text-align: center; width: 100%; }
.cat-layout-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: #f4f4f4;
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}
.cat-layout-pagination .current { background: #2563eb; color: #fff; }

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablet (hasta 1024px) */
/* La parte superior (Top 3) colapsa a 2 columnas */
@media (max-width: 1024px) {
    .cat-layout-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    }
    .cat-layout-hero { grid-column: span 2; }
    
    /* El grid inferior ya es de 2 columnas, así que se ve bien */
}

/* Móvil (hasta 650px) */
/* Todo a 1 columna */
@media (max-width: 650px) {
    .cat-layout-top-grid, 
    .cat-layout-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .cat-layout-hero { grid-column: span 1; height: 250px; }
    
    .cat-layout-wrapper { padding: 10px; }
}
