@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    /* Colores principales */
    --color-primary: #57872b;
    --color-primary-dark: #00cc6a;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-dark-gray: #1a1a1a;
    --color-green-dark: #2d5a2d;
    --color-light-gray: #cccccc;
    
    /* Colores con transparencia */
    --color-black-90: rgba(0, 0, 0, 0.9);
    --color-black-70: rgba(0, 0, 0, 0.7);
    --color-primary-10: rgba(0, 255, 136, 0.1);
    --color-primary-30: rgba(0, 255, 136, 0.3);
    --color-primary-50: rgba(0, 255, 136, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #ffffff;
    color: var(--color-white);
    overflow-x: hidden;
}

/* Particles Background - Solo para hero */
#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    mask: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0.5) 85%, rgba(0,0,0,0) 100%);
    -webkit-mask: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,0.5) 85%, rgba(0,0,0,0) 100%);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent; /* Cambiar a transparente inicialmente */
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Clase para cuando el header tiene fondo */
header.scrolled {
    background: rgb(0 0 0);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-white);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 1) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('../img/about-us-header-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: "Inter", sans-serif;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--color-primary-50);
}

/* Sections */
.section {
    padding: 100px 5%;
    margin: 0 auto;
}

.section h2 {
    font-size: 2.5rem;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 3rem;
    color: var(--color-primary);
}

/* Secciones de contenido centrado */
.content-section {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.5s ease;
}

.content-section.active {
    opacity: 1;
    visibility: visible;
}

.centered-content {
    max-width: 800px;
    text-align: center;
    padding: 3rem;
    background: var(--color-black-90);
    border-radius: 8px;
    border: 1px solid var(--color-primary);
    box-shadow: 0 20px 50px var(--color-primary-30);
    backdrop-filter: blur(15px);
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.content-section.active .centered-content {
    transform: translateY(0);
}

.centered-content h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2.8rem;
}

.centered-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--color-white);
}

/* Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--color-black-70);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--color-primary-30);
    border-color: var(--color-white);
}

.card i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-white);
}

/* Stats Section */
.stats {
    background: var(--color-primary-10);
    border-radius: 4px;
    padding: 3rem;
    margin: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--color-black-70);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    color: var(--color-white);
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    text-transform: uppercase;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-light-gray);
}

/* Footer */
footer {
    background: #195a26;
    text-align: center;
    padding: 4rem;
    position: relative;
    margin-top: 4rem;
}

/* Textura de montaÃ±as usando la imagen existente */
footer::before {
    /* content: ''; */
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background-image: url('../img/Rasgado_Basic_Verde.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    z-index: 1;
}

/* Capa adicional para mÃ¡s profundidad si es necesario */
footer::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 104px;
    background-image: url('../img/Rasgado_Basic_Verde.png');
    background-size: 120% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    filter: brightness(0.8);
    z-index: 2;
}

/* Ajuste responsivo */
@media (max-width: 768px) {
    footer::before {
        top: -30px;
        height: 30px;
    }
    
    footer::after {
        top: -25px;
        height: 25px;
    }
    
    footer {
        margin-top: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 50px 5%;
    }
    
    .centered-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .centered-content h2 {
        font-size: 2.2rem;
    }
    
    .centered-content p {
        font-size: 1.1rem;
    }
}

/* Colores especÃ­ficos para h2 y p de cada secciÃ³n */

/* SecciÃ³n Carousel */
#carousel-section h2 {
    color: var(--color-primary);
}

#carousel-section p {
    color: #ffffff;
}

/* SecciÃ³n Servicios */
#servicios h2 {
    color: var(--color-white);
}

#servicios p {
    color: #ebe9e9;
}

#servicios .card h3 {
    color: var(--color-primary);
}

#servicios .card p {
    color: var(--color-white);
}

/* SecciÃ³n Impacto */
#impacto h2 {
    color: var(--color-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#impacto p {
    color: var(--color-white);
}

#impacto .stat-item h3 {
    color: var(--color-primary);
}

#impacto .stat-item p {
    color: var(--color-light-gray);
}

/* SecciÃ³n Contacto */
#contacto h2 {
    color: var(--color-green-dark);
}

#contacto p {
    color: var(--color-dark-gray);
}

#contacto .form-group label {
    color: var(--color-dark-gray);
}

/* SecciÃ³n Hero (inicio) - ya tiene estilos pero los reforzamos */
#inicio h1 {
    color: var(--color-white);
}

#inicio p {
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Carrusel Horizontal */
.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-wrapper {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform; /* OptimizaciÃ³n para GPU */
}

.carousel-slide {
    width: 33.333%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backface-visibility: hidden; /* OptimizaciÃ³n para GPU */
}

.carousel-slide .centered-content {
    max-width: 800px;
    width: 90%;
    text-align: center;
    padding: 3rem;
    background: var(--color-black-90);
    border-radius: 4px;
    backdrop-filter: blur(15px);
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

.carousel-slide .centered-content h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2.8rem;
    color: var(--color-primary);
    transition: color 0.8s ease;
}

.carousel-slide .centered-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-white);
    overflow-y: auto;
    text-align: -webkit-center;
}

/* Botones del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-black-70);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    width: 50px;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--color-primary);
    color: var(--color-black);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 57px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--color-black-70);
    border: 1px solid var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

.indicator:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        height: 450px;
        margin: 0 1rem;
    }
    
    .carousel-slide .centered-content {
        padding: 2rem;
        height: 350px;
        width: 95%;
    }
    
    .carousel-slide .centered-content h2 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .carousel-slide .centered-content p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-indicators {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 400px;
    }
    
    .carousel-slide .centered-content {
        padding: 1.5rem;
        height: 300px;
    }
    
    .carousel-slide .centered-content h2 {
        font-size: 1.8rem;
    }
    
    .carousel-slide .centered-content p {
        font-size: 1rem;
    }
}

/* Fondos especÃ­ficos para cada secciÃ³n por ID (excluyendo hero) */
#carousel-section {
    background: #ffffff;
    padding: 100px 5%;
}

#servicios {
    background: var(--color-green-dark);
    padding: 100px 5%;
}

#galeria {
    background: #d2f5db;
    padding: 100px 5%;
}

#galeria p {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: var(--color-black);
}

#impacto {
    background: #000000;
    padding: 100px 5%;
}

#contacto {
    background: #ffffff;
    padding: 100px 5%;
}

/* Ajustar el color del texto en la secciÃ³n de impacto para mejor contraste */
#impacto h2,
#impacto p {
    color: var(--color-white);
}

#impacto .stat-item h3 {
    color: var(--color-white);
}

#impacto .stat-item p {
    color: var(--color-white);
}

/* Ajustar el fondo de las estadÃ­sticas en la secciÃ³n de impacto */
#impacto .stats {
    background: rgb(26 110 44 / 24%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Estilos adicionales para el footer con informaciÃ³n de contacto */
.footer-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-content h3 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info h4 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--color-white);
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.contact-info strong {
    color: var(--color-primary);
    text-transform: uppercase;
}

/* BotÃ³n flotante de donaciÃ³n */
.donate-button-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--color-primary), #e93f3f);
    color: var(--color-white);
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(87, 135, 43, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.donate-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(87, 135, 43, 0.6);
    background: linear-gradient(45deg, #ff6b6b, var(--color-primary));
}

.donate-btn i {
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.donate-btn span {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Animaciones */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
    }
}

/* Responsive para el botÃ³n de donaciÃ³n */
@media (max-width: 768px) {
    .donate-button-float {
        bottom: 20px;
        right: 20px;
    }
    
    .donate-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .donate-btn i {
        font-size: 1rem;
    }
    
    .donate-btn span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .donate-button-float {
        bottom: 15px;
        right: 15px;
    }
    
    .donate-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .donate-btn span {
        display: none; /* Solo mostrar el icono en pantallas muy pequeÃ±as */
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
}

.footer-bottom p {
    color: #ffffff;
    margin: 0.5rem 0;
}

/* Responsive para el footer */
@media (max-width: 768px) {
    .footer-content h3 {
        font-size: 1.4rem;
    }
    
    .contact-info {
        padding: 1.5rem;
        margin: 0 1rem 2rem 1rem;
    }
    
    .contact-info h4 {
        font-size: 1.2rem;
    }
    
    .contact-info p {
        font-size: 1rem;
    }
}

/* GalerÃ­a de imÃ¡genes */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(87, 135, 43, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Modal para imÃ¡genes */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--color-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--color-primary);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--color-primary);
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--color-primary);
    color: var(--color-black);
}

/* Responsive para la galerÃ­a */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-container {
        padding: 0 1rem;
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
        padding: 10px;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item {
        max-width: 300px;
        margin: 0 auto;
    }
}