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

html {
    scroll-behavior: smooth;
}

body {
    padding-top: 80px;
}

section {
  scroll-margin-top: 90px; /* ajusta según altura del header */
}
/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fff;
    z-index: 1000;
}

.logo {
    height: 50px;
    margin-left: 20px;
    margin-right: 20px;
}

.nav {
    display: flex;
    gap: 40px;
    margin-left: auto;
}

.nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
}

.btn-contacto {
    background: #2ecc71;
    color: white;
    padding: 10px 25px;
    margin: 0 20px 0 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

.btn-contacto:hover {
    background: #27ae60;
}

/* HERO */
.hero {
    min-height: calc(100vh - 80px);
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 8%;
    color: white;

    background:
    linear-gradient(to right, rgba(0,0,0,0.7), rgba(8,118,54,0.5)),
    url("img_hoja1/Primera imagen.jpeg") center center / cover no-repeat;
}

.contenido_inicio {
    max-width: 600px;
}

.contenido_inicio h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.contenido_inicio span {
    color: #1eff7c;
}

.contenido_inicio p {
    font-size: 20px;
    margin-bottom: 25px;
    color: #ddd;
}

.btn-hero {
        display: block;
    margin-top: 15px;
    width: 250px;
}

.btn-hero {
    background: white;
    color: #2c3e50;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.btn-hero:hover {
    background: #1b7b43;
    color: white;
}



.subtitulo {
    text-align: center;
}
/* TEXTOS GENERALES */
.subtitulo, .titulo, .descripcion {
    text-align: center;
}

.titulo {
    font-size: 32px;
    margin: 10px 0;
}

.descripcion {
    color: #64748b;
    margin-bottom: 40px;
}

/* SERVICIOS */
/* TABS */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: #eaeaea;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
}

.tab.active {
    background: linear-gradient(135deg, #4e73df, #8e44ad);
    color: white;
}

/* GRID */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-left: 30px;
    margin-right: 30px;
}

/* CARD */
.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-family: Arial;
}

.card-content p {
    text-align: justify;
}

/* CTA */
.cta {
    margin-top: 50px;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    color: white;

    background: linear-gradient(135deg, #2d6cdf, #8e44ad);
}

.cta h2 {
    margin-bottom: 10px;
}

.cta p {
    margin-bottom: 20px;
}

.btn-cta {
    background: white;
    color: #2d6cdf;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.tab-content.active {
    display: block;
    opacity: 1;
}


/* NOSOTROS */
.nosotros-section {
    padding: 80px 10%;
    text-align: center;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.box {
    display: flex;
    gap: 20px;
    padding: 30px;
    border-radius: 15px;
    background: #f5f7f8;
    flex-wrap: wrap;
}

.icono {
    min-width: 50px;
    height: 50px;
    background: #2ecc71;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
}


.texto-box h3 {
    color: #2ecc71;
    padding-bottom: 10px;
    padding-top: 15px;
    font-size: 20px;
    text-transform: uppercase;
}

.texto-box p {
    color: #555;
    line-height: 1.3;
    text-align: justify;
}

/* VALORES */
.valores {
    margin-top: 60px;
    padding: 25px 40px; /* 🔥 más espacio interno */
    border-radius: 20px;
    color: white;
    background: linear-gradient(135deg, #1e7f5c, #2ecc71);
}

.valores h2 {
    margin-bottom: 20px; /* 🔥 separa título */
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 4fr));
    gap: 30px; /* 🔥 más separación entre bloques */
}

.valor {
    text-align: center;
    padding: 10px;
}

.valor .icono {
    margin: 0 auto 15px; /* 🔥 separa icono del texto */
}

.valor h4 {
    margin-bottom: 10px; /* 🔥 separa subtítulo */
}

.valor p {
    line-height: 1.5;
    text-align: justify;
    margin-left: 0;
}

/* CONTACTO */
.contacto {
    background: #f8fafc;
    padding: 80px 20px;
    text-align: center;
}

.subtitulo {
    color: #22c55e;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.titulo-contacto {
    font-size: 32px;
    margin-bottom: 10px;
}

.contenedor {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

/* INFO */
.info {
    text-align: left;
    max-width: 350px;
}

.item {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.item :hover, .telefono :hover {
    font-weight: bold;
    color: #22c55e;
}


/* FORMULARIO */
.formulario {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: left;
}

.formulario h3 {
    margin-bottom: 18px;
}

.formulario input,
.formulario textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
}

.formulario button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.formulario button:hover {
    opacity: 0.9;
}

/* FOOTER */
.footer {
    background: linear-gradient(135deg, #064223, #1f5f4a, #229552);
box-shadow: inset 0 0 100px rgba(100, 204, 100, 0.2);
    color: white;
    padding: 50px 40px 20px;
}

.contenedor-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col a {
    display: block;;
    color: white;
    text-decoration: none;
    margin: 8px 0;
}

.footer-col a:hover {
    text-decoration: underline;
}

.logo-footer {
    width: 160px;
    filter: brightness(0) invert(1);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #1e293b;
    padding-top: 15px;
    font-size: 14px;
}

.mensaje-exito {
    display: none;
    margin-top: 15px;
    color: #2ecc71;
    font-weight: bold;
}

.horario p {
    font-weight: 700;
    text-transform: uppercase;
}

.horario {
    margin-top: 18px;
}

.horario small {
    font-weight: 400;
    text-transform: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: black;
    transition: 0.3s;
}

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

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

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

@media (max-width: 768px) {

    /* mostrar botón */
    .menu-toggle {
        display: flex;
        margin-left: auto;
        margin-right: 12px;
        order: 2;
    }

    /* ocultar menú */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);

        flex-direction: column;

        max-height: 0;       /* 🔥 escondido */
        overflow: hidden;

        transition: max-height 0.4s ease;
    }

    .nav a {
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    /* mostrar menú */
    .nav.active {
        max-height: 400px;
    }

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

    .btn-contacto {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 8px 0 0;
        padding: 9px 18px;
        font-size: 14px;
        white-space: nowrap;
        order: 3;
    }

    .logo {
        margin: 0;
        order: 1;
    }

    .header {
        gap: 12px;
    }

    .hero {
        padding: 30px 6%;
        background-position: center center;
    }

    .contenido_inicio {
        max-width: 100%;
    }

    .contenido_inicio h1 {
        font-size: 32px;
        line-height: 1.15;
        word-break: break-word;
    }

    .contenido_inicio p {
        font-size: 16px;
        line-height: 1.5;
    }

    .btn-hero {
        width: 100%;
        max-width: 260px;
    }

    .valores-grid {
        grid-template-columns: 1fr;
    }

    .nosotros-grid {
        grid-template-columns: 1fr;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
        margin-left: 14px;
        margin-right: 14px;
    }

    .card {
        text-align: center;
    }

    .card-content h3 {
        text-align: left;
    }

    .card-content p {
        text-align: justify;
    }

    .valor {
        text-align: center;
    }

    .valor p {
        text-align: justify;
    }

}
