/* =========================================
   1. CONFIGURACIÓN BASE Y VARIABLES
   ========================================= */
:root {
    /* Paleta de colores - Frente de Río */
    --primary-color: #2E5A38;   /* Verde húmedo oscuro */
    --secondary-color: #B8965E; /* Ocre / Tierra */
    --accent-color: #4A7C96;    /* Azul Mapocho */
    --text-color: #333333;      /* Gris lectura */
    --light-bg: #F4F7F5;        /* Fondo suave */
    --white: #FFFFFF;
    
    /* Tipografías */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. HEADER Y NAVEGACIÓN (CON LOGO)
   ========================================= */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0; /* Un poco más compacto */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NUEVO: Estilo para el Logo de imagen */
.logo img {
    height: 60px; /* Altura controlada para que no deforme el menú */
    width: auto;  /* El ancho se ajusta solo */
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.main-nav a:hover { color: var(--secondary-color); }

.btn-nav {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: 4px;
}
.btn-nav:hover { background-color: var(--secondary-color); }

/* =========================================
   3. HERO SECTION (CENTRADOR PERFECTO)
   ========================================= */
.hero {
    /* Imagen de fondo */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('portada-humedal-aerea.jpg');
    background-color: var(--primary-color); /* Respaldo */
    background-size: cover;
    background-position: center;
    height: 85vh; /* 85% del alto de la pantalla */

    /* FLEXBOX PARA CENTRAR TODO */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente */
    align-items: center;     /* Centra horizontalmente */
    
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

/* Contenedor interno para limitar el ancho del texto */
.hero-content {
    max-width: 900px; /* Evita que el texto se estire demasiado a los lados */
    width: 100%;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6); /* Sombra para leer mejor sobre la foto */
}

.hero-content p {
    font-size: 1.3rem;
    margin: 0 auto 2.5rem auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.hero-buttons .btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 5px;
    font-weight: 700;
    margin: 10px;
}

.btn-primary { background-color: var(--secondary-color); color: var(--white); border: none; cursor: pointer; }
.btn-outline { border: 2px solid var(--white); background: transparent; color: var(--white); }

.btn-primary:hover { background-color: #a3834e; transform: translateY(-2px); }
.btn-outline:hover { background-color: var(--white); color: var(--primary-color); transform: translateY(-2px); }

/* =========================================
   4. SECCIONES GENERALES
   ========================================= */
section { padding: 80px 0; }
.section-light { background-color: var(--white); }
.section-gray { background-color: var(--light-bg); }

.section-title { text-align: center; margin-bottom: 3.5rem; }
.section-title h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}
.divider {
    height: 4px;
    width: 70px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* =========================================
   5. QUIÉNES SOMOS
   ========================================= */
.about-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 50px; align-items: center; }
.about-text .lead { font-size: 1.25rem; color: var(--primary-color); font-weight: 600; margin-bottom: 1.5rem; }
.stat-box {
    background: var(--primary-color);
    color: var(--white);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 6px solid var(--secondary-color);
    border-radius: 0 8px 8px 0;
}
.stat-box h4 { font-family: var(--font-heading); margin-bottom: 5px; font-size: 1.1rem; text-transform: uppercase; }

/* =========================================
   6. PROYECTOS (GRID)
   ========================================= */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    display: flex; flex-direction: column; height: 100%;
}
.project-card:hover { transform: translateY(-8px); }

.card-image {
    height: 220px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

/* Imágenes correctas */
.project-img-1 { background-image: url('proyecto-sendero.jpg'); }
.project-img-2 { background-image: url('proyecto-monitoreo.jpg'); }
.project-img-3 { background-image: url('proyecto-educacion.jpg'); }

.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.category { font-size: 0.75rem; text-transform: uppercase; color: var(--secondary-color); font-weight: 700; margin-bottom: 8px; }
.card-content h4 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 12px; color: var(--primary-color); }
.read-more { margin-top: auto; font-weight: 700; color: var(--accent-color); font-size: 0.9rem; }

/* =========================================
   7. SECCIÓN HUMEDAL
   ========================================= */
.section-nature { background-color: #eaf2e3; }
.humedal-content { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.humedal-text h4 { font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary-color); margin-bottom: 20px; }
.check-list li { margin-bottom: 12px; padding-left: 25px; position: relative; font-weight: 600; }
.check-list li::before { content: "•"; color: var(--secondary-color); font-size: 1.5rem; position: absolute; left: 0; top: -5px; }

.img-box {
    background-image: url('biodiversidad-coipo-garza.jpg');
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    height: 350px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.mt-20 { margin-top: 25px; display: inline-block; }

/* =========================================
   8. TRANSPARENCIA
   ========================================= */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; }
.doc-card {
    background: var(--white); border: 1px solid #e0e0e0;
    padding: 30px 20px; text-align: center; border-radius: 8px; transition: all 0.3s;
}
.doc-card:hover { border-color: var(--secondary-color); background-color: #fffbf0; transform: translateY(-3px); }
.doc-card .icon { font-size: 2.5rem; display: block; margin-bottom: 15px; }
.doc-card h4 { color: var(--primary-color); font-weight: 700; margin-bottom: 5px; }

/* =========================================
   9. CONTACTO (MODERNO)
   ========================================= */
.contact-modern {
    position: relative;
    background: #1a3c26;
    background-image: linear-gradient(135deg, #1a3c26 0%, #0d2116 100%);
    color: #fff;
    padding: 100px 0;
    overflow: hidden;
}

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: flex-start; }
.contact-info-modern h2 { font-family: var(--font-heading); font-size: 2.5rem; margin: 15px 0; line-height: 1.2; }
.contact-info-modern .badge { background-color: var(--secondary-color); color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.intro-text { font-size: 1.1rem; opacity: 0.9; margin-bottom: 40px; }

.info-item { display: flex; align-items: center; margin-bottom: 25px; }
.icon-circle { width: 50px; height: 50px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-right: 15px; }
.info-item strong { display: block; color: var(--secondary-color); font-size: 0.9rem; text-transform: uppercase; }

.social-links-row { display: flex; gap: 15px; margin-top: 15px; }
.social-btn {
    padding: 10px 25px; border: 1px solid rgba(255,255,255,0.3); border-radius: 30px; font-size: 0.9rem; transition: all 0.3s ease;
}
.social-btn:hover { background: var(--white); color: var(--primary-color); transform: translateY(-3px); }

.form-card {
    background: #ffffff; padding: 40px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); color: #333;
}
.form-card h3 { font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 25px; font-size: 1.5rem; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 700; color: #666; margin-bottom: 8px; text-transform: uppercase; }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 12px 15px; background: #f4f7f5; border: 2px solid #e1e1e1; border-radius: 8px; font-family: inherit; font-size: 0.95rem; transition: 0.3s;
}
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--accent-color); background: #fff; }
.btn-submit {
    width: 100%; padding: 15px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.3s;
}
.btn-submit:hover { background-color: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* =========================================
   10. FOOTER (MODERNO)
   ========================================= */
.footer-modern {
    background-color: #0d2116; color: #88998c; padding: 50px 0; font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-left h4 { color: #fff; margin-bottom: 5px; font-family: var(--font-heading); font-size: 1.1rem; }
.footer-links a { margin: 0 15px; color: #ccc; transition: 0.3s; }
.footer-links a:hover { color: var(--secondary-color); }

/* =========================================
   11. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 900px) {
    .header-container { flex-direction: column; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; margin-top: 15px; }
    
    .hero-content h2 { font-size: 2rem; }
    .hero-buttons .btn { margin-bottom: 10px; width: 100%; margin: 5px 0; }
    
    .about-grid, .humedal-content { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .footer-content { flex-direction: column; text-align: center; }
    
}

/* --- ESTILOS LOGO + TEXTO --- */

/* Hace que la imagen y el texto se pongan en fila */
.logo-link {
    display: flex;
    align-items: center; /* Centra verticalmente */
    gap: 12px;           /* Espacio entre la imagen y el texto */
    text-decoration: none;
}

/* Control del tamaño de la imagen */
.logo-link img {
    height: 50px; /* Ajusta este valor si quieres el logo más grande o chico */
    width: auto;
    display: block;
}

/* Estilo del texto "Frente de Río" */
.logo-text {
    font-family: 'Montserrat', sans-serif; /* Tipografía de títulos */
    font-weight: 700;       /* Negrita */
    font-size: 1.4rem;      /* Tamaño del texto */
    color: #2E5A38;         /* Verde corporativo */
    text-transform: uppercase; /* Opcional: Todo en mayúsculas */
    line-height: 1;
}

/* Ajuste para móviles: Reduce un poco el texto si la pantalla es chica */
@media (max-width: 600px) {
    .logo-text {
        font-size: 1.1rem;
    }
    .logo-link img {
        height: 40px;
    }
}