/* ==========================================================================
   1. FUENTES Y VARIABLES GLOBALES (PALETA ECUADOR)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Open+Sans:wght@400;600;700&display=swap');

:root {
    /* Paleta Ecuador */
    --brand-primary: #FFD100;        /* Amarillo Sol / Principal */
    --brand-primary-hover: #E6BC00;  /* Amarillo Hover */
    --brand-yellow-bg: #FEFCE8;     /* Amarillo Crema Suave */
    --brand-blue-dark: #0F172A;      /* Azul Profundo */
    --brand-blue-accent: #1E3A8A;    /* Azul Institucional */
    --brand-red-accent: #DC2626;     /* Rojo Acento Bandera */
    --ecuador-amarillo-light: #FFFBE6; /* Fondo suave para insignias */
 
    
    /* Neutros */
    --bg-gray-light: #F8FAFC;
    --border-color: #E2E8F0;
    --text-main: #334155;
    --text-muted: #64748B;
    
    /* TipografÃ­as */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* PrevenciÃ³n global de desbordamiento horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text-main);
}

/* JerarquÃ­a TipogrÃ¡fica */
h1, h2, h3, h4, h5, h6,
.core-hero-title,
.core-noticia-title,
.core-card-title,
.core-modal-title,
.core-propuesta-eje-title,
.core-agenda-title,
.core-section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--brand-blue-dark);
}

button, input, select, textarea {
    font-family: var(--font-body);
}

/* IntegraciÃ³n con Plyr Player */
.plyr {
    --plyr-color-main: var(--brand-primary) !important;
}

/* Clases de Utilidad */
.text-center { text-align: center; }
.text-blue { color: var(--brand-blue-dark); }
.text-red { color: var(--brand-red-accent); }
.text-yellow { color: var(--brand-primary); }

/* Layout de Contenedores y Secciones */
.core-landing-wrapper {
    font-family: inherit;
    color: var(--text-main);
}

.core-section {
    padding: 60px 20px;
}

.core-container {
    max-width: 1200px;
    margin: 0 auto;
}

.core-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.core-section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.core-section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   2. HERO SLIDER & BANNERS (ANCHO COMPLETO Y GRID)
   ========================================================================== */
.core-hero-section-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.core-landing-wrapper .core-hero-section-wrapper {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.core-hero-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    color: #ffffff;
}

.core-hero-slide {
    display: none;
    padding: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.core-hero-slide.active {
    display: block !important;
    opacity: 1 !important;
}

.core-hero-banner-img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    max-height: 550px;
    object-fit: cover;
}

.core-hero-container,
.core-hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.core-hero-content {
    flex: 1;
}

.core-hero-badge, .core-badge {
    display: inline-block;
    background: var(--brand-red-accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.core-hero-title {
    font-size: 2.8rem;
    margin: 15px 0;
    line-height: 1.2;
}

.core-hero-desc, .core-hero-excerpt {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

.core-hero-actions {
    display: flex;
    gap: 15px;
}

.core-hero-btn, .core-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.core-hero-btn, .core-btn-primary {
    background: var(--brand-primary);
    color: #0F172A !important;
}

.core-hero-btn:hover, .core-btn-primary:hover {
    background: var(--brand-primary-hover);
}

.core-btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main) !important;
}

.core-btn-secondary:hover {
    background-color: #cbd5e1;
}

.core-hero-media {
    flex: 1;
    text-align: center;
}

.core-hero-media img, .core-profile-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.core-img-placeholder {
    width: 100%;
    height: 380px;
    background: var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 600;
}

/* Controles del Slider */
.core-slider-prev, .core-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    z-index: 10;
    transition: background 0.3s ease;
}

.core-slider-prev:hover, .core-slider-next:hover {
    background: var(--brand-blue-dark);
}

.core-slider-prev { left: 20px; }
.core-slider-next { right: 20px; }

.core-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.core-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.core-dot.active {
    background: var(--brand-primary);
    width: 24px;
    border-radius: 6px;
}

/* ==========================================================================
   3. PROPUESTAS Y TABS
   ========================================================================== */
.core-sec-propuestas {
    background-color: #FFFFFF;
    border-left: 6px solid var(--brand-primary);
}

.core-propuestas-tabs-container {
    margin: 30px 0;
}

.core-tabs-header {
    display: flex;
    gap: 10px;
    background-color: var(--bg-gray-light);
    padding: 8px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.core-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 700;
    color: var(--brand-blue-dark);
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    text-transform: uppercase;
    font-size: 14px;
    white-space: nowrap;
}

.core-tab-link:hover {
    background-color: rgba(245, 158, 11, 0.15);
}

.core-tab-link.active {
    background-color: var(--brand-primary);
    color: #0F172A;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.core-tab-panel {
    display: none;
    padding: 30px;
    border-radius: 16px;
}

.core-tab-panel.active {
    display: block;
}

.core-tab-panel:nth-child(odd) {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
}

.core-tab-panel:nth-child(even) {
    background-color: var(--brand-yellow-bg);
    border: 1px solid #FEF08A;
}

.core-propuesta-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 35px;
    align-items: center;
}

.core-propuesta-media img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.core-propuesta-eje-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.core-propuesta-body-content {
    font-size: 16px;
    line-height: 1.7;
}

.core-propuesta-body-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.core-propuesta-body-content li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.core-propuesta-body-content li::before {
    content: "âœ“";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-primary);
    font-weight: 900;
    font-size: 18px;
}

/* Grid de Tarjetas de Propuesta */
.core-propuestas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.core-propuesta-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.core-propuesta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.core-card-icon, .core-propuesta-icon {
    width: 48px;
    height: 48px;
    background-color: #FEF3C7;
    color: var(--brand-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.core-propuesta-sub {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-blue-accent);
    margin-bottom: 5px;
    display: block;
}

.core-propuesta-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
}

.core-propuesta-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.core-propuesta-btn {
    margin-top: auto;
    background: transparent;
    border: none;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color 0.2s ease;
}

.core-propuesta-btn:hover {
    color: var(--brand-primary-hover);
}

/* ==========================================================================
   4. GALERÃA DE VIDEOS Y FOTOS
   ========================================================================== */
.core-sec-galeria {
    background-color: #FFFFFF;
}

.core-galeria-grid, 
.core-galeria-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.core-galeria-grid-3col {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
}

.core-galeria-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--brand-blue-dark);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.core-galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
    opacity: 0.9;
}

.core-galeria-item:hover .core-galeria-img {
    transform: scale(1.06);
    opacity: 1;
}

.core-galeria-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    z-index: 1;
}

.core-play-btn-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 2;
}

.core-play-btn-svg.btn-yellow { color: var(--brand-primary); }
.core-play-btn-svg.btn-red    { color: var(--brand-red-accent); }
.core-play-btn-svg.btn-blue   { color: var(--brand-blue-accent); }

.core-galeria-item:hover .core-play-btn-svg {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--brand-blue-dark);
}

.core-galeria-title {
    margin: 0;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
}

.core-item-hidden {
    display: none !important;
}

.core-galeria-more-container {
    text-align: center;
    margin-top: 30px;
}

.core-btn-ver-mas {
    background: var(--brand-primary);
    color: #0F172A;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.core-btn-ver-mas:hover {
    background: var(--brand-primary);
}

/* ==========================================================================
   5. AGENDA TERRITORIAL
   ========================================================================== */
.core-sec-agenda {
    background-color: var(--bg-gray-light);
    border-left: 6px solid var(--brand-red-accent);
}

.core-agenda-wrapper {
    margin: 20px 0;
}

.core-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.core-agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Tarjeta de Agenda */
.core-agenda-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 20px;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.core-agenda-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Contenedores de Imagen de Agenda */
.core-agenda-img-wrap {
    flex: 0 0 180px;
    max-width: 180px;
    width: 100%;
}

.core-agenda-img, .core-agenda-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.core-agenda-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.core-agenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.core-agenda-badge, .core-agenda-tag {
    background-color: var(--ecuador-amarillo-light) !important;
    color: #b45309 !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    align-self: flex-start;
}

.tag-proximo   { background-color: #e0f2fe !important; color: #0369a1 !important; }
.tag-encurso   { background-color: #dcfce7 !important; color: #15803d !important; }
.tag-finalizado{ background-color: #f1f5f9 !important; color: #64748b !important; }
.tag-cancelado { background-color: #fee2e2 !important; color: #b91c1c !important; }

.core-agenda-meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 6px 0 10px;
}

.core-agenda-title {
    font-size: 1.15rem;
    margin: 0 0 10px 0;
}

.core-agenda-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.core-agenda-footer {
    margin-top: auto;
    padding-top: 10px;
}

.core-agenda-maps-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background-color: var(--brand-blue-accent);
    color: #ffffff !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.core-agenda-maps-btn:hover {
    background-color: var(--brand-blue-dark);
}

/* ==========================================================================
   6. NOTICIAS Y ACTUALIDAD
   ========================================================================== */
.core-sec-noticias {
    background-color: var(--bg-gray-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.core-noticias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--brand-blue-dark);
    padding-bottom: 12px;
    margin-bottom: 28px;
}

.core-noticias-section-title {
    font-size: 1.75rem;
    margin: 0;
    text-transform: uppercase;
    color: var(--brand-blue-dark);
}

.core-noticias-ver-todas {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-blue-accent);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.core-noticias-grid,
.core-noticias-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 20px 0;
}

.core-noticia-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.core-noticia-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.core-noticia-media a,
.core-noticia-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.core-noticia-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.core-noticia-card:hover .core-noticia-img {
    transform: scale(1.04);
}

.core-noticia-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.core-noticia-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-red-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.core-noticia-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 10px 0;
}

.core-noticia-title a {
    color: var(--brand-blue-dark);
    text-decoration: none;
}

.core-noticia-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.core-btn-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
}

.core-btn-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   7. TRAYECTORIA Y BIOGRAFÃA (ACORDEÃ“N Y TIMELINE)
   ========================================================================== */
.core-sec-trayectoria {
    background-color: var(--bg-gray-light);
    border-left: 6px solid var(--brand-blue-dark);
}




.core-timeline-wrapper {
    position: relative;
    padding: 40px 20px 60px 20px;
    margin-bottom: 30px;
}

.core-timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #cbd5e1;
    z-index: 1;
    transform: translateY(-50%);
}

.core-timeline-dots {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.core-timeline-item {
    position: relative;
}

.core-timeline-dot {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--brand-blue-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.core-dot-year {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand-blue-dark);
}

.core-timeline-dot:hover {
    background: var(--brand-blue-accent);
    transform: scale(1.15);
}

.core-timeline-dot:hover .core-dot-year {
    color: #ffffff;
}

.core-timeline-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 220px;
    background: var(--brand-blue-dark);
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    text-align: center;
}

.core-timeline-tooltip strong {
    display: block;
    color: #38bdf8;
    margin-bottom: 4px;
}

.core-timeline-tooltip p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #cbd5e1;
}

.core-timeline-dot:hover .core-timeline-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* AcordeÃ³n */
.core-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.core-accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.core-accordion-header {
    width: 100%;
    padding: 18px 22px;
    background: #ffffff;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-blue-dark);
    cursor: pointer;
    transition: background 0.2s ease;
}

.core-accordion-header:hover {
    background: var(--bg-gray-light);
}

.core-accordion-icon {
    font-size: 1.4rem;
    color: var(--brand-blue-accent);
}

.core-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.core-accordion-item.is-open .core-accordion-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in-out;
}

.core-accordion-body {
    padding: 0 22px 22px 22px;
    border-top: 1px solid #f1f5f9;
}

.core-bio-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.core-bio-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.core-bio-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.core-bio-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}



/* ==========================================================================
   8. FORMULARIO VOLUNTARIADO
   ========================================================================== */
#voluntariado.core-sec-voluntariado,
.core-sec-voluntariado {
    background-color: var(--brand-yellow-bg);
    border-top: 4px solid var(--brand-primary);
    padding-top: 70px;
    padding-bottom: 70px;
}

.core-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.core-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

#core-voluntariado-form button[type="submit"],
.core-btn-submit {
    background: var(--brand-primary) !important;
    color: #0F172A !important;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

#core-voluntariado-form button[type="submit"]:hover,
.core-btn-submit:hover {
    background: var(--brand-primary-hover) !important;
}

/* ==========================================================================
   9. MODALES / POPUPS
   ========================================================================== */
.core-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.core-modal.is-open,
.core-modal.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.core-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.core-modal-container {
    position: relative;
    background: #FFFFFF;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 32px;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.core-modal.is-open .core-modal-container,
.core-modal.is-active .core-modal-container {
    transform: translateY(0);
}

.core-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
}

.core-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.core-modal-icon { font-size: 2.5rem; }
.core-modal-header h2 { margin: 0; font-size: 1.5rem; }

.core-modal-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.core-modal-body {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
}

/* ==========================================================================
   10. ADAPTACIONES MÃ“VILES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 992px) {
    .core-galeria-grid-3col {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .core-hero-container,
    .core-hero-grid,
    .core-propuesta-item,
    .core-trayectoria-grid,
    .core-galeria-grid-2x2,
    .core-noticias-grid-3,
    .core-noticias-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        text-align: center;
    }

    .core-hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .core-hero-title {
        font-size: 2.1rem;
    }

    .core-tabs-header {
        justify-content: flex-start;
    }

    .core-modal-container {
        padding: 20px;
    }

    /* ModificaciÃ³n responsiva de Agenda */
    .core-agenda-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .core-agenda-img-wrap {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .core-agenda-img, .core-agenda-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .core-galeria-grid-3col {
        grid-template-columns: 1fr !important;
    }
}

/* Ajusta los SVG dentro de las pestaÃ±as */
.tab-item svg, 
.nav-item svg {
  width: 32px; /* O el tamaÃ±o deseado: 24px, 40px, etc. */
  height: 32px;
  max-width: 100%;
  display: block;
  margin: 0 auto 8px auto; /* Centra el icono respecto al texto */
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 15px;
}

.tabs-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  overflow-x: auto; /* O 'hidden' si son pocos Ã­tems y deben encajar exactamente */
}

/* Forzar tamaÃ±o y proporciÃ³n del SVG en todas las pestaÃ±as */
/* Selector especÃ­fico para aislar solo la barra de propuestas */
.propuesta-tab svg,
.propuestas-tabs svg,
div[class*="propuesta"] svg,
ul[class*="propuesta"] svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin: 0 auto 6px auto !important;
}

/* Restablecer o proteger los iconos de redes sociales de Blocksy por si acaso */
.ct-header-socials svg,
.ct-footer-socials svg,
[data-id*="socials"] svg {
  width: var(--theme-icon-size, 1em) !important;
  height: var(--theme-icon-size, 1em) !important;
  max-width: none !important;
  max-height: none !important;
}

/* ==========================================================================
   OPTIMIZACIÃ“N DE PESTAÃ‘AS DE PROPUESTAS PARA MÃ“VIL (GRID 2x2)
   ========================================================================== */
@media (max-width: 768px) {
  
  /* Contenedor principal de las pestaÃ±as */
  .core-tabs-header,
  .tabs-container,
  .propuestas-tabs,
  ul[class*="propuesta"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columnas iguales */
    gap: 10px !important;                             /* Espacio entre pestaÃ±as */
    padding: 10px !important;
    overflow-x: visible !important;                   /* Elimina el scroll horizontal */
    white-space: normal !important;                   /* Permite que el texto se ajuste */
  }

  /* Cada pestaÃ±a individual dentro del Grid */
  .core-tab-link,
  .tab-item,
  .nav-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 12px 8px !important;
    font-size: 0.75rem !important;                    /* TamaÃ±o de texto legible en mÃ³vil */
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }

  /* Control del tamaÃ±o del SVG en mÃ³vil */
  .core-tab-link svg,
  .tab-item svg,
  div[class*="propuesta"] svg,
  ul[class*="propuesta"] svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 0 6px 0 !important;
    flex-shrink: 0 !important;
  }
}

/* --- CONTENEDOR PRINCIPAL Y GRID --- */
.core-biografia-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* GRID AJUSTADO: MÃ¡s espacio a la izquierda, foto mÃ¡s angosta y pegada a la derecha */
.core-trayectoria-grid {
    display: grid !important;
    /* 1fr le da todo el ancho posible al contenido; 280px fija la foto a la derecha */
    grid-template-columns: 1fr 280px !important; 
    gap: 2rem !important; /* Reduce un poco la separaciÃ³n entre columnas */
    align-items: start !important;
}

/* Columna izquierda (Timeline + AcordeÃ³n) */
.core-trayectoria-content {
    order: 1 !important;
    width: 100% !important; /* Asegura que tome todo el espacio disponible */
}

@media (max-width: 768px) {
    .core-trayectoria-grid {
        grid-template-columns: 1fr !important; /* En mÃ³viles pasa a 1 sola columna */
        gap: 1.5rem !important;
    }
    .core-trayectoria-media {
        order: 1 !important; /* En mÃ³viles la foto se mantiene arriba */
        justify-self: center !important;
    }

    .core-profile-img {
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .core-trayectoria-content {
        order: 2 !important; /* El contenido queda abajo */
    }
}

/* --- ESTILOS DE LA IMAGEN --- */
/* Columna derecha (Imagen) */
.core-trayectoria-media {
    order: 2 !important;
    position: sticky !important;
    top: 20px;
    justify-self: end !important; /* Forzado de alineaciÃ³n total a la derecha */
    width: 100% !important;
}

.core-profile-img {
    width: 100% !important;
    max-width: 280px !important; /* Ancho mÃ¡ximo para la foto */
    height: auto !important;
    display: block !important;
    margin-left: auto !important; /* Empuja la imagen al borde derecho absoluto */
}

/* --- LÃNEA DE TIEMPO INTERACTIVA (TIMELINE) --- */
.core-timeline-wrapper {
    position: relative;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.core-timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.core-timeline-dots {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.core-timeline-item {
    position: relative;
}

.core-timeline-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.core-timeline-dot:hover {
    transform: scale(1.15);
    background: #0369a1;
}

.core-dot-year {
    font-size: 0.75rem;
    font-weight: bold;
}

/* Tooltip en hover sobre los cÃ­rculos del timeline */
.core-timeline-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.core-timeline-tooltip strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #38bdf8;
}

.core-timeline-tooltip p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.core-timeline-dot:hover .core-timeline-tooltip {
    visibility: visible;
    opacity: 1;
}

/* --- ACORDEÃ“N DESPLEGABLE --- */
.core-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.core-accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.core-accordion-header {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.core-accordion-header:hover {
    background: #f1f5f9;
}

.core-accordion-icon {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0284c7;
}

.core-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.core-accordion-item.is-open .core-accordion-content {
    max-height: 10000px; /* Permite mostrar el contenido completo */
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.core-accordion-body {
    padding: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* --- LISTA INTERNA DEL ACORDEÃ“N --- */
.core-bio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.core-bio-list li {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

.core-bio-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}



.core-bio-desc {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
}

/* Previene que palabras largas o tÃ­tulos rompan el layout en mÃ³viles */
.core-trayectoria-grid,
.core-accordion-wrapper,
.core-accordion-header,
.core-bio-desc {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Fuerza a los botones del acordeÃ³n a adaptar su alto si el texto es largo */
.core-accordion-header {
    white-space: normal; /* Permite que el texto salte de lÃ­nea */
    height: auto;
    line-height: 1.4;
}

/* En pantallas mÃ³viles reduce ligeramente el padding para ganar espacio */
@media (max-width: 768px) {
    .core-accordion-header {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
}

/* 1. Remover el estado activo/seleccionado permanente que WordPress le asigna a los enlaces /# en el Home */
.home .menu-item[class*="current"] > a[href*="/#"] {
    background-color: transparent !important;
    color: inherit !important;
}

/* 2. Forzar tu diseÃ±o exacto de hover (Fondo amarillo y texto #0F172A) al pasar el mouse por los enlaces /# */
.menu-item a[href*="/#"]:hover,
.home .menu-item a[href*="/#"]:hover {
    background-color: var(--brand-primary-hover, #E6BC00) !important;
    color: #0F172A !important;
    transition: all 0.3s ease;
}

/* --- FIXES PARA MÓVIL (Biografía e Hitos) --- */
@media (max-width: 768px) {
    /* Corregir imagen tirada a la derecha y tamaño grande */
    .core-trayectoria-grid {
        grid-template-columns: 100% !important; /* Fuerza 1 columna y previene overflow de grid */
        max-width: 100vw !important;
        overflow: hidden !important; /* Corta overflow global de esta sección */
        text-align: left !important;
    }
    .core-trayectoria-media {
        order: 1 !important;
        position: static !important;
        justify-self: center !important;
    }
    .core-profile-img {
        max-width: 250px !important; /* Hace la foto más pequeña */
        margin-left: 0 !important;
        margin: 0 auto !important;
    }
    .core-trayectoria-content {
        order: 2 !important;
        min-width: 0 !important; /* Permite a los hijos scrollear sin estirar la columna de grid */
        width: 100% !important;
        text-align: left !important;
    }
    
    /* Mejorar el timeline (círculos) con scroll horizontal y tamaño adecuado */
    .core-timeline-wrapper {
        overflow-x: auto !important; /* Fuerza el scroll */
        padding-top: 60px !important; /* Espacio superior para que el tooltip no se corte en móvil */
        padding-bottom: 25px !important; /* Espacio para scrollbar */
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        display: block !important;
    }
    .core-timeline-dots {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 25px !important;
        min-width: max-content !important;
        position: relative;
    }
    .core-timeline-dot {
        width: 46px !important;
        height: 46px !important;
        flex-shrink: 0 !important;
    }
    .core-dot-year {
        font-size: 0.8rem !important;
    }
    .core-timeline-line {
        display: none !important;
    }
    .core-timeline-dots::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 3px;
        background: #e2e8f0;
        z-index: -1;
        transform: translateY(-50%);
    }

    .core-bio-list li {
        text-align: left !important;
    }
}

/* --- FIX PARA COLORES DE CÍRCULOS Y TOOLTIPS COMPLETOS --- */
.core-timeline-dot, .core-dot-year {
    color: #ffffff !important;
}
.core-timeline-dot:hover, .core-timeline-dot.active, .core-dot-year:hover {
    color: #ffffff !important;
}

/* Evitar que los tooltips se corten y hacerlos más anchos para el texto nuevo */
.core-timeline-tooltip {
    width: 280px !important; /* Más ancho para las 35 palabras */
    white-space: normal;
    text-align: left !important;
}

/* En el primer elemento (izquierda), alinear el tooltip a la izquierda */
.core-timeline-item:first-child .core-timeline-tooltip {
    left: 0 !important;
    transform: translateY(0) !important;
}

/* En el último elemento (derecha), alinear el tooltip a la derecha */
.core-timeline-item:last-child .core-timeline-tooltip {
    left: auto !important;
    right: 0 !important;
    transform: translateY(0) !important;
}

/* Ajustar márgenes para que el tooltip se vea bien sin transformX en los extremos */
.core-timeline-item:first-child .core-timeline-dot:hover .core-timeline-tooltip {
    transform: translateY(0) !important;
}
.core-timeline-item:last-child .core-timeline-dot:hover .core-timeline-tooltip {
    transform: translateY(0) !important;
}

/* --- FIXES GLOBALES PARA TIMELINE (ESCRITORIO Y MÓVIL) --- */
.core-timeline-wrapper {
    overflow-x: auto !important; 
    padding-top: 240px !important; /* Espacio superior para tooltips largos */
    padding-bottom: 25px !important; 
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    display: block !important;
    margin-top: -140px !important; /* Compensa el padding extra arriba para no dejar tanto hueco */
}
.core-timeline-dots {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 30px !important;
    min-width: max-content !important;
    position: relative;
    padding: 0 10px; /* Margen interior */
}
.core-timeline-dot {
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0 !important;
}
.core-timeline-line {
    display: none !important;
}
.core-timeline-dots::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    z-index: -1;
    transform: translateY(-50%);
}

/* Tooltip fixes para que no se corten */
.core-timeline-tooltip {
    width: 320px !important; 
    white-space: normal;
    text-align: left !important;
    bottom: 135% !important;
}

/* Primer y segundo elemento - alineados a la izquierda para no cortar */
.core-timeline-item:first-child .core-timeline-tooltip {
    left: 0 !important;
    transform: translateY(0) !important;
}
.core-timeline-item:nth-child(2) .core-timeline-tooltip {
    left: 0 !important;
    transform: translateY(0) !important;
}
.core-timeline-item:nth-child(3) .core-timeline-tooltip {
    left: 0 !important;
    transform: translateY(0) !important;
}

/* Último y penúltimo elemento - alineados a la derecha */
.core-timeline-item:last-child .core-timeline-tooltip {
    left: auto !important;
    right: 0 !important;
    transform: translateY(0) !important;
}
.core-timeline-item:nth-last-child(2) .core-timeline-tooltip {
    left: auto !important;
    right: 0 !important;
    transform: translateY(0) !important;
}
.core-timeline-item:nth-last-child(3) .core-timeline-tooltip {
    left: auto !important;
    right: 0 !important;
    transform: translateY(0) !important;
}

/* Para prevenir overflow del contenedor principal en desktop */
.core-trayectoria-content {
    min-width: 0 !important; 
}
