/*
Theme Name: Fundación Región de Colchagua
Description: Tema completo a medida. Soporta video de cabecera y cuadrículas de contenido.
*/

:root {
    /* Colores del Manual de Marca */
    --color-celeste: #5EB1E3;
    --color-naranja: #F49739;
    --color-gris: #CDCCCC;
    --color-negro: #000000;

    /* Colores del Mapa del Logo */
    --color-azul-logo: #30A4FF;
    --color-verde-logo: #5BD31B;

    --color-blanco: #FFFFFF;

    --font-body: 'Source Sans 3', sans-serif;
    --font-heading: 'Source Serif 4', serif;
}

/* --- 1. BASE Y RESET --- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-negro);
    margin: 0;
    padding: 0;
    background: var(--color-blanco);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--color-negro);
    font-family: var(--font-heading);
    margin-top: 0;
}

a {
    color: var(--color-negro);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-azul-logo);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-title {
    display: inline-block;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--color-naranja);
    font-size: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-naranja);
    color: #FFFFFF !important;
    border-radius: 4px;
    font-weight: 700;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-verde-logo);
    color: var(--color-negro) !important;
}

/* --- 2. HEADER Y NAVEGACIÓN --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: var(--color-blanco);
    border-bottom: 4px solid var(--color-negro);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.site-branding img {
    max-height: 55px;
    width: auto;
}

.header-right-area {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-navigation ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 8px 0;
    color: var(--color-negro);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--color-azul-logo);
}

.main-navigation ul ul {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    background: var(--color-blanco);
    border: 1px solid var(--color-gris);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 99999;
}

.main-navigation li:hover > ul {
    display: flex !important;
}

.main-navigation ul ul li {
    width: 100%;
    border-bottom: 1px solid #EEE;
}

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

.main-navigation ul ul a {
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 400;
}

.header-social-links {
    border-left: 2px solid var(--color-gris);
    padding-left: 20px;
}

.header-social-list {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-social-list .social-icon {
    color: var(--color-negro);
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.header-social-list .social-icon:hover {
    color: var(--color-celeste);
    transform: translateY(-2px);
}

@media (max-width: 1080px) {
    .header-social-links { display: none; }
}

/* --- 3. HERO / VIDEO CABECERA --- */
.hero-section {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100%;
    height: 85vh;
    min-height: 550px;
    padding-bottom: 60px !important;
    overflow: hidden;
    background-color: var(--color-negro);
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-width: 177.77vh;
    min-height: 100vh;
    transform: translate(-50%, -50%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: var(--color-blanco);
}

.hero-content h1 {
    color: var(--color-blanco) !important;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    color: #F0F0F0;
    font-size: 1.15rem;
    margin-bottom: 20px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

/* --- 4. PORTADA: LO ÚLTIMO DE NUESTRA GESTIÓN --- */
.home-news-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 960px) {
    .home-news-layout {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 35px;
        align-items: start;
    }
}

.home-news-lead {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #EBEBEB;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

/* --- PARCHE NOTICIAS PRINCIPALES (FOTO FLEXIBLE) --- */
.home-news-lead {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-lead-thumb {
    width: 100%;
    height: auto !important; /* Anula cualquier altura fija anterior */
    flex-grow: 1; /* Obliga al contenedor a estirarse y rellenar el hueco */
    min-height: 300px; /* Asegura un tamaño decente en móviles */
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 18px;
}

.news-lead-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Recorta los bordes sobrantes sin aplastar la imagen */
}

.news-lead-thumb:hover img {
    transform: scale(1.02);
}

.news-lead-body h3 {
    font-size: 1.65rem;
    line-height: 1.25;
    margin: 0 0 10px 0;
}

.news-lead-body h3 a { color: var(--color-negro); }
.news-lead-body h3 a:hover { color: var(--color-azul-logo); }

.news-lead-body p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.home-news-secondary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: flex-start;
}

.news-secondary-card {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: #FFFFFF;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.news-secondary-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-gris);
}

.secondary-card-thumb {
    flex: 0 0 120px;
    height: 95px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--color-gris);
}

.secondary-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.secondary-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.secondary-card-body h4 {
    font-size: 0.98rem;
    line-height: 1.35;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.secondary-card-body h4 a { color: var(--color-negro); }
.secondary-card-body h4 a:hover { color: var(--color-azul-logo); }

.secondary-card-body p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

/* --- 5. PORTADA: SECCIONES RESTANTES --- */
.team-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
    text-align: center;
}

.team-grid img,
.projects-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.video-wrapper {
    text-align: center;
    margin: 80px 0;
}
.video-wrapper iframe {
    max-width: 100%;
    border-radius: 8px;
}

.support-section {
    position: relative;
    margin: 80px 0 40px;
    padding: 90px 20px;
    background: #222222 url('https://colchagua.org/wp-content/uploads/2025/02/DSC_0144.jpg') center / cover no-repeat;
    text-align: center;
}

.support-section .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

.support-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    color: var(--color-blanco);
}

.support-content h2 {
    color: var(--color-celeste) !important;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.support-content p {
    color: #E0E0E0;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* --- 6. ARTÍCULO INDIVIDUAL CON SIDEBAR (SINGLE POST) --- */
.single-layout-wrapper {
    max-width: 1200px;
    margin: 50px auto 90px;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

@media (min-width: 900px) {
    .single-layout-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    .single-main-content {
        flex: 1 1 68%;
        min-width: 0;
    }
    .single-sidebar {
        flex: 0 0 28%;
        position: sticky;
        top: 90px;
    }
}

.single-post-category a {
    display: inline-block;
    background-color: var(--color-celeste);
    color: #FFF !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.single-post-title {
    font-size: clamp(2rem, 3.2vw, 2.7rem);
    line-height: 1.25;
    margin: 0 0 15px 0;
}

.single-post-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--color-gris);
    padding-bottom: 18px;
    margin-bottom: 30px;
}

.single-post-featured-image {
    margin: 0 0 30px 0;
    width: 100%;
}

.single-post-featured-image img {
    width: 100% !important;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.single-post-body {
    font-size: 1.15rem;
    line-height: 1.85;
    color: #222;
}

.single-post-body p { margin-bottom: 1.6rem; }

.single-post-footer {
    border-top: 2px solid var(--color-gris);
    margin-top: 50px;
    padding-top: 25px;
}

.post-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.sidebar-widget {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--color-gris);
}
.sidebar-widget:last-child { border-bottom: none; }

.widget-title {
    font-size: 1.2rem;
    margin: 0 0 18px 0;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--color-naranja);
    display: inline-block;
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}
.sidebar-post-thumb {
    flex: 0 0 75px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
}
.sidebar-post-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.sidebar-post-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}
.sidebar-post-date {
    font-size: 0.75rem;
    color: #777;
    text-transform: uppercase;
}

.sidebar-promo-box {
    background-color: #F8F8F8;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid var(--color-gris);
}

.btn-sidebar {
    display: block;
    text-align: center;
    background-color: var(--color-naranja);
    color: #FFF !important;
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
}
.btn-sidebar:hover { background-color: var(--color-celeste); }

.sidebar-social-wrapper .social-links-list { gap: 10px; }
.sidebar-social-wrapper .social-icon {
    background-color: #EEE;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.sidebar-social-wrapper .social-icon:hover {
    background-color: var(--color-celeste);
    color: #FFF;
}

/* --- 7. ARCHIVOS Y CATEGORÍAS (ARCHIVE) --- */
.archive-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.archive-card {
    background: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.archive-card-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--color-gris);
}

.archive-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.archive-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-gris) 0%, #B5BDBC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}
.archive-card-placeholder span {
    font-family: var(--font-heading);
    color: var(--color-negro);
    font-weight: 700;
    opacity: 0.7;
}

.archive-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.archive-card-meta {
    font-size: 0.8rem;
    color: #777;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.archive-card-title {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
    margin: 0 0 12px 0 !important;
}

.archive-card-excerpt p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #444 !important;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.archive-card-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-naranja);
    align-self: flex-start;
}

.archive-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.archive-pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--color-gris);
    border-radius: 4px;
    font-weight: 600;
}
.archive-pagination .page-numbers.current {
    background-color: var(--color-negro);
    color: #FFF;
    border-color: var(--color-negro);
}

/* --- 8. COMPATIBILIDAD GUTENBERG (CORREGIDO) --- */
.entry-content {
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

/* Columnas nativas responsivas (Sin !important destructivos) */
.entry-content .wp-block-columns {
    display: flex;
    flex-wrap: wrap; /* Vital para que no colapse en celulares */
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .entry-content .wp-block-columns {
        flex-wrap: nowrap;
    }
}

.entry-content .wp-block-column {
    flex: 1;
    min-width: 0;
}

/* Domar imágenes sueltas gigantes (Ej: Foto de "Nuestra Fundación") */
.entry-content > .wp-block-image img,
.entry-content > figure img {
    border-radius: 8px;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    margin: 0 auto;
}

/* Dar aire automático a los títulos de cada sección */
.entry-content h2 {
    margin-top: 80px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-naranja);
    display: inline-block;
}

/* Centrar libros e imágenes en columnas/grupos */
.entry-content .wp-block-group {
    border-radius: 8px;
    padding: 15px;
}

.entry-content ul { 
    line-height: 1.6; 
    padding-left: 20px; 
}
.entry-content li { 
    margin-bottom: 6px; 
    font-size: 0.95rem; 
}

/* --- PARCHE PORTADA: LO ÚLTIMO DE NUESTRA GESTIÓN --- */
.home-news-layout {
    align-items: stretch; /* Fuerza a ambas columnas a tener la misma altura */
}

.news-lead-thumb {
    height: 100%;
    max-height: 380px; /* Acorta la foto del alcalde para que no sobre espacio a la derecha */
}

.home-news-secondary {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribuye exactamente las 3 noticias para rellenar el hueco blanco */
    height: 100%;
    gap: 15px;
}

/* --- 9. FOOTER Y REDES SOCIALES --- */
.site-footer {
    padding: 50px 5% 25px;
    background-color: var(--color-gris);
    color: var(--color-negro);
    border-top: 4px solid var(--color-naranja);
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
}

.social-links-list {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.social-links-list .social-icon {
    color: var(--color-negro);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.social-links-list .social-icon:hover {
    color: var(--color-celeste);
    transform: translateY(-2px);
}

.site-footer .copyright {
    padding-top: 20px;
    border-top: 1px solid #AAA;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #222;
}

/* --- GRID NATIVA DE PROYECTOS --- */
.projects-grid-native {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.project-card {
    background: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.project-card-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--color-gris);
}

.project-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-card-thumb img {
    transform: scale(1.03);
}

.project-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0 0 12px 0;
}

.project-card-title a { color: var(--color-negro); }
.project-card-title a:hover { color: var(--color-azul-logo); }

.project-card-excerpt {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-card-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-naranja);
    align-self: flex-start;
}
.project-card-link:hover { color: var(--color-celeste); }


/* ==========================================================================
   PLANTILLAS: TRANSPARENCIA Y NOSOTROS
   ========================================================================== */

/* Estructura principal irrompible (Grid en lugar de Flexbox) */
.transparencia-hero {
    display: grid !important;
    grid-template-columns: 1fr !important; /* Móvil: 1 columna */
    gap: 40px !important;
    margin-bottom: 60px !important;
    align-items: center !important;
}

@media (min-width: 860px) {
    .transparencia-hero {
        grid-template-columns: 1fr 1fr !important; /* Escritorio: Exactamente 50/50 */
        gap: 60px !important;
    }
}

/* Imágenes principales */
.transparencia-media img {
    width: 100% !important;
    height: 500px !important;
    object-fit: cover !important;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* Imágenes apiladas (Para la sección "Objeto") */
.transparencia-media-apilada {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    width: 100% !important;
}

.transparencia-media-apilada img {
    width: 100% !important;
    height: 235px !important;
    object-fit: cover !important;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* Tipografía de la sección */
.transparencia-overline {
    font-size: 0.85rem;
    color: var(--color-naranja);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    font-weight: 700;
    display: block;
}

.transparencia-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin: 0 0 20px 0;
}

.transparencia-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

/* ==========================================================================
   GALERÍA FINAL (Corrección definitiva)
   ========================================================================== */

.galeria-nosotros {
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1 columna en móviles */
    gap: 20px !important;
    margin-top: 60px !important;
    margin-bottom: 60px !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .galeria-nosotros {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columnas en tablets */
    }
}

@media (min-width: 1024px) {
    .galeria-nosotros {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 columnas obligatorias en PC */
    }
}

.galeria-nosotros img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
    max-width: none !important; /* Anula restricciones ocultas del tema */
    display: block !important;
}

.galeria-nosotros img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Grilla de cajas inferiores de Transparencia Activa */
.transparencia-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.transparencia-box {
    background-color: #F8F9FA;
    padding: 35px;
    border-radius: 8px;
    border: 1px solid #EAEAEA;
}

.transparencia-box h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--color-naranja);
    padding-bottom: 10px;
    display: inline-block;
}

.transparencia-box ul {
    padding-left: 20px;
    margin: 0;
}

.transparencia-box li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.transparencia-update {
    text-align: center;
    font-style: italic;
    color: #888;
    font-size: 0.9rem;
    margin-top: 60px;
    border-top: 1px solid #EAEAEA;
    padding-top: 20px;
}

.transparencia-box a {
    color: var(--color-naranja);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.transparencia-box a:hover {
    color: var(--color-celeste);
}

.transparencia-main-body {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #EAEAEA;
    margin-bottom: 50px;
}

.transparencia-main-body:empty {
    display: none;
}

.grilla-noticias-lateral {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ==========================================================================
   ARREGLOS ESPECÍFICOS DE LA PORTADA (FRONT-PAGE)
   ========================================================================== */

/* 1. Nuestra Fundación (Layout 50/50) */
.fundacion-split-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 80px 0; /* Da aire arriba y abajo de la sección */
    align-items: center;
}

@media (min-width: 860px) {
    .fundacion-split-block {
        grid-template-columns: 1fr 1fr; /* Divide en dos columnas en PC */
    }
}

.fundacion-split-media img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* --- TIENDA WOOCOMMERCE (CORRECCIÓN SHORTCODE) --- */
ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 40px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Matar flotaciones nativas */
ul.products::before,
ul.products::after {
    display: none !important;
}

/* Diseño de la tarjeta individual */
ul.products li.product {
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    background: #FFFFFF !important;
    padding: 30px !important;
    border-radius: 8px !important;
    border: 1px solid #EAEAEA !important;
    box-sizing: border-box !important;
}

/* Forzar 2 columnas en PC */
@media (min-width: 768px) {
    ul.products li.product {
        width: calc(50% - 20px) !important; /* 50% menos la mitad del gap */
        max-width: 450px !important; 
    }
}

/* Portadas de los libros */
ul.products li.product img {
    display: block !important;
    margin: 0 auto 20px auto !important; /* 'auto' a los lados fuerza el centrado perfecto */
    width: auto !important;
    max-height: 280px !important;
    object-fit: contain !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

/* Centrar el contenido del enlace interno de WooCommerce */
ul.products li.product .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Botón "Añadir al carrito" */
ul.products li.product .button {
    margin-top: auto !important; /* Empuja el botón siempre al fondo */
    background: var(--color-naranja) !important;
    color: #FFF !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

ul.products li.product .button:hover {
    background: var(--color-celeste) !important;
}

