/* 🟦 RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding-top: 70px;
    /* Compensar el header fijo */
}

.contenedor {
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 🟩 HEADER Y NAVEGACIÓN */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 100, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-header {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    border-radius: 10px;
    border: 2px solid white;
    margin-right: 20px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.navegacion-principal {
    display: flex;
    align-items: center;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 1rem 0;
}

.menu a:hover {
    color: #a8d5a2;
}

/* 🟨 HERO */
.hero {
    background-image: url('../imagenes/Valle-del-Elqui-1.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    color: white;
    padding: 0 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.contenido-hero {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem;
}

.logo-inicio {
    margin-bottom: 2rem;
}

.logo-inicio .logo {
    width: 120px;
    margin: 0 auto;
}

.titulo-principal {
    font-family: 'Lora', serif;
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.quality {
    color: #a8d5a2;
}

.slogan {
    font-size: 2.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #e0f7e0;
    text-shadow: 2px 0px 1px rgba(0, 0, 0, 0.5);
}

/* 🟨 SECCIONES GENERALES */
.section {
    padding: 6rem 0;
    background-color: white;
    scroll-margin-top: 70px;
}

.section h2 {
    text-align: center;
    font-size: 3.6rem;
    color: hsl(123, 91%, 25%);
    margin-bottom: 3rem;
    font-family: 'Lora', serif;
    position: relative;
    text-shadow: 3px 0px 0px #16161699,
        -2px 5px 5px hsla(0, 2%, 24%, 0.698);
}

/* 🔹 NOSOTROS */
.section-nosotros {
    background: url('../imagenes/Cerezamata.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    position: relative;
}

.section-nosotros::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.grid-nosotros {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.texto-nosotros p {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    line-height: 1.8;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.imagen-nosotros {
    display: flex;
    justify-content: center;
    align-items: center;
}

.imagen-nosotros img {
    max-width: 100%;
    width: 390px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* 🔹 SERVICIOS */
.section-servicios {
    background: url('../imagenes/arandanos.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    position: relative;
    padding: 6rem 0;
}

.section-servicios::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 50, 0, 0.8);
    z-index: -1;
}

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

.servicio-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    text-align: center;
    transition: transform 0.3s ease;
}

.servicio-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.25);
}

.servicio-card h3 {
    margin: 1.5rem 0;
    font-size: 2rem;
    color: white;
}

.servicio-card p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #e0f7e0;
}

.img-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #a8d5a2;
    margin: 0 auto 1rem auto;
}

/* 🔹 ZONA Y ALIANZAS */
.imagenes-contenedor {
    background-color: #f1f8e9;
    padding: 6rem 0;
}

.zona-h2,
.alianzas-title {
    text-align: center;
    font-size: 3.6rem;
    color: hsl(123, 91%, 25%);
    margin-bottom: 2rem;
    font-family: 'Lora', serif;
    position: relative;
    text-shadow: 3px 0px 0px #16161699,
        -2px 5px 5px hsla(0, 2%, 24%, 0.698);
}

.mapa-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.mapa {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.alianzas-logos-container {
    display: flex;
    justify-content: center;
    overflow: hidden;
    margin-top: 2rem;
    padding: 2rem 0;
}

.alianzas-logos {
    display: flex;
    gap: 30px;
    animation: scroll 20s linear infinite;
    align-items: center;
}

.alianzas-logos img {
    max-width: 120px;
    height: auto;
    filter: grayscale(100%) brightness(0.8);
    transition: filter 0.3s ease, transform 0.3s ease;
    object-fit: contain;
}

.alianzas-logos img:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 🔹 GALERÍA */
.section-galeria {
    background-color: #fafafa;
    padding: 6rem 0;
}

.grid-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.galeria-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galeria-item:hover img {
    transform: scale(1.1);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .caption {
    opacity: 1;
}

/* 🔹 CONTACTO */
.section-contacto {
    background-color: #e8f5e8;
    padding: 4rem 0;
    overflow: hidden;
}

.titulo-contac {
    text-align: center;
    top: 29px;
    position: relative;
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: center;
}

.contacto-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.logo-info {
    width: 180px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contacto-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.contacto-info p {
    font-size: 1.6rem;
    color: #2e7d32;
    margin: 0;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #2e7d32;
    font-weight: 500;
    font-size: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.5rem;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.btn-enviar {
    background-color: #2e7d32;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    font-weight: 500;
    margin-top: 0.5rem;
}

.btn-enviar:hover {
    background-color: #1b5e20;
}

.contenedor-contacto {
    max-width: 116rem;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* 🟦 FOOTER */
.footer {
    background-color: #1b5e20;
    color: white;
    text-align: center;
    padding: 2rem 0;
    font-size: 1.4rem;
}

/* 📱 IMÁGENES RESPONSIVAS */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 📱 MEDIA QUERIES (Responsive) */
@media (max-width: 992px) {
    .grid-nosotros {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .imagen-nosotros {
        justify-content: center;
    }

    .texto-nosotros p {
        text-align: left;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    html {
        font-size: 58%;
    }

    .header-container {
        padding: 0 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .navegacion-principal {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 100, 0, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .navegacion-principal.active {
        left: 0;
    }

    .menu {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        width: 100%;
        padding: 0;
    }

    .menu a {
        font-size: 2rem;
        padding: 1.5rem;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        height: 90vh;
        padding: 0 1rem;
    }

    .titulo-principal {
        font-size: 3.5rem;
    }

    .slogan {
        font-size: 1.8rem;
    }

    .section {
        padding: 5rem 0;
    }

    .section h2 {
        font-size: 2.8rem;
        margin-bottom: 2rem;
    }

    .section-contacto {
        padding: 3rem 0;
        /* Un poco menos de espacio */
    }

    .zona-h2,
    .alianzas-title {
        font-size: 2.8rem;
    }

    .contacto-grid {
        .contacto-grid {
            grid-template-columns: 1fr;
            /* Una sola columna */
            gap: 2.5rem;
            text-align: center;
        }

        .contenedor-contacto {
            padding: 0 1.5rem;
            /* Reduce el padding lateral */
        }

        .section-contacto {
            padding: 4rem 0;
        }

        .contacto-form {
            padding: 2rem;
        }

        .texto-nosotros p {
            font-size: 1.6rem;
        }

        .imagen-nosotros img {
            width: 100%;
            max-width: 300px;
        }

        .contacto-form {
            padding: 2rem;
        }

        .logo-info {
            width: 160px;
        }

        .alianzas-logos img {
            max-width: 80px;
        }

        .alianzas-logos {
            gap: 20px;
        }
    }

    @media (max-width: 480px) {
        html {
            font-size: 50%;
        }

        body {
            padding-top: 70px;
        }

        .header-container {
            padding: 0 1rem;
        }

        .hero {
            height: 80vh;
            padding: 0 1rem;
        }

        .titulo-principal {
            font-size: 2.8rem;
        }

        .slogan {
            font-size: 1.6rem;
        }

        .section {
            padding: 4rem 0;
        }

        .section h2 {
            font-size: 2.4rem;
            margin-bottom: 1.5rem;
        }

        .zona-h2,
        .alianzas-title {
            font-size: 2.4rem;
        }

        .grid-servicios,
        .grid-galeria {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .contenedor-contacto {
            padding: 0 1rem;
            /* Máximo ajuste en móviles pequeños */
        }

        .contacto-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        .logo-info {
            width: 140px;
        }

        .form-group input,
        .form-group textarea {
            font-size: 1.4rem;
            padding: 0.7rem;
        }

        .contacto-form {
            padding: 1.5rem;
        }

        .btn-enviar {
            padding: 1rem 2rem;
            font-size: 1.4rem;
        }

        .servicio-card {
            padding: 1.5rem;
        }

        .servicio-card h3 {
            font-size: 1.8rem;
        }

        .servicio-card p {
            font-size: 1.4rem;
        }

        .alianzas-logos img {
            max-width: 70px;
        }

        .texto-nosotros p {
            font-size: 1.5rem;
        }

        .contenedor {
            padding: 0 1.5rem;
        }

        .footer {
            padding: 1.5rem 0;
            font-size: 1.2rem;
        }

        .alianzas-logos {
            gap: 15px;
            animation: scroll 15s linear infinite;
        }

        @keyframes scroll {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-50%);
            }
        }
    }

    @media (max-width: 320px) {
        html {
            font-size: 45%;
        }

        .titulo-principal {
            font-size: 2.4rem;
        }

        .slogan {
            font-size: 1.4rem;
        }

        .section h2 {
            font-size: 2rem;
        }

        .contacto-form {
            padding: 1rem;
        }

        .alianzas-logos img {
            max-width: 60px;
        }
    }
}

/* 🔵 BOTÓN FLOTANTE DE WHATSAPP */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366; /* Color oficial de WhatsApp */
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: whatsapp-pulse 2s infinite;
    border: 3px solid white;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    animation: none;
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Animación suave de pulso */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsive: Ajuste en pantallas pequeñas */
@media (max-width: 480px) {
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 320px) {
    .whatsapp-btn {
        width: 45px;
        height: 45px;
        bottom: 10px;
        right: 10px;
    }
}