/* ==========================================================================
   OPONEX · estilos de componentes
   --------------------------------------------------------------------------
   Los COLORES, las TIPOGRAFÍAS y los TAMAÑOS de texto se cambian en
   Apariencia > Editor > Estilos (o en theme.json). Aquí solo está lo que el
   editor no puede expresar: tarjetas, burbujas de respuesta, barras, etc.

   Cómo leer este archivo: cada bloque empieza con el nombre del componente y
   la clase que lo activa (por ejemplo ".ox-card"). Esa clase se pone en el
   editor, en el panel de la derecha: Avanzado > Clase(s) CSS adicional(es).
   ========================================================================== */

:root {
	/* Atajos a la paleta de theme.json: si cambias un color en Estilos, todo lo de abajo lo sigue. */
	--ox-ink: var(--wp--preset--color--ink);
	--ox-ink-soft: var(--wp--preset--color--ink-soft);
	--ox-green: var(--wp--preset--color--green);
	--ox-green-dark: var(--wp--preset--color--green-dark);
	--ox-gold: var(--wp--preset--color--gold);
	--ox-paper: var(--wp--preset--color--paper);
	--ox-white: var(--wp--preset--color--white);
	--ox-line: var(--wp--preset--color--line);
	--ox-border: var(--wp--preset--color--border);
	--ox-muted: var(--wp--preset--color--muted);
	--ox-on-ink: var(--wp--preset--color--on-ink);
	--ox-mint: var(--wp--preset--color--mint);
	--ox-display: var(--wp--preset--font-family--bricolage);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Foco visible para teclado */
:where(a, button, summary, input, .wp-element-button):focus-visible {
	outline: 3px solid var(--ox-green);
	outline-offset: 3px;
	border-radius: 4px;
}
.has-ink-background-color :where(a, button, summary):focus-visible { outline-color: var(--ox-gold); }

/* ---------- Secciones de página completa ---------- */
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
.ox-sections .wp-block-post-content > * + * { margin-block-start: 0; }

/* .ox-band: franja blanca con filete arriba y abajo */
.ox-band { border-top: 1px solid var(--ox-line); border-bottom: 1px solid var(--ox-line); }

/* .ox-lead: párrafo de entrada, con ancho de lectura cómodo */
.ox-lead { max-width: 640px; }
.ox-hero__copy .ox-lead { max-width: 560px; }
/* .ox-title: título de sección con ancho limitado */
.ox-title { max-width: 780px; margin-right: auto !important;
  margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1280px)) / 2)) !important; }
h1, h2, h3 { margin-block-end: 0; }

/* ---------- Cabecera ---------- */
.ox-header { border-bottom: 1px solid var(--ox-line); }
.ox-logo { margin: 0; line-height: 0; width: 132px; max-width: 100%; }
.ox-logo--footer { width: 168px; }
.ox-logo a { display: block; }
.ox-logo img { display: block; width: 100%; height: auto; }
.ox-header__row > .wp-block-navigation { flex: 0 1 auto; }

.ox-lang { border: 1.5px solid var(--ox-border); border-radius: 999px; overflow: hidden; }
.ox-lang__item { line-height: 1; }
.ox-lang__item a { display: block; padding: 8px 13px; font-size: 14px; font-weight: 700; line-height: 1.2;
	color: var(--ox-muted); text-decoration: none; }
.ox-lang__item a:hover { color: var(--ox-ink); }
.ox-lang__item.is-current a { background: var(--ox-ink); color: var(--ox-paper); }

.ox-login, .ox-login a { font-weight: 600; font-size: 16px; color: var(--ox-ink); text-decoration: none; }
.ox-login a:hover { color: var(--ox-green); }
.ox-btn-sm .wp-block-button__link { font-size: 16px; padding: 12px 22px; border-radius: 12px; }

/* ---------- Botones ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link { padding: 14px 26px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--ox-ink) !important; color: var(--ox-paper) !important;
}
.wp-block-button__link.has-gold-background-color:hover { filter: brightness(1.07); }
.ox-btn-block { width: 100%; }
.ox-btn-block .wp-block-button__link { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.wp-block-button.ox-btn-sm.ox-btn-sm > .wp-block-button__link { padding: 12px 22px; }

/* ---------- Tarjetas ---------- */
.ox-card { border-radius: var(--wp--custom--radius--xl); box-sizing: border-box; }
.ox-card__title { font-family: var(--ox-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.ox-card__note { padding-top: 4px; }
.ox-equal.wp-block-columns { align-items: stretch; }

/* .ox-pillar: tarjeta con icono (Teoría, Tests, Progreso) */
.ox-pillar { border-radius: var(--wp--custom--radius--lg); padding: 32px; }
.ox-icon { width: 52px; height: 52px; border-radius: var(--wp--custom--radius--md); display: flex; align-items: center;
	justify-content: center; padding: 0; }
.ox-icon .wp-block-image, .ox-icon figure { line-height: 0; }
.ox-icon img { width: 28px; height: 28px; display: block; }

/* ---------- Cifras de la portada ---------- */
.ox-stats { padding-top: 12px; border-top: 1px solid var(--ox-line); }
.ox-num { font-family: var(--ox-display); font-weight: 800; font-size: var(--wp--preset--font-size--stat);
	letter-spacing: -0.02em; line-height: 1.1; }
.ox-stat__label { font-size: 15px; }

/* ---------- Pregunta de ejemplo (.ox-quiz) ---------- */
.ox-quiz { border: 1px solid var(--ox-line); border-radius: var(--wp--custom--radius--xl);
	box-shadow: var(--wp--preset--shadow--card); overflow: hidden; width: 100%; max-width: 520px; margin-inline: auto; }
.ox-quiz__head { padding: 16px 24px; font-size: 14px; font-weight: 600; }
.ox-quiz__body { padding: 28px 24px 8px; }
.ox-quiz__q { font-family: var(--ox-display); font-weight: 700; font-size: 25px; line-height: 1.2; letter-spacing: -0.01em; }
.ox-option { border: 1.5px solid var(--ox-line); border-radius: var(--wp--custom--radius--md); padding: 12px 16px; }
.ox-option__text { font-size: 16px; line-height: 1.35; }
.ox-option.is-correct { border: 2px solid var(--ox-green); background: var(--ox-mint); padding: 11px 15px; }
.ox-option.is-correct .ox-option__text { font-weight: 600; }

/* Burbuja con la letra de la opción; la correcta lleva la X de la marca */
.ox-bubble { flex: none; box-sizing: border-box; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ox-ink);
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; line-height: 1; }
.ox-bubble.is-correct { position: relative; background: var(--ox-ink); font-size: 0; color: transparent; }
.ox-bubble.is-correct::after { content: ""; position: absolute; inset: 4px; background: center / contain no-repeat
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M28.6 29.4L46.2 29.4L92 90.6L74.4 90.6Z' fill='%23F2F5F1'/%3E%3Cpath d='M28 90.6L73.8 29.4L91.4 29.4L45.6 90.6Z' fill='%23D4A62A'/%3E%3C/svg%3E"); }
.ox-bubble--sm { width: 30px; height: 30px; font-size: 14px; }

.ox-quiz > .ox-quiz__feedback { margin: 16px 24px 24px; }
.ox-quiz__result p { font-size: 15px; line-height: 1.5; }
.ox-quiz__note { font-size: 13px; }
.ox-chip-gold { flex: none; white-space: nowrap; background: var(--ox-gold); color: var(--ox-ink); padding: 2px 6px; border-radius: 4px; font-weight: 700; }

/* Figuras de los psicotécnicos */
.ox-series { background: var(--ox-paper); border-radius: 16px; padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ox-fig { width: 64px; max-width: 100%; height: auto; aspect-ratio: 1 / 1; display: block; flex: none; }
.ox-fig-options > .ox-option svg { width: min(64px, 100%); }
.ox-fig-options > .ox-option { flex: 1 1 0; min-width: 0; padding: 10px; border-radius: var(--wp--custom--radius--md); }
.ox-fig-options > .ox-option.is-correct { padding: 9px; }

/* .ox-chip: etiqueta redonda (tipos de aptitud) */
.ox-chip { background: var(--ox-paper); border: 1px solid var(--ox-line); border-radius: 999px; padding: 8px 14px;
	font-size: 15px; font-weight: 600; }

/* ---------- Barras (.ox-bar) ---------- */
.ox-bar__label { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.ox-bar__n { flex: none; white-space: nowrap; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ox-bar__track { height: 12px; background: var(--ox-paper); border-radius: 6px; overflow: hidden; }
.ox-bar__fill { display: block; height: 12px; border-radius: 6px; background: var(--ox-green); }
.ox-bar__fill.is-gold { background: var(--ox-gold); }
.ox-topics { border: 1px solid var(--ox-line); border-radius: var(--wp--custom--radius--xl); padding: 32px; }
.ox-topics > * { margin-block: 0; }

/* ---------- Tarjeta oscura de la oposición (.ox-feature) ---------- */
.ox-feature { border-radius: var(--wp--custom--radius--xxl); }
.ox-feature .ox-kicker { font-size: 16px; font-weight: 600; }
.ox-ambit { border-radius: 16px; padding: 18px 22px; }
.ox-ambit__title { font-family: var(--ox-display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
.ox-ambit__desc { font-size: 14px; }
.ox-ambit__n { font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ---------- Planes (.ox-plan) ---------- */
.ox-plan { display: flex; flex-direction: column; border-radius: var(--wp--custom--radius--xl); padding: 36px; }
.ox-plan--monthly { border: 1.5px solid var(--ox-line); }
.ox-plan__name { font-size: var(--wp--preset--font-size--plan); }
.ox-price { font-family: var(--ox-display); font-weight: 800; font-size: var(--wp--preset--font-size--price);
	line-height: 1; letter-spacing: -0.03em; }
.ox-badge { background: var(--ox-gold); color: var(--ox-ink); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.ox-plan > .ox-plan__cta.wp-block-buttons { margin-top: auto; padding-top: 24px; width: 100%; }
.ox-plan__cta .wp-block-button { width: 100%; }

/* Listas con marca de verificación (.ox-checks; .ox-checks--gold sobre fondo oscuro) */
.wp-block-list.ox-checks { list-style: none; margin-inline: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.4; }
.ox-checks li { position: relative; padding-left: 34px; }
.ox-checks li::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; background: center / contain no-repeat
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230E7C66' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ox-checks--gold li::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23D4A62A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---------- Libros (.ox-pack) ---------- */
.ox-pack { border: 1px solid var(--ox-line); border-radius: var(--wp--custom--radius--lg); padding: 28px; }
.ox-pack.is-featured { border: 2px solid var(--ox-ink); padding: 27px; }
.ox-pack__name { font-family: var(--ox-display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.ox-pack__price { font-family: var(--ox-display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
.ox-pill { background: var(--ox-mint); border-radius: 8px; padding: 8px 12px; font-size: 15px; font-weight: 600; }

/* ---------- Lista de temas ---------- */
.ox-ambit-card { border: 1px solid var(--ox-line); padding: 28px; border-radius: var(--wp--custom--radius--lg); }
.wp-block-list.ox-temas { list-style: none; margin-inline: 0; padding: 0; font-size: 16px; line-height: 1.4; }
.ox-temas li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--ox-line); }
.ox-temas li strong { flex: none; min-width: 2.4em; color: var(--ox-green-dark); }
.ox-temas .ox-count { flex: none; white-space: nowrap; margin-left: auto; padding-left: 8px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ox-muted); }

/* ---------- Preguntas frecuentes (desplegables) ---------- */
.ox-faq > .ox-faq__item { margin-block-start: 0; border-top: 1px solid var(--ox-line); }
.ox-faq .ox-faq__item:last-child { border-bottom: 1px solid var(--ox-line); }
.ox-faq__item summary { position: relative; cursor: pointer; list-style: none; padding: 24px 44px 24px 0;
	font-family: var(--ox-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; line-height: 1.25; }
.ox-faq__item summary::-webkit-details-marker { display: none; }
.ox-faq__item summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px;
	border-right: 2.5px solid var(--ox-ink); border-bottom: 2.5px solid var(--ox-ink); transform: translateY(-70%) rotate(45deg);
	transition: transform .2s ease; }
.ox-faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ox-faq__item > p { margin: 0; padding: 0 0 24px; max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .ox-faq__item summary::after { transition: none; } }

/* ---------- Pie ---------- */
.ox-footer a { color: var(--ox-on-ink); text-decoration: none; }
.ox-footer a:hover { color: var(--ox-white); text-decoration: underline; }
.ox-footer__brand { max-width: 340px; }
.ox-footer__title { font-family: var(--ox-display); font-weight: 700; font-size: 18px; }
.wp-block-list.ox-footer__links { list-style: none; margin-inline: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.ox-footer__legal { padding-top: 24px; border-top: 1px solid #1D4A43; border-top-color: color-mix(in srgb, var(--ox-on-ink) 22%, var(--ox-ink)); }

/* ---------- Entradas y páginas de texto ---------- */
.ox-post { padding: 28px; border: 1px solid var(--ox-line); }
.ox-reading { line-height: 1.7; }
.ox-reading > * + * { margin-block-start: 1.2em; }
.ox-intro h1 { max-width: 18ch; }
.wp-block-search .wp-block-search__button { background: var(--ox-green); color: var(--ox-white); border: 0; border-radius: var(--wp--custom--radius--md); font-weight: 700; padding: 0 22px; }
.wp-block-search .wp-block-search__input { border: 1.5px solid var(--ox-border); border-radius: var(--wp--custom--radius--md); padding: 12px 16px; background: var(--ox-white); }

/* ---------- Móvil ---------- */
@media (max-width: 781px) {
	.ox-plan { padding: 28px; }
	.ox-topics { padding: 24px; }
	.ox-faq__item summary { font-size: 19px; }
	.ox-header__actions { width: 100%; justify-content: space-between; }
	.ox-footer .ox-footer__cols { row-gap: 32px; }
}
