/* --- ESTILOS GENERALES Y VARIABLES --- */
:root {
    /* Paleta de colores más clara y vibrante */
    --primary-green-dark: #2F6C2E; /* Verde más profundo pero vibrante */
    --primary-green-light: #5AA84D; /* Verde más claro y amigable */
    --accent-yellow: #FFD700; /* Amarillo brillante para acentos */

    /* Esquema de colores moderno y limpio */
    --background-light: #fdfdfd; /* Fondo claro general */
    --background-medium: #ffffff; /* Fondo para tarjetas y secciones */
    --text-dark: #2c3e50; /* Color de texto principal oscuro */
    --text-light: #7f8c8d; /* Color de texto secundario */
    --border-light: #ecf0f1; /* Borde sutil */
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);

    --font-primary: 'Roboto', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    color: var(--primary-green-dark);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.08);
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-green-dark);
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-yellow);
    border-radius: 2px;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-green-dark);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-green-light), var(--primary-green-dark));
    color: var(--background-light);
    padding: 16px 38px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 20px var(--shadow-medium);
    border: none;
    text-transform: uppercase;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(90, 168, 77, 0.4);
    background: linear-gradient(45deg, var(--primary-green-dark), var(--primary-green-light));
}

/* --- BARRA DE NAVEGACIÓN --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px var(--shadow-light);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    height: 70px; /* Logo un poco más grande */
    display: flex;
    align-items: center;
}

.logo-img {
    height: 100%;
    width: auto;
    filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.08));
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 1.2rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 8px;
    font-size: 1.05rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-green-light);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary-green-dark);
    transform: translateY(-2px);
}

.nav-cta {
    padding: 12px 28px;
    font-size: 1rem;
}

/* Burger menu para responsive */
.burger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001; /* Asegura que esté sobre el menú off-canvas */
}

.burger-menu div {
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 7px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animación del burger menu */
.burger-menu.toggle .line1 {
    transform: rotate(-45deg) translate(-7px, 7px);
}
.burger-menu.toggle .line2 {
    opacity: 0;
}
.burger-menu.toggle .line3 {
    transform: rotate(45deg) translate(-7px, -7px);
}

/* --- SECCIÓN HERO (INICIO) --- */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: transform 0.1s linear; /* Para efecto parallax */
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 10s ease-out; /* Transición más larga para movimiento sutil */
    transform: scale(1.05); /* Zoom inicial */
}

.hero-slideshow .slide.active {
    opacity: 1;
    transform: scale(1); /* Zoom out al activarse */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 1rem;
}

.hero p {
    font-size: clamp(1.15rem, 3vw, 1.4rem);
    max-width: 700px;
    margin: 0 auto 2.8rem auto;
    color: var(--text-dark);
    font-weight: 300;
}

/* --- SECCIÓN SERVICIOS --- */
.services {
    background-color: var(--background-light);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}
.service-card {
    background: var(--background-medium);
    text-align: center;
    border-radius: 15px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px var(--shadow-light);
}
.service-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 20px rgba(90, 168, 77, 0.3);
}
.service-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.service-card:hover .service-img {
    transform: scale(1.08);
}
.service-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.service-card h3 {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.service-card .icon-service {
    color: var(--primary-green-light);
    font-size: 1.8rem;
}
.service-card p {
    font-size: 1rem;
    color: var(--text-light);
}

/* --- SECCIÓN POR QUÉ ELEGIRNOS --- */
.why-choose-us {
    background-color: var(--primary-green-dark); /* Fondo oscuro para contraste */
    color: var(--background-light);
    padding-bottom: 8rem; /* Más espacio abajo */
}
.why-choose-us h2 {
    color: var(--background-light);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.why-choose-us h2::after {
    background-color: var(--accent-yellow);
}
.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}
.choose-card {
    background: var(--primary-green-light); /* Tarjetas de color verde claro */
    color: var(--background-medium);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.choose-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--accent-yellow); /* Amarillo al pasar el mouse */
    color: var(--text-dark);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.choose-card:hover .icon-large {
    color: var(--primary-green-dark); /* Icono verde oscuro al pasar el mouse */
}

.choose-card .icon-large {
    font-size: 3.5rem;
    color: var(--background-medium);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}
.choose-card h3 {
    color: var(--background-medium);
    margin-bottom: 0.8rem;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}
.choose-card:hover h3 {
    color: var(--text-dark);
}
.choose-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: color 0.3s ease;
}
.choose-card:hover p {
    color: var(--text-dark);
}

/* --- SECCIÓN TESTIMONIOS --- */
.testimonials {
    background-color: var(--background-light);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.testimonial-card {
    background: var(--background-medium);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 8px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    position: relative;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow-medium);
}
.testimonial-card .quote-icon {
    font-size: 2.5rem;
    color: var(--primary-green-light);
    margin-bottom: 1.5rem;
    display: block;
}
.testimonial-card p {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}
.testimonial-card h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--primary-green-dark);
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}
.testimonial-card span {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
}

/* --- SECCIÓN FAQ --- */
.faq-section {
    background-color: var(--background-medium);
}
.faq-grid {
    max-width: 900px; /* Ancho máximo para la sección FAQ */
    margin: 0 auto;
}
.faq-item {
    background-color: var(--background-light);
    margin-bottom: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.faq-question {
    background: none;
    border: none;
    color: var(--text-dark);
    font-family: var(--font-headings);
    font-size: 1.25rem;
    text-align: left;
    width: 100%;
    padding: 1.5rem 2rem;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}
.faq-question:hover, .faq-item.active .faq-question {
    background-color: #f0f8f0; /* Un verde muy claro */
    color: var(--primary-green-dark);
}
.faq-question::after {
    content: '\f078'; /* Ícono de Font Awesome para flecha hacia abajo */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
    color: var(--primary-green-light);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding: 0 2rem;
}
.faq-item.active .faq-answer {
    padding-bottom: 1.5rem;
}
.faq-answer p {
    color: var(--text-light);
    font-size: 1.05rem;
}
.faq-answer a {
    color: var(--primary-green-light);
    text-decoration: none;
}
.faq-answer a:hover {
    text-decoration: underline;
}

/* --- SECCIÓN CONTACTO --- */
.contact {
    background-color: var(--background-light);
}
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: stretch;
}
.contact-info h2 {
    text-align: left;
    margin-bottom: 1.8rem;
}
.contact-info p, .contact-info li {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.contact-info i {
    color: var(--primary-green-light);
    margin-right: 15px;
    width: 25px;
    text-align: center;
}
.contact-info ul {
    list-style: none;
    padding-left: 0;
}
.contact-info a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-info a:hover {
    color: var(--primary-green-light);
}
.contact-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-medium);
    height: 100%;
    min-height: 450px;
}
.contact-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- FOOTER --- */
.footer {
    background: var(--text-dark); /* Footer oscuro para contraste */
    padding: 4rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.95rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}
.footer-col h3 {
    color: var(--primary-green-light);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.8rem;
}
.footer-col ul li a, .footer-col p a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-col ul li a:hover, .footer-col p a:hover {
    color: var(--primary-green-light);
}
.footer-col .logo-container {
    height: 70px;
    margin-bottom: 1.5rem;
}
.social-icons {
    margin-top: 1.5rem;
}
.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-right: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-icons a:hover {
    color: var(--primary-green-light);
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    color: var(--text-light);
}

/* --- ANIMACIONES (INVISIBLES POR DEFECTO, ACTIVADAS POR JS) --- */
.fade-in-up, .slide-in-left, .slide-in-right {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left {
    transform: translateX(-50px);
}

.slide-in-right {
    transform: translateX(50px);
}

/* Clases que JS añade para activar las animaciones */
.animated.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.animated.slide-in-left {
    opacity: 1;
    transform: translateX(0);
}

.animated.slide-in-right {
    opacity: 1;
    transform: translateX(0);
}

/* --- DISEÑO RESPONSIVE --- */
@media (max-width: 992px) {
    .nav-menu {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 70%; /* Ancho del menú */
    max-width: 320px; /* Un ancho máximo para que no sea muy grande en tablets */
    background-color: var(--background-medium);
    flex-direction: column;
    
    /* --- CAMBIOS PRINCIPALES AQUÍ --- */
    justify-content: flex-start; /* Alinea los elementos arriba en lugar de al centro */
    align-items: flex-start; /* Alinea el texto de los enlaces a la izquierda */
    padding-top: 8rem; /* Añade un espacio superior para no pegar los enlaces al borde */
    /* --- FIN DE CAMBIOS PRINCIPALES --- */

    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 999;
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
}

.nav-menu.nav-active {
    transform: translateX(0%);
}

.nav-menu a {
    /* --- CAMBIOS PARA APARIENCIA DE LISTA --- */
    display: block; /* Hace que el enlace ocupe todo el ancho disponible */
    width: 100%;
    padding: 1rem 2.5rem; /* Espaciado interno para que sea fácil de tocar */
    margin: 0.5rem 0; /* Espacio vertical entre cada opción del menú */
    font-size: 1.4rem; /* Tamaño de letra legible y moderno */
    text-align: left; /* Asegura que el texto esté alineado a la izquierda */
    color: var(--text-dark);
    /* --- FIN DE CAMBIOS DE APARIENCIA --- */
    
    opacity: 0; /* Para la animación de entrada */
    transform: translateX(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, background-color 0.3s ease; /* Añadida transición para hover */
}

/* Efecto hover para los enlaces del menú */
.nav-menu a:hover {
    background-color: #f0f8f0; /* Un verde muy sutil al pasar el mouse */
    color: var(--primary-green-dark);
}

.nav-menu.nav-active a {
    opacity: 1;
    transform: translateX(0);
}
    .nav-menu.nav-active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.nav-active a:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.nav-active a:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.nav-active a:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.nav-active a:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.nav-active a:nth-child(6) { transition-delay: 0.35s; }

    .nav-cta {
        display: none; /* Ocultar el botón CTA de la navbar principal en móviles */
    }
    .burger-menu {
        display: block;
    }

    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    .contact-content {
        grid-template-columns: 1fr;
    }
    .about-text h2, .contact-info h2 {
        text-align: center;
    }
    .hero-content {
        padding: 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        text-align: center;
    }
    .footer-col .logo-container {
        margin: 0 auto 1.5rem auto;
    }
    .social-icons {
        justify-content: center; /* Centrar iconos sociales */
        display: flex;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }
    .hero {
        min-height: 80vh;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 2rem;
    }
    .faq-question {
        font-size: 1.1rem;
        padding: 1.2rem 1.5rem;
    }
    .faq-answer p {
        padding: 0 1.5rem 1.2rem;
    }
    .contact-map {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .navbar .logo-container {
        height: 55px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    .service-card-content {
        padding: 1.2rem;
    }
    .service-card h3 {
        font-size: 1.4rem;
    }
    .contact-info p, .contact-info li {
        font-size: 1rem;
    }
    .contact-map {
        min-height: 250px;
    }
    .nav-menu {
        width: 85%;
    }
    .why-choose-us-grid, .testimonials-grid {
        grid-template-columns: 1fr; /* Una columna en móviles muy pequeños */
    }
}

