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

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

/* Scroll-padding accounts for navbar + sticky anchor bar */
html:has(.frm-anchors) {
  scroll-padding-top: calc(var(--frm-bar-h, 46px) + 1rem);
}
@media (max-width: 1024px) {
  html:has(.frm-anchors) {
    scroll-padding-top: calc(58px + var(--frm-bar-h, 46px) + 1rem);
  }
}


/* ================================================================
   BARRA DE ANCLAS — sticky bajo el nav principal
   ================================================================ */

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

.frm-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);
}
.frm-anchors__inner::-webkit-scrollbar { display: none; }

.frm-anchors__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  padding: 0 1rem;
  height: var(--frm-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;
}
.frm-anchors__link:hover { color: var(--text); }
.frm-anchors__link.is-active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.frm-anchors__link i {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}
.frm-anchors__link.is-active i { opacity: 1; }

@media (max-width: 1024px) {
  .frm-anchors { top: 58px; }
}


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

.frm-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;
}

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


/* ================================================================
   ASIDE — "En esta página"
   ================================================================ */

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

.frm-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;
}

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

.frm-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;
}
.frm-aside__link:hover {
  background: var(--bg-secondary, #f0f0ec);
  color: var(--text);
}
.frm-aside__link.is-active {
  background: rgba(245, 161, 0, 0.1);
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 600;
}
.frm-aside__link i {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}
.frm-aside__link.is-active i { opacity: 1; }


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

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

.frm-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;
}
.frm-section__label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

.frm-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;
}

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

.frm-callout {
  border-left: 3px solid var(--blue);
  padding: 1.25rem 1.5rem;
  background: rgba(27, 87, 160, 0.05);
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  margin: 1.5rem 0;
}


/* ================================================================
   ENTIDADES FIRMANTES — convenio
   ================================================================ */

.frm-entities {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.frm-entity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--light);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 200px;
  transition: border-color 150ms;
}
.frm-entity:hover { border-color: var(--brand); }

.frm-entity__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(201, 35, 29, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.frm-entity__icon i {
  font-size: 20px;
  color: var(--brand);
}

.frm-entity__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.frm-entity-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .frm-entity-sep { display: none; }
}


/* ================================================================
   NIVELES DE FORMACIÓN — grid de 2 tarjetas
   ================================================================ */

.frm-nivel-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin-top: 1.5rem;
  align-items: center;
}

.frm-nivel-card {
  background: var(--light);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.frm-nivel-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}
.frm-nivel-card--blue:hover { border-color: var(--blue); }

.frm-nivel-card__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.frm-nivel-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201, 35, 29, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.frm-nivel-card__icon i {
  font-size: 24px;
  color: var(--brand);
}
.frm-nivel-card--blue .frm-nivel-card__icon {
  background: rgba(27, 87, 160, 0.08);
}
.frm-nivel-card--blue .frm-nivel-card__icon i {
  color: var(--blue);
}

.frm-nivel-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  margin: 0;
  padding-top: 0.5rem;
}

.frm-nivel-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.frm-nivel-card__desc p { margin: 0; }

.frm-nivel-card__num {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(201, 35, 29, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.9rem;
  align-self: flex-start;
}
.frm-nivel-card--blue .frm-nivel-card__num {
  color: var(--blue);
  background: rgba(27, 87, 160, 0.08);
}

.frm-nivel-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.frm-nivel-connector i {
  font-size: 1.5rem;
  opacity: 0.35;
}

@media (max-width: 640px) {
  .frm-nivel-grid {
    grid-template-columns: 1fr;
  }
  .frm-nivel-connector {
    justify-content: center;
    padding: 0.25rem 0;
  }
  .frm-nivel-connector i {
    transform: rotate(90deg);
  }
}


/* ================================================================
   NOTA DE GRATUIDAD
   ================================================================ */

.frm-gratuidad {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(201, 35, 29, 0.04);
  border: 0.5px solid rgba(201, 35, 29, 0.2);
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
  margin-top: 1.5rem;
}
.frm-gratuidad i {
  font-size: 20px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}
.frm-gratuidad p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  font-weight: 500;
}


/* ================================================================
   LOGOS INSTITUCIONALES
   ================================================================ */

.frm-logos {
  margin-top: 1.75rem;
}

.frm-logos__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;
}

.frm-logos__row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.frm-logos__item {
  display: flex;
  align-items: center;
}

.frm-logos__link {
  display: block;
  opacity: 0.8;
  transition: opacity 150ms;
}
.frm-logos__link:hover { opacity: 1; }

.frm-logos__img {
  max-height: 48px;
  width: auto;
  display: block;
}

.frm-logos__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.frm-logos__dot {
  font-size: 1.5rem;
  color: var(--border);
  line-height: 1;
}

.frm-logos--text .frm-logos__name {
  font-size: 1rem;
  color: var(--text);
}


/* ================================================================
   CTA SECUNDARIO — pie de la sección Formación
   ================================================================ */

.frm-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--border);
}

.frm-inline-cta__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.frm-inline-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  border: 1.5px solid var(--brand);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 150ms, color 150ms;
}
.frm-inline-cta__btn:hover {
  background: var(--brand);
  color: white;
}
.frm-inline-cta__btn i { font-size: 14px; }


/* ================================================================
   CTA FINAL — mismo patrón que vol-process-card (Voluntariado)
   ================================================================ */

.frm-process-card {
  background: var(--dark);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
}
.frm-process-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 0% 100%, rgba(201, 35, 29, 0.28) 0%, transparent 60%);
  pointer-events: none;
}

.frm-process-card__wm {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 8rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.frm-process-card__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.frm-process-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: white;
  line-height: 1;
  margin: 0;
}

.frm-process-card__desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin: 0;
}

.frm-process-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--brand);
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  align-self: flex-start;
  transition: background 150ms, transform 150ms, box-shadow 150ms;
}
.frm-process-card__btn:hover {
  background: var(--brand-dark, #9E1B16);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 35, 29, 0.4);
}
.frm-process-card__btn i { font-size: 1.1em; }


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

/* ── ≤ 1024px: navbar mobile (~58px) ───────────────────────── */
@media (max-width: 1024px) {
  .frm-anchors {
    top: 58px;
  }
  html:has(.frm-anchors) {
    scroll-padding-top: calc(58px + var(--frm-bar-h, 46px) + 1rem);
  }
}

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

/* ── ≤ 768px: reducir espaciado + comprimir anchor bar ─────── */
@media (max-width: 768px) {
  .frm-section {
    padding: 2.5rem 0;
  }
  .frm-anchors__link {
    padding: 0 0.75rem;
    gap: 0.4rem;
    font-size: 11px;
  }
}

/* ── ≤ 480px: pantallas pequeñas ────────────────────────────── */
@media (max-width: 480px) {
  .frm-section {
    padding: 2rem 0;
  }
  .frm-section__title {
    font-size: 1.35rem;
  }
  .frm-anchors__link {
    padding: 0 0.625rem;
    gap: 0.25rem;
    font-size: 11px;
  }
  .frm-inline-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .frm-inline-cta__btn {
    align-self: stretch;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
  .frm-process-card {
    padding: 1.75rem 1.25rem;
  }
  .frm-process-card__wm {
    font-size: 5.5rem;
    right: 0.75rem;
    opacity: 0.6;
  }
  .frm-process-card__btn {
    align-self: stretch;
    justify-content: center;
  }
}


/* ================================================================
   SCROLL REVEAL — animaciones de entrada
   ================================================================ */

.hp-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.hp-reveal.hp-visible {
  opacity: 1;
  transform: none;
}
.hp-reveal[data-delay="1"] { transition-delay: 80ms; }
.hp-reveal[data-delay="2"] { transition-delay: 160ms; }
.hp-reveal[data-delay="3"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .hp-reveal { opacity: 1; transform: none; transition: none; }
}
