/* White Fox · página CMS #5 "Cambios y devoluciones" (plantilla templates/cms/page-5.tpl).
   Se carga solo en esa página. Todas las clases empiezan con wfr-.
   Computadora = 992 px o más; celular/tablet = menos. Sin JavaScript se ven los cuatro casos completos. */

/* Contenedor de la página: 1040 px de contenido en computadora y 20 px de margen en celular.
   Las migas están dentro del mismo contenedor, así que quedan alineadas con el título. */
body#cms.cms-id-5 #wrapper > .container {
    width: 100%;
    max-width: 1080px;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

.wfr {
    --wfr-navy: #1E2A3A;
    --wfr-gold: #B3956A;
    --wfr-cream: #F9F4F0;
    --wfr-gray: #5E6672;
    --wfr-line: rgba(30, 42, 58, .16);
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: 24px 0 72px;
    font-family: 'PT Serif', serif;
    color: var(--wfr-navy);
}
.wfr *, .wfr *::before, .wfr *::after { box-sizing: border-box; }
#wrapper .wfr p, #wrapper .wfr ol, #wrapper .wfr h1, #wrapper .wfr h2 { margin: 0; padding: 0; }
#wrapper .wfr ol { list-style: none; }

/* ---------- Encabezado ---------- */
#wrapper .wfr .wfr__title {
    font-family: inherit; font-size: 44px; font-weight: 500; line-height: 1.15;
    letter-spacing: 0; text-transform: none; color: var(--wfr-navy);
}
#wrapper .wfr .wfr__intro { max-width: 100%; margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--wfr-gray); text-wrap: balance; }
#wrapper .wfr .wfr__ask { margin-top: 44px; margin-bottom: 18px; font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--wfr-navy); }

/* ---------- Selector de casos (computadora) ---------- */
.wfr-tabs { display: none; }
.wfr.is-js .wfr-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

#wrapper .wfr .wfr-tab {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    min-height: 0; margin: 0; padding: 22px 20px 20px;
    background: #fff; color: var(--wfr-navy);
    border: 1px solid var(--wfr-line); border-radius: 0; box-shadow: none;
    font-family: inherit; font-size: 17px; font-weight: 400; line-height: 1.3;
    letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
#wrapper .wfr .wfr-tab:hover { border-color: rgba(30, 42, 58, .5); background: #fff; color: var(--wfr-navy); }
#wrapper .wfr .wfr-tab:focus-visible { outline: 2px solid var(--wfr-navy); outline-offset: 2px; }
#wrapper .wfr .wfr-tab[aria-pressed="true"] { border-color: var(--wfr-navy); box-shadow: inset 0 0 0 1px var(--wfr-navy); background: var(--wfr-cream); }
.wfr .wfr-ico { flex: none; width: 30px; height: 30px; color: var(--wfr-gold); }
.wfr-tab__name { display: block; margin-top: 16px; font-size: 17px; line-height: 1.3; color: var(--wfr-navy); }
.wfr-tab__tag { display: block; margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--wfr-gray); }

/* ---------- Casos ---------- */
.wfr-cases { margin-top: 36px; padding-top: 44px; border-top: 1px solid rgba(30, 42, 58, .12); }
.wfr-case { scroll-margin-top: 110px; }
.wfr-case + .wfr-case { margin-top: 64px; }
.wfr.is-js .wfr-case + .wfr-case { margin-top: 0; }
.wfr.is-js .wfr-case:not(.is-open) { display: none; }
.wfr-acc { display: none; }   /* la cabecera del acordeón es solo para celular */

#wrapper .wfr .wfr-case__title { font-family: inherit; font-size: 30px; font-weight: 500; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--wfr-navy); }
#wrapper .wfr .wfr-case__term { margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--wfr-gray); }

/* Pasos: círculo dorado de 28 px unidos por una línea fina */
#wrapper .wfr .wfr-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 36px; align-items: start; }
.wfr-step { position: relative; display: block; min-width: 0; margin: 0; padding: 0; }
.wfr-step__n {
    display: flex; align-items: center; justify-content: center;
    flex: none; width: 28px; height: 28px; border: 1px solid var(--wfr-gold); border-radius: 50%;
    background: #fff; color: var(--wfr-navy); font-size: 13.5px; line-height: 1; position: relative; z-index: 1;
}
.wfr-step:not(:last-child)::after { content: ''; position: absolute; top: 14px; left: 28px; right: -40px; height: 1px; background: var(--wfr-gold); }
.wfr-step__text { display: block; margin-top: 16px; padding-right: 8px; }
.wfr-step__title { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--wfr-navy); }
.wfr-step__detail { display: block; margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--wfr-gray); }

/* Acciones */
.wfr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
#wrapper .wfr .wfr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; height: 48px; margin: 0; padding: 0 28px;
    background: var(--wfr-navy); color: var(--wfr-cream); border: 1px solid var(--wfr-navy); border-radius: 0; box-shadow: none;
    font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1; letter-spacing: 0; text-transform: none; text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
#wrapper .wfr .wfr-btn:hover { background: #2B3B50; border-color: #2B3B50; color: var(--wfr-cream); text-decoration: none; }
#wrapper .wfr .wfr-btn:focus-visible { outline: 2px solid var(--wfr-gold); outline-offset: 2px; }
#wrapper .wfr .wfr-btn--line { background: #fff; color: var(--wfr-navy); border-color: rgba(30, 42, 58, .4); }
#wrapper .wfr .wfr-btn--line:hover { background: var(--wfr-cream); border-color: var(--wfr-navy); color: var(--wfr-navy); }

#wrapper .wfr .wfr-cond-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--wfr-navy);
    font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.3; letter-spacing: 0; text-transform: none;
    text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
#wrapper .wfr .wfr-cond-btn:hover { background: none; color: var(--wfr-gold); }
#wrapper .wfr .wfr-cond-btn:focus-visible { outline: 2px solid var(--wfr-navy); outline-offset: 3px; }
.wfr-cond-btn .wfr-chev { transition: transform .2s ease; }
.wfr-cond-btn[aria-expanded="true"] .wfr-chev { transform: rotate(180deg); }

/* Condiciones: desplegadas, en gris. Sin JavaScript se ven abiertas. */
.wfr-cond { max-width: 760px; margin-top: 20px; font-size: 15px; line-height: 1.7; color: var(--wfr-gray); }
.wfr-cond[hidden] { display: none; }
#wrapper .wfr .wfr-cond__list { margin: 0; padding: 0 0 0 20px; list-style: disc; }
#wrapper .wfr .wfr-cond__list li { margin: 0 0 8px; padding: 0; font-size: 15px; line-height: 1.7; color: var(--wfr-gray); }
#wrapper .wfr .wfr-cond__list li:last-child { margin-bottom: 0; }
#wrapper .wfr .wfr-cond__list li::marker { color: var(--wfr-gray); }
/* Mail dentro de los pasos: link del mismo gris, subrayado */
#wrapper .wfr .wfr-mail { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
#wrapper .wfr .wfr-mail:hover { color: var(--wfr-navy); }

/* ---------- Bloque final ---------- */
.wfr-help { margin-top: 72px; background: #fff; border-top: 1px solid rgba(30,42,58,.12); }
.wfr-help__inner { padding: 56px 0; text-align: center; }
#wrapper .wfr .wfr-help__title { font-family: inherit; font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: 0; text-transform: none; color: var(--wfr-navy); }
#wrapper .wfr .wfr-help__text { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--wfr-gray); }
.wfr-help__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
#wrapper .wfr .wfr-help__legal { margin-top: 28px; font-size: 13.5px; line-height: 1.6; color: var(--wfr-gray); }
#wrapper .wfr .wfr-help__legal a { color: var(--wfr-gray); text-decoration: underline; text-underline-offset: 3px; }
#wrapper .wfr .wfr-help__legal a:hover { color: var(--wfr-navy); }

/* ---------- Celular y tablet ---------- */
@media (max-width: 991px) {
    .wfr { padding: 12px 0 0; }
    #wrapper .wfr .wfr__title { font-size: 30px; }
    #wrapper .wfr .wfr__intro { margin-top: 12px; font-size: 16px; }
    #wrapper .wfr .wfr__ask { margin-top: 28px; margin-bottom: 14px; font-size: 18px; }

    .wfr.is-js .wfr-tabs { display: none; }
    .wfr.is-js .wfr-case:not(.is-open) { display: block; }   /* en celular los 4 casos se ven; cada acordeón muestra u oculta su contenido */
    .wfr-cases { margin-top: 0; padding-top: 0; border-top: 0; }
    .wfr-case + .wfr-case, .wfr.is-js .wfr-case + .wfr-case { margin-top: 12px; }
    .wfr-case { border: 1px solid var(--wfr-line); background: #fff; scroll-margin-top: 80px; }
    .wfr.is-js .wfr-case.is-open { border-color: var(--wfr-navy); }

    #wrapper .wfr .wfr-acc {
        display: flex; align-items: center; gap: 16px; width: 100%; min-height: 0; margin: 0; padding: 18px 18px;
        background: #fff; color: var(--wfr-navy); border: 0; border-radius: 0; box-shadow: none;
        font-family: inherit; text-align: left; letter-spacing: 0; text-transform: none; cursor: pointer;
    }
    #wrapper .wfr .wfr-acc:hover { background: #fff; color: var(--wfr-navy); }
    #wrapper .wfr .wfr-acc:focus-visible { outline: 2px solid var(--wfr-navy); outline-offset: -2px; }
    .wfr.is-js .wfr-case.is-open > .wfr-acc, #wrapper .wfr.is-js .wfr-case.is-open > .wfr-acc:hover { background: var(--wfr-cream); }
    .wfr-acc__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
    .wfr-acc__name { font-size: 17px; line-height: 1.3; color: var(--wfr-navy); }
    .wfr-acc__tag { font-size: 14px; line-height: 1.4; color: var(--wfr-gray); }
    .wfr-acc .wfr-chev { flex: none; transition: transform .2s ease; }
    .wfr-acc[aria-expanded="true"] .wfr-chev { transform: rotate(180deg); }

    .wfr.is-js .wfr-case:not(.is-open) .wfr-case__body { display: none; }
    .wfr-case__body { padding: 24px 18px 26px; border-top: 1px solid rgba(30, 42, 58, .1); }
    .wfr-case__title { display: none; }
    #wrapper .wfr .wfr-case__term { margin-top: 0; font-size: 16px; }

    /* Pasos apilados, con la línea vertical entre círculos */
    #wrapper .wfr .wfr-steps { display: block; margin-top: 24px; }
    .wfr-step { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 24px; }
    .wfr-step:last-child { padding-bottom: 0; }
    .wfr-step:not(:last-child)::after { top: 28px; bottom: 0; left: 14px; right: auto; width: 1px; height: auto; }
    .wfr-step__text { margin-top: 2px; padding-right: 0; }

    .wfr-actions { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 28px; }
    #wrapper .wfr .wfr-btn { width: 100%; }
    #wrapper .wfr .wfr-cond-btn { justify-content: center; }

    /* Bloque final: fondo blanco, línea fina arriba, botones a todo el ancho */
    .wfr-help { margin: 40px 0 0; }
    .wfr-help__inner { padding: 40px 0; }
    #wrapper .wfr .wfr-help__title { font-size: 22px; }
    .wfr-help__actions { flex-direction: column; margin-top: 22px; }
    #wrapper .wfr .wfr-help__legal { margin-top: 22px; }
}

/* ---------- Todo centrado ---------- */
/* Encabezado: centrado en computadora y en celular */
#wrapper .wfr .wfr__head { text-align: center; }
#wrapper .wfr .wfr__intro { margin-left: auto; margin-right: auto; }

@media (min-width: 992px) {
    /* Tarjetas: ícono, nombre y plazo al centro */
    #wrapper .wfr .wfr-tab { align-items: center; text-align: center; }

    /* Detalle del caso */
    .wfr-case__body { text-align: center; }
    #wrapper .wfr .wfr-case__term { max-width: 720px; margin-left: auto; margin-right: auto; }
    /* Pasos: cada círculo al centro de su columna; la línea va de un círculo al siguiente */
    #wrapper .wfr .wfr-steps { justify-items: center; }
    .wfr-step { width: 100%; display: flex; flex-direction: column; align-items: center; }
    .wfr-step:not(:last-child)::after { left: calc(50% + 14px); right: calc(14px - 40px - 50%); }
    .wfr-step__text { padding-right: 0; max-width: 320px; }
    .wfr-actions { justify-content: center; }
    /* Condiciones: el bloque va al centro; las viñetas se leen alineadas a la izquierda */
    .wfr-cond { margin-left: auto; margin-right: auto; text-align: left; }
}
