/*
 * ============================================================
 * Este código lleva la huella de Jose Antonio Echevarria – ECH
 * - echevarria@megustanlastic.es - 06/11/2026.
 * Desarrollo generado para el Centro Asturiano de Oviedo.
 * No modificar sin permiso.
 * ============================================================
 *
 * public/css/voluntarios.css
 * Formulario de voluntariado · mobile-first.
 * Todas las clases llevan prefijo .vol para no chocar con main.css
 */

.vol {
    --vol-azul: #0e4ca1;
    --vol-azul-osc: #0a3a7c;
    --vol-azul-claro: #eaf1fb;
    --vol-oro: #c9a84c;
    --vol-oro-claro: #faf4e3;
    --vol-tinta: #13233d;
    --vol-gris: #5b6b82;
    --vol-linea: #d8e2f0;
    --vol-error: #c0392b;
    --vol-radio: 14px;

    background: #fff;
    color: var(--vol-tinta);
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    /* La cabecera del sitio es fija: dejamos su altura + aire */
    padding: calc(var(--header-h, 72px) + 2.5rem) 0 4rem;
}
.vol *, .vol *::before, .vol *::after { box-sizing: border-box; }
.vol__wrap { max-width: 760px; margin: 0 auto; padding: 0 1.1rem; }

/* ─── Cabecera ──────────────────────────────────────────── */
.vol-hero { margin-bottom: 2rem; }
.vol-hero__anio {
    display: flex; align-items: center; gap: .75rem;
    margin: 0 0 .9rem; font-weight: 800; letter-spacing: .02em;
    color: var(--vol-azul); font-size: 1rem;
}
.vol-hero__anio span:first-child { color: var(--vol-gris); font-weight: 600; }
.vol-hero__anio span:first-child::after {
    content: ''; display: inline-block; width: 2.5rem; height: 3px;
    background: var(--vol-oro); vertical-align: middle; margin-left: .75rem; border-radius: 2px;
}
.vol-hero__titulo {
    font-size: clamp(1.9rem, 7vw, 3rem); line-height: 1.08; font-weight: 800;
    color: var(--vol-azul); margin: 0 0 1rem; letter-spacing: -.02em;
}
.vol-hero__sub {
    margin: -.4rem 0 1.1rem; font-size: clamp(.95rem, 3.6vw, 1.1rem); font-weight: 600;
    color: #8a6d1f; letter-spacing: .01em;
}
.vol-hero__texto { font-size: 1.02rem; line-height: 1.6; color: var(--vol-tinta); margin: 0 0 1.25rem; max-width: 60ch; }
.vol-hero__claves { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.vol-hero__claves li {
    font-size: .92rem; color: var(--vol-gris);
    padding-left: 1.1rem; position: relative;
}
.vol-hero__claves li::before {
    content: ''; position: absolute; left: 0; top: .5em;
    width: .45rem; height: .45rem; border-radius: 50%; background: var(--vol-oro);
}
.vol-hero__claves strong { color: var(--vol-tinta); font-weight: 700; }

/* ─── Formulario y pasos ────────────────────────────────── */
.vol-form { position: relative; }
/* Al desplazar a un paso o a un error, que no quede bajo la cabecera fija */
.vol-form, .vol-campo, .vol-grupo, .vol-ok { scroll-margin-top: calc(var(--header-h, 72px) + 1rem); }
.vol-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.vol-progreso { display: none; }
.vol-pasos { display: none; }

.vol-form.is-js .vol-progreso {
    display: block; padding: .2rem 0 .7rem; margin-bottom: 1rem;
}
.vol-progreso__barra { height: 6px; background: var(--vol-azul-claro); border-radius: 99px; overflow: hidden; }
.vol-progreso__barra span {
    display: block; height: 100%; width: 0; background: var(--vol-oro);
    border-radius: 99px; transition: width .35s ease;
}
.vol-progreso__txt { margin: .55rem 0 0; font-size: .85rem; color: var(--vol-gris); }
.vol-progreso__txt b { color: var(--vol-azul); }

.vol-paso {
    border: 0; margin: 0 0 2rem; padding: 0; min-width: 0;
}
.vol-form.is-js .vol-paso { display: none; }
.vol-form.is-js .vol-paso.is-activo { display: block; animation: volEntra .3s ease; }
@keyframes volEntra { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.vol-paso legend {
    font-size: 1.3rem; font-weight: 800; color: var(--vol-azul);
    padding: 0; margin-bottom: 1.2rem; width: 100%;
}

/* ─── Campos de texto ───────────────────────────────────── */
.vol-campo { margin-bottom: 1.15rem; }
.vol-campo label, .vol-pregunta {
    display: block; font-weight: 600; font-size: .95rem; margin-bottom: .45rem; line-height: 1.4;
}
.vol-campo small, .vol-pregunta small { font-weight: 500; color: var(--vol-gris); font-size: .82rem; }
.vol-pregunta small { display: block; margin-top: .15rem; }
.vol-campo input, .vol-campo textarea {
    width: 100%; font: inherit; font-size: 16px; /* 16px evita el zoom de iOS */
    color: var(--vol-tinta); background: #fff;
    border: 1.5px solid var(--vol-linea); border-radius: 10px;
    padding: .8rem .9rem; min-height: 50px;
    transition: border-color .15s, box-shadow .15s;
}
.vol-campo textarea { resize: vertical; min-height: 110px; }
.vol-campo input:focus, .vol-campo textarea:focus {
    outline: none; border-color: var(--vol-azul); box-shadow: 0 0 0 3px rgba(14, 76, 161, .15);
}
.vol-campo.is-error input, .vol-campo.is-error textarea { border-color: var(--vol-error); }
.vol-fila { display: grid; gap: 0 1rem; }

.vol-nota { font-size: .88rem; padding: .7rem .9rem; border-radius: 10px; margin: -.3rem 0 1.15rem; }
.vol-nota--oro { background: var(--vol-oro-claro); border-left: 4px solid var(--vol-oro); }

/* ─── Grupos de opciones ────────────────────────────────── */
.vol-grupo { margin-bottom: 1.7rem; border-radius: var(--vol-radio); }
.vol-grupo.is-error { outline: 2px solid var(--vol-error); outline-offset: 6px; }
.vol-error-txt { color: var(--vol-error); font-size: .86rem; font-weight: 600; margin: .5rem 0 0; }
.vol-pregunta--accion { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.vol-pregunta--accion p { margin: 0; }
.vol-todos {
    flex-shrink: 0; font: inherit; font-size: .8rem; font-weight: 700;
    color: var(--vol-azul); background: none; border: 1.5px solid var(--vol-azul);
    border-radius: 99px; padding: .3rem .8rem; cursor: pointer;
}
.vol-todos[aria-pressed="true"] { background: var(--vol-azul); color: #fff; }

.vol-chips { display: grid; gap: .55rem; grid-template-columns: 1fr; }
.vol-chips--2 { grid-template-columns: repeat(2, 1fr); }
.vol-chips--3 { grid-template-columns: 1fr; }
.vol-chips--meses { grid-template-columns: repeat(3, 1fr); }
.vol-chips--dias { grid-template-columns: repeat(4, 1fr); }

/* Chip genérico: el input queda oculto pero accesible */
.vol-chip, .vol-area { position: relative; display: block; cursor: pointer; }
.vol-chip input, .vol-area input, .vol-check input {
    position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.vol-chip span {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 48px; padding: .55rem .6rem; border-radius: 10px;
    border: 1.5px solid var(--vol-linea); background: #fff;
    font-size: .9rem; font-weight: 600; line-height: 1.25; color: var(--vol-tinta);
    transition: background .15s, border-color .15s, color .15s;
}
.vol-chip--grande span { min-height: 56px; font-size: 1rem; }
.vol-chip input:checked + span {
    background: var(--vol-azul); border-color: var(--vol-azul); color: #fff;
}
.vol-chip input:focus-visible + span, .vol-area input:focus-visible + span, .vol-check input:focus-visible + span {
    outline: 3px solid var(--vol-oro); outline-offset: 2px;
}

/* Áreas: tarjetas con icono */
.vol-areas { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
.vol-area span {
    display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
    height: 100%; min-height: 96px; padding: .8rem .85rem;
    border: 1.5px solid var(--vol-linea); border-radius: var(--vol-radio);
    font-size: .86rem; font-weight: 600; line-height: 1.3; background: #fff;
    transition: background .15s, border-color .15s;
}
.vol-area i { font-style: normal; font-size: 1.45rem; line-height: 1; }
.vol-area input:checked + span {
    border-color: var(--vol-azul); background: var(--vol-azul-claro);
    box-shadow: inset 0 0 0 1.5px var(--vol-azul);
}
.vol-area input:checked + span::after {
    content: '✓'; position: absolute; top: .55rem; right: .65rem;
    width: 1.35rem; height: 1.35rem; border-radius: 50%;
    background: var(--vol-oro); color: #fff; font-size: .8rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* Casilla de consentimiento */
.vol-check { display: block; cursor: pointer; position: relative; }
.vol-check span {
    display: block; padding: .9rem .9rem .9rem 3.1rem; border-radius: var(--vol-radio);
    border: 1.5px solid var(--vol-linea); font-size: .92rem; line-height: 1.45; position: relative;
}
.vol-check span::before {
    content: ''; position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
    width: 1.4rem; height: 1.4rem; border: 2px solid var(--vol-azul); border-radius: 6px; background: #fff;
}
.vol-check input:checked + span { border-color: var(--vol-azul); background: var(--vol-azul-claro); }
.vol-check input:checked + span::before {
    background: var(--vol-azul);
    box-shadow: inset 0 0 0 3px #fff;
}

.vol-legal { font-size: .78rem; color: var(--vol-gris); line-height: 1.55; margin: 0; }
.vol-legal a { color: var(--vol-azul); font-weight: 600; }

/* Resumen previo al envío */
.vol-resumen {
    background: var(--vol-azul-claro); border-radius: var(--vol-radio);
    padding: 1rem 1.1rem; margin-bottom: 1.5rem; font-size: .88rem;
}
.vol-resumen h3 { margin: 0 0 .6rem; font-size: .95rem; color: var(--vol-azul); }
.vol-resumen dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.vol-resumen dt { color: var(--vol-gris); font-weight: 600; }
.vol-resumen dd { margin: 0; }
.vol-resumen button {
    margin-top: .7rem; background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
    color: var(--vol-azul); text-decoration: underline; cursor: pointer;
}

/* ─── Mensajes ──────────────────────────────────────────── */
.vol-msg {
    padding: .85rem 1rem; border-radius: 10px; margin: 0 0 1rem;
    font-size: .92rem; font-weight: 600; background: #fdecea; color: var(--vol-error);
}
.vol-msg--error { display: block; }

/* ─── Botones ───────────────────────────────────────────── */
.vol-nav {
    display: flex; gap: .7rem; position: sticky; bottom: 0; z-index: 5;
    background: #fff; padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--vol-linea);
    /* Deja libre la esquina del botón flotante de cookies (44px a 16px del borde) */
    padding-left: 3.6rem;
}
.vol-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    min-height: 52px; padding: .8rem 1.4rem; border-radius: 99px;
    font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none;
    border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .1s;
}
.vol-btn:active { transform: scale(.98); }
.vol-btn:focus-visible { outline: 3px solid var(--vol-oro); outline-offset: 2px; }
.vol-btn[hidden] { display: none; }
.vol-btn--azul { background: var(--vol-azul); color: #fff; }
.vol-btn--azul:hover { background: var(--vol-azul-osc); }
.vol-btn--oro { background: var(--vol-oro); color: #fff; }
.vol-btn--oro:hover { background: #b8963b; }
.vol-btn--linea { background: #fff; color: var(--vol-azul); border-color: var(--vol-linea); flex: 0 0 auto; }
.vol-btn[disabled] { opacity: .6; cursor: wait; }

/* ─── Confirmación y avisos ─────────────────────────────── */
.vol-ok, .vol-aviso {
    text-align: center; padding: 2.5rem 1.2rem; border-radius: var(--vol-radio);
    border: 1.5px solid var(--vol-linea);
}
.vol-ok h2, .vol-aviso h2 { color: var(--vol-azul); font-size: 1.5rem; margin: 0 0 .6rem; }
.vol-ok p, .vol-aviso p { line-height: 1.6; margin: 0 auto 1rem; max-width: 46ch; }
.vol-ok__nota { color: var(--vol-gris); font-size: .9rem; }
.vol-ok__sello {
    width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%;
    background: var(--vol-oro); color: #fff; font-size: 2.2rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.vol-ok .vol-btn, .vol-aviso .vol-btn { flex: none; }

/* ─── Tablet (≥ 600px) ──────────────────────────────────── */
@media (min-width: 600px) {
    .vol-fila { grid-template-columns: 1fr 1fr; }
    .vol-chips--3 { grid-template-columns: repeat(3, 1fr); }
    .vol-chips--meses { grid-template-columns: repeat(4, 1fr); }
    .vol-chips--dias { grid-template-columns: repeat(7, 1fr); }
    .vol-areas { grid-template-columns: repeat(3, 1fr); }
    .vol-hero__claves { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
    .vol-nav { justify-content: flex-end; }
    .vol-btn { flex: 0 0 auto; min-width: 180px; }
}

/* ─── Escritorio (≥ 900px) ──────────────────────────────── */
@media (min-width: 900px) {
    .vol__wrap { max-width: 860px; }
    .vol-form.is-js .vol-progreso { display: none; }
    .vol-form.is-js .vol-pasos {
        display: flex; list-style: none; margin: 0 0 2rem; padding: 0; gap: .4rem;
        counter-reset: none;
    }
    .vol-pasos li {
        flex: 1; display: flex; flex-direction: column; gap: .45rem;
        font-size: .78rem; font-weight: 600; color: var(--vol-gris); cursor: default;
    }
    .vol-pasos li::before {
        content: ''; height: 5px; border-radius: 99px; background: var(--vol-azul-claro);
    }
    .vol-pasos li span { display: none; }
    .vol-pasos li em { font-style: normal; }
    .vol-pasos li.is-hecho { cursor: pointer; color: var(--vol-azul); }
    .vol-pasos li.is-hecho::before { background: var(--vol-azul); }
    .vol-pasos li.is-activo { color: var(--vol-tinta); font-weight: 700; }
    .vol-pasos li.is-activo::before { background: var(--vol-oro); }
    .vol-chips--meses { grid-template-columns: repeat(6, 1fr); }
    .vol-areas { grid-template-columns: repeat(4, 1fr); }
    .vol-nav { position: static; border-top: 0; padding-top: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .vol * { animation: none !important; transition: none !important; }
}

/*
 * ============================================================
 * FIN – Este código lleva la huella de Jose Antonio Echevarria – ECH
 * - echevarria@megustanlastic.es - 06/11/2026.
 * Desarrollo generado para el Centro Asturiano de Oviedo.
 * No modificar sin permiso.
 * ============================================================
 */
