:root {
    --azul: #087dcc;
    --azul-oscuro: #075b99;
    --cian: #16c4e8;
    --azul-muy-claro: #eefaff;
    --gris-fondo: #f7fafc;
    --texto: #1c2935;
    --texto-suave: #61717f;
    --blanco: #ffffff;
    --sombra: 0 10px 30px rgba(0, 80, 130, 0.08);
    --radio: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background: var(--blanco);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


/* CONTENEDOR */

.container {
    width: min(90%, 1200px);
    margin: 0 auto;
}



/* CABECERA */

.header {
    position: static !important;
    top: auto !important;
    z-index: auto;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e8eef2;
}

.header .container {
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 145px;
    height: auto;
}


/* MENÚ DE NAVEGACIÓN */

.nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav a {
    position: relative;
    font-size: 15px;
    font-weight: 600;
    color: var(--texto);
    transition: color 0.3s ease;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    background: var(--cian);
    transition: width 0.3s ease;
}

.nav a:hover {
    color: var(--azul);
}

.nav a:hover::after {
    width: 100%;
}


/* PORTADA */

.hero {
    min-height: 680px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 85% 50%,
            rgba(22, 196, 232, 0.12),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f1fbfe 100%
        );
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
}

.hero-content {
    max-width: 600px;
}

.hero-subtitle,
.section-subtitle {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--azul);
}

.hero h1 {
    margin-bottom: 25px;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero h1 strong {
    display: block;
    color: var(--azul);
}

.hero p {
    max-width: 530px;
    margin-bottom: 35px;
    font-size: 18px;
    color: var(--texto-suave);
}


/* BOTONES */

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    color: var(--blanco);
    background: var(--azul);
    box-shadow: 0 8px 20px rgba(8, 125, 204, 0.25);
}

.btn-primary:hover {
    background: var(--azul-oscuro);
    box-shadow: 0 12px 25px rgba(8, 125, 204, 0.30);
}

.btn-secondary {
    color: var(--azul);
    background: var(--blanco);
    border: 1px solid #cfe8f2;
}

.btn-secondary:hover {
    border-color: var(--azul);
}


/* IMAGEN DE PORTADA */

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(22, 196, 232, 0.10);
    z-index: 0;
}

.hero-image img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    object-fit: contain;
}


/* SECCIONES GENERALES */

.section {
    padding: 110px 0;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 18px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
}

.section-heading p {
    color: var(--texto-suave);
    font-size: 17px;
}


/* INTRODUCCIÓN */

.intro {
    background: var(--blanco);
}

.intro-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.intro-text h3 {
    margin-bottom: 20px;
    font-size: 30px;
}

.intro-text p {
    margin-bottom: 15px;
    color: var(--texto-suave);
    font-size: 17px;
}


/* ZONAS DE RECUPERACIÓN */

.zones {
    background: var(--gris-fondo);
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.zone-card {
    overflow: hidden;
    background: var(--blanco);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.zone-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 80, 130, 0.13);
}

.zone-image {
    height: 230px;
    overflow: hidden;
}

.zone-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.zone-card:hover .zone-image img {
    transform: scale(1.05);
}

.zone-content {
    padding: 28px;
}

.zone-content h3 {
    margin-bottom: 10px;
    font-size: 25px;
}

.zone-content p {
    margin-bottom: 20px;
    color: var(--texto-suave);
}

.zone-content a {
    color: var(--azul);
    font-size: 14px;
    font-weight: 700;
}


/* MÁQUINAS */

.machines {
    background: var(--blanco);
}

.machines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.machine-card {
    display: grid;
    grid-template-columns: 45% 55%;
    overflow: hidden;
    background: var(--azul-muy-claro);
    border-radius: var(--radio);
    border: 1px solid #dff1f7;
}

.machine-image {
    min-height: 350px;
}

.machine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.machine-content {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.machine-content h3 {
    margin-bottom: 15px;
    font-size: 25px;
}

.machine-content p {
    margin-bottom: 25px;
    color: var(--texto-suave);
}

.machine-content .btn {
    align-self: flex-start;
}


/* CÓMO FUNCIONA */

.how-it-works {
    background: var(--gris-fondo);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.step {
    padding: 30px;
    background: var(--blanco);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

.step-number {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 30px;
    font-weight: 800;
    color: var(--cian);
}

.step h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.step p {
    color: var(--texto-suave);
}


/* CONTACTO */

.contact {
    position: relative;
    background:
        linear-gradient(
            135deg,
            var(--azul),
            #00a9d5
        );
    color: var(--blanco);
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -200px;
    right: -100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.contact-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.contact-text {
    max-width: 650px;
}

.contact-text h2 {
    margin-bottom: 20px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
}

.contact-text p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact .btn-primary {
    background: var(--blanco);
    color: var(--azul);
}

.btn-whatsapp {
    color: var(--blanco);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-whatsapp:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* PIE DE PÁGINA */

.footer {
    padding: 60px 0 25px;
    background: #102432;
    color: var(--blanco);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    width: 130px;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.65);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cian);
}

.footer-bottom {
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
}


/* ACCESIBILIDAD Y NAVEGACIÓN */

section[id] {
    scroll-margin-top: 100px;
}

a:focus-visible {
    outline: 3px solid var(--cian);
    outline-offset: 4px;
    border-radius: 4px;
}


/* TABLET */

@media (max-width: 950px) {

    .header .container {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px 0;
    }

    .nav ul {
        gap: 18px;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .nav a {
        font-size: 14px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-content {
        max-width: 700px;
        margin: 0 auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image img {
        max-width: 400px;
    }

    .zones-grid {
        grid-template-columns: 1fr 1fr;
    }

    .zones-grid .zone-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

    .machines-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .contact-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-buttons {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}


/* MÓVIL */

@media (max-width: 650px) {

    .header .container {
        min-height: auto;
        gap: 10px;
    }

    .logo img {
        width: 115px;
    }

    .nav {
        width: 100%;
    }

    .nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 14px;
    }

    .nav a {
        font-size: 12px;
    }

    /* La navegación mantiene todos los enlaces visibles */

    .nav li:nth-child(2),
    .nav li:nth-child(3) {
        display: list-item;
    }

    .hero {
        min-height: auto;
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 42px;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-image::before {
        width: 280px;
        height: 280px;
    }

    .section {
        padding: 75px 0;
    }

    .section-heading {
        margin-bottom: 40px;
    }

    .zones-grid {
        grid-template-columns: 1fr;
    }

    .zones-grid .zone-card:last-child {
        grid-column: auto;
        max-width: none;
    }

    .machine-card {
        grid-template-columns: 1fr;
    }

    .machine-image {
        min-height: 260px;
    }

    .machine-content {
        padding: 25px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .contact-text h2 {
        font-size: 34px;
    }

    .contact-buttons {
        width: 100%;
        flex-direction: column;
    }

    .contact-buttons .btn {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    section[id] {
        scroll-margin-top: 125px;
    }
}


/* RESPETAR LAS PREFERENCIAS DE MOVIMIENTO */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
