@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --primary-color: #1e40af;
    /* Deep brand royal blue */
    --primary-hover: #1d4ed8;
    --primary-grad: linear-gradient(135deg, #1d4ed8, #3b82f6);
    /* Gradient matching brand blue palette */
    --accent-color: #0284c7;
    /* Sky blue brand accent */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #475569;
    /* Slate 600 */
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-border: rgba(226, 232, 240, 0.8);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 8px rgba(15, 23, 42, 0.02);
    --card-shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.1), 0 1px 10px rgba(15, 23, 42, 0.03);
    --border-radius: 10px;
}

/* 1. Tipografía y Estilos Base */
html {
    scroll-behavior: smooth !important;
}

body {
    font-family: var(--font-body) !important;
    color: var(--text-main) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 60%, #eef5fc 100%) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    -webkit-font-smoothing: antialiased;
}

/* Forzar que todos los wrappers del tema tengan fondo transparente para lograr un background 100% parejo */
#page,
.site,
#content-wrapper,
.site-content,
.content-area,
.site-main,
#content,
#primary {
    background: transparent !important;
    background-color: transparent !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.widget-title {
    font-family: var(--font-headings) !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* 2. Rediseño Premium del Banner Hero de Páginas y Artículos (Centrado Absoluto y Plano) */
.default-header.has-hero-bg {
    position: relative !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    min-height: 480px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 100px 0 !important; /* Relleno vertical amplio y simétrico */
    margin-bottom: 60px !important;
    color: #ffffff !important;
    overflow: hidden !important;
    isolation: isolate !important;
    box-sizing: border-box !important;
}

/* Capa 1: gradiente balanceado oscuro para legibilidad óptima de texto centrado */
.default-header.has-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 25, 0.5) 0%,
        rgba(5, 10, 25, 0.65) 50%,
        rgba(5, 10, 25, 0.8) 100%
    );
    z-index: 1;
}

/* Capa 2: tono azul de marca para coherencia visual */
.default-header.has-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(29, 78, 216, 0.12) 0%,
        transparent 50%,
        rgba(2, 132, 199, 0.08) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Línea brillante inferior decorativa */
.default-header.has-hero-bg .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.default-header.has-hero-bg .hero-overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.0) 10%,
        rgba(99, 179, 237, 0.9) 40%,
        rgba(147, 210, 255, 1) 50%,
        rgba(99, 179, 237, 0.9) 60%,
        rgba(59, 130, 246, 0.0) 90%,
        transparent 100%
    );
    animation: heroGlow 3s ease-in-out infinite alternate;
}

/* Shimmer de luz superior */
.default-header.has-hero-bg .hero-overlay::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -30%;
    width: 60%;
    height: 160%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 70%
    );
    animation: heroShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

/* Contenido centrado sobre los overlays */
.default-header.has-hero-bg .container.hero-content {
    position: relative !important;
    z-index: 10 !important;
    max-width: 860px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    animation: heroContentIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

/* Título principal - tipografía cinematográfica limpia (Texto Plano sin degradados, sombras ni bordes) */
.default-header.has-hero-bg .title,
.default-header .title,
.default-header.no-hero-bg .title,
h1.title,
.wp-block-heading.title {
    font-family: var(--font-headings) !important;
    font-size: clamp(2rem, 5vw, 3.6rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    margin: 0 0 20px 0 !important;
    text-shadow: none !important;
    filter: none !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-text-stroke: 0px transparent !important;
    text-stroke: 0px transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Categoría - badge glassmorphism premium */
.default-header.has-hero-bg .category {
    margin-bottom: 20px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    animation: heroContentIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.default-header.has-hero-bg .category a {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    color: #ffffff !important;
    padding: 7px 22px !important;
    border-radius: 50px !important;
    font-family: var(--font-headings) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
}

.default-header.has-hero-bg .category a::before {
    content: '✈';
    font-size: 0.85em;
    opacity: 0.85;
}

.default-header.has-hero-bg .category a:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(2, 132, 199, 0.85)) !important;
    border-color: rgba(147, 197, 253, 0.5) !important;
    transform: translateY(-3px) !important;
    box-shadow:
        0 8px 24px rgba(29, 78, 216, 0.4),
        0 0 0 1px rgba(147, 197, 253, 0.3) !important;
    color: #ffffff !important;
}

/* Meta (autor, fecha) - estilo refinado */
.default-header.has-hero-bg .meta {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: rgba(186, 230, 255, 0.9) !important;
    letter-spacing: 0.02em !important;
    animation: heroContentIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.default-header.has-hero-bg .meta * {
    color: rgba(186, 230, 255, 0.9) !important;
}

.default-header.has-hero-bg .meta a {
    color: rgba(186, 230, 255, 0.95) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-weight: 600 !important;
}

.default-header.has-hero-bg .meta a:hover {
    color: #ffffff !important;
}

/* 3. Bloque Cover Nativo de WordPress (Hero de Inicio) */
.wp-block-cover.alignfull {
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.wp-block-cover__inner-container h1 {
    font-family: var(--font-headings) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

/* 4. Grilla de Clusters y Entradas */
.flex.flex-fluid {
    display: grid !important;
    gap: 30px !important;
    padding: 15px 0 20px 0 !important;
    /* Reduce bottom padding from 40px to 20px for a more compact grid */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Reset and force columns to use 100% of their grid cell width instead of getting squished by original theme rules */
.flex.flex-fluid .entry-item,
.flex.flex-fluid .featured-item {
    max-width: 100% !important;
    width: 100% !important;
    flex-basis: auto !important;
}

/* Column template assignments on larger screens */
@media (min-width: 992px) {
    .flex.flex-fluid.columns-1 {
        grid-template-columns: 1fr !important;
    }

    .flex.flex-fluid.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .flex.flex-fluid.columns-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .flex.flex-fluid.columns-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .flex.flex-fluid.columns-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Tablet screens: reduce to 2 columns for a balanced view */
@media (min-width: 768px) and (max-width: 991px) {

    .flex.flex-fluid.columns-2,
    .flex.flex-fluid.columns-3,
    .flex.flex-fluid.columns-4,
    .flex.flex-fluid.columns-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile screens: always 2 columns for all cards in grid */
@media (max-width: 767px) {
    .flex.flex-fluid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        /* Tighter gaps on mobile for a neat grid layout */
    }
}

/* Tarjetas Regulares (.entry-item) */
.entry-item {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--card-shadow) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    /* COMPLETELY REMOVE THEME PADDING */
    padding-bottom: 0px !important;
    /* Remove bottom padding to let children spacing control it perfectly */
}

.entry-item:hover {
    box-shadow: var(--card-shadow-hover) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}

/* Eliminar el doble borde y doble padding del wrapper interno original de Orbital y asegurar su superposición visual segura */
.entry-item .entry-wrapper {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important; /* Fondo blanco sólido para actuar como máscara opaca */
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    position: relative !important;
    z-index: 5 !important; /* Capa superior sobre la imagen para blindar contra cualquier desbordamiento de escala */
    border-radius: 0 0 var(--border-radius) var(--border-radius) !important; /* Mantener bordes redondeados inferiores en la tarjeta */
}

/* Imagen de la Tarjeta - Forzar eliminación de bordes y establecer aspect-ratio 1:1 (cuadrado) */
.entry-item img,
.entry-item .entry-header img,
.entry-item .entry-header .wp-post-image,
.entry-item .wp-post-image {
    width: 100% !important;
    height: auto !important;
    /* Permitir que la altura se calcule a partir del aspect-ratio */
    aspect-ratio: 1 / 1 !important;
    /* Relación de aspecto 1:1 exacta (cuadrada) */
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    /* ROUND TOP CORNERS TO MATCH THE CARD */
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.entry-item:hover img {
    transform: scale(1.02) !important;
}

/* Cabecera y Enlace de Imagen - Forzar eliminación de bordes, paddings y márgenes */
.entry-item .entry-header,
.entry-item .entry-header a,
.entry-item > a:first-child {
    position: relative !important;
    overflow: hidden !important; /* Recorta el desbordamiento inferior y lateral al hacer zoom */
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important; /* Alineación y recorte de curvatura superior */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: block !important;
    /* Corrección del bug de Webkit/Blink para overflow:hidden con border-radius e hijos con transform */
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
    isolation: isolate !important;
    padding-bottom: 8px !important;
}

/* Categoría sobre la imagen */
.entry-item .entry-category {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.entry-item .entry-category a,
.entry-item .entry-category p {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--primary-color) !important;
    padding: 4px 14px !important;
    border-radius: 50px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    display: inline-block !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

.entry-item .entry-category a:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Fecha sobre la imagen (Derecha) */
.entry-item .entry-date {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.entry-item .entry-date p {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Contenido de la Tarjeta */
.entry-item .entry-title {
    font-family: var(--font-headings) !important;
    font-size: 1.15rem !important;
    line-height: 1.35em !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding: 12px 15px 16px 15px !important; /* Padding compacto con espacio de respiración inferior para evitar cortes de letras */
    margin: 0 !important; /* Cero margen para que el fondo blanco cubra todo el espacio inferior de la tarjeta */
    background: #ffffff !important; /* Fondo blanco sólido para actuar como máscara opaca definitiva */
    position: relative !important;
    z-index: 5 !important; /* Capa superior sobre la imagen para blindar contra cualquier desbordamiento de escala */
    border-radius: 0 0 var(--border-radius) var(--border-radius) !important; /* Mantener redondeado de la tarjeta */
    transition: color 0.3s ease !important;

    /* Truncado estricto a un máximo de 2 líneas nativas por el navegador */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding-bottom: 0px !important;
}

.entry-item:hover .entry-title {
    color: var(--primary-color) !important;
}

.entry-item .entry-meta {
    padding: 0 15px 0 15px !important;
    /* Zero out native padding-bottom to prevent dead space when empty */
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Add bottom spacing only if there is actual content in meta */
.entry-item .entry-meta>*:last-child {
    margin-bottom: 12px !important;
    /* Elegant compact spacing after the last text element */
}

.entry-item .entry-excerpt {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    line-height: 1.45em !important;
    margin: 0 0 10px 0 !important;

    /* Truncado estricto a un máximo de 3 líneas utilizando content-box para evitar el clipping */
    box-sizing: content-box !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 4.35em !important;
    /* Exact text height for 3 lines (3 * 1.45em = 4.35em) */
}

.entry-item .entry-excerpt p,
.entry-item .entry-excerpt-info {
    margin: 0 !important;
    padding: 0 !important;
}

.entry-item .entry-author {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.entry-item .entry-author p,
.entry-item .entry-author-info {
    margin: 0 !important;
    padding: 0 !important;
}

.entry-item .entry-author::before {
    content: '✍️';
}

/* Botones Premium en Clusters */
.entry-item .btn.btn-block {
    background: var(--primary-grad) !important;
    color: #ffffff !important;
    font-family: var(--font-headings) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.8rem !important;
    padding: 11px 20px !important;
    border-radius: 50px !important;
    margin: auto 15px 12px 15px !important;
    /* Reduced bottom margin from 20px to 12px and side margins to 15px */
    border: none !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
}

.entry-item .btn.btn-block:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
}

/* 5. Tarjetas Destacadas (.featured-item) */
.featured-item {
    background: #0f172a !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: var(--card-shadow) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    height: auto !important;
    /* Permitir que la altura se calcule a partir del aspect-ratio */
    aspect-ratio: 1 / 1 !important;
    /* Relación de aspecto 1:1 exacta (cuadrada) */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

.featured-item:hover {
    box-shadow: var(--card-shadow-hover) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.featured-item .featured-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.featured-item img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    /* Lock image aspect-ratio to 1:1 */
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: block !important;
    margin: 0 !important;
}

.featured-item:hover img {
    transform: scale(1.02) !important;
}

.featured-item::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.featured-item a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 24px !important;
    text-decoration: none !important;
}

.featured-item .entry-title {
    font-family: var(--font-headings) !important;
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: color 0.3s ease !important;

    /* Strict truncation to max 2 lines to prevent overflow in square card */
    box-sizing: border-box !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 2.6em !important;
    /* Exact text height for 2 lines */
}

.featured-item:hover .entry-title {
    color: #60a5fa !important;
}

/* 6. Animaciones del Hero Premium */
@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translateY(32px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes heroGlow {
    from {
        opacity: 0.5;
        transform: scaleX(0.7);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes heroShimmer {
    0% {
        transform: translateX(-120%) skewX(-15deg);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    60% {
        opacity: 0;
    }
    100% {
        transform: translateX(300%) skewX(-15deg);
        opacity: 0;
    }
}

/* Mantener fadeInUp para compatibilidad con otras partes del tema */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 7. Responsividad */
@media (max-width: 768px) {
    .default-header.has-hero-bg {
        min-height: 320px !important;
        background-attachment: scroll !important; /* Parallax off on mobile */
        padding: 40px 0 !important;
        align-items: center !important; /* Centrado vertical en móviles */
        justify-content: center !important; /* Centrado horizontal en móviles */
    }

    .default-header.has-hero-bg .title {
        font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
        letter-spacing: -0.02em !important;
    }

    .default-header.has-hero-bg .category a {
        padding: 6px 16px !important;
        font-size: 0.68rem !important;
    }

    .default-header.has-hero-bg .meta {
        gap: 10px !important;
        font-size: 0.8rem !important;
    }

    .flex.flex-fluid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 10px 0 12px 0 !important;
        /* Extremely tight bottom padding on mobile */
    }

    .flex.flex-fluid .entry-item,
    .flex.flex-fluid .featured-item {
        max-width: 100% !important;
        width: 100% !important;
        flex-basis: auto !important;
    }

    .entry-item .entry-title {
        font-size: 0.95rem !important;
        line-height: 1.3em !important;
        padding: 12px 12px 0 12px !important;
    }

    .entry-item .entry-meta {
        padding: 0 10px 0 10px !important;
        /* Super tight padding on mobile */
    }

    .entry-item .entry-meta>*:last-child {
        margin-bottom: 10px !important;
    }

    .entry-item .btn.btn-block {
        font-size: 0.72rem !important;
        padding: 8px 15px !important;
        margin: auto 10px 10px 10px !important;
        /* Reduced margin to 10px on mobile */
    }

    /* Featured item refinements on mobile (2-column layout) */
    .featured-item a {
        padding: 12px !important;
    }

    .featured-item .entry-title {
        font-size: 0.95rem !important;
        line-height: 1.25em !important;
    }
}

/* 8. WordPress Admin Bar Fix */
#wpadminbar {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    z-index: 9999999 !important;
    /* Aumentado para estar siempre sobre la cabecera */
}

/* 9. Hero - Indicador de scroll y lectura estimada */
.hero-read-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: rgba(186, 230, 255, 0.85);
    font-weight: 500;
}

/* Separador entre meta items */
.default-header.has-hero-bg .meta > * + * {
    padding-left: 16px;
    position: relative;
}

.default-header.has-hero-bg .meta > * + *::before {
    content: '·';
    position: absolute;
    left: 4px;
    color: rgba(147, 210, 255, 0.6);
    font-size: 1.2em;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

/* Indicador de scroll - flecha animada */
.hero-scroll-indicator {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: heroContentIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
    opacity: 0.75;
}

.hero-scroll-arrow {
    display: block;
    width: 22px;
    height: 22px;
    border-right: 2px solid rgba(147, 210, 255, 0.8);
    border-bottom: 2px solid rgba(147, 210, 255, 0.8);
    transform: rotate(45deg);
    animation: heroArrowBounce 1.6s ease-in-out infinite;
    border-radius: 0 0 2px 0;
}

@keyframes heroArrowBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.8;
    }
    50% {
        transform: rotate(45deg) translateY(6px);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero-scroll-indicator {
        display: none;
    }
}

/* ==========================================================================
   10. Footer Premium & Menú Legal
   ========================================================================== */
.site-footer {
    background: #ffffff !important; /* Fondo blanco igual que el header */
    color: #475569 !important; /* Letras oscuras (Slate 600) para contraste */
    padding: 60px 0 30px 0 !important;
    border-top: 2px solid rgba(15, 23, 42, 0.08) !important; /* Borde 2px clarito que divide el degradado del blanco */
    position: relative !important;
}

.site-footer a {
    color: #475569 !important; /* Letras oscuras para los enlaces */
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.site-footer a:hover {
    color: #1d4ed8 !important; /* Azul del logo al pasar el cursor */
}

/* Footer Widget Area */
.widget-area-footer {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 40px !important;
    margin-bottom: 25px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important; /* Divisor clarito */
}

.widget-area-footer .widget-title {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    position: relative !important;
}

.widget-area-footer .widget-title::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: #3b82f6;
    margin-top: 8px;
    border-radius: 2px;
}

.widget-area-footer ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget-area-footer li {
    margin-bottom: 10px !important;
}

/* Credits Bar */
.footer-credits-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.footer-credits-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.footer-brand {
    font-family: var(--font-headings) !important;
    font-weight: 800 !important;
    font-size: 1.4rem !important;
    color: #ffffff !important;
    display: inline-block !important;
}

.footer-logo-img {
    max-height: 50px !important;
    width: auto !important;
}

.footer-copyright {
    font-size: 0.85rem !important;
    margin: 0 !important;
    color: #64748b !important;
}

/* Legal Menu */
.footer-legal-nav {
    display: block !important;
}

.footer-legal-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-legal-menu li {
    margin: 0 !important;
}

.footer-legal-menu a {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    transition: color 0.3s ease !important;
}

.footer-legal-menu a:hover {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .footer-credits-bar {
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .footer-credits-left {
        align-items: center !important;
    }
    .footer-legal-menu {
        justify-content: center !important;
        gap: 16px !important;
    }
}

/* ==========================================================================
   11. Home Hero Premium (Estilos para el Cover de la Página de Inicio)
   ========================================================================== */
.home-hero-premium {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    isolation: isolate !important;
}

/* Oscurecer el fondo para garantizar contraste absoluto */
.home-hero-premium::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.45) 0%,
        rgba(15, 23, 42, 0.65) 50%,
        rgba(15, 23, 42, 0.9) 100%
    ) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.home-hero-premium .wp-block-cover__inner-container {
    z-index: 5 !important;
    width: 100% !important;
    max-width: 960px !important;
    padding: 120px 24px !important;
}

.home-hero-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: heroContentIn 1s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}

/* Badge del hero de inicio */
.home-hero-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    color: #ffffff !important;
    padding: 8px 24px !important;
    border-radius: 50px !important;
    font-family: var(--font-headings) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Título del hero de inicio */
.home-hero-title {
    font-family: var(--font-headings) !important;
    font-size: clamp(2.6rem, 7vw, 4.8rem) !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    margin-bottom: 25px !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.home-hero-title em {
    font-style: italic !important;
    position: relative !important;
    color: #00d2ff !important; /* Vibrant sky-blue/cyan from the logo gradient */
}

/* Subtítulo del hero de inicio */
.home-hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem) !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 720px !important;
    margin-bottom: 40px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Botones del hero de inicio */
.home-hero-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    margin-bottom: 50px !important;
    width: 100% !important;
}

/* Botón Primario */
.home-hero-btn-primary a {
    background: linear-gradient(135deg, #1d4ed8, #0284c7) !important; /* Logo blue gradient! */
    color: #ffffff !important; /* White text for contrast! */
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    padding: 16px 36px !important;
    border-radius: 50px !important;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-block !important;
    text-decoration: none !important;
    border: none !important;
}

.home-hero-btn-primary a:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5) !important;
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important; /* Vibrant hover blue */
}

/* Botón Secundario */
.home-hero-btn-secondary a {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    padding: 14px 34px !important;
    border-radius: 50px !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.home-hero-btn-secondary a:hover {
    transform: translateY(-4px) !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15) !important;
}

/* Estadísticas del hero de inicio */
.home-hero-stats {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 40px !important;
    flex-wrap: wrap !important;
    padding-top: 30px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.home-hero-stat {
    font-size: 1.1rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 !important;
}

.home-hero-stat strong {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-family: var(--font-headings) !important;
    font-weight: 800 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

@media (max-width: 768px) {
    .home-hero-premium {
        min-height: auto !important;
        border-radius: 0 !important; /* Bordes completamente rectos y sin redondeado en móvil según especificación */
    }
    .home-hero-premium .wp-block-cover__inner-container {
        padding: 60px 16px !important;
    }
    .home-hero-stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 20px 30px !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    .home-hero-stat {
        font-size: 0.95rem !important;
        flex: 1 1 120px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .home-hero-stat:last-child {
        flex: 1 1 100% !important; /* La tercera estadística se estira al 100% para centrarse simétricamente en la fila inferior */
        margin-top: 8px !important;
    }
    .home-hero-stat strong {
        font-size: 1.2rem !important;
    }
    .home-hero-buttons {
        gap: 12px !important;
    }
    .home-hero-btn-primary a,
    .home-hero-btn-secondary a {
        font-size: 0.95rem !important;
        padding: 12px 24px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }
}

/* ==========================================================================
   12. Unificación Exacta de Tamaño para Logos (Header y Footer)
   ========================================================================== */
.site-logo .custom-logo,
.footer-logo-img {
    height: auto !important;
    max-height: 50px !important; /* Altura idéntica y uniforme para ambos logos */
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: all 0.3s ease !important;
}

.site-logo .custom-logo:hover,
.footer-logo-img:hover {
    opacity: 0.9 !important;
}

/* ==========================================================================
   13. Estilos de Adornos, Insignias y Botones para los Demás Héroes
   ========================================================================== */

/* Insignias superiores de categorías, páginas y archivos */
.default-header.has-hero-bg .category a,
.default-header.has-hero-bg .page-badge,
.default-header.has-hero-bg .archive-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    color: #ffffff !important;
    padding: 7px 22px !important;
    border-radius: 50px !important;
    font-family: var(--font-headings) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
    text-decoration: none !important;
}

/* Insignia circular premium para páginas estáticas sin categoría */
.default-header.has-hero-bg .page-badge {
    padding: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

.default-header.has-hero-bg .category a:hover {
    background: linear-gradient(135deg, #1d4ed8, #0284c7) !important; /* Logo blue gradient */
    border-color: rgba(147, 197, 253, 0.5) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4) !important;
}

/* Adorno / Separador central (Línea + Avión en Logo Blue) */
.hero-ornament {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin: 24px 0 !important;
    width: 100% !important;
}

.hero-ornament .hero-line {
    width: 60px !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent) !important;
    display: inline-block !important;
}

.hero-ornament .hero-icon {
    color: #00d2ff !important; /* Vibrant sky-blue/cyan from the logo gradient */
    font-size: 1.25rem !important;
    line-height: 1 !important;
    display: inline-block !important;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5) !important;
    animation: pulseHeroIcon 2s ease-in-out infinite alternate !important;
}

@keyframes pulseHeroIcon {
    from {
        transform: scale(1);
        opacity: 0.8;
    }
    to {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Botón de acción al fondo de todos los héroes */
.hero-action-btn {
    margin-top: 10px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

.hero-action-link {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    padding: 10px 28px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.hero-action-link:hover {
    background: linear-gradient(135deg, #1d4ed8, #0284c7) !important; /* Logo blue gradient */
    border-color: #00d2ff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.4) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   14. Unificación Total del Footer (Color Blanco con Letras Oscuras y Legibles)
   ========================================================================== */
.site-footer {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-top: 2px solid rgba(15, 23, 42, 0.06) !important; /* Borde superior de 2px bien clarito */
    box-shadow: none !important;
    color: #475569 !important;
}

.site-footer .widget,
.site-footer .widget-area,
.site-footer .widget_nav_menu,
.site-footer .widget-area-footer,
.site-footer .widget-area-footer .widget,
.site-footer .widget-area-footer div,
.site-footer .widget-area-footer ul,
.site-footer .widget-area-footer li {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #475569 !important; /* Letras oscuras (Slate 600) para excelente contraste */
}

/* Forzar que los títulos de los widgets en el footer sean de color gris oscuro */
.site-footer .widget-title,
.site-footer .widget-area-footer .widget-title,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
    color: #0f172a !important; /* Slate 900 */
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
}

/* Forzar que los enlaces del menú del footer sean legibles y oscuros */
.site-footer a,
.site-footer .widget-area-footer a,
.site-footer .widget-area-footer li a,
.site-footer .widget_nav_menu a,
.site-footer .widget_nav_menu li a,
.site-footer .footer-legal-menu a {
    color: #475569 !important; /* Slate 600 - Enlaces oscuros */
    background: transparent !important;
    background-color: transparent !important;
    text-shadow: none !important;
    border: none !important;
    display: inline-block !important;
    padding: 6px 0 !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Efecto hover vibrante con el azul del logo de Rutas */
.site-footer a:hover,
.site-footer .widget-area-footer a:hover,
.site-footer .widget-area-footer li a:hover,
.site-footer .widget_nav_menu a:hover,
.site-footer .widget_nav_menu li a:hover,
.site-footer .footer-legal-menu a:hover {
    color: #1d4ed8 !important; /* Azul corporativo del logo en hover */
    transform: translateX(4px) !important; /* Desplazamiento interactivo premium */
}

div#content-wrapper {
    padding-top: 0px !important;
}
.banner {
    display: none !important;
}