/* Reset básico */
html {
    scroll-behavior: smooth;
}

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

:root {
    --primary: #7a9c40; /* Un verde oliva más brillante y fresco */
    --primary-dark: #556b2f; /* Tu verde original, ideal para títulos y contrastes */
    --accent: #e07a5f; /* Un terracota/naranja más suave y moderno */
    --bg: #fdfaf5; /* Un blanco roto más cálido que el puro */
    --text-main: #2d3748; /* Gris oscuro para mejorar la lectura */
    --text-muted: #718096; /* Gris más claro para textos secundarios */
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout Moderno --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Margen superior para que el menú pegajoso no tape los títulos al navegar */
section, .grid {
    scroll-margin-top: 100px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    grid-auto-rows: 1fr;
}

/* --- Componente de Tarjeta (Card) --- */
.card {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--primary);
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent);
}

/* --- Módulo: Componentes internos de la Tarjeta --- */
.card-title {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.7;
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--primary);
}

/* --- Módulo: Navegación (Navbar) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    background-color: rgba(253, 250, 245, 0.95); /* Color de fondo semi-transparente */
    backdrop-filter: blur(8px); /* Efecto contemporáneo de vidrio esmerilado */
    z-index: 1000;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- Módulo: Hero / Bienvenidos --- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, rgba(122, 156, 64, 0.1) 0%, rgba(224, 122, 95, 0.1) 100%);
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.hero-title {
    color: var(--primary-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Módulo: Quiénes Somos --- */
.about-section {
    margin-top: 4rem;
    padding: 3rem;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-title {
    color: var(--primary-dark);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.about-intro {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 3rem auto;
}

.about-intro .highlight {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    grid-auto-rows: 1fr;
}

.member-name {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 0.5rem;
}

.share-links {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-share {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    margin: 0.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.btn-share:hover { opacity: 0.85; }
.btn-share.facebook { background-color: #1877F2; }
.btn-share.x-social { background-color: #000000; }
.btn-share.whatsapp { background-color: #25D366; }

/* --- Módulo: Nuestro Objetivo --- */
.objectives-section {
    margin-top: 4rem;
}

/* Centramos los dos últimos elementos en pantallas grandes (Escritorio) */
@media (min-width: 1025px) {
    .objectives-section .grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .objectives-section .grid .card {
        grid-column: span 2;
    }
    .objectives-section .grid .card:nth-child(4) {
        grid-column-start: 2;
    }
}

/* --- Módulo: Testimonios (Carrusel) --- */
.testimonials-section {
    margin-top: 4rem;
    text-align: center;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 auto;
    gap: 1rem;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 1rem 0 2rem 0;
    -ms-overflow-style: none; /* Oculta la barra de scroll en IE/Edge */
    scrollbar-width: none; /* Oculta la barra de scroll en Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Oculta la barra de scroll en Chrome, Safari y Opera */
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 1.35rem); /* Se muestran 3 tarjetas por defecto */
    scroll-snap-align: center;
    background: #ffffff;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.quote-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.testimonial-text {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.testimonial-author {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.95rem;
}

.carousel-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--primary-dark);
}

/* --- Módulo: Contacto --- */
.contact-section {
    margin-top: 4rem;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
}

.contact-intro {
    margin-bottom: 2rem;
    text-align: center;
    max-width: 850px;
    margin: 0 auto 3rem auto;
    color: var(--text-muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.form-control {
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-submit:hover { opacity: 0.85; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-details h4 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-details p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.map-container {
    width: 100%;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Módulo: Pie de página (Footer) --- */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Media Queries (Diseño Responsivo) --- */

/* Dispositivos medianos (Tablets, max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    .hero-title { font-size: 2.2rem; }
    
    .testimonial-card {
        flex: 0 0 calc(50% - 1rem); /* 2 tarjetas en tablet */
    }
}

/* Dispositivos pequeños (Teléfonos móviles, max-width: 768px) */
@media (max-width: 768px) {
    /* Ajustamos el menú de navegación para que se apile */
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-links a {
        margin-left: 0;
        padding: 0.5rem;
    }
    
    /* Reducimos el tamaño de los títulos */
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.75rem; }
    
    /* Reducimos el espacio interior (padding) de las secciones para aprovechar la pantalla */
    .about-section, .contact-section { padding: 1.5rem; }
    .card { padding: 1.5rem; }
    
    /* Forzamos a que las cuadrículas ocupen una sola columna en pantallas pequeñas */
    .grid, .team-grid, .contact-grid { grid-template-columns: 1fr; }
    
    .testimonial-card {
        flex: 0 0 100%; /* 1 tarjeta en móvil */
    }
}