/*
 * AUTORETOQUES — HOW-IT-WORKS.CSS OPTIMIZADO
 * Sustituye el contenido actual de:
 * /assets/css/how-it-works.css
 *
 * - Mantiene el diseño y comportamiento actuales.
 * - Usa las variables globales definidas en main.css.
 * - Reduce colores repetidos.
 * - Conserva todos los selectores y breakpoints.
 */

.at-how {
    background: var(--at-white);
    color: var(--at-text);
}

/* HERO */

.at-how-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--at-navy-900);
    color: var(--at-white);
}

.at-how-hero__bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(13, 24, 42, .98) 0%, rgba(13, 24, 42, .90) 42%, rgba(13, 24, 42, .30) 100%),
        url("https://autoretoques.com/wp-content/uploads/2026/08/autoretoques9.webp");
    background-size: cover;
    background-position: center right;
}

.at-how-hero__inner {
    position: relative;
    z-index: 2;
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 620px) 1fr;
    align-items: center;
    gap: 50px;
}

.at-how-eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--at-yellow);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.at-how-hero h1 {
    max-width: 680px;
    margin: 0 0 20px;
    color: var(--at-white);
    font-size: clamp(42px, 5.5vw, 72px);
    line-height: .98;
    letter-spacing: -.055em;
}

.at-how-hero p {
    max-width: 540px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, .86);
    font-size: 19px;
    line-height: 1.6;
}

.at-how-btn {
    min-height: 52px;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 9px;
    background: var(--at-yellow);
    color: var(--at-navy-900);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.at-how-btn:focus{
    color:#000 !important;
}

.at-how-hero__before-after {
    display: flex;
    align-items: center;
    justify-content: center;
}

.at-how-hero__before-after div {
    width: 300px;
    height: 300px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 10%;
    background: rgba(255, 255, 255, .06);
}

.at-how-hero__before-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.at-how-hero__before-after strong {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    color: var(--contrast);
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
}

.at-how-hero__before-after > span {
    width: 46px;
    height: 46px;
    margin: 0 -10px;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--at-yellow);
    color: var(--at-navy-900);
    font-weight: 700;
}

/* SECTION HEAD */

.at-how-section-head {
    margin-bottom: 34px;
    text-align: center;
}

.at-how-section-head h2 {
    margin: 0;
    color: var(--at-navy-900);
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -.045em;
}

.at-how-section-head mark {
    background: transparent;
    color: var(--at-yellow);
}

.at-how-section-head--dark h2 {
    color: var(--at-white);
}

/* STEPS */

.at-how-steps {
    padding: 58px 0 62px;
    background: var(--at-white);
}

.at-how-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 2fr);
    gap: 14px;
}

.at-how-step {
    position: relative;
    min-height: 360px;
    padding: 34px 18px 22px;
    border: 1px solid var(--at-line);
    border-radius: 16px;
    background: var(--at-white);
    box-shadow: 0 14px 38px rgba(13, 24, 42, .055);
}

.at-how-step__number {
    position: absolute;
    left: 16px;
    top: -16px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--at-navy-900);
    color: var(--at-white);
    border: 3px solid var(--at-yellow);
    font-size: 14px;
    font-weight:700;
}

.at-how-step h3 {
    min-height: 42px;
    margin: 0 0 16px;
    color: var(--at-navy-900);
    font-size: 15px;
    line-height: 1.25;
}

.at-how-step p {
    margin: 18px 0 0;
    color: var(--at-muted);
    font-size: 13px;
    line-height: 1.55;
}

.at-how-step__visual--form {
    display: grid;
    gap: 7px;
}

.at-how-step__visual--form select,
.at-how-step__visual--form button {
    height: 31px;
    border-radius: 6px;
    border: 1px solid #dfe3ea;
    padding: 0 8px;
    font-size: 11px;
}

.at-how-step__visual--form button {
    border: 0;
    background: var(--at-yellow);
    color: var(--at-navy-900);
    font-weight:700;
    text-transform: uppercase;
}

.at-how-step__image img,
.at-how-mini-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--at-soft);
}

.at-how-mini-gallery {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 6px;
}

.dos-bloques {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.at-how-mini-gallery--three {
    grid-template-columns: repeat(3, 1fr);
}

.at-how-clock {
    height: 122px;
    display: grid;
    place-items: center;
}

.at-how-clock span {
    width: 96px;
    height: 96px;
    position: relative;
    display: block;
    border-radius: 50%;
    border: 6px solid var(--at-line);
    border-top-color: var(--at-yellow);
}

.at-how-clock span::before,
.at-how-clock span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: var(--at-navy-900);
    transform-origin: left center;
}

.at-how-clock span::before {
    width: 26px;
    height: 3px;
    transform: rotate(0deg);
}

.at-how-clock span::after {
    width: 3px;
    height: 28px;
    transform: translateY(-28px);
}

/* RESULTS */

.at-how-results {
    padding: 54px 0 58px;
    background: var(--at-navy-900);
    color: var(--at-white);
}

.at-how-results__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
}

.at-how-result-card {
    min-width: 0;
}

.at-how-result-card h3 {
    margin: 0 0 10px;
    color: var(--at-white);
    text-align: center;
    font-size: 18px;
}

.at-how-comparison {
    --position: 50%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    background: var(--at-navy-900);
}

.at-how-comparison__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    user-select: none;
    pointer-events: none;
}

.at-how-comparison__before-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    clip-path: inset(0 calc(100% - var(--position)) 0 0);
}

.at-how-comparison__range {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: ew-resize;
    opacity: 0;
}

.at-how-comparison__label {
    position: absolute;
    top: 16px;
    z-index: 2;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(13, 24, 42, .78);
    color: var(--at-white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.at-how-comparison__label--before {
    left: 16px;
}

.at-how-comparison__label--after {
    right: 16px;
}

.at-how-comparison__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position);
    z-index: 2;
    width: 2px;
    background: rgba(255, 255, 255, .9);
    transform: translateX(-50%);
    pointer-events: none;
}

.at-how-comparison--empty {
    display: grid;
    place-items: center;
    border-style: dashed;
    background: rgba(255, 255, 255, .05);
}

.at-how-comparison__placeholder {
    max-width: 260px;
    margin: 0;
    padding: 24px;
    color: rgba(255, 255, 255, .72);
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.at-how-comparison__placeholder code {
    color: var(--at-yellow);
}

.at-how-comparison__divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: var(--at-navy-900);
    color: var(--at-white);
    font-size: 19px;
    line-height: 1;
    transform: translate(-50%, -50%);
}

/* FAQS */

.at-how-faqs {
    padding: 58px 0 70px;
    background: var(--at-navy-900);
    color: var(--at-white);
}

.at-how-faqs__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 34px;
}

.at-how-faqs article {
    display: grid;
    grid-template-columns: 58px 1fr;
    column-gap: 18px;
    align-items: start;
}

.at-how-faqs span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(247, 181, 0, .45);
    border-radius: 50%;
    color: var(--at-yellow);
    font-size: 28px;
}

.at-how-faqs h3 {
    margin: 0 0 8px;
    color: var(--at-white);
    font-size: 18px;
}

.at-how-faqs p {
    grid-column: 2;
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    line-height: 1.6;
}

.at-how-faqs h2{
    color:#fff;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .at-how-steps__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .at-how-faqs__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .at-how-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .at-how-hero {
        min-height: auto;
    }

    .at-how-hero__bg {
        background:
            linear-gradient(180deg, rgba(13, 24, 42, .98) 0%, rgba(13, 24, 42, .90) 55%, rgba(13, 24, 42, .55) 100%),
            url("https://autoretoques.com/wp-content/uploads/2026/08/autoretoques9.webp");
        background-size: cover;
        background-position: 75% center;
    }

    .at-how-hero__inner {
        min-height: 620px;
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 54px;
    }

    .at-how-hero h1 {
        max-width: 360px;
        font-size: 38px;
    }

    .at-how-hero p {
        max-width: 340px;
        font-size: 15px;
    }

    .at-how-hero__before-after {
        justify-content: flex-start;
        margin-top: 18px;
    }

    .at-how-hero__before-after div {
        width: 125px;
        height: 125px;
    }

    .at-how-steps__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .at-how-step {
        min-height: auto;
        padding: 18px 18px 18px 62px;
    }

    .at-how-step__number {
        left: 18px;
        top: 18px;
    }

    .at-how-step h3 {
        min-height: auto;
        margin-bottom: 0;
    }

    .at-how-step > *:not(.at-how-step__number):not(h3) {
        margin-top: 18px;
    }

    .at-how-results__grid {
        grid-template-columns: 1fr;
    }

    .at-how-comparison img {
        height: 100%;
    }

    .at-how-faqs__grid {
        grid-template-columns: 1fr;
    }

    .at-how-faqs article {
        grid-template-columns: 46px 1fr;
    }

    .at-how-faqs span {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
}

@media (max-width: 420px) {
    .at-how-results__grid {
        grid-template-columns: 1fr;
    }
}
