/* =====================================================
   RESET / CONFIGURACIÓN BASE
   ===================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #F9FAFB;
    color: #1F2937;
}

/* Evita scroll lateral en móviles reales */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mantiene el footer abajo */
main {
    flex: 1;
}

/* Crea contexto de render estable (clave mobile) */
header,
section {
    position: relative;
    isolation: isolate;
}

/* =====================================================
   HERO (mobile first – sin vh)
   ===================================================== */

.hero {
    width: 100%;
    padding: 4rem 1.5rem 5rem;
    background: linear-gradient(135deg, #4F46E5, #3B82F6);
    color: #fff;

    /* separación REAL para evitar solapamientos */
    margin-bottom: 4rem;
}

/* Texto hero */
.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Botón */
.hero .btn-light {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero .btn-light:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Imagen hero */
.hero-image {
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
}

.hero-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   TABLET / DESKTOP
   ===================================================== */

@media (min-width: 768px) {
    .hero {
        padding: 6rem 4rem;
        min-height: 60vh;
        /* solo desktop */
    }

    .hero h1 {
        font-size: 4rem;
        text-align: left;
    }

    .hero p {
        font-size: 1.5rem;
        text-align: left;
    }

    .hero-image {
        margin-top: 0;
    }
}

/* =====================================================
   BENEFICIOS
   ===================================================== */

.benefits {
    padding: 5rem 2rem;
    background-color: #F3F4F6;
}

.benefits h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.benefit-card {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.benefit-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4F46E5;
}

/* =====================================================
   CÓMO FUNCIONA
   ===================================================== */

.how-it-works {
    padding: 5rem 2rem;
    background-color: #E0E7FF;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.step {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   REGISTRO (FORMULARIO)
   ===================================================== */

.signup {
    padding: 5rem 2rem;
    background-color: #3B82F6;
    color: #fff;
}

.signup h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Inputs */
.signup .form-control {
    background-color: #fff;
    color: #1F2937;
    border-radius: 0.5rem;
}

.signup .form-floating label {
    color: #6B7280;
}

/* Focus limpio */
.signup .form-control:focus {
    box-shadow: none;
    border-color: #2563EB;
}

/* Botón */
.signup button {
    border-radius: 0.5rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.signup button:hover {
    transform: scale(1.03);
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background-color: #111827;
    color: #fff;
    padding: 2.5rem 2rem;
    text-align: center;
}

/* =====================================================
   MOBILE EXTRA
   ===================================================== */

@media (max-width: 767px) {

    /* Ajuste de padding general */
    .benefits,
    .how-it-works,
    .signup {
        padding: 3rem 1.25rem;
    }

    /* HERO MOBILE */
    .hero {
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-image {
        order: 2;
        margin-top: 2rem;
        max-width: 100%;
    }

    .hero-image img {
        max-height: 280px;
        width: 100%;
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .hero-image img {
        max-height: 280px;
        width: 100%;
        object-fit: contain;
    }
}