/* ==========================================================================
   TEMA: Fundación Abalcom Divina Hermandad
   URI: https://grupoortizguzman.com/abalcom
   AUTOR: KAVOD TECHNOLOGIES
   VERSIÓN: 1.2 (Optimizada)
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES GLOBALES Y CONFIGURACIÓN (:ROOT)
   ========================================================================== */
:root {
    --gold: #d4af37;
    --gold-light: #f1d592;
    --gold-dark: #aa841b;
    --bg-dark: #030303;
    --bg-card: rgba(10, 10, 10, 0.75);
    --glass-border: rgba(212, 175, 55, 0.08);
    --glass-border-hover: rgba(212, 175, 55, 0.25);
    --transition-premium: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth !important;
}

html,
body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(212, 175, 55, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Bloqueos controlados de scroll en estados modales */
body.menu-open,
body.modal-open,
body.master-modal-open {
    overflow: hidden !important;
}

/* ==========================================================================
   2. ESTRUCTURAS DE MAQUETACIÓN Y CLASES GLOBALES
   ========================================================================== */
section {
    padding: 160px 6% 90px;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 90px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 20px;
}

.section-header h2 span {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold-light);
    padding-right: 4px;
}

.global-cinema-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(3, 3, 3, 0.4) 0%, rgba(3, 3, 3, 0.7) 50%, rgba(3, 3, 3, 0.90) 100%),
        url('../images/hero-fundacion.webp') center/cover no-repeat;
    z-index: -2;
    transform: scale(1.05);
    filter: blur(5px) brightness(0.7);
}

.section-premium-padding {
    padding: 100px 0;
}

.section-premium-padding-bordered {
    padding: 100px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.05);
}

.container-centered-max {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.paragraph-lead-premium {
    font-family: 'Montserrat', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.9;
    max-width: 850px;
    margin: 0 auto 60px auto;
    text-align: center;
    font-weight: 300;
}

/* ==========================================================================
   3. SISTEMA DE DISEÑO UNIFICADO (KAVOD TECH)
   ========================================================================== */
/* A. Homogeneización de Contenedores (Glassmorphism Idéntico) */
.enfoque-card,
.causa-box,
.testio-card,
.donacion-card,
.noticia-card,
.noticias-grid .newsflash>div,
.noticias-grid .newsflash-item,
.noticias-grid ul.newsflash li {
    background: rgba(10, 10, 10, 0.72) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(212, 175, 55, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45) !important;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* B. Comportamiento Hover Unificado */
.enfoque-card:hover,
.causa-box:hover,
.testio-card:hover,
.donacion-card:hover,
.noticia-card:hover,
.noticias-grid .newsflash>div:hover,
.noticias-grid .newsflash-item:hover,
.noticias-grid ul.newsflash li:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(212, 175, 55, 0.40) !important;
    background: rgba(16, 16, 16, 0.85) !important;
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.08) !important;
}

/* C. Coherencia de Respiración (Padding Interno Idéntico) */
.enfoque-card,
.causa-box,
.testio-card,
.donacion-card .donacion-card-body,
.noticia-body {
    padding: 45px 35px !important;
}

/* D. Jerarquía Tipográfica Estricta en Tarjetas */
.enfoque-card h3,
.causa-text h3,
.donacion-card h3,
.donacion-card-body h3,
.noticia-body h3,
.noticias-grid .newsflash-title,
.noticias-grid a.mod-articles-category-title,
.noticias-grid .noticia-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 18px !important;
    margin-top: 0 !important;
    line-height: 1.4 !important;
    text-transform: none !important;
}

.enfoque-card p,
.enfoque-card-content,
.enfoque-card-content p,
.causa-descripcion,
.causa-descripcion p,
.donacion-detalles,
.donacion-detalles p,
.noticia-body p,
.noticias-grid .newsflash-text,
.noticias-grid p {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 300 !important;
    line-height: 1.8 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-bottom: 0 !important;
}

.testio-autor,
.noticia-meta {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 600 !important;
    color: var(--gold-light) !important;
}

.testio-cargo,
.donacion-tipo span {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.4) !important;
    margin-top: 5px !important;
}

/* E. Iconografía y Logotipos Unificados */
.enfoque-card i,
.causa-logo-wrapper i {
    font-size: 3.2rem !important;
    color: var(--gold-light) !important;
    margin-bottom: 25px !important;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.2)) !important;
    transition: all 0.6s ease !important;
}

.causa-box:hover .causa-logo-wrapper i {
    color: #d4af37 !important;
    transform: scale(1.1) !important;
}

.causa-logo-wrapper img {
    max-height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.2));
    transition: var(--transition-premium);
}

.causa-box:hover .causa-logo-wrapper img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.5));
}

.causa-logo-wrapper {
    margin-bottom: 25px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 70px !important;
    width: 100% !important;
    padding: 0 !important;
}

.causa-text {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* ==========================================================================
   4. COMPONENTES DE NAVEGACIÓN (HEADER & MENÚS)
   ========================================================================== */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 40px !important;
    min-height: 95px !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: var(--transition-premium);
}

.nav-glass-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 95px !important;
    background: rgba(3, 3, 3, 0.85) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    z-index: 9998 !important;
    pointer-events: none;
}

body nav .nav-logo {
    display: inline-block !important;
    width: 220px !important;
    height: 75px !important;
    background-image: url('../images/abalcom.png') !important;
    background-size: contain !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

body nav .nav-logo img,
body nav .nav-logo::before,
body nav .nav-logo::after {
    display: none !important;
    content: none !important;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    transition: var(--transition-premium);
    position: relative;
    padding: 10px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: var(--transition-premium);
    transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 100000;
}

.btn-donar-nav {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 28px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-premium);
    position: relative;
    overflow: hidden;
}

.btn-donar-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.6s;
}

.btn-donar-nav:hover::before {
    left: 100%;
}

.btn-donar-nav:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
    border-color: var(--gold);
}

.menu-movil-btn {
    display: none !important;
    background: transparent;
    border: none;
    color: #d4af37;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
}

/* ==========================================================================
   5. SECCIONES PRINCIPALES
   ========================================================================== */

/* --- INICIO (HERO) --- */
#inicio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero-content img,
.hero-main-logo {
    max-width: 580px;
    width: 90%;
    margin-bottom: 25px;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.8));
    animation: logoZoomOut 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
    object-fit: contain;
    display: block;
}

.hero-subtitle-premium {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: gray;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-align: center;
    display: block;
    width: 100%;
    max-width: 500px;
    margin-top: 15px;
    margin-bottom: 50px;
    white-space: nowrap;
    text-shadow: 0px 3px 10px rgba(0, 0, 0, 0.7);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-top: 20px;
}

@keyframes logoZoomOut {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(30px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* --- NUESTRO ENFOQUE --- */
.enfoque-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

/* --- QUÉ HACEMOS (PROGRAMAS/CAUSAS) --- */
.causas-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 35px !important;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.que-hacemos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.pilar-card {
    background: rgba(8, 8, 8, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    transition: var(--transition-premium);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 45px 35px;
}

.pilar-card:hover {
    border-color: var(--gold);
    background: rgba(12, 12, 12, 0.85);
    transform: translateY(-5px);
}

.pilar-icon {
    color: var(--gold);
    margin-bottom: 20px;
}

.pilar-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 15px;
}

.pilar-info p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 300;
}

/* --- TESTIMONIOS --- */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

.testio-card::before {
    content: "“";
    position: absolute;
    top: 10px;
    left: 25px;
    font-size: 6rem;
    color: rgba(212, 175, 55, 0.05);
    font-family: 'Playfair Display', serif;
}

.testio-quote {
    font-family: 'Playfair Display', serif !important;
    font-style: italic !important;
    font-size: 1.15rem !important;
    line-height: 1.8 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 35px !important;
    position: relative;
    z-index: 2;
}

/* --- DONACIONES & CUENTAS BANCARIAS --- */
.donaciones-grid,
.banks-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 30px !important;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.donation-box>p {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-style: italic;
    color: rgba(10, 10, 10, 0.75);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.donacion-card h3 {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
}

.donacion-detalles strong {
    color: #f1d592 !important;
    font-weight: 600;
}

.donacion-tipo {
    margin-top: auto !important;
}

.bank-card {
    background: rgba(10, 10, 10, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 45px;
    text-align: left;
    transition: var(--transition-premium);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-radius: 14px;
}

.bank-card:hover {
    border-color: var(--gold);
    background: rgba(10, 10, 10, 0.75);
}

.bank-name {
    color: var(--gold);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding-bottom: 10px;
}

.bank-details p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 2.2;
}

.bank-details strong {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* --- GALERÍA PREMIUM (MASONRY) --- */
.gallery-grid {
    display: block !important;
    column-count: 5;
    column-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-grid .btn-ver-mas-container {
    column-span: all !important;
    -webkit-column-span: all !important;
    margin-top: 50px !important;
    display: flex !important;
}

.gallery-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 20px;
    height: auto !important;
    border-radius: 8px !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: auto !important;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(212, 175, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- MÓDULO DE NOTICIAS (JOOMLA NEWSFLASH & GRID) --- */
.noticias-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.noticias-grid>div:not(.btn-ver-mas-container),
.noticias-grid>ul:not(.btn-ver-mas-container) {
    display: contents !important;
}

/* Truncado Inteligente y Visuales de Artículos */
.noticias-grid img,
.noticias-grid p:has(img) img,
.noticias-grid div:has(img) img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 0 15px 0 !important;
}

.noticias-grid p:has(img),
.noticias-grid div:has(img),
.noticias-grid figure {
    display: block !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 2px solid #d4af37 !important;
}

.noticias-grid h1,
.noticias-grid h2,
.noticias-grid h3,
.noticias-grid h4,
.noticias-grid h5,
.noticias-grid h6,
.noticias-grid .page-header,
.noticias-grid .item-title,
.noticias-grid .newsflash-title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    white-space: normal !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 20px 20px 10px !important;
}

.noticias-grid .item>div:not(:has(img)):not([class*="title"]),
.noticias-grid .items-leading>div:not(:has(img)):not([class*="title"]),
.noticias-grid .leading-0>div:not(:has(img)):not([class*="title"]),
.noticias-grid .newsflash>div>div:not(:has(img)):not([class*="title"]),
.noticias-grid .newsflash-item>div:not(:has(img)):not([class*="title"]),
.noticias-grid ul.newsflash li>div:not(:has(img)):not([class*="title"]),
.noticias-grid .mod-articles-category-introtext,
.noticias-grid .introtext,
.noticias-grid .item p:not(:has(img)),
.noticias-grid .items-leading p:not(:has(img)),
.noticias-grid .newsflash p:not(:has(img)),
.noticias-grid .newsflash-item p:not(:has(img)),
.noticias-grid ul.newsflash li p:not(:has(img)),
.noticias-grid .noticia-card p:not(:has(img)) {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 4.8em !important;
    margin: 0 20px 20px !important;
}

.noticias-grid .item p:not(:has(img))~p:not(:has(img)),
.noticias-grid .items-leading p:not(:has(img))~p:not(:has(img)),
.noticias-grid .newsflash-item p:not(:has(img))~p:not(:has(img)),
.noticias-grid .newsflash p:not(:has(img))~p:not(:has(img)),
.noticias-grid ul.newsflash li p:not(:has(img))~p:not(:has(img)),
.noticias-grid>div>div>p:not(:has(img))~p:not(:has(img)),
.introtext p:not(:has(img))~p:not(:has(img)) {
    display: none !important;
}

/* Ocultar elementos sobrantes nativos de Joomla */
.readmore,
.noticias-grid .readmore,
.noticias-grid p.readmore,
.noticias-grid a.readmore,
.noticias-grid .mod-articles-category-readmore,
.mod-articles-category-readmore,
.pagenav,
.pagination {
    display: none !important;
}

/* --- BOTÓN VER MÁS --- */
.btn-ver-mas-container {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    clear: both !important;
}

.btn-ver-mas-premium {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(10, 10, 10, 0.95) !important;
    border: 1px solid var(--gold, #d4af37) !important;
    color: var(--gold, #d4af37) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    padding: 14px 38px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

.btn-ver-mas-premium:hover {
    background: var(--gold, #d4af37) !important;
    color: #000000 !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3) !important;
}

/* ==========================================================================
   6. VENTANAS MODALES Y OVERLAYS
   ========================================================================== */

/* --- JOOMLA MODALS (Artículos Legales) --- */
#legal-modal-body h1,
#legal-modal-body h2,
#legal-modal-body .page-header h2 {
    font-family: 'Playfair Display', serif;
    color: #d4af37 !important;
    font-weight: 400;
    margin-top: 10px;
    margin-bottom: 20px;
}

#legal-modal-body h3 {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    margin-top: 25px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

#legal-modal-body p {
    margin-bottom: 15px;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.8) !important;
}

#legal-modal-body ul {
    padding-left: 20px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

#legal-modal-body li {
    margin-bottom: 8px;
}

/* Blindaje Modal Legal Joomla */
#legal-modal-body .pagenav,
#legal-modal-body .item-page-navigation,
#legal-modal-body .pager,
#legal-modal-body nav.pagination,
#legal-modal-body ul[class*="pagenav"],
#legal-modal-body div[class*="navigation"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- MASTER MODALS DINÁMICOS --- */
.master-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 99999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
}

.master-modal-overlay[style*="display: flex"],
.master-modal-overlay[style*="display: block"] {
    display: flex !important;
}

.master-modal-box {
    background: #080808 !important;
    border: 1px solid #d4af37 !important;
    border-radius: 8px !important;
    max-width: 700px !important;
    width: 90% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 30px !important;
    position: relative !important;
    z-index: 999999999 !important;
    color: #fff !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

.master-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    color: #d4af37 !important;
    font-size: 32px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    z-index: 10 !important;
}

.master-modal-title {
    color: #fff !important;
    font-size: 1.6rem !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
    font-family: 'Playfair Display', serif !important;
}

.master-modal-body {
    color: #ccc !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    font-family: 'Montserrat', sans-serif !important;
}

.master-modal-body *,
.master-modal-body p {
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Modo Interno Galería Ampliada */
.master-modal-overlay.modal-gallery-mode .master-modal-box {
    max-width: 1150px !important;
    width: 95% !important;
    max-height: 95vh !important;
    padding: 20px !important;
    background: rgba(10, 10, 10, 0.98) !important;
}

.master-modal-overlay.modal-gallery-mode .master-modal-img {
    max-height: 78vh !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    display: block !important;
}

.master-modal-overlay.modal-gallery-mode .master-modal-title {
    text-align: center !important;
    font-size: 1.3rem !important;
    color: #ffffff !important;
    margin-bottom: 5px !important;
}

.master-modal-overlay.modal-gallery-mode .master-modal-meta {
    text-align: center !important;
    color: var(--gold, #d4af37) !important;
    margin-bottom: 0 !important;
}

.master-modal-overlay.modal-gallery-mode .master-modal-body {
    display: none !important;
}

/* ==========================================================================
   7. ANIMACIONES Y ELEMENTOS FLOTANTES
   ========================================================================== */
.reveal-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(3, 3, 3, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--gold);
    padding: 15px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    max-width: 56px;
}

.whatsapp-float span {
    white-space: nowrap;
    opacity: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: opacity 0.4s;
}

.whatsapp-float:hover {
    max-width: 280px;
    background: rgba(212, 175, 55, 0.1);
}

.whatsapp-float:hover span {
    opacity: 1;
}

/* ==========================================================================
   8. RODAPIÉ INTERNO (FOOTER)
   ========================================================================== */
footer {
    background: #010101;
    border-top: 1px solid var(--glass-border);
    padding: 100px 6% 40px;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1fr;
    gap: 40px;
    max-width: 1500px;
    margin: 0 auto 60px;
}

.footer-logo {
    height: 75px;
    margin-bottom: 25px;
    filter: brightness(1.15);
    mix-blend-mode: lighten;
    display: block;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.85rem;
    line-height: 1.9;
    font-weight: 300;
}

.footer-content .footer-col:first-child p {
    max-width: 290px;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    font-weight: 600;
    white-space: nowrap;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.85rem;
    text-decoration: none;
    line-height: 2.4;
    display: block;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: fit-content;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-col a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: var(--transition-premium);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
}

.footer-legal-links a:hover {
    color: var(--gold);
}

.footer-comunicaciones-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-comunicaciones-menu li {
    margin-bottom: 15px !important;
}

.footer-comunicaciones-menu li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.footer-comunicaciones-menu li a i {
    color: #d4af37 !important;
    font-size: 1.1rem !important;
    width: 20px !important;
    text-align: center !important;
    transition: transform 0.3s ease !important;
}

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

.footer-comunicaciones-menu li a:hover i {
    transform: scale(1.15) !important;
    color: #f1d592 !important;
}

.footer-comunicaciones-dinamico a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.footer-comunicaciones-dinamico a i {
    color: var(--gold) !important;
    font-size: 0.9rem !important;
    width: 18px !important;
    text-align: center !important;
    transition: transform 0.3s ease !important;
}

.footer-comunicaciones-dinamico a:hover i {
    transform: scale(1.15);
    color: #fff !important;
}

/* ==========================================================================
   9. MEDIA QUERIES (RESPONSIVE CENTRALIZADO)
   ========================================================================== */
@media (max-width: 1400px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 1200px) {
    .que-hacemos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    nav {
        padding: 10px 20px !important;
    }

    .gallery-grid {
        column-count: 2;
    }

    .menu-movil-btn {
        display: block !important;
    }

    .nav-right-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 99999;
    }

    .nav-right-wrapper.activo {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-family: 'Montserrat', sans-serif;
        color: white;
        text-decoration: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 120px 5% 70px;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .causas-grid,
    .que-hacemos-grid,
    .footer-content,
    .enfoque-grid,
    .noticias-grid,
    .gallery-grid,
    .donaciones-grid {
        grid-template-columns: 1fr !important;
    }

    .nav-links {
        display: none;
    }

    .btn-donar-nav {
        display: block !important;
        padding: 8px 16px;
        font-size: 0.65rem;
        letter-spacing: 1.5px;
    }

    .nav-actions-container {
        gap: 10px !important;
    }

    .hero-content img,
    .hero-main-logo {
        width: 85%;
        max-width: 340px;
    }

    .hero-subtitle-premium {
        font-size: 0.85rem;
        letter-spacing: 3px;
        margin-top: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-legal-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .nav-right-wrapper.activo {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.98) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 9999 !important;
    }

    .nav-right-wrapper.activo .nav-links {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }

    .hero-subtitle-premium {
        font-size: 0.68rem;
        letter-spacing: 3px;
    }
}

/* ==========================================================================
   CORRECCIÓN: VISOR DE NOTICIAS Y BLOG (MODAL)
   ========================================================================== */

/* Limitar el tamaño de la imagen de portada en el modal */
.master-modal-img {
    width: 100% !important;
    max-height: 350px !important;
    /* Fija un alto máximo prudente */
    object-fit: cover !important;
    /* Evita que la imagen se deforme o estire */
    border-radius: 8px !important;
    margin-bottom: 25px !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Dar formato legible, espaciado y justificado al texto del artículo */
.master-modal-body {
    font-family: 'Montserrat', sans-serif !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
}

.master-modal-body p {
    margin-bottom: 20px !important;
    /* Separación obligatoria entre párrafos */
    text-align: justify !important;
    /* Texto alineado como en un periódico */
    display: block !important;
}

/* Asegurar que los saltos de línea generados por JS se comporten como bloque */
.master-modal-body br {
    display: block !important;
    content: "" !important;
    margin-top: 15px !important;
}

/* ==========================================================================
   PAGINACIÓN NUMÉRICA PREMIUM
   ========================================================================== */
.paginacion-numerica-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px auto 20px auto; /* Asegura espacio arriba y abajo, y centra */
    width: 100%;
    clear: both;
}

.btn-paginacion {
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-paginacion:hover:not(:disabled) {
    background: var(--gold, #d4af37);
    color: #0d0d0d;
    border-color: var(--gold, #d4af37);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.45);
    transform: translateY(-3px);
}

.btn-paginacion.active {
    background: var(--gold, #d4af37);
    color: #0d0d0d;
    border-color: var(--gold, #d4af37);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    pointer-events: none; /* Deshabilita clics en la página activa */
}

.btn-paginacion:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    transform: none !important;
    box-shadow: none !important;
}

/* Ajuste sutil para los íconos de flechas */
.btn-paginacion i {
    font-size: 0.85rem;
}