:root {
    --green-primary: #4bb63a;
    /* color principal */
    --green-footer: #287225;
    /* footer */
    --green-dark: #245d1b;
    /* textos oscuros */
    --green-news: #2bc825;
    /* sección noticias */
    --white: #ffffff;
    --black: #333;
    --light-bg: #f0f0f0;
    --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
}
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    outline: none;
    border: none;
    text-decoration: none;
    transition: .2s linear;
}
@media (max-width: 991px) {
    html {
        font-size: 90%;
    }

    .header {
        padding: 1rem 4%; 
    }

    section {
        padding: 60px 5% !important; 
    }

    .main-title {
        font-size: 1.8rem;
    }
}
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 6%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between; 
    box-shadow: var(--box-shadow);
    z-index: 1000;
}
.menu-icon {
    font-size: 2.2rem;
    color: var(--black);
    cursor: pointer;
    display: none; 
}


.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 3rem;
    color: var(--black);
    font-weight: 500;
    font-size: .9rem;
}

.nav a {
    color: var(--black);
    font-weight: 500;
    text-transform: uppercase;
}


.nav a:hover,
.nav a.active {
    color: var(--green-primary);
    font-weight: 600;
}


body {
    padding-top: 80px;
    animation: page-enter 0.45s ease-out both;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}

.hero {
    position: relative;
    width: 100%;
    min-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
}

.hero-img.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(1, 33, 1, 0.956), rgba(0, 100, 0, 0));
    z-index: 2;
}

.hero-text {
    position: relative;
    z-index: 3;
    color: var(--white);
    max-width: 870px;

}

.hero-text h1 {
    font-size: clamp(1.8rem, 5vw + 1rem, 3.5rem);
    text-transform: uppercase;
    line-height: 1.2;

}

.hero-text p {
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}


.btn {
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
    border: 2px solid var(--green-primary);
    background: transparent;
    border-radius: 5px;
    transition: 0.3s;
}

.btn:hover {
    background: var(--green-primary);
    color: var(--white);
}

/* Botones de carrusel */
.hero-buttons {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: .5rem;
    z-index: 4;
}

.carousel-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.carousel-btn.active {
    background: var(--green-primary);
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        display: none; 
        flex-direction: column;
        gap: 0;
        box-shadow: var(--box-shadow);
        border-top: 1px solid #eee;
        align-items: center;
        text-align: center;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        width: 100%;
        padding: 1.5rem;
        border-bottom: 1px solid #f5f5f5;
        font-size: 1rem;
        justify-content: center;
    }

    body {
        padding-top: 70px; 
    }
}

.about {
    padding: 100px 7%;
    background: var(--white);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.about-images {
    position: relative;
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
}


.green-dots-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;

}
.dot-pattern {
    position: absolute;
    width: 60px;
    height: 40px;
    background-image: radial-gradient(var(--green-primary) 2px, transparent 2px);
    background-size: 10px 10px;
}

.dot-top-right {
    top: 35%;
    right: 10%;
}

.dot-bottom-left {
    bottom: 25%;
    left: 1%;
}

.img-back {
    width: 80%;
    height: 70%;
    object-fit: cover;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.img-front {
    width: 90%;
    height: 60%;
    object-fit: cover;
    border-radius: 2px;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.main-title {
    font-size: 2.1rem;
    margin-bottom: 30px;
}

.text-item {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #161616;
    margin-top: 5px;
    margin-bottom: 5px;
    font-weight: 550;
}

.linea-verde-horizontal {
    width: 100%;
    max-width: 70px;
    height: 3px;
    background-color: var(--green-primary);
    margin: 8px 0 15px 0;
}

.bloque-vertical-verde .section-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bloque-vertical-verde .section-subtitle::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background-color: var(--green-primary);
}

.linea-separadora-gris {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 18px 0;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.45;
    color: #555;
    text-transform: none;

}

.btn-more {
    display: inline-block;
    margin-top: 20px;
    color: var(--green-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.btn-more:hover {
    color: var(--green-dark);
    text-decoration: underline;
}
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-images {
        min-height: 400px; 
        margin-top: 30px;
    }
    
    .img-back {
        width: 70%;
        height: 250px;
        object-fit: cover;
    }
    
    .img-front {
        width: 70%;
        height: 220px;
        bottom: 10%;
        right: 5%;
        object-fit: cover;
    }
    .dot-top-right {
        top: 32%;
        right: 4%;
    }

    .dot-bottom-left {
        bottom: 8%;
        left: 19%;
    }
    
}

.stats {
    background-color: #fafff9;
    padding: 50px 7%;
    width: 100%;
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    line-height: 1;
    text-align: center;
}

.stat-info .plus {
    color: var(--green-primary);
    margin-left: 2px;
}

.stat-info p {
    font-size: 0.95rem;
    font-weight: 500;
    color: #161616;
    line-height: 1.2;
}

.legal-text {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
}


@media (max-width: 991px) {
    .stats-container {
        justify-content: center;
        gap: 50px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        width: 100%; 
        flex-direction: column; 
        justify-content: center; 
        align-items: center;  
        text-align: center;
        padding-left: 0;  
        gap: 10px;
    }
    .stat-info h3 {
        text-align: center;
    }
}
/* --- SECCIÓN LOGROS --- */
.logros {
    position: relative;
    padding: 100px 7%;
    width: 100%;
    min-height: 600px;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
        url('../img/logros.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
}

.logros-overlay {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
   
}

.titulo-logros {
    color: var(--white);
    font-size: 2.2rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
}

.linea-decorativa {
    width: 60px;
    height: 4px;
    background: var(--green-primary);
    margin-bottom: 50px;
}

/* --- CONTENEDOR DE TARJETAS --- */
.logros-container {
    display: grid;
      grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    gap: 20px;
    width: 100%;

}

.logro-card {
    background: var(--white);
    padding: 20px;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: auto;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    height: 100%; 
    aspect-ratio: auto; 
    min-height: 250px; 
    display: flex;
    flex-direction: column;
 
}

.logro-icon {
    height: 35px;
    width: auto;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: filter 0.3s;
}

.logro-card:first-child:not(:hover) .logro-icon {
    filter: brightness(0) saturate(100%) invert(59%) sepia(19%) saturate(1965%) hue-rotate(66deg) brightness(91%) contrast(87%);
}

.logro-card h3 {
    color: var(--green-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.logro-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.logro-lista li {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.4;
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
    transition: color 0.3s;
}

.logro-lista li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--green-primary);
    font-weight: bold;
    font-size: 1.1rem;
}

.logro-card:hover {
    background: var(--green-primary);
}

@media (hover: hover) {
    .logro-card:hover {
        transform: translateY(-5px) scale(1.02);
    }
}

.logro-card:hover h3,
.logro-card:hover .logro-lista li,
.logro-card:hover .logro-lista li::before {
    color: var(--white);
}


.logro-card:hover .logro-icon {
    filter: brightness(0) invert(1);
}

.leer-mas-btn {
    margin-top: 50px;
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
}

.leer-mas-btn:hover {
    color: var(--green-primary);
    border-bottom: 2px solid var(--green-primary);
}

@media (max-width: 1200px) {
    .logros-container {
        grid-template-columns: repeat(3, 1fr); 
        gap: 15px;
    }
}


@media (max-width: 768px) {
    .logros-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .titulo-logros {
        font-size: 1.8rem;
    }
}
 
@media (max-width: 480px) {
    .logros-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .logro-card {
        aspect-ratio: auto; 
        min-height: 200px;
        padding: 30px 20px;
    }

    .dot-pattern {
        width: 50px;
        height: 35px;
        background-size: 9px 9px;
    }

    .dot-top-right {
        right: 2%;
    }

    .dot-bottom-left {
        left: 17%;
        bottom: 10%;
    }
}

/* --- SECCIÓN NOTICIAS --- */
.noticias {
    padding: 100px 7%; 
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.noticias-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
}

.titulo-noticias {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.linea-decorativa-centro {
    width: 60px;
    height: 4px;
    background: var(--green-primary);
    margin: 0 auto 20px auto; 
}

.subtitulo-noticias {
    font-size: 1rem;
    color: #666;
    margin-top: 15px;
}
.noticias-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    margin-bottom: 60px;
}

.noticia-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent; 
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    border-bottom: 4px solid var(--green-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
@media (hover: hover) {
    .noticia-card:hover {
        transform: translateY(-10px);
    }
}

.img-box {
    width: 100%;
    height: 250px; 
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center 38%;
    transition: transform 0.5s ease;
}
.img-box img.obj-left {
  object-position: 10% center;
}

.noticia-card:hover .img-box img {
    transform: scale(1.1); 
}

.noticia-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.noticia-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}

.icono-fecha {
    height: 15px; 
    width: auto;
    object-fit: contain;
    
    filter: grayscale(100%); 
    opacity: 0.5; 

    vertical-align: middle; 
}

.noticia-content h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.4;
}

.noticia-content p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.leer-mas-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.leer-mas-link i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.leer-mas-link:hover {
    color: var(--green-primary);
}
.leer-mas-link:hover i {
    transform: translateX(5px);
}

.noticias-footer {
    display: flex;
    justify-content: center;
}

.btn-ver-todas {
    background: var(--green-footer); 
    color: var(--white);
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-ver-todas:hover {
    background: var(--green-primary); 
}

@media (max-width: 768px) {
    .noticias {
        padding: 80px 5%;
    }
    .titulo-noticias {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .noticia-card:active {
        transform: scale(0.98);
        background-color: #f9f9f9; 
    }

    .noticia-card:hover {
        transform: none; 
    }
}
/* --- FOOTER --- */
.footer {
    background: var(--green-footer);
    color: white;
    padding: 60px 7% 20px;
    font-size: 0.85rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr; 
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 40px;
    align-items: start;
}

.f-col:first-child {
    text-align: justify;
    max-width: 350px; 
}

.f-logo {
    height: 50px;
    margin-bottom: 20px;
    
}

.f-col h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: white;
}

.f-col a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-bottom: 12px;
    transition: 0.3s;
}

.f-col a:hover {
    color: white;
    padding-left: 5px; 
}

.f-col:last-child p {
    margin-bottom: 18px; 
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.f-col strong {
    color: white; 
    display: inline-block;
    min-width: 75px;
}

.f-bottom {
    max-width: 1200px; 
    margin: 0 auto;    
    padding-top: 20px;
    text-align: left;
}

.f-bottom p {
    font-size: 0.75rem;
    opacity: 0.5;
    padding-left: 0; 
}

.footer .contact-social {
    margin-top: 20px; 
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer .contact-social svg.footer-social-icon {
    width: 28px;
    height: 28px;
    display: block;
    transition: transform 0.3s ease;
}

.footer .contact-social img {
    width: 28px;
    height: 28px;
    display: block;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.footer .contact-social a:hover svg.footer-social-icon,
.footer .contact-social a:hover img {
    transform: scale(1.08);
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
    }

    .f-col:first-child {
        text-align: left; 
        max-width: 100%;
    }

    .f-col:last-child {
        text-align: left;
    }

    .f-bottom {
        text-align: center; 
    }
}

/* --- PÁGINA SOBRE NOSOTROS --- */
.about-page {
    color: #202020;
}

.section-shell {
    width: min(100% - 12vw, 1180px);
    margin: 0 auto;
}

.about-story {
    padding: clamp(70px, 9vw, 130px) 0;
    background: var(--white);
    scroll-margin-top: 95px;
}

.about-story__content {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(280px, .72fr);
    align-items: center;
    gap: clamp(40px, 8vw, 130px);
}

.about-story__copy {
    max-width: 700px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 8px;
    border-radius: 2px;
    background: var(--green-primary);
    color: var(--white);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.5;
    text-transform: uppercase;
}

.about-story .eyebrow {
    color: var(--white);
}

.about-story h1,
.purpose-section h2 {
    color: var(--green-primary);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
}

.title-rule {
    width: 46px;
    height: 2px;
    margin: 11px 0 20px;
    background: var(--green-primary);
}

.about-story p,
.purpose-section p {
    color: #303030;
    font-size: clamp(.76rem, 1vw, .91rem);
    line-height: 1.52;
}

.about-story p + p {
    margin-top: 13px;
}

.about-story__image,
.purpose-section__image {
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 7px 15px rgba(0, 0, 0, .16);
}

.about-story__image img,
.purpose-section__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-story__image {
    align-self: center;
    aspect-ratio: .98 / 1;
}

.purpose-section {
    padding: clamp(60px, 8vw, 110px) 0;
    background: #f8fff5;
}

.purpose-section__content {
    display: grid;
    grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr);
    gap: clamp(40px, 7vw, 100px);
    align-items: center;
}

.purpose-section__image {
    aspect-ratio: 1.35 / 1;
}

.purpose-section__copy {
    max-width: 680px;
}

.purpose-section__copy article + article {
    margin-top: 22px;
}

.purpose-section h2 {
    margin-bottom: 9px;
    text-align: right;
}

.eyebrow--right {
    display: table;
    margin: 0 0 3px auto;
}

.purpose-section .eyebrow {
    color: var(--white);
}

.purpose-section__copy article p,
.purpose-section__closing {
    text-align: justify;
}

.purpose-section__closing {
    margin-top: 22px;
}

.about-page .stats {
    padding: 54px 7%;
    background: var(--white);
}

.about-page .stats-container {
    gap: clamp(26px, 5vw, 74px);
}

.about-page .stat-icon {
    height: 45px;
}

.about-logros {
    position: relative;
    padding: clamp(75px, 9vw, 120px) 0;
    scroll-margin-top: 95px;
    background:
        linear-gradient(rgba(4, 6, 4, .82), rgba(4, 6, 4, .82)),
        url('../img/logros.jpg') center / cover no-repeat;
    background-attachment: fixed;
}

.about-logros__overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-logros h2 {
    color: var(--white);
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.about-logros .linea-decorativa {
    margin: 10px 0 42px;
}

.about-logros__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px clamp(28px, 7vw, 110px);
    width: 100%;
}

.achievement-card {
    min-height: 210px;
    padding: 27px clamp(25px, 4vw, 55px);
    border-radius: 2px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
    color: #242424;
    cursor: pointer;
    text-align: center;
}

.achievement-card--featured {
    background: var(--green-primary);
    color: var(--white);
}

.achievement-card--wide {
    grid-column: 1 / -1;
    width: min(100%, 850px);
    justify-self: center;
}

.achievement-card__icon {
    display: block;
    width: 29px;
    height: 29px;
    margin: 0 auto 12px;
    object-fit: contain;
}

.achievement-card:not(.achievement-card--featured) .achievement-card__icon {
    filter: none;
}

.about-logros__grid .achievement-card:first-child:not(:hover):not(.is-highlighted) .achievement-card__icon {
    filter: brightness(0) saturate(100%) invert(59%) sepia(19%) saturate(1965%) hue-rotate(66deg) brightness(91%) contrast(87%);
}

.achievement-card--featured .achievement-card__icon {
    filter: brightness(0) invert(1);
}

.achievement-card h3 {
    margin-bottom: 12px;
    color: var(--green-primary);
    font-size: .93rem;
    font-weight: 600;
}

.achievement-card--featured h3 {
    color: var(--white);
}

.achievement-card p {
    font-size: clamp(.62rem, .78vw, .74rem);
    line-height: 1.48;
}

.achievement-card:hover,
.achievement-card.is-highlighted {
    background: var(--green-primary);
    color: var(--white);
    transform: translateY(-5px);
}

.achievement-card:hover h3,
.achievement-card.is-highlighted h3,
.achievement-card:hover p,
.achievement-card.is-highlighted p {
    color: var(--white);
}

.achievement-card:hover .achievement-card__icon,
.achievement-card.is-highlighted .achievement-card__icon {
    filter: brightness(0) invert(1);
}

.achievement-card:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 5px;
}

.board-section {
    padding: clamp(70px, 9vw, 120px) 0 clamp(80px, 11vw, 150px);
}

.board-section__heading {
    margin: 0 auto clamp(34px, 5vw, 58px);
    text-align: center;
}

.board-section h2 {
    color: #2f7f2d;
    font-size: clamp(1.3rem, 2.15vw, 1.85rem);
    font-weight: 600;
    text-transform: uppercase;
}

.board-section__line {
    width: min(100%, 840px);
    height: 1px;
    margin: 18px auto 0;
    background: var(--green-primary);
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px clamp(28px, 6vw, 88px);
    width: min(100%, 1000px);
    margin: 0 auto;
}

.board-card {
    position: relative;
    min-height: 142px;
    padding: 18px 16px;
    border-radius: 2px;
    background: var(--white);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .13);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.board-card h3 {
    color: #272727;
    font-size: .93rem;
    font-weight: 600;
    line-height: 1.18;
}

.board-card p {
    margin-top: 14px;
    color: #a7adba;
    font-size: .66rem;
}

.board-card:hover,
.board-card.is-highlighted,
.board-card.is-selected {
    background: var(--green-primary);
    border-bottom-color: var(--green-dark);
    box-shadow: 0 12px 22px rgba(37, 93, 27, .26);
    transform: translateY(-5px);
}

.board-card:hover h3,
.board-card.is-highlighted h3,
.board-card.is-selected h3,
.board-card:hover p,
.board-card.is-highlighted p,
.board-card.is-selected p {
    color: var(--white);
}

.board-card:focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: 5px;
}

@media (max-width: 850px) {
    .section-shell {
        width: min(100% - 10vw, 1180px);
    }

    .about-story__content,
    .purpose-section__content {
        grid-template-columns: 1fr;
    }

    .about-story__image {
        width: min(100%, 460px);
        justify-self: center;
    }

    .purpose-section__image {
        width: min(100%, 600px);
        justify-self: center;
        order: 2;
    }

    .purpose-section__copy {
        max-width: none;
        order: 1;
    }

    .board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .about-story,
    .purpose-section {
        padding: 60px 0;
    }

    .about-story__content,
    .purpose-section__content {
        gap: 34px;
    }

    .about-story p,
    .purpose-section p {
        font-size: .8rem;
        text-align: left;
    }

    .purpose-section h2,
    .eyebrow--right {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    .about-logros__grid,
    .board-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card--wide {
        grid-column: auto;
    }

    .achievement-card {
        min-height: auto;
    }

    .board-card {
        min-height: 118px;
    }
}


@media (hover: none) {
    .nav a:hover:not(.active) {
        color: var(--black);
        font-weight: 500;
    }

    .nav a:active:not(.active) {
        color: var(--green-primary);
    }

    .btn:hover {
        background: transparent;
        color: var(--white);
    }

    .btn:active {
        background: var(--green-primary);
    }

    .btn-more:hover {
        color: var(--green-primary);
        text-decoration: none;
    }

    .btn-more:active,
    .leer-mas-link:active {
        color: var(--green-dark);
        text-decoration: underline;
    }

    .logro-card:hover {
        background: var(--white);
        transform: none;
    }

    .logro-card:hover h3 {
        color: var(--green-primary);
    }

    .logro-card:hover .logro-lista li {
        color: #444;
    }

    .logro-card:hover .logro-lista li::before {
        color: var(--green-primary);
    }

    .logro-card:hover .logro-icon {
        filter: none;
    }

    .logro-card:first-child:hover .logro-icon {
        filter: brightness(0) saturate(100%) invert(59%) sepia(19%) saturate(1965%) hue-rotate(66deg) brightness(91%) contrast(87%);
    }

    .logro-card:active {
        background: var(--green-primary);
        transform: scale(.98);
    }

    .logro-card:active h3,
    .logro-card:active .logro-lista li,
    .logro-card:active .logro-lista li::before {
        color: var(--white);
    }

    .logro-card:active .logro-icon {
        filter: brightness(0) invert(1);
    }

    .leer-mas-btn:hover {
        color: var(--white);
        border-bottom-color: transparent;
    }

    .leer-mas-btn:active {
        color: var(--green-primary);
        border-bottom-color: var(--green-primary);
    }

    .noticia-card:hover {
        border-bottom-color: transparent;
        box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
        transform: none;
    }

    .noticia-card:hover .img-box img {
        transform: none;
    }

    .noticia-card:hover .leer-mas-link {
        color: #333;
    }

    .noticia-card:hover .leer-mas-link i {
        transform: none;
    }

    .noticia-card:active {
        border-bottom-color: var(--green-primary);
        transform: scale(.98);
    }

    .btn-ver-todas:hover {
        background: var(--green-footer);
    }

    .btn-ver-todas:active {
        background: var(--green-primary);
        transform: scale(.98);
    }

    .f-col a:hover {
        color: rgba(255, 255, 255, .8);
        padding-left: 0;
    }

    .f-col a:active {
        color: var(--white);
    }

    .achievement-card:hover {
        background: rgba(255, 255, 255, .98);
        color: #242424;
        transform: none;
    }

    .achievement-card:hover h3 {
        color: var(--green-primary);
    }

    .achievement-card:hover p {
        color: #242424;
    }

    .achievement-card:hover .achievement-card__icon {
        filter: none;
    }

    .about-logros__grid .achievement-card:first-child:hover .achievement-card__icon {
        filter: brightness(0) saturate(100%) invert(59%) sepia(19%) saturate(1965%) hue-rotate(66deg) brightness(91%) contrast(87%);
    }

    .board-card:hover {
        background: var(--white);
        border-bottom-color: transparent;
        box-shadow: 0 3px 8px rgba(0, 0, 0, .13);
        transform: none;
    }

    .board-card:hover h3 {
        color: #272727;
    }

    .board-card:hover p {
        color: #a7adba;
    }
}

@media (max-width: 768px) {
    .about-logros {
        background-attachment: scroll;
    }
}

/* --- PÁGINA SOBRE NOTICIAS Y EVENTOS --- */

.news-page {
  padding: 100px 7%;
  background: #fff;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 80px;
  max-width: 1180px;
  margin: auto;
}

.news-feed h1 {
  color: #333;
  font-size: 2rem;
}

.news-line {
  width: 50px;
  height: 3px;
  margin: 10px 0 35px;
  background: var(--green-primary);
}

.news-article {
  margin-bottom: 85px;
  scroll-margin-top: 100px;
}
.news-article.fade-in{
    animation:newsFade .5s ease;
}

@keyframes newsFade{

    from{
        opacity:0;
        transform:translateY(30px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

.news-article > img {
  width: 100%;
  aspect-ratio: 1.777/1;
  object-fit: cover;
  object-position: center 42%;
}
.news-article > img.obj-left {
  object-position: 10% center;
}
.news-article > img.aspect-tall {
  aspect-ratio: 4 / 3;
}

.news-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0 12px;
  font-size: .7rem;
  color: #999;
}

.news-meta-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: .62;
  filter: grayscale(100%);
}

.news-meta span {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--green-primary);
  color: white;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
}

.news-article h2 {
  color: #4c4c4c;
  font-size: 1.2rem;
}

.news-article p {
  margin-top: 8px;
  color: #727272;
  font-size: .85rem;
  line-height: 1.5;
}

.share {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color:#4c4c4c;
  font-weight: 600;
}

.share a {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: transparent;
}

.share a img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-sidebar {
  padding-top: 82px;
}

#news-search-form {
  display: flex;
  height: 34px;
  margin-bottom: 8px;
}

.search-field {
  position: relative;
  width: 100%;
}

#news-search {
  width: 100%;
  height: 100%;
  padding: 0 30px 0 10px; 
  border: 1px solid #b8eab1;
  box-sizing: border-box;
}

#news-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

#news-search-clear:hover {
  color: #4c4c4c;
}

#news-count {
  margin: 0 0 20px;
  font-size: .75rem;
  color: #8a8a8a;
}

.news-article mark,
#news-count mark {
  background: #fff1a8;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

#news-search-form > button,
.news-filter {
  background: var(--green-primary);
  color: white;
  cursor: pointer;
}

#news-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
#news-search-form button {
  padding: 0 12px;
  font-size: .7rem;
}

#news-search-form button img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.sidebar-box {
  margin-top: 20px;
  padding: 15px;
  background: #f0f7e7;
}

.sidebar-box h2 {
 display: flex;
 justify-content: space-between;
 align-items: center;

 font-size: .8rem;
 font-weight: 600;
 color: #242424;

 padding-bottom: 12px;
 margin-bottom: 15px;

 border-bottom: 2px solid #d9dde2;
}

.sidebar-box h2 img {
  width: 17px;
  height: 17px;
  margin: 0;
}

.sidebar-box a {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 11px 0;
  color: #4c4c4c;
  text-decoration: none;
}
.sidebar-box a > div {
  display: flex;
  flex-direction: column;
}

.sidebar-box a span {
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.2;
  color: #4c4c4c;
}

.sidebar-box a small {
  margin-top: 4px;
  font-size: .65rem;
  color: #999;
}

.sidebar-box a > img {
  width: 39px;
  height: 31px;
  object-fit: cover;
}

.news-filter {
  display: block;
  margin: 8px 0;
  padding: 6px 11px;
  border-radius: 18px;
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
}

.news-filter.active {
  background: var(--green-dark);
}

.news-load-more{
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

#load-more-btn{
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    background: var(--green-primary);
    color: white;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

#load-more-btn:disabled {
    opacity: .5;
    cursor: default;
}

#load-more-btn:hover{
    background: var(--green-dark);
}

@media (max-width: 850px) {
  .news-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .news-sidebar {
    padding-top: 0;
  }
}

/* ===================== PÁGINA DE CONTACTO ===================== */
 
.contact-page {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}
 
.contact-wrap {
    width: 100%;
    max-width: 1100px; 
    background: #ffff;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    padding: 50px;
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    align-items: flex-start;
    gap: 40px;
}
 
.contact-info h2,
.contact-form-card h2 {
    font-size: 1.6rem;
    color: #222;
    font-weight: 700;
    margin-bottom: 15px;
}

.contact-description{
    margin:15px 0 25px;
    color:#666;
    line-height:1.7;
    font-size:15px;
    max-width:320px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: .85rem;
    color: #444;
}
 
.contact-item a {
    color: #444;
    text-decoration: none;
}
 
.contact-item a:hover {
    color: var(--green-primary);
}
 
.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    object-fit: contain;
}

.contact-social{
    display:flex;
    gap: 15px;
    margin-top: 18px;
}
.contact-social a{
    display:inline-flex;
    transition:.3s;
}

.contact-social a:hover{
    transform:scale(1.08);
}

.contact-social img{
    width:28px;
    height:28px;
    display:block;
}

.contact-form-card {
    background: #fff;
    border-radius: 8px;
    padding: 0 25px 25px;
}
 
 
.contact-form-card label {
    display: block;
    font-size: .75rem;
    color: #777;
    margin-bottom: 6px;
}
 
.contact-form-card input[type="text"],
.contact-form-card input[type="email"],
.contact-form-card input[type="tel"],
.contact-form-card textarea {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 0;
    border: 1px solid #b8eab1;
    border-radius: 4px;
    font-family: inherit;
    font-size: .85rem;
    box-sizing: border-box;
}
 
.contact-form-card textarea {
    resize: vertical;
    min-height: 90px;
}
 
.contact-form-card input:focus,
.contact-form-card textarea:focus {
    outline: none;
    border-color: var(--green-primary);
}
 
.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
 
#contact-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 4px;
    background: var(--green-primary);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .5px;
    cursor: pointer;
    transition: .3s;
}
 
#contact-submit:hover {
    background: var(--green-dark);
}
 
#contact-submit:disabled {
    opacity: .6;
    cursor: default;
}
 
 
@media (max-width: 720px) {
    .contact-wrap {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
}

/*  VALIDACIONES FORMULARIO */

.field-error{
    margin-top: 4px;
    font-size:.8rem;
    color:#d93025;
    min-height:18px;
}

.input-error{
    border:1px solid #d93025 !important;
}

.input-success{
    border:1px solid #4bb63a !important;
}

#contact-status{
    margin-top:15px;
    font-size:.9rem;
    font-weight:500;
}

#contact-status.success{
    color:#2e7d32;
}

#contact-status.error{
    color:#d93025;
}

/* PAGINA DE RECURSOS*/
.intro-seccion {
    max-width: 1200px;
    margin: 60px auto 40px auto; 
    padding: 0;
}

.main-title {
    text-align: left;
    font-size: 2rem;
    color: #333; 
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
}

.linea-verde-horizontal {
    width: 100px; 
    height: 4px;
    background-color: #62b945; 
    margin: 0 0 30px 0;
    border-radius: 2px;
}

.recursos-intro-text {
    text-align: left;
    font-size: 1rem;
    color: #666666;
    max-width: 800px;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

@media(max-width: 768px) {
    .intro-seccion {
        padding: 0 20px;
        margin: 30px auto 15px auto !important; 
    }
    .main-title {
        font-size: 2rem;
    }
}


.recursos-lista {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}


.recurso-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 0; 
    box-shadow: none; 
}

@media(min-width: 769px) {
    .recurso-item {
        flex-direction: row;
        align-items: stretch;
        min-height: 400px;
    }
    .recurso-item--reverse {
        flex-direction: row-reverse;
    }
}


.recurso-media {
    flex: 1;
    overflow: hidden;
    border-radius: 0;
}

.recurso-media img {
    width: 100%;
    height: 100%;
    min-height: 260px; 
    object-fit: cover;
    display: block;
    transition: transform .45s;
}

@media(min-width: 769px) {
    .recurso-item {
        height: 400px !important;
        min-height: 0 !important;
        display: flex !important;
        margin: 0 !important;
        border: 0 !important;
    }

    .recurso-info, 
    .recurso-media {
        flex: 0 0 50% !important;
        width: 50% !important;
        min-width: 50% !important;
        max-width: 50% !important;
        margin: 0 !important;
        border: 0 !important;
        height: 100% !important;
    }

    .recurso-info {
        padding: 40px 72px !important;
        box-sizing: border-box !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .recurso-media {
        overflow: hidden !important;
        display: flex !important;
    }

    .recurso-media img {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important; 
        object-fit: cover !important;
        display: block !important;
    }
    .recurso-item--reverse .recurso-info {
        padding-left: 0 !important; 
        padding-right: 72px !important; 
        align-items: flex-start;
        text-align: left !important;
    }
}

.recurso-media:hover img {
    transform: scale(1.04);
}

.recurso-info {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 6%;
}

.recurso-info h2 {
    color: #4bb63a;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.recurso-info p, 
.recurso-info ul {
    color: #666;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.recurso-info ul {
    padding-left: 0;
    list-style: none;
}

.recurso-info li {
    margin-bottom: 12px;
}

.btn-recurso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: 2px;
    background: #62b945;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: .3s;
    margin-top: 10px;
}

.btn-recurso:hover {
    background: #4bb63a;
}

.btn-recurso.proximo {
    background-color: #e0e0e0 !important;
    color: #888888 !important;
    cursor: not-allowed;
    border: none;
    pointer-events: none; 
}

.etiqueta-proximamente {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 18px;
    background-color: #eef7ea;
    color: var(--green-dark);
    border: 1px solid #cfe8c4;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.contenido-desplegable {
    display: block;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    background: #ffffff;
    padding: 0;
    border: none;
    width: 100%;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.contenido-desplegable.active {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    padding: 40px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    pointer-events: auto;
}

.documentos-lista, 
.material-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.documentos-lista > div,
.material-lista > div {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    transition: all 0.3s ease;
}

.documentos-lista > div:hover,
.material-lista > div:hover {
    border-color: #62b945;
    box-shadow: 0 4px 10px rgba(98, 185, 69, 0.08);
}

.documentos-lista strong, 
.material-lista strong {
    font-size: 1.1rem;
    color: #333333;
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.documentos-lista p, 
.material-lista p {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.documentos-lista a,
.material-lista a {
    display: inline-block;
    padding: 7px 18px;
    margin-right: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #62b945;
    border: 1px solid #62b945;
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.documentos-lista a:hover {
    background-color: #62b945;
    color: #ffffff;
}

.documento-header {
    display: flex;
    align-items: center;
    gap: 15px; 
    margin-bottom: 20px;
}

.icono-pdf {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    stroke: #444; 
    stroke-width: 2;
}

.icono-link {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    stroke: #444;
    stroke-width: 2;
}

.documento-textos h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.documento-textos p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.galeria-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.galeria-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 2;
}

.modal-galeria {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 0; 
}

.modal-galeria.active {
    display: flex;
    animation: modalAparecer .3s ease-out;
}

@keyframes modalAparecer {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 15, 15, 0.92); 
}

.modal-contenido {
    position: relative;
    z-index: 1;
    width: 100vw; 
    max-width: 100vw;
    height: 100vh; 
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: transparent; 
    border-radius: 0; 
    padding: 0;
    box-shadow: none;
    justify-content: space-between;
}

#modal-img-principal {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background-color: transparent;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); 
    transform: scale(0.98); 
}
#modal-img-principal.active-zoom {
    transform: scale(1);             /* Se agranda suavemente al cargar */
}

.modal-visor {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-cerrar {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

#modal-contador {
    position: absolute;
    bottom: 25px;
    left: 25px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.modal-cerrar:hover {
    background-color: #ffffff;
    color: #000000;
    transform: scale(1.1) rotate(90deg);
}

.modal-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important; 
    border: none !important;            
    color: #ffffff;                     
    font-size: 2.5rem;
    font-weight: 300;                                  
    line-height: 1;
    padding: 15px;                     
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.modal-flecha:hover {
    color: var(--green-primary);        
    transform: translateY(-50%) scale(1.1);
}

.modal-anterior {
    left: 15px;
}

.modal-siguiente {
    right: 15px;
}

.modal-miniaturas-container {
    background: rgba(0, 0, 0, 0.4);  
    backdrop-filter: blur(4px);    
    padding: 15px 20px;              
    margin-top: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--green-primary) rgba(255,255,255,0.1);
    flex-shrink: 0;
    width: 100%;
}

.modal-miniaturas-container::-webkit-scrollbar {
    height: 6px;
}

.modal-miniaturas-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.modal-miniaturas-container::-webkit-scrollbar-thumb {
    background-color: #62b945;
    border-radius: 10px;
}

.modal-miniaturas {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;                     
    width: max-content;
    scroll-snap-type: x proximity;
    margin: 0 auto;
}

.modal-miniaturas img {
    flex: 0 0 auto;
    width: 90px;
    height: 68px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 3px solid transparent;
    border-radius: 6px;           
    scroll-snap-align: start;
    transition: all 0.3s ease;
}

.modal-miniaturas img:hover {
    opacity: 0.9;
}

.modal-miniaturas img.active {
    opacity: 1;
    border-color: var(--green-primary); 
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(75, 182, 58, 0.299);
}

@media (max-width: 768px) {
    .modal-galeria {
        padding: 0; 
    }

    .modal-contenido {
        width: 100vw;       
        max-width: 100vw;
        height: 100vh;      
        max-height: 100vh;
        border-radius: 0;   
        background-color: transparent; 
        padding: 0;         
        box-shadow: none;   
        justify-content: space-between; 
        position: relative;
    }

    .modal-cerrar {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.6); 
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .modal-miniaturas-container {
        background: rgba(0, 0, 0, 0.6); 
        padding: 12px 0;
        margin-top: 0;
        flex-shrink: 0;
        width: 100%;
    }

    .modal-miniaturas img {
        width: 80px; 
        height: 60px;
        opacity: 0.8;
        border-width: 3px;
    }

    .modal-miniaturas img.active {
        opacity: 1;
        border-color: var(--green-primary);
    }

    .intro-seccion {
        margin: 10px auto 5px auto !important;
        padding: 0 20px !important;
    }
    .linea-verde-horizontal {
        margin: 0 0 8px 0 !important;
    }
    .recursos-intro-text {
        margin: 0 0 8px 0 !important;
    }
    .recursos-lista {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .galeria-lista {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .contenido-desplegable.active {
        max-height: 5000px !important;
        padding: 20px 0 50px 0 !important; 
    }

    .modal-flecha {
        font-size: 2rem !important;
        padding: 10px !important;
    }
    
    #modal-contador {
        bottom: 15px;
        left: 15px;
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}

.icono-flecha {
    width: 16px;   
    height: 16px;
    margin-left: 8px;         
    vertical-align: middle;    
    display: inline-block;
    transition: transform 0.3s ease;
    filter: invert(1);
}

.flecha-arriba {
    transform: rotate(180deg);
}
