/* pagina — plantilla genérica (page.php): avisos legales y páginas simples.
   Banda crema con migas y título; cuerpo blanco con columna de lectura (~72ch) e índice de h2
   (plegable en celular, fijo a la izquierda en escritorio). Los títulos del texto van en caja normal: es para leer. */

.pg { background: #fff; color: #121011; }

/* ── Banda de cabecera ── */
.pg-cab { position: relative; background: #F4F1EC; border-bottom: 1px solid rgba(18, 16, 17, .08); overflow: hidden; }
.pg-cab::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 91, 35, .35), 0 0 0 28px rgba(255, 91, 35, .05), 0 0 0 29px rgba(255, 91, 35, .18); pointer-events: none; }
.pg-cab__in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 32px var(--m) 30px; }
.pg-migas ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13.5px; color: #6C6A6C; }
.pg-migas li { display: inline-flex; align-items: center; }
.pg-migas li + li::before { content: "›"; margin: 0 8px; color: #B9B6B8; }
.pg-migas a { display: inline-flex; align-items: center; min-height: 32px; color: #3A383A; text-decoration: none; }
.pg-migas a:hover { color: #C8410F; text-decoration: underline; text-underline-offset: 3px; }
.pg-migas [aria-current] { color: #121011; font-weight: 500; }
.pg-cab h1 { max-width: 22ch; font-size: clamp(32px, 4.6vw, 64px); color: #121011; text-wrap: balance; }
.pg-fecha { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; color: #4a4446; font-size: 14px; }
.pg-fecha::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ── Cuerpo ── */
.pg-cuerpo { max-width: 1180px; margin: 0 auto; padding: 28px var(--m) var(--sep); }
.pg-art { min-width: 0; max-width: 72ch; }
.pg-cuerpo:not(.pg-cuerpo--indice) .pg-art { margin: 0 auto; }

/* Índice plegable (celular / tableta) */
.pg-indice { margin-bottom: 28px; border-radius: 16px; background: #FBF8F4; box-shadow: inset 0 0 0 1px rgba(18, 16, 17, .08); }
.pg-indice summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; border-radius: 16px; }
.pg-indice summary::-webkit-details-marker { display: none; }
.pg-indice summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid #121011; border-bottom: 2px solid #121011; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease); }
.pg-indice[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.pg-indice summary:focus-visible { outline: 2px solid #C8410F; outline-offset: 2px; }
.pg-indice__n { color: #6C6A6C; font-weight: 400; font-size: 13.5px; }
.pg-indice ol { margin: 0; padding: 0 10px 12px; list-style: none; }
.pg-indice a { display: flex; gap: 10px; padding: 9px 8px; border-radius: 10px; color: #3A383A; font-size: 14.5px; line-height: 1.35; text-decoration: none; transition: background-color .2s, color .2s; }
.pg-indice a span { flex: none; min-width: 2ch; color: #6C6A6C; font-variant-numeric: tabular-nums; font-weight: 600; }
.pg-indice a:hover { background: #F4F1EC; color: #121011; }
.pg-indice a.is-on { color: #121011; font-weight: 600; }
.pg-indice a.is-on span { color: #C8410F; }
.pg-indice a:focus-visible { outline: 2px solid #C8410F; outline-offset: 1px; }

/* ── Tipografía del texto ── */
.pg-texto { color: #2b292a; font-size: clamp(16px, 1.1vw, 17.5px); line-height: 1.75; overflow-wrap: anywhere; }
.pg-texto > * + * { margin-top: 1.05em; }
.pg-texto p:empty { display: none; }
.pg-texto .pg-doc { margin: 0 0 1.4em; color: #6C6A6C; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; }
.pg-texto h2, .pg-texto h3, .pg-texto h4 { color: #121011; text-transform: none !important; scroll-margin-top: 100px; text-wrap: balance; }
.pg-texto h2 { display: flex; align-items: baseline; gap: 14px; margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid rgba(18, 16, 17, .1); font-size: clamp(22px, 2vw, 28px); font-weight: 700 !important; letter-spacing: -.02em !important; line-height: 1.2 !important; }
.pg-texto h2:first-child, .pg-texto .pg-doc + h2 { margin-top: 0; }
.pg-n { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 10px; background: #121011; color: var(--lima); font-size: 14px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; transform: translateY(-3px); }
.pg-texto h3 { display: flex; align-items: baseline; gap: 10px; margin-top: 1.8em; font-size: clamp(18px, 1.5vw, 21px); font-weight: 600 !important; letter-spacing: -.01em !important; line-height: 1.3 !important; }
.pg-l { flex: none; color: #C8410F; font-weight: 700; }
.pg-l::after { content: ")"; }
.pg-texto h4 { margin-top: 1.6em; font-size: 17px; font-weight: 600 !important; }
.pg-texto strong, .pg-texto b { color: #121011; font-weight: 600; }
.pg-texto a[href] { color: #C8410F; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness .2s, color .2s; }
.pg-texto a[href]:hover { color: #121011; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.pg-texto a:not([href]) { color: inherit !important; }
.pg-texto :is(ul, ol) { padding-left: 0; list-style: none; }
.pg-texto li { position: relative; padding-left: 26px; }
.pg-texto li + li { margin-top: .45em; }
.pg-texto ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.pg-texto ol { counter-reset: pg-ol; }
.pg-texto ol > li { counter-increment: pg-ol; }
.pg-texto ol > li::before { content: counter(pg-ol) "."; position: absolute; left: 0; top: 0; color: #C8410F; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-texto blockquote { margin-left: 0; margin-right: 0; padding: 18px 20px; border-radius: 0 14px 14px 0; background: #FBF8F4; box-shadow: inset 3px 0 0 var(--accent); color: #2b292a; }
.pg-texto blockquote > * + * { margin-top: .6em; }
.pg-texto blockquote p { margin: 0; }
.pg-texto hr { height: 1px; border: 0; background: rgba(18, 16, 17, .12); margin: 2em 0; }
.pg-texto img { max-width: 100%; height: auto; border-radius: 14px; }
.pg-texto figure { margin-left: 0; margin-right: 0; }
.pg-texto :is(table) { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.pg-texto .wp-block-table, .pg-texto figure:has(> table) { overflow-x: auto; }
.pg-texto th, .pg-texto td { padding: 10px 12px; border-bottom: 1px solid rgba(18, 16, 17, .1); text-align: left; vertical-align: top; }
.pg-texto th { background: #F4F1EC; color: #121011; font-weight: 600; }
.pg-texto code { padding: 2px 6px; border-radius: 6px; background: #F4F1EC; font-size: .9em; }

/* ── «¿Dudas?» ── */
.pg-dudas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 48px; padding: 18px 20px; border-radius: 18px; background: #121011; color: #fff; }
.pg-dudas p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 15.5px; }
.pg-dudas strong { color: #fff; font-weight: 600; }
.pg-dudas a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--lima); color: #121011; font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .25s, color .25s; }
.pg-dudas a svg { transition: transform .3s var(--ease); }
.pg-dudas a:hover { background: #fff; color: #121011; }
.pg-dudas a:hover svg { transform: translateX(3px); }
.pg-dudas a:focus-visible { outline: 2px solid var(--lima); outline-offset: 3px; }

@media (min-width: 768px) {
	.pg-cab__in { padding: 48px var(--m) 44px; }
	.pg-cab::after { right: 6%; top: 50%; width: 280px; height: 280px; transform: translateY(-50%); }
	.pg-cuerpo { padding-top: 44px; }
	.pg-dudas { padding: 22px 26px; }
}

/* Escritorio: índice fijo a la izquierda */
@media (min-width: 1024px) {
	.pg-cuerpo--indice { display: grid; grid-template-columns: 250px minmax(0, 72ch); justify-content: center; gap: clamp(40px, 5vw, 80px); align-items: start; padding-top: 56px; }
	.pg-cuerpo--indice .pg-indice { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; margin: 0; background: none; box-shadow: none; }
	.pg-indice summary { min-height: 0; padding: 0 8px 10px; pointer-events: none; color: #6C6A6C; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
	.pg-indice summary::after, .pg-indice__n { display: none; }
	.pg-indice ol { padding: 0; border-left: 1px solid rgba(18, 16, 17, .1); }
	.pg-indice a { margin-left: -1px; padding: 8px 10px 8px 14px; border-radius: 0 10px 10px 0; border-left: 2px solid transparent; font-size: 14px; }
	.pg-indice a.is-on { border-left-color: var(--accent); background: #FBF8F4; }
}
