:root {
    --verde-claro: #f1f8e9;
    --verde-suave: #a5d6a7;
    --verde-texto: #2e7d32;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--verde-claro);
    color: #333;
    scroll-behavior: smooth;
}

/* Navbar a la derecha */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 20px 5%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--verde-texto);
    font-weight: bold;
}

/* Hero */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: #e8f5e9;
}

.img-empresa {
    max-width: 100%;
    border-radius: 15px;
    margin-top: 20px;
}

/* Acordeón de productos */
.accordion-btn {
    background-color: var(--verde-suave);
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    margin-top: 5px;
    border-radius: 5px;
}

.panel {
    padding: 0 18px;
    display: none;
    background-color: white;
    overflow: hidden;
}

/* Imagen en movimiento */
.img-animada {
    width: 200px;
    animation: flotar 3s ease-in-out infinite;
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.section { padding: 60px 10%; text-align: center; }
.sucursales { display: flex; justify-content: space-around; background: #fff; }
.footer { background: var(--verde-texto); color: white; padding: 40px; text-align: center; }
.footer a { color: white; margin: 0 10px; text-decoration: none; }

/* --- AJUSTES PARA MÓVILES --- */
@media (max-width: 768px) {
    /* El menú se centra y los enlaces se separan */
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .nav-links {
        margin-top: 15px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .nav-links a {
        margin: 0 10px;
        font-size: 14px;
    }

    /* El título inicial se hace más pequeño para que no se corte */
    .hero h1 {
        font-size: 1.8rem;
    }

    /* Las cuadrículas (familias y sucursales) pasan de filas a columnas */
    .grid-familias, .sucursales {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .sucursal {
        width: 100%;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--verde-suave);
        padding-bottom: 15px;
    }

    /* Ajuste de márgenes laterales en el contenido */
    .section {
        padding: 40px 5%;
    }

    /* El formulario ocupa todo el ancho */
    input, textarea {
        width: 90% !important;
    }

    /* La imagen animada se ajusta de tamaño */
    .img-animada {
        width: 120px;
        margin-top: 20px;
    }
}
