/* =============================================
   HOME.CSS — Estilos de la página principal
   ============================================= */

/* === Hero ===
   WPO: sin min-height full-screen; padding compacto para que
   el mapa/estadísticas sea visible above-the-fold en la mayoría
   de dispositivos sin necesidad de scroll.
*/
.hero {
    display: flex;
    align-items: center;
    background-color: var(--color-primary);
    padding: 4.5rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.07);
    pointer-events: none;
}

.hero-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.875rem;
}

.hero-title {
    font-size: clamp(1.875rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 0.875rem;
}

.hero-subtitle {
    font-size: clamp(0.9375rem, 2vw, 1.0625rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    justify-content: center;
}

/* === Sección mapa global === */

.map-section {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.map-stats-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.75rem 1.5rem;
    background: var(--color-primary);
}

.map-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0 2.5rem;
}

.map-stat-sep {
    width: 1px;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.map-stat-num {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1;
}
.map-stat-num--green  { color: #86efac; }
.map-stat-num--orange { color: #fdba74; }

.map-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.map-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}
.map-legend span { display: flex; align-items: center; gap: 0.3rem; }

.map-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.map-legend-dot--orange { background: #F97316; }
.map-legend-dot--green  { background: #16a34a; }

#home-map {
    width: 100%;
    height: 420px;
}

@media (max-width: 640px) {
    .map-stats-band {
        padding: 1.25rem 0.75rem;
    }
    .map-stat {
        padding: 0 1rem;
    }
    .map-stat-sep {
        height: 2rem;
    }
    #home-map {
        height: 280px;
    }
    .map-legend {
        justify-content: center;
    }
}

/* === Sección cómo funciona === */
.how-section {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.step-card {
    padding: 1.25rem 1.5rem;
    background-color: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition), transform var(--transition);
}

.step-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Header row: number + icon + title inline */
.step-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    flex-shrink: 0;
    background-color: var(--color-accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius);
}

.step-icon {
    flex-shrink: 0;
    color: var(--color-primary);
    display: flex;
    align-items: center;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    padding-left: 2.5rem; /* align under the title, past number+icon */
}

/* === Sección CTA final === */
.cta-section {
    padding: 5rem 0;
    background-color: var(--color-bg-subtle);
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 0.625rem;
}

.cta-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* === Responsive === */
@media (max-width: 640px) {
    .hero {
        padding: 4rem 1.25rem 2.5rem;
        align-items: flex-start;
    }

    .hero-content {
        text-align: left;
    }

    .hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        justify-content: center;
    }

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

    .step-card {
        padding: 1.5rem;
    }
}
