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

:root {
    --ipelc-orange: #FF6B00;
    --ipelc-orange-dark: #cc5500;
    --ipelc-orange-light: #fff0e6;
    --ipelc-gradient: linear-gradient(135deg, #FF8C00 0%, #FF5500 100%);
    --ipelc-text-dark: #1f2937;
    --ipelc-text-gray: #6b7280;
    --ipelc-bg-light: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Tipografía General Modernizada */
body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
    color: var(--ipelc-text-dark);
    background-color: var(--ipelc-bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #111;
}

/* --- MENU PREMIUM & HEADER (Identidad Naranja) --- */
.site-header,
header,
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    position: relative;
    z-index: 1000;
}

/* Contenedor del menú */
.main-navigation {
    font-family: 'Outfit', sans-serif;
}

/* Items de primer nivel con estilo de botón sutil */
.main-navigation ul li a {
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.8rem 1.2rem !important;
    /* Ajuste de padding para botón */
    margin: 0 0.2rem;
    /* Espacio entre botones */
    color: var(--ipelc-text-dark) !important;
    /* Texto Oscuro para fondo claro */
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    /* Bordes redondeados estilo 'Pill' */
}

/* Efecto Hover Premium: Inversión a Claro con Texto Naranja */
.main-navigation>div>ul>li:hover>a,
.main-navigation>div>ul>li.current-menu-item>a {
    color: #ffffff !important;
    /* Texto Blanco */
    background: var(--ipelc-orange) !important;
    /* Fondo Naranja */
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
    /* Sombra suave naranja */
    transform: translateY(-2px);
    /* Ligera elevación */
}

/* Eliminar línea inferior antigua para limpiar el diseño */
.main-navigation>div>ul>li>a::after {
    display: none;
}


/* Ajuste para botón de búsqueda y otros iconos en header */
.site-header svg,
.site-header i,
.search-toggle {
    fill: var(--ipelc-text-dark) !important;
    color: var(--ipelc-text-dark) !important;
}

/* Submenús (Dropdowns) - Mantener blanco para contraste */
.main-navigation ul ul {
    background: white !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-top: 4px solid #ffffff;
    /* Conector visual */
    border-radius: 0 0 8px 8px;
    padding: 0.5rem 0 !important;
    min-width: 240px;
}

.main-navigation ul li:hover>ul {
    opacity: 1;
    transform: translateY(0);
}

.main-navigation ul ul li a {
    text-transform: none;
    font-weight: 500 !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 0.95rem;
    color: var(--ipelc-text-dark) !important;
    /* Texto oscuro en submenú */
    text-shadow: none;
    border-bottom: 1px solid #f3f4f6;
    display: block;
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

.main-navigation ul ul li a:hover {
    background: #fff0e6 !important;
    color: var(--ipelc-orange) !important;
    /* Naranja en hover de submenú */
    padding-left: 1.8rem !important;
    /* Efecto slide sutil */
}

/* Logo wrapper si es necesario ajustar */
.site-branding,
.custom-logo-link {
    background: white;
    padding: 5px 15px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Ajuste del botón mobile si existe */
.menu-toggle {
    background: var(--ipelc-gradient);
    color: white;
    border-radius: 4px;
}

/* Botones Premium */
button,
.button,
.wp-block-button__link {
    background: var(--ipelc-gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 24px !important;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
}

button:hover,
.button:hover,
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* Noticias y Layout Premium */
.wp-block-post-template,
.blog-grid,
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Estilo específico para Tarjetas de Noticias (adaptando selectores comunes y del tema) */
article.post,
.card-nota,
.wp-block-gob-bo-card-nota,
.card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

article.post:hover,
.card-nota:hover,
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-bottom: 4px solid var(--ipelc-orange) !important;
}

/* Imágenes en tarjetas */
article.post img,
.card-img-top,
.wp-block-post-featured-image img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

/* Títulos de noticias */
article.post h2,
article.post h3,
.card-title {
    font-size: 1.25rem !important;
    line-height: 1.4;
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
    margin: 0 !important;
    color: #111;
}

article.post p:not(.has-text-color),
.card-text {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: var(--ipelc-text-gray);
    font-size: 0.95rem;
    flex-grow: 1;
}

/* Metadatos (Fecha, Categoría) con estilo IPELC */
.entry-meta,
.card-meta {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.85rem;
    color: var(--ipelc-orange);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* --- FOOTER CORREGIDO (Alto Contraste) --- */
footer,
.site-footer,
#colophon {
    background-color: #111827 !important;
    /* Gris oscuro casi negro */
    color: #f3f4f6 !important;
    /* Blanco hueso para texto */
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 5px solid var(--ipelc-orange);
}

/* Forzar color blanco en todos los textos del footer */
footer p,
.site-footer p,
footer li,
.site-footer li,
footer span,
.site-footer span,
footer div,
.site-footer div {
    color: #d1d5db !important;
    /* Gris muy claro */
}

/* Títulos del footer */
footer h1,
.site-footer h1,
footer h2,
.site-footer h2,
footer h3,
.site-footer h3,
footer h4,
.site-footer h4,
footer h5,
.site-footer h5,
footer strong {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--ipelc-orange);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Enlaces del Footer */
footer a,
.site-footer a {
    color: #9ca3af !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover,
.site-footer a:hover {
    color: var(--ipelc-orange) !important;
    text-decoration: underline;
}

/* Eliminar fondos grises internos si existen */
footer .widget,
.site-footer .widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- COMUNICADOS FIX --- */
.ver-comunicado {
    color: var(--ipelc-orange) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.ver-comunicado:hover {
    color: var(--ipelc-orange-dark) !important;
    text-decoration: underline;
    transform: translateX(5px);
    /* Pequeña animación de flecha */
}

.card-footer a {
    text-decoration: none !important;
}

/* --- TITULOS DE SECCION (DIVIDERS) --- */
#divider {
    position: relative;
    margin: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

#divider hr {
    display: none;
}

#divider h4 {
    display: inline-block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    padding-bottom: 15px;
    /* Aumentado para mayor espacio */
    border-bottom: 4px solid var(--ipelc-orange);
    margin-bottom: -3px;
    /* Superponer al borde gris perfectament */
    text-transform: uppercase;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

/* --- TRÁMITES FIX --- */
/* Sobrescribir clase 'fondo-verde' */
.fondo-verde,
.card.fondo-verde {
    background: white !important;
    border: 1px solid #f3f4f6 !important;
    box-shadow: var(--shadow-md) !important;
    color: var(--ipelc-text-dark) !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Círculo Principal: Naranja Bajito (Arriba Derecha) */
.fondo-verde::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Círculo Secundario: Azul Bajito (Abajo Izquierda) */
.fondo-verde::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(42, 54, 145, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fondo-verde:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--ipelc-orange) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.fondo-verde:hover::before {
    transform: scale(1.2);
}

.fondo-verde:hover::after {
    transform: scale(1.3) translateX(10px);
}

/* Forzar que los textos dentro de la tarjeta de trámite sean legibles */
.fondo-verde h4,
.fondo-verde .card-title {
    color: var(--ipelc-orange) !important;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.fondo-verde p,
.fondo-verde .card-text {
    color: var(--ipelc-text-gray) !important;
    position: relative;
    z-index: 2;
}

.fondo-verde b {
    color: #111 !important;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}

.boton-tramite {
    background: white !important;
    color: var(--ipelc-orange) !important;
    border: 1px solid var(--ipelc-orange) !important;
    font-weight: 600;
    border-radius: 50px !important;
    padding: 5px 15px !important;
    z-index: 2;
    position: relative;
    transition: all 0.2s;
}

.boton-tramite:hover {
    background: var(--ipelc-orange) !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(255, 107, 0, 0.3);
}



/* Borde Wiphala sutil en top */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right,
            #FFFFFF 14.28%,
            #F7D900 14.28% 28.56%,
            #E9660A 28.56% 42.84%,
            #D52B1E 42.84% 57.12%,
            #793A8B 57.12% 71.4%,
            #2A3691 71.4% 85.68%,
            #008D36 85.68%);
    z-index: 9999;
}