/*
 * FILE: assets/css/components/section-como-funciona.css
 * COMPONENT: section-como-funciona.php
 * PURPOSE: Stepper horizontal de 4 pasos con conector entre ellos
 */

/* ============================================================
   SECTION DOTS — Decoración de puntitos
   ============================================================ */
.section-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.section-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #1758A0;
    opacity: 0.4;
}

.section-dots span:nth-child(3) {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================================================
   STEPS LIST — Grid horizontal
   ============================================================ */
.steps-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    list-style: none;
    position: relative;
    margin-bottom: var(--space-12);
}

/* Línea conectora entre pasos — 3 colores institucionales */
.steps-list::before {
    content: '';
    position: absolute;
    top: 52px; /* centro del número */
    left: calc(12.5% + 20px);
    right: calc(12.5% + 20px);
    height: 2px;
    background: linear-gradient(
        to right,
        #45A85A   0%,
        #1758A0  50%,
        #E94E89 100%
    );
    z-index: 0;
}

/* ============================================================
   STEP — Item individual
   ============================================================ */
.steps-list__item {
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 var(--space-4);
}

/* Número del paso */
.step__number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: #45A85A;
    color: var(--color-neutral-0);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(69, 168, 90, 0.15);
    flex-shrink: 0;
}

/* Ícono */
.step__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background-color: rgba(69, 168, 90, 0.10);
    color: #205F3E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.step:hover .step__icon {
    background-color: #45A85A;
    color: var(--color-neutral-0);
}

/* Título */
.step__title {
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-neutral-900);
    margin-bottom: var(--space-3);
    line-height: var(--line-height-tight);
}

/* Descripción */
.step__description {
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
    line-height: var(--line-height-loose);
    margin-bottom: var(--space-4);
}

/* Wrapper de contenido textual — necesario para flex-row en mobile */
.step__body {
    display: contents;
}

/* Meta (badge de período) */
.step__meta {
    margin-top: auto;
}

/* ============================================================
   RESPONSIVE — Stepper vertical en mobile
   ============================================================ */
@media (max-width: 1024px) {
    .steps-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-10);
    }

    .steps-list::before {
        display: none;
    }
}

/* Tablet pequeña — 2 col con gap reducido */
@media (max-width: 768px) {
    .steps-list {
        gap: var(--space-6);
    }

    .step {
        padding: 0 var(--space-2);
    }
}

/* Mobile — 1 col, layout horizontal número + texto */
@media (max-width: 640px) {
    .steps-list {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .step {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: var(--space-4);
        padding: 0;
    }

    .step__number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .step__icon {
        display: none;
    }

    .step__body {
        display: block;
        flex: 1;
        min-width: 0;
    }

    .step__title {
        font-size: var(--text-sm);
    }

    .step__description {
        font-size: var(--text-xs);
    }
}

/* Mobile muy pequeño — 360–390px */
@media (max-width: 400px) {
    .steps-list {
        gap: var(--space-4);
    }

    .step__number {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }
}

/* ============================================================
   IMAGEN INSTITUCIONAL — reemplaza el bloque de etapas
   ============================================================ */
.como-funciona__visual {
    display: block;
    max-width: 560px;
    width: 100%;
    margin: 0 auto var(--space-8);
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 1px 4px  rgba(0, 0, 0, 0.04);
}

.como-funciona__img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
}

/* Tablet */
@media (max-width: 768px) {
    .como-funciona__visual {
        max-width: 450px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .como-funciona__visual {
        width: 80%;
        max-width: 320px;
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }
}
