/* Páginas legales con el diseño de la Landing 4 (Álvaro, 2026-10-22): índice lateral fijo y contenido en secciones
   desplegables, la primera abierta. Va después de styles.css y marca-tipo.css (Obviously, colores y radios del manual).
   Colores del manual: Océano #002D41 · Marino #005C6E · Viva #009AB0 · Calma #92D3E7 · Sol #FDD15F · Luz Gray #EEE8E1 */
.pagina-legal body { background: #f7f5f2; color: #002D41; }
.pagina-legal .site-header { position: fixed; }
.legal { padding: calc(var(--cab-alto, 97px) + clamp(2rem, 5vw, 4rem)) clamp(1.25rem, 5vw, 5.5rem) clamp(4rem, 8vw, 7rem); }
.legal-marco { max-width: 1240px; margin: 0 auto; }
.legal-volver { display: inline-flex; align-items: center; min-height: 2.75rem; color: #005C6E; font-weight: 500; font-size: .9375rem; text-decoration: none; }
.legal-volver:hover { text-decoration: underline; text-decoration-color: #FDD15F; text-decoration-thickness: 2px; text-underline-offset: .3rem; }
.legal-titulo { margin: .4rem 0 clamp(2rem, 4vw, 3rem); font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: 0; text-transform: none; color: #002D41; hyphens: auto; overflow-wrap: break-word; } /* «Datenschutzerklärung» no cabe entera en móvil */
.legal-rejilla { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }

/* Índice lateral (izquierda): fijo al hacer scroll, bajo la cabecera */
.legal-indice { position: sticky; top: calc(var(--cab-alto, 97px) + 1.5rem); max-height: calc(100vh - var(--cab-alto, 97px) - 3rem); overflow-y: auto;
  padding: 1.4rem 1.2rem; border-radius: 14px; background: #EEE8E1; }
.legal-indice-titulo { margin: 0 0 .8rem; font-family: var(--display); font-weight: 600; font-size: 1rem; color: #005C6E; }
.legal-indice ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem; }
.legal-indice a { display: block; padding: .5rem .7rem; border-radius: 10px; color: #002D41; font-size: .875rem; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.legal-indice a:hover { background: rgba(0, 154, 176, .12); }
.legal-indice a[aria-current] { background: #002D41; color: #fff; }

/* Contenido: secciones desplegables */
.legal-cuerpo { min-width: 0; }
.legal-intro { margin-bottom: 1.6rem; font-size: 1rem; line-height: 1.6; }
.legal-sec { margin: 0 0 .75rem; border-radius: 14px; background: #fff; box-shadow: 0 1px 0 rgba(0, 45, 65, .08), 0 10px 28px rgba(0, 45, 65, .06); scroll-margin-top: calc(var(--cab-alto, 97px) + 1.2rem); }
.legal-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding: 1rem 1.3rem; cursor: pointer; list-style: none; border-radius: 14px; }
.legal-sec > summary::-webkit-details-marker { display: none; }
.legal-sec > summary:hover { background: rgba(0, 154, 176, .06); }
.legal-sec > summary:focus-visible { outline: 3px solid #009AB0; outline-offset: 2px; }
.legal-sec > summary h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.25; letter-spacing: 0; text-transform: none; color: #002D41; overflow-wrap: anywhere; }
.legal-sec > summary svg { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; padding: .25rem; border-radius: 50%; background: #FDD15F; fill: none; stroke: #002D41; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.legal-sec[open] > summary svg { transform: rotate(180deg); }
.legal-texto { padding: 0 1.3rem 1.4rem; font-size: 1rem; line-height: 1.6; color: #002D41; overflow-wrap: anywhere; }
.legal-texto p, .legal-texto ul, .legal-texto ol { margin: 0 0 .9rem; }
.legal-texto ul, .legal-texto ol { padding-left: 1.3rem; }
.legal-texto li { margin: .25rem 0; }
.legal-texto li > p { margin: 0; }
.legal-texto h3, .legal-texto h4 { margin: 1.2rem 0 .5rem; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; text-transform: none; color: #005C6E; }
.legal-texto a { color: #005C6E; text-decoration-color: #009AB0; text-underline-offset: .2rem; }
.legal-texto strong, .legal-texto b { font-weight: 600; }
.legal-texto table { display: block; max-width: 100%; overflow-x: auto; margin: 0 0 1rem; border-collapse: collapse; font-size: .875rem; }
.legal-texto th, .legal-texto td { padding: .5rem .6rem; border: 1px solid #EEE8E1; vertical-align: top; text-align: left; }
.legal-texto th { background: #EEE8E1; }

/* Móvil y tablet: el índice arriba (se pliega) y las secciones debajo */
@media (max-width: 900px) {
  .legal-rejilla { grid-template-columns: minmax(0, 1fr); }
  .legal-indice { position: static; max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .legal-sec > summary svg { transition: none; } }

/* Índice plegable: en escritorio siempre abierto (sin flecha); en móvil plegado con «Índice ▾» */
.legal-indice-plegable > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: default; }
.legal-indice-plegable > summary::-webkit-details-marker { display: none; }
.legal-indice-plegable > summary svg { display: none; width: 1.3rem; height: 1.3rem; fill: none; stroke: #005C6E; stroke-width: 2.2; stroke-linecap: round; transition: transform .25s ease; }
@media (max-width: 900px) {
  .legal-indice { padding: .2rem 1rem; }
  .legal-indice-plegable > summary { min-height: 3rem; margin: 0; cursor: pointer; }
  .legal-indice-plegable > summary svg { display: block; }
  .legal-indice-plegable[open] > summary svg { transform: rotate(180deg); }
  .legal-indice-plegable[open] > ol { padding-bottom: .9rem; }
}
/* Aquí no hay panel del formulario: el pie (y cualquier sección) va a todo el ancho */
.pagina-legal main > section, .pagina-legal .pie { margin-right: 0 !important; }
