/* ================================================================
   INSCRIPCIÓN — Voluntariat Esportiu de València · Brand Book 2026
   page-inscripcion.php
   ================================================================ */

:root {
  --ins-bar-h: 46px;
}

/* Compensar barra de anclas sticky al hacer clic en anclas internas */
html {
  scroll-padding-top: calc(var(--ins-bar-h, 46px) + 1rem);
}
@media (max-width: 1024px) {
  /* Navbar sticky en móvil ~58px; ajustar sticky top de la barra de anclas */
  .ins-anchors {
    top: 58px;
  }
  html {
    scroll-padding-top: calc(58px + var(--ins-bar-h, 46px) + 1rem);
  }
}


/* ================================================================
   BARRA DE ANCLAS — sticky
   ================================================================ */

.ins-anchors {
  position: sticky;
  top: 0;
  z-index: 80;
  background: white;
  border-bottom: 0.5px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.ins-anchors__inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}
.ins-anchors__inner::-webkit-scrollbar { display: none; }

.ins-anchors__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  padding: 0 1rem;
  height: var(--ins-bar-h, 46px);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 150ms, border-color 150ms;
}
.ins-anchors__link i {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 150ms;
}
.ins-anchors__link:hover { color: var(--text); }
.ins-anchors__link:hover i { opacity: 1; }
.ins-anchors__link.is-active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.ins-anchors__link.is-active i { opacity: 1; }


/* ================================================================
   LAYOUT PRINCIPAL — contenido + aside
   ================================================================ */

.ins-layout {
  display: grid;
  grid-template-columns: 1fr 252px;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.ins-content {
  min-width: 0;
  padding-bottom: 4rem;
}


/* ================================================================
   ASIDE
   ================================================================ */

.ins-aside {
  position: sticky;
  top: calc(var(--topbar-h, 54px) + var(--ins-bar-h, 46px) + 2rem);
  background: var(--light);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 3rem;
}

.ins-aside__label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ins-aside__nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ins-aside__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 150ms, color 150ms;
  border-left: 2px solid transparent;
}
.ins-aside__link:hover {
  background: var(--bg-secondary, #f0f0ec);
  color: var(--text);
}
.ins-aside__link.is-active {
  background: rgba(245, 161, 0, 0.1);
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 600;
}
.ins-aside__link i {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}
.ins-aside__link.is-active i { opacity: 1; }

.ins-aside-contact {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--border);
}

.ins-aside-contact__label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ins-aside-contact__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 150ms;
  word-break: break-all;
}
.ins-aside-contact__item:hover { color: var(--brand); }
.ins-aside-contact__item i { font-size: 14px; flex-shrink: 0; }


/* ================================================================
   SECCIONES DE CONTENIDO
   ================================================================ */

.ins-section {
  padding: 3.5rem 0;
  border-bottom: 0.5px solid var(--border);
}
.ins-section:last-child { border-bottom: none; }

.ins-section__label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ins-section__label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

.ins-section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.ins-prose {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
}
.ins-prose p { margin: 0 0 1em; }
.ins-prose p:last-child { margin-bottom: 0; }
.ins-prose strong { color: var(--text); font-weight: 600; }
.ins-prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ================================================================
   REQUISITOS — checklist
   ================================================================ */

.ins-req-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 52ch;
}

.ins-req-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

.ins-req-item__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(201, 35, 29, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ins-req-item__icon i {
  font-size: 13px;
  color: var(--brand);
}

.ins-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background: rgba(27, 87, 160, 0.08);
  border: 0.5px solid rgba(27, 87, 160, 0.2);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
}
.ins-badge i { font-size: 15px; }


/* ================================================================
   PASOS DEL FORMULARIO — strip horizontal de 5 pasos
   ================================================================ */

.ins-pasos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 1.5rem 0 2rem;
  border: 0.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.ins-paso-card {
  background: var(--light);
  border: none;
  border-right: 0.5px solid var(--border);
  border-radius: 0;
  padding: 1.25rem 1.125rem;
  transition: background 150ms;
  position: relative;
}
.ins-paso-card:last-child { border-right: none; }
.ins-paso-card:hover { background: white; }

/* Separador con flecha entre pasos */
.ins-paso-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 7px solid var(--border);
  z-index: 2;
}

.ins-paso-card__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.ins-paso-card__tit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 0.375rem;
}

.ins-paso-card__desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Mobile: scroll horizontal con snap */
@media (max-width: 720px) {
  .ins-pasos-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
    border: none;
    border-radius: 0;
    gap: 0.75rem;
    margin-left: calc(-1 * clamp(1.5rem, 4vw, 3rem));
    margin-right: calc(-1 * clamp(1.5rem, 4vw, 3rem));
    padding: 0 clamp(1.5rem, 4vw, 3rem) 0.625rem;
  }
  .ins-paso-card {
    min-width: 172px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border: 0.5px solid var(--border);
    border-right: 0.5px solid var(--border);
    border-radius: 12px;
  }
  .ins-paso-card::after { display: none; }
}


/* ================================================================
   FORMULARIO — contenedor BitForm
   ================================================================ */

.ins-section--form .ins-section__title {
  margin-bottom: 0.75rem;
}

.ins-form-wrap {
  border: 0.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: white;
}

.ins-form-placeholder {
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ins-form-placeholder i {
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.ins-form-placeholder p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.ins-form-placeholder__sub {
  font-size: 0.875rem !important;
}
.ins-form-placeholder__sub a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ================================================================
   TIMELINE — "Qué ocurre después"
   ================================================================ */

.ins-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
  max-width: 52ch;
}

.ins-timeline__step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.75rem;
}
.ins-timeline__step:last-child { padding-bottom: 0; }

/* Línea vertical entre pasos */
.ins-timeline__step::before {
  content: '';
  position: absolute;
  left: 19px; /* centro exacto del dot de 38px */
  top: 38px;  /* justo al terminar el dot */
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-strong), var(--border));
}
.ins-timeline__step:last-child::before { display: none; }

.ins-timeline__dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: border-color 150ms, background 150ms;
}
.ins-timeline__dot i {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 150ms;
}

/* Penúltimos pasos: aspecto "completado" */
.ins-timeline__step:not(:last-child) .ins-timeline__dot {
  background: var(--light);
}

/* Último paso: logro destacado */
.ins-timeline__dot--brand {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(201, 35, 29, 0.12);
}
.ins-timeline__dot--brand i { color: white; }

.ins-timeline__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.5rem;
}
.ins-timeline__body strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.ins-timeline__body span {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ================================================================
   CONTACTO FINAL — sección #informacion
   ================================================================ */

.ins-contacto {
  margin-top: 2rem;
  background: var(--light);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 52ch;
}

.ins-contacto__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.ins-contacto__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 2rem;
}

.ins-contacto__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 150ms;
}
.ins-contacto__item:hover { color: var(--brand); }
.ins-contacto__item i { font-size: 17px; color: var(--brand); flex-shrink: 0; }


/* ================================================================
   BOTÓN FLOTANTE VOLVER ARRIBA — solo móvil (aside oculto)
   ================================================================ */

.ins-back-top {
  display: none; /* visible solo en móvil vía media query + JS */
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 85;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 250ms, transform 250ms ease, background 150ms;
  pointer-events: none;
}
.ins-back-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ins-back-top:hover { background: var(--brand); }
.ins-back-top:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .ins-back-top { display: flex; }
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── ≤ 900px: colapsar aside ─────────────────────────────────── */
@media (max-width: 900px) {
  .ins-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ins-aside { display: none; }
}

/* ── ≤ 768px: reducir espaciado vertical + contacto apilado ──── */
@media (max-width: 768px) {

  .ins-section {
    padding: 2.25rem 0;
  }

  /* Timeline: quitar límite de ancho para usar todo el espacio */
  .ins-timeline {
    max-width: 100%;
  }

  /* Checklist: quitar límite de ancho */
  .ins-req-list {
    max-width: 100%;
  }

  /* Contacto: apilar teléfono y email verticalmente */
  .ins-contacto {
    max-width: 100%;
    padding: 1rem 1.125rem;
  }
  .ins-contacto__items {
    flex-direction: column;
    gap: 0;
  }
  .ins-contacto__item {
    min-height: 44px; /* touch target mínimo */
    border-bottom: 0.5px solid var(--border);
    padding: 0;
  }
  .ins-contacto__item:last-child {
    border-bottom: none;
  }

  /* Placeholder formulario: reducir padding interno */
  .ins-form-placeholder {
    padding: 2.5rem 1.25rem;
  }
}

/* ── ≤ 480px: pantallas pequeñas ─────────────────────────────── */
@media (max-width: 480px) {

  /* Anchor bar: reducir padding lateral para que quepan los 4 items */
  .ins-anchors__link {
    padding: 0 0.625rem;
    font-size: 11px;
    gap: 0.25rem;
  }

  /* Secciones: padding mínimo */
  .ins-section {
    padding: 2rem 0;
  }

  /* Títulos de sección: forzar mínimo legible */
  .ins-section__title {
    font-size: 1.5rem;
    margin-bottom: 1.125rem;
  }

  /* Badge "100% online": wrap si es necesario */
  .ins-badge {
    white-space: normal;
    text-align: left;
  }

  /* Timeline body: texto ligeramente más pequeño */
  .ins-timeline__body strong { font-size: 0.875rem; }
  .ins-timeline__body span   { font-size: 0.8rem; }
}
