/* ==========================================================================
   ayudahipotecas — estilos del tema hijo (los tokens viven en theme.json)
   ========================================================================== */

:root:root {
	--ah-ink: var(--wp--preset--color--tinta);
	--ah-ink-2: var(--wp--preset--color--tinta-2);
	--ah-muted: var(--wp--preset--color--texto-2);
	--ah-line: var(--wp--preset--color--linea);
	--ah-bg: var(--wp--preset--color--fondo);
	--ah-white: var(--wp--preset--color--blanco);
	--ah-orange: var(--wp--preset--color--naranja);
	--ah-orange-hover: var(--wp--preset--color--naranja-hover);
	--ah-orange-text: var(--wp--preset--color--naranja-texto);
	--ah-footer: var(--wp--preset--color--pie);
	--ah-font-head: var(--wp--preset--font-family--titulos);
	--ah-font: var(--wp--preset--font-family--texto);
	--ah-r-card: var(--wp--custom--radius--card, 28px);
	--ah-r-input: var(--wp--custom--radius--input, 14px);
	--ah-r-pill: 999px;
	--ah-ease: cubic-bezier(.2, .8, .2, 1);
	--ah-gutter: 32px;
	--ah-section-y: 104px;
	--ah-shadow-lift: 0 32px 60px -28px rgba(20, 33, 61, .35);
	--ah-shadow-cta: 0 14px 28px -12px rgba(194, 65, 12, .6);
	--ah-header-h: 76px;

	/* Blocksy lee estas variables: se alinean con el sistema de diseño. */
	--theme-font-family: var(--ah-font);
	--theme-text-color: var(--ah-ink-2);
	--theme-headings-color: var(--ah-ink);
	--theme-link-initial-color: var(--ah-orange-text);
	--theme-link-hover-color: var(--ah-orange-hover);
	--theme-palette-color-1: var(--ah-orange);
	--theme-palette-color-2: var(--ah-orange-hover);
	--theme-palette-color-3: var(--ah-ink-2);
	--theme-palette-color-4: var(--ah-ink);
	--theme-palette-color-5: var(--ah-line);
	--theme-palette-color-6: var(--ah-bg);
	--theme-palette-color-7: var(--ah-bg);
	--theme-palette-color-8: var(--ah-white);
	--theme-button-background-initial-color: var(--ah-orange);
	--theme-button-background-hover-color: var(--ah-orange-hover);
	--theme-border-radius: var(--ah-r-input);
	--theme-normal-container-max-width: 1240px;
}

@media (max-width: 781px) {
	:root:root {
		--ah-gutter: 20px;
		--ah-section-y: 72px;
		--ah-header-h: 64px;
	}
}

html { scroll-padding-top: calc(var(--ah-header-h) + 16px); }

body {
	background: var(--ah-bg);
	color: var(--ah-ink-2);
	font-family: var(--ah-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Blocksy pinta los títulos con variables propias: se alimentan desde theme.json. */
body :is(h1, h2, h3, h4, h5, h6) {
	--theme-font-family: var(--ah-font-head);
	--theme-font-weight: 700;
	--theme-letter-spacing: -0.025em;
	--theme-line-height: 1.08;
	--theme-heading-color: var(--ah-ink);
	font-family: var(--ah-font-head);
	color: var(--ah-ink);
	letter-spacing: -0.025em;
	text-wrap: balance;
}
body h1 { --theme-font-size: var(--wp--preset--font-size--hero); --theme-font-weight: 800; }
body h2 { --theme-font-size: var(--wp--preset--font-size--xxl); --theme-font-weight: 800; }
body h3 { --theme-font-size: var(--wp--preset--font-size--l); }
body h4 { --theme-font-size: var(--wp--preset--font-size--m); }
body { --theme-font-size: var(--wp--preset--font-size--m); --theme-line-height: 1.6; }

p { text-wrap: pretty; }

/* Foco visible en todo lo interactivo. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ah-orange-text);
	outline-offset: 3px;
	border-radius: 6px;
}

.ah-skip {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--ah-ink);
	color: #fff;
	border-radius: var(--ah-r-pill);
	font-weight: 700;
}
.ah-skip:focus { top: 16px; }

.ah-i { width: 20px; height: 20px; flex: none; }

/* ---------- Secciones ---------- */

.ah-section,
.ah-topbar,
.ah-header,
.ah-sources,
.ah-footer {
	padding-left: var(--ah-gutter);
	padding-right: var(--ah-gutter);
}

.ah-section {
	padding-top: var(--ah-section-y);
	padding-bottom: var(--ah-section-y);
	margin-block: 0;
}
.ah-section--tight { padding-top: 0; }
.ah-section--white { background: var(--ah-white); border-block: 1px solid var(--ah-line); }
.ah-section--mint { background: var(--wp--preset--color--menta-seccion); }

.ah-lienzo > * { margin-block: 0; }
.ah-lienzo > .ah-section + .ah-section:not(.ah-section--white):not(.ah-section--dark) { padding-top: 0; }

.ah-eyebrow {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ah-orange-text);
}
.ah-eyebrow--pin { display: inline-flex; align-items: center; gap: 8px; }
.ah-eyebrow--pin::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ah-section h2 { margin-top: 0; margin-bottom: 16px; }
.ah-lead { font-size: 18px; line-height: 1.65; color: var(--ah-muted); margin-top: 0; margin-bottom: 0; }
/* Ancho de lectura limitado sin romper el centrado del layout constrained (alineado a la izquierda). */
.ah-section > h2,
.ah-section > .ah-lead,
.ah-section > .ah-hub-hero__title {
	max-width: 700px;
	margin-left: max(0px, calc((100% - 1240px) / 2)) !important;
	margin-right: auto !important;
}
.ah-section > .ah-lead { max-width: 640px; }
.ah-cta h2, .ah-trust h2, .ah-faq h2 { max-width: 14ch; }
.ah-steps__head h2 { max-width: 16ch; }

.ah-section__head { gap: 24px; margin-bottom: 48px; }
.ah-section__intro { flex: 1 1 520px; max-width: 680px; }

.ah-grid { display: grid; gap: 20px; }
.ah-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ah-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ah-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ah-grid > * { margin: 0 !important; }

@media (max-width: 1080px) {
	.ah-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ah-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.ah-grid--2, .ah-grid--3, .ah-grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Botones ---------- */

.wp-element-button,
.wp-block-button__link,
.ah-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 28px;
	border: 0;
	border-radius: var(--ah-r-pill);
	background: var(--ah-orange);
	color: #fff;
	font-family: var(--ah-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s var(--ah-ease), transform .25s var(--ah-ease), box-shadow .25s var(--ah-ease);
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.ah-btn:hover {
	background: var(--ah-orange-hover);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--ah-shadow-cta);
}
.ah-btn .ah-i, .wp-block-button__link .ah-i { width: 18px; height: 18px; }
.ah-btn--block { display: flex; width: 100%; }
.ah-btn--dark { background: var(--ah-ink); }
.ah-btn--dark:hover { background: #0b1428; box-shadow: 0 14px 28px -12px rgba(20, 33, 61, .7); }

.wp-block-button.is-small .wp-block-button__link { min-height: 44px; padding: 10px 22px; }
.ah-header .wp-block-button__link { white-space: nowrap; }

.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link {
	background: var(--ah-white);
	color: var(--ah-ink);
	border: 1.5px solid var(--ah-line);
	padding: 12px 24px;
}
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--ah-orange);
	background: #FFF3EC;
	color: var(--ah-ink);
	box-shadow: none;
}

/* ---------- Barra superior y cabecera ---------- */

.ah-header-wrap {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .ah-header-wrap { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .ah-header-wrap { top: 0; } }

.ah-topbar {
	background: var(--ah-ink);
	color: #E6E9F0;
	font-size: 13px;
}
.ah-topbar__in { min-height: 40px; gap: 8px 24px; padding-block: 8px; }
.ah-topbar p { margin: 0; }
.ah-topbar strong { color: #fff; }
.ah-topbar__cta a { color: #FFD3BD; font-weight: 700; text-decoration: none; }
.ah-topbar__cta a:hover { color: #fff; }

.ah-header {
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	        backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--ah-line);
	transition: box-shadow .3s var(--ah-ease);
}
.is-scrolled .ah-header { box-shadow: 0 10px 30px -20px rgba(20, 33, 61, .45); }
.ah-header__in { min-height: var(--ah-header-h); gap: 24px; }
.ah-header .wp-block-buttons { margin: 0; }

.ah-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	min-height: 44px;
}
.ah-logo__mark {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--ah-orange);
	color: #fff;
}
.ah-logo__mark .ah-i { width: 20px; height: 20px; }
.ah-logo__text {
	font-family: var(--ah-font-head);
	font-weight: 800;
	font-size: 21px;
	letter-spacing: -0.03em;
	color: var(--ah-ink);
}
.ah-logo__text b { color: var(--ah-orange); font-weight: 800; }
.ah-logo--light .ah-logo__text { color: #fff; }
.ah-logo--light .ah-logo__text b { color: #FF9A66; }

.ah-nav { font-size: 15px; font-weight: 600; }
.ah-nav .wp-block-navigation__container { gap: 4px 28px; }
.ah-nav .wp-block-navigation-item__content { color: var(--ah-ink); text-decoration: none; padding-block: 10px; }
.ah-nav .wp-block-navigation-item__content:hover { color: var(--ah-orange-text); }
.ah-nav .wp-block-navigation__responsive-container-open,
.ah-nav .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: var(--ah-ink);
}
.ah-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px var(--ah-gutter);
	background: var(--ah-white);
}
.ah-nav .is-menu-open .wp-block-navigation-item__content { font-size: 20px; padding-block: 12px; }

@media (max-width: 960px) {
	.ah-header__in { flex-wrap: nowrap; }
	.ah-header .ah-nav { order: 3; }
}
@media (max-width: 600px) {
	.ah-topbar__in > p:first-child { display: none; }
	.ah-topbar__in { justify-content: center; }
	.ah-header__in { gap: 4px; }
	.ah-header { padding-left: 16px; padding-right: 12px; }
	.ah-header__cta .wp-block-button__link { min-height: 44px; padding: 8px 12px; font-size: 13px; }
	.ah-logo { gap: 6px; }
	.ah-logo__mark { width: 30px; height: 30px; border-radius: 9px; }
	.ah-logo__mark .ah-i { width: 17px; height: 17px; }
	.ah-logo__text { font-size: 16px; }
	.ah-header .ah-nav { flex: none; }
}

/* ---------- Hero ---------- */

.ah-hero { padding-top: 88px; }
.ah-hero__cols { gap: 56px; }
.ah-hero__title { margin: 0 0 24px; font-size: var(--wp--preset--font-size--hero); line-height: 1.02; }
.ah-hero__title mark { color: var(--ah-orange); background: none; }
.ah-hero .ah-lead { margin-bottom: 32px; }
.ah-chips__label { font-size: 14px; font-weight: 600; color: var(--ah-ink); margin: 0 0 12px; }

.ah-chips { list-style: none; margin: 0 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ah-chips li { margin: 0; }
.ah-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 18px;
	background: var(--ah-white);
	border: 1.5px solid var(--ah-line);
	border-radius: var(--ah-r-pill);
	color: var(--ah-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .25s var(--ah-ease), background-color .25s var(--ah-ease), transform .25s var(--ah-ease);
}
.ah-chip .ah-i { width: 17px; height: 17px; color: var(--ah-orange-text); }
.ah-chip:hover { border-color: var(--ah-orange); background: #FFF3EC; color: var(--ah-ink); transform: translateY(-2px); }

.ah-byline, .ah-author { display: flex; align-items: center; gap: 14px; }
.ah-byline p, .ah-author p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ah-muted); }
.ah-byline strong, .ah-author strong { color: var(--ah-ink); }
.ah-avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--wp--preset--color--cielo-tinte);
	color: var(--wp--preset--color--cielo-texto);
	font-weight: 700;
	font-size: 15px;
}
.ah-avatar--l { width: 56px; height: 56px; font-size: 18px; background: var(--wp--preset--color--naranja-tinte); color: var(--wp--preset--color--naranja-hover); }
.ah-placeholder { color: var(--ah-muted); }

.ah-hero__aside { position: relative; }
.ah-hero__aside::before {
	content: "";
	position: absolute;
	inset: -28px -28px 40px 40px;
	background: var(--wp--preset--color--menta-seccion);
	border-radius: 40px;
	z-index: 0;
}
.ah-hero__aside > * { position: relative; z-index: 1; }

/* ---------- Calculadora ---------- */

.ah-calc {
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: var(--ah-r-card);
	padding: 32px;
	box-shadow: 0 40px 80px -40px rgba(20, 33, 61, .35);
	max-width: 520px;
	margin-inline: auto;
}
.ah-calc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.ah-calc__title { margin: 0; font-size: 22px; }
.ah-badge {
	flex: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: var(--ah-r-pill);
	font-size: 13px;
	font-weight: 700;
}
.ah-badge--menta { background: var(--wp--preset--color--menta-tinte); color: var(--wp--preset--color--menta-texto); }
.ah-calc__field { margin-bottom: 20px; }
.ah-calc__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ah-calc__row label { font-size: 15px; font-weight: 600; color: var(--ah-ink); }
.ah-calc__row output { font-family: var(--ah-font-head); font-size: 22px; font-weight: 800; color: var(--ah-ink); letter-spacing: -0.02em; }
.ah-calc__row--small { font-size: 14px; color: var(--ah-muted); margin-bottom: 12px; }
.ah-calc__row--small strong { color: var(--ah-ink); font-size: 16px; white-space: nowrap; }

.ah-calc input[type="range"] {
	--p: 50%;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 44px;
	background: transparent;
	cursor: pointer;
}
.ah-calc input[type="range"]::-webkit-slider-runnable-track {
	height: 8px;
	border-radius: 8px;
	background: linear-gradient(to right, var(--ah-orange) var(--p), var(--ah-line) var(--p));
}
.ah-calc input[type="range"]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--ah-line); }
.ah-calc input[type="range"]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--ah-orange); }
.ah-calc input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	margin-top: -8px;
	border-radius: 50%;
	background: var(--ah-orange);
	border: 4px solid #fff;
	box-shadow: 0 2px 8px rgba(20, 33, 61, .35);
}
.ah-calc input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--ah-orange);
	border: 4px solid #fff;
	box-shadow: 0 2px 8px rgba(20, 33, 61, .35);
}

.ah-calc__q { border: 0; padding: 0; margin: 0 0 20px; }
.ah-calc__q legend { float: left; width: 100%; font-size: 15px; font-weight: 600; color: var(--ah-ink); margin: 0 0 10px; padding: 0; }
.ah-seg { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ah-seg label { position: relative; margin: 0; }
.ah-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ah-seg span {
	display: grid;
	place-items: center;
	min-height: 48px;
	border: 1.5px solid var(--ah-line);
	border-radius: var(--ah-r-input);
	font-weight: 700;
	color: var(--ah-ink);
	transition: background-color .2s var(--ah-ease), border-color .2s var(--ah-ease), color .2s var(--ah-ease);
}
.ah-seg input:checked + span { background: var(--ah-ink); border-color: var(--ah-ink); color: #fff; }
.ah-seg input:focus-visible + span { outline: 3px solid var(--ah-orange-text); outline-offset: 3px; }

.ah-calc__result { background: var(--ah-bg); border-radius: 18px; padding: 18px 20px; margin-bottom: 20px; }
.ah-progress { height: 8px; border-radius: 8px; background: var(--ah-line); overflow: hidden; }
.ah-progress span { display: block; height: 100%; background: var(--ah-orange); border-radius: 8px; transition: width .45s var(--ah-ease); }
.ah-progress.is-done span { background: var(--wp--preset--color--menta-texto); }
.ah-calc__msg { margin: 14px 0 0; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ah-ink); }
.ah-calc__note { margin: 14px 0 0; font-size: 13px; color: var(--ah-muted); text-align: center; }

/* ---------- Franja de fuentes ---------- */

.ah-sources { background: var(--ah-white); border-block: 1px solid var(--ah-line); }
.ah-sources__in { min-height: 88px; gap: 12px 40px; padding-block: 20px; }
.ah-sources p { margin: 0; }
.ah-sources__label { font-size: 14px; color: var(--ah-muted); }
.ah-sources__list { display: flex; flex-wrap: wrap; gap: 8px 32px; font-family: var(--ah-font-head); font-weight: 700; font-size: 17px; }
.ah-sources__list a, .ah-sources__list span { color: var(--ah-ink-2); text-decoration: none; }
.ah-sources__list a:hover { color: var(--ah-orange-text); }

/* ---------- Tarjetas ---------- */

.card {
	--tint: var(--wp--preset--color--naranja-tinte);
	--tint-text: var(--wp--preset--color--naranja-hover);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: var(--ah-r-card);
	padding: 30px;
	transition: transform .45s var(--ah-ease), border-color .45s var(--ah-ease), box-shadow .45s var(--ah-ease), background-color .45s var(--ah-ease);
}
.card > * { margin-block: 0; }
.card--naranja { --tint: var(--wp--preset--color--naranja-tinte); --tint-text: var(--wp--preset--color--naranja-hover); }
.card--menta { --tint: var(--wp--preset--color--menta-tinte); --tint-text: var(--wp--preset--color--menta-texto); }
.card--cielo { --tint: var(--wp--preset--color--cielo-tinte); --tint-text: var(--wp--preset--color--cielo-texto); }
.card--sol { --tint: var(--wp--preset--color--sol-tinte); --tint-text: var(--wp--preset--color--sol-texto); }

/* Círculo decorativo de la esquina. */
.card:not(.card--static):not(.card--row)::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -70px;
	right: -70px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: var(--tint);
	opacity: .55;
	transition: transform .45s var(--ah-ease);
}

.card__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--tint);
	color: var(--tint-text);
	margin-bottom: 20px;
}
.card__icon .ah-i { width: 22px; height: 22px; }
.card__tag {
	align-self: flex-start;
	margin-bottom: 14px !important;
	padding: 4px 12px;
	border-radius: var(--ah-r-pill);
	background: var(--ah-bg);
	font-size: 13px;
	font-weight: 600;
	color: var(--ah-ink-2);
}
.card__title { margin: 0 0 12px !important; font-size: 22px; line-height: 1.15; }
.card__title a { color: var(--ah-ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__text, .card__sub { font-size: 15px; line-height: 1.6; color: var(--ah-muted); }
.card__foot { margin-top: auto !important; padding-top: 28px; gap: 16px; }
.card__stat { margin: 0; font-size: 13px; color: var(--ah-muted); line-height: 1.3; }
.card__stat strong {
	display: block;
	font-family: var(--ah-font-head);
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--ah-ink);
}
.card__arrow {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--ah-bg);
	color: var(--ah-ink);
	transition: background-color .45s var(--ah-ease), color .45s var(--ah-ease), transform .45s var(--ah-ease);
}
.card__arrow .ah-i { width: 18px; height: 18px; }

.card:not(.card--static):hover,
.card:not(.card--static):focus-within {
	transform: translateY(-8px);
	border-color: #F3B597;
	box-shadow: var(--ah-shadow-lift);
}
.card:not(.card--static):hover::before { transform: scale(1.5); }
.card:hover .card__arrow,
.card:focus-within .card__arrow {
	background: var(--ah-orange);
	color: #fff;
	transform: rotate(-45deg);
}

.card--row { flex-direction: row; align-items: center; gap: 16px; padding: 22px 24px; }
.card--row .card__icon { margin: 0; width: 44px; height: 44px; }
.card--row .card__title { font-size: 17px; margin: 0 0 2px !important; }
.card--row .card__sub { font-size: 13px; line-height: 1.4; }

.ah-num { font-size: 13px; font-weight: 800; color: var(--ah-orange-text); margin-bottom: 14px !important; }
.card--static h3 { font-size: 19px; margin-bottom: 10px; }

/* ---------- Cómo funciona ---------- */

.ah-section--dark { background: var(--ah-ink); color: #C9CFDC; }
.ah-section--dark h2, .ah-section--dark h3 { color: #fff; }
.ah-section--dark .ah-eyebrow { color: #FFB38A; }
.ah-section--dark .ah-lead { color: #C9CFDC; }
.ah-steps__head { gap: 48px; margin-bottom: 48px; }
.ah-steps__head h2 { margin-bottom: 0; }
.ah-step {
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: var(--ah-r-card);
	padding: 32px;
}
.ah-step > * { margin-block: 0; }
.ah-step__n {
	font-family: var(--ah-font-head);
	font-size: 56px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	color: #FF8A4C;
	margin-bottom: 24px !important;
}
.ah-step h3 { font-size: 22px; margin-bottom: 12px !important; }
.ah-step p:last-child { font-size: 15px; line-height: 1.6; }

/* ---------- Comunidades ---------- */

.ah-ccaa {
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}
.ah-ccaa li { margin: 0; }
.ah-ccaa a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px 44px 12px 16px;
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: 16px;
	color: var(--ah-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .3s var(--ah-ease), border-color .3s var(--ah-ease), transform .3s var(--ah-ease);
}
.ah-ccaa a::before,
.ah-ccaa a::after {
	content: "";
	flex: none;
	background: currentColor;
}
.ah-ccaa a::before {
	width: 18px;
	height: 18px;
	color: var(--ah-orange-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	background-color: var(--ah-orange-text);
}
.ah-ccaa a::after {
	position: absolute;
	right: 16px;
	width: 18px;
	height: 18px;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .3s var(--ah-ease), transform .3s var(--ah-ease);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	background-color: var(--ah-orange-text);
}
.ah-ccaa a:hover,
.ah-ccaa a:focus-visible { background: #FFF6F1; border-color: #F3B597; transform: translateY(-2px); }
.ah-ccaa a:hover::after,
.ah-ccaa a:focus-visible::after { opacity: 1; transform: none; }

@media (max-width: 1080px) { .ah-ccaa { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ah-ccaa { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- CTA de H2B ---------- */

.ah-cta {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--ah-orange);
	border-radius: 36px;
	padding: 56px;
	gap: 48px;
	color: #fff;
}
.ah-cta::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: -120px;
	bottom: -200px;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .12);
}
.ah-cta h2 { color: #fff; }
.ah-cta .ah-eyebrow { color: #fff; }
.ah-cta .ah-lead { color: #fff; margin-bottom: 24px; }
.ah-checks { list-style: none; margin: 0; padding: 0; }
.ah-checks li {
	position: relative;
	padding-left: 34px;
	margin-bottom: 12px;
	font-weight: 600;
}
.ah-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A3412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.ah-form {
	background: var(--ah-white);
	color: var(--ah-ink);
	border-radius: var(--ah-r-card);
	padding: 32px;
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .45);
}
.ah-form__title { margin: 0 0 18px; font-size: 22px; color: var(--ah-ink); }
.ah-form label { display: block; font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--ah-ink); }
.ah-form input[type="text"],
.ah-form input[type="tel"],
.ah-form select {
	width: 100%;
	min-height: 48px;
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 1.5px solid var(--ah-line);
	border-radius: var(--ah-r-input);
	background: var(--ah-white);
	color: var(--ah-ink);
	font: inherit;
	font-size: 16px;
}
.ah-form input:focus, .ah-form select:focus { border-color: var(--ah-ink); outline: none; box-shadow: 0 0 0 3px rgba(20, 33, 61, .15); }
.ah-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ah-form__check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: 14px !important; line-height: 1.45; margin: 4px 0 18px !important; color: var(--ah-ink-2) !important; }
.ah-form__check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ah-ink); }
.ah-form__check a { color: var(--ah-orange-text); text-decoration: underline; text-underline-offset: 2px; }
.ah-form__status { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--wp--preset--color--menta-texto); }
.ah-form__status:empty { display: none; }
.ah-form__note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--ah-muted); }

@media (max-width: 781px) {
	.ah-cta { padding: 32px 20px; border-radius: 28px; }
	.ah-form { padding: 24px 20px; }
	.ah-form__row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Por qué fiarte ---------- */

.ah-trust { gap: 64px; }
.ah-author { margin-top: 32px; padding: 20px; background: var(--ah-bg); border-radius: 20px; }
.ah-author a { text-decoration: none; }

/* ---------- Guías con pestañas ---------- */

.ah-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-tab {
	min-height: 44px;
	padding: 8px 18px;
	border: 1.5px solid var(--ah-line);
	border-radius: var(--ah-r-pill);
	background: var(--ah-white);
	color: var(--ah-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .25s var(--ah-ease), background-color .25s var(--ah-ease), transform .25s var(--ah-ease);
}
.ah-tab:hover { border-color: var(--ah-orange); background: #FFF3EC; transform: translateY(-2px); }
.ah-tab[aria-selected="true"] { background: var(--ah-ink); border-color: var(--ah-ink); color: #fff; transform: none; }

.js .ah-guias__panel[hidden] { display: none; }
.ah-guias__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	counter-reset: guia;
}
.ah-guias__grid > li { margin: 0; counter-increment: guia; }
.ah-guia { height: 100%; padding: 10px 10px 24px; }
.ah-guia::before { display: none; }
.ah-guia__top {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	height: 120px;
	padding: 16px 18px;
	border-radius: 20px;
	background: var(--wp--preset--color--naranja-tinte);
	margin-bottom: 18px !important;
}
li:nth-child(5n+2) .ah-guia__top { background: var(--wp--preset--color--menta-tinte); }
li:nth-child(5n+3) .ah-guia__top { background: var(--wp--preset--color--cielo-tinte); }
li:nth-child(5n+4) .ah-guia__top { background: var(--wp--preset--color--sol-tinte); }
.ah-guia__top::before {
	content: counter(guia, decimal-leading-zero);
	font-family: var(--ah-font-head);
	font-size: 44px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--ah-ink-2);
}
.ah-guia__min {
	margin: 0;
	padding: 4px 14px;
	border-radius: var(--ah-r-pill);
	background: rgba(255, 255, 255, .85);
	font-family: var(--ah-font-head);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ah-ink-2);
}
.ah-guia__cat, .ah-guia__title { padding-inline: 14px; }
.ah-guia__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px !important; }
.ah-guia__cat a { color: var(--ah-orange-text); text-decoration: none; pointer-events: none; }
.ah-guia__title { margin: 0 !important; font-size: 18px; line-height: 1.25; }
.ah-guia__title a { color: var(--ah-ink); text-decoration: none; }
.ah-guia__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

@media (max-width: 1080px) { .ah-guias__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ah-guias__grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.ah-faq { gap: 64px; }
.ah-faq__item { margin: 0 !important; }
.ah-faq__item summary {
	position: relative;
	list-style: none;
	min-height: 44px;
	padding-right: 40px;
	display: flex;
	align-items: center;
	font-weight: 700;
	font-size: 17px;
	color: var(--ah-ink);
	cursor: pointer;
}
.ah-faq__item summary::-webkit-details-marker { display: none; }
.ah-faq__item summary::after {
	content: "";
	position: absolute;
	right: 4px;
	width: 18px;
	height: 18px;
	background: var(--ah-orange-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .3s var(--ah-ease);
}
.ah-faq__item[open] summary::after { transform: rotate(45deg); }
.ah-faq__item p { margin: 8px 0 0; color: var(--ah-muted); line-height: 1.65; }

/* ---------- Pie ---------- */

.ah-footer {
	background: var(--ah-footer);
	color: #B9C0CF;
	padding-top: 72px;
	padding-bottom: 40px;
	margin-top: 0;
}
.ah-footer__cols { gap: 40px; }
.ah-footer__lema { margin-top: 16px; font-size: 15px; line-height: 1.6; max-width: 32ch; }
.ah-footer__title { font-family: var(--ah-font); font-size: 15px !important; font-weight: 700; letter-spacing: 0; color: #fff; margin: 8px 0 16px; }
.ah-footer__list { list-style: none; margin: 0; padding: 0; }
.ah-footer__list li { margin: 0; line-height: 1.3; }
.ah-footer__list a { display: inline-block; padding: 11px 0; color: #D5DAE5; font-size: 15px; text-decoration: none; }
.ah-footer__list a:hover { color: #fff; text-decoration: underline; }
.ah-footer__legal {
	margin: 48px 0 0;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: 13px;
	line-height: 1.6;
	color: #9AA3B5;
}

/* ---------- Columnas en móvil ---------- */

@media (max-width: 781px) {
	.ah-hero { padding-top: 48px; }
	.ah-hero__cols, .ah-trust, .ah-faq, .ah-steps__head { gap: 32px; }
	.ah-hero__aside::before { inset: -16px -12px 32px 24px; }
	.ah-calc { padding: 24px 20px; }
	.ah-section__head { margin-bottom: 32px; }
	.ah-step { padding: 24px; }
	.ah-step__n { font-size: 44px; }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.card:hover, .card:focus-within, .ah-chip:hover, .ah-tab:hover,
	.ah-btn:hover, .wp-block-button__link:hover, .ah-ccaa a:hover,
	.card:hover::before, .card:hover .card__arrow {
		transform: none !important;
	}
}

/* ==========================================================================
   Fase 4 — Artículo, páginas, autora, archivos y hub de comunidades
   ========================================================================== */

/* ---------- Cabecera de artículo / página / archivo ---------- */

.ah-article__head,
.ah-archive__head {
	background: var(--ah-white);
	border-bottom: 1px solid var(--ah-line);
	padding: 40px var(--ah-gutter) 48px;
}
.ah-article__head-in { max-width: 920px; margin-inline: auto; }
.ah-archive__head-in { max-width: 1240px; margin-inline: auto; }

.ah-crumbs { margin-bottom: 18px; font-size: 13px; color: var(--ah-muted); }
.ah-crumbs .rank-math-breadcrumb p { margin: 0; }
.ah-crumbs a { color: var(--ah-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ah-crumbs a:hover { color: var(--ah-orange-text); }
.ah-crumbs .separator { margin: 0 6px; color: var(--ah-muted); }
.ah-crumbs .last { color: var(--ah-ink); font-weight: 600; }

.ah-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ah-tag {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 12px;
	border-radius: var(--ah-r-pill);
	background: var(--ah-bg);
	font-size: 13px;
	font-weight: 600;
	color: var(--ah-ink-2);
	text-decoration: none;
}
.ah-tag--naranja { background: var(--wp--preset--color--naranja-tinte); color: var(--wp--preset--color--naranja-hover); }
.ah-tag--menta { background: var(--wp--preset--color--menta-tinte); color: var(--wp--preset--color--menta-texto); }
a.ah-tag:hover { color: var(--ah-ink); }

body .ah-article__title,
body .ah-archive__title { --theme-font-size: clamp(32px, 4.2vw, 52px); margin: 0 0 16px; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.06; }
.ah-article__sub { font-size: 19px; line-height: 1.6; color: var(--ah-muted); margin: 0 0 24px; max-width: 64ch; }
.ah-article__head .ah-byline { margin-top: 24px; }
.ah-byline a { color: var(--ah-ink); text-decoration: none; }
.ah-byline a:hover strong { color: var(--ah-orange-text); }
img.ah-avatar { object-fit: cover; padding: 0; }

/* Barra de progreso de lectura. */
.ah-read-progress { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.ah-read-progress span { display: block; height: 100%; width: 0; background: var(--ah-orange); }

/* ---------- Maquetación de tres columnas ---------- */

.ah-article__layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 680px) 300px;
	justify-content: center;
	gap: 48px;
	max-width: 1240px;
	margin-inline: auto;
	padding: 48px var(--ah-gutter) var(--ah-section-y);
}
.ah-article__layout:not(:has(.ah-toc)) { grid-template-columns: minmax(0, 720px) 300px; }

.ah-toc { position: sticky; top: calc(var(--ah-header-h) + 72px); align-self: start; }
.ah-toc__box summary {
	list-style: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ah-ink-2);
	margin-bottom: 14px;
}
.ah-toc__box summary::-webkit-details-marker { display: none; }
.ah-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ah-line); }
.ah-toc li { margin: 0; }
.ah-toc a {
	display: block;
	padding: 8px 0 8px 14px;
	margin-left: -2px;
	border-left: 2px solid transparent;
	font-size: 14px;
	line-height: 1.35;
	color: var(--ah-muted);
	text-decoration: none;
}
.ah-toc a:hover { color: var(--ah-ink); }
.ah-toc a.is-active { color: var(--ah-orange-text); border-left-color: var(--ah-orange); font-weight: 600; }

.ah-article__aside { min-width: 0; }
.ah-article__sticky { position: sticky; top: calc(var(--ah-header-h) + 72px); }
.ah-form--compact { padding: 24px; margin-bottom: 28px; border: 1px solid var(--ah-line); box-shadow: 0 30px 60px -36px rgba(20, 33, 61, .35); }
.ah-form--compact .ah-form__title { font-size: 20px; }
.ah-form__eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ah-orange-text); }
.ah-form--compact .ah-form__row { grid-template-columns: 1fr; }

.ah-related__title { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ah-ink-2); }
.ah-related { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ah-related__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 12px;
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: 18px;
	transition: border-color .3s var(--ah-ease), transform .3s var(--ah-ease);
}
.ah-related__item:hover { border-color: #F3B597; transform: translateY(-2px); }
.ah-related__item a { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ah-ink); text-decoration: none; }
.ah-related__item a::after { content: ""; position: absolute; inset: 0; }
.ah-related__n {
	display: grid;
	place-items: center;
	align-content: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	font-family: var(--ah-font-head);
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
}
.ah-related__n small { font-family: var(--ah-font); font-size: 11px; font-weight: 700; }
.ah-related__n--menta { background: var(--wp--preset--color--menta-tinte); color: var(--wp--preset--color--menta-texto); }
.ah-related__n--sol { background: var(--wp--preset--color--sol-tinte); color: var(--wp--preset--color--sol-texto); }
.ah-related__n--cielo { background: var(--wp--preset--color--cielo-tinte); color: var(--wp--preset--color--cielo-texto); }

@media (max-width: 1180px) {
	.ah-article__layout,
	.ah-article__layout:not(:has(.ah-toc)) { grid-template-columns: minmax(0, 1fr) 300px; }
	.ah-toc { position: static; grid-column: 1 / -1; }
	.ah-toc__box { background: var(--ah-white); border: 1px solid var(--ah-line); border-radius: 18px; padding: 12px 20px; }
	.ah-toc__box summary { cursor: pointer; margin: 0; min-height: 44px; display: flex; align-items: center; }
	.ah-toc__box[open] summary { margin-bottom: 8px; }
}
@media (max-width: 900px) {
	.ah-article__layout,
	.ah-article__layout:not(:has(.ah-toc)) { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
	.ah-article__sticky { position: static; }
}

/* ---------- Contenido del artículo ---------- */

.ah-article__content,
.ah-page__content {
	font-size: var(--wp--preset--font-size--articulo);
	line-height: 1.7;
	color: var(--ah-ink-2);
	min-width: 0;
	--theme-font-size: var(--wp--preset--font-size--articulo);
	--theme-line-height: 1.7;
}
.ah-page__content { max-width: 760px; margin-inline: auto; padding: 48px var(--ah-gutter) var(--ah-section-y); box-sizing: content-box; }
.ah-article__content > *,
.ah-page__content > * { margin-top: 0; margin-bottom: 1.15em; max-width: none; }
body .ah-article__content h2,
body .ah-page__content h2 { --theme-font-size: clamp(26px, 2.6vw, 32px); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; margin-top: 1.9em; margin-bottom: .6em; scroll-margin-top: calc(var(--ah-header-h) + 72px); text-align: left !important; }
.ah-article__content > h2:first-child { margin-top: 0; }
body .ah-article__content h3,
body .ah-page__content h3 { --theme-font-size: 22px; font-size: 22px; margin-top: 1.6em; margin-bottom: .5em; }
.ah-article__content :is(h3, h4, h5, p).has-text-align-center { text-align: left !important; }
body .ah-article__content h4 { --theme-font-size: 19px; font-size: 19px; margin-top: 1.4em; }
.ah-article__content a:not(.wp-element-button),
.ah-page__content a:not(.wp-element-button) { color: var(--ah-orange-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ah-article__content a:not(.wp-element-button):hover,
.ah-page__content a:not(.wp-element-button):hover { color: var(--ah-orange-hover); text-decoration-thickness: 2px; }
.ah-article__content strong { color: var(--ah-ink); }
.ah-article__content ul, .ah-article__content ol,
.ah-page__content ul, .ah-page__content ol { padding-left: 1.3em; }
.ah-article__content li, .ah-page__content li { margin-bottom: .45em; }
.ah-article__content hr { border: 0; border-top: 1px solid var(--ah-line); margin: 2em 0; }

/* Tablas con hover en filas. */
.ah-article__content .wp-block-table,
.ah-page__content .wp-block-table { margin-bottom: 1.6em; overflow-x: auto; }
.ah-article__content table,
.ah-page__content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: 20px;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.5;
}
.ah-article__content th, .ah-article__content td,
.ah-page__content th, .ah-page__content td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--ah-line); text-align: left; vertical-align: top; }
.ah-article__content thead th, .ah-page__content thead th { background: var(--ah-bg); color: var(--ah-ink); font-weight: 700; }
.ah-article__content tr:last-child td, .ah-page__content tr:last-child td { border-bottom: 0; }
.ah-article__content tbody tr, .ah-page__content tbody tr { transition: background-color .2s var(--ah-ease); }
.ah-article__content tbody tr:hover, .ah-page__content tbody tr:hover { background: #FFF6F1; }
.ah-article__content td:first-child { font-weight: 600; color: var(--ah-ink); }

.ah-disclaimer {
	margin-top: 2.4em;
	padding: 18px 22px;
	background: var(--ah-white);
	border: 1px solid var(--ah-line);
	border-radius: 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ah-muted);
}
.ah-disclaimer p { margin: 0; }
.ah-disclaimer strong { color: var(--ah-ink); }

/* Patrones de artículo. */
.ah-summary { padding: 24px 28px; background: var(--wp--preset--color--menta-seccion); border-radius: 24px; }
.ah-summary__title { margin: 0 0 10px !important; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--menta-texto); }
.ah-summary ul { margin: 0; }

.ah-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ah-stat { background: var(--ah-white); border: 1px solid var(--ah-line); border-radius: 20px; padding: 18px; }
.ah-stat > * { margin: 0 !important; }
.ah-stat__value { font-family: var(--ah-font-head); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--ah-ink); line-height: 1.1; }
.ah-stat__label { font-size: 13px; line-height: 1.4; color: var(--ah-muted); margin-top: 6px !important; }
@media (max-width: 560px) { .ah-stats { grid-template-columns: 1fr; } }

.ah-cta-inline {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 26px 28px;
	margin-block: 2em !important;
	background: var(--ah-ink);
	border-radius: 24px;
	color: #C9CFDC;
}
.ah-cta-inline > * { margin: 0 !important; }
.ah-cta-inline__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ah-orange); color: #fff; }
.ah-cta-inline__title { font-family: var(--ah-font-head); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: #fff; margin: 0 0 4px !important; line-height: 1.2; }
.ah-cta-inline__text { font-size: 15px; line-height: 1.5; margin: 0 !important; color: #C9CFDC; }
.ah-cta-inline .wp-block-buttons { margin: 0; }
@media (max-width: 640px) {
	.ah-cta-inline { grid-template-columns: auto minmax(0, 1fr); }
	.ah-cta-inline .wp-block-buttons { grid-column: 1 / -1; }
	.ah-cta-inline .wp-block-button, .ah-cta-inline .wp-block-button__link { width: 100%; }
}

/* ---------- Autora y archivos ---------- */

.ah-author-card { display: flex; gap: 28px; align-items: flex-start; }
.ah-avatar--xl { width: 112px; height: 112px; font-size: 36px; background: var(--wp--preset--color--naranja-tinte); color: var(--wp--preset--color--naranja-hover); }
.ah-author-card__cargo { margin: 0 0 12px; font-weight: 600; color: var(--ah-ink-2); }
.ah-author-card__count { margin: 12px 0 0; font-size: 14px; color: var(--ah-muted); }
.ah-archive__desc { font-size: 18px; line-height: 1.65; color: var(--ah-muted); max-width: 70ch; }
.ah-archive__desc p { margin: 0 0 .8em; }
.ah-archive__body { max-width: 1240px; margin-inline: auto; padding: 48px var(--ah-gutter) var(--ah-section-y); }
.ah-archive__grid { margin-bottom: 40px !important; }
.ah-guia__top[data-n]::before { content: attr(data-n); }
.ah-guia__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ah-orange-text); margin: 0 0 6px !important; padding-inline: 14px; }
body h2.ah-guia__title { --theme-font-size: 18px; font-size: 18px; line-height: 1.25; }

.ah-archive .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ah-archive .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--ah-line);
	border-radius: var(--ah-r-pill);
	background: var(--ah-white);
	color: var(--ah-ink);
	font-weight: 600;
	text-decoration: none;
}
.ah-archive .page-numbers.current { background: var(--ah-ink); border-color: var(--ah-ink); color: #fff; }
.ah-archive a.page-numbers:hover { border-color: var(--ah-orange); background: #FFF3EC; }

@media (max-width: 640px) {
	.ah-author-card { flex-direction: column; gap: 16px; }
	.ah-avatar--xl { width: 88px; height: 88px; font-size: 28px; }
}

/* ---------- Hub de comunidades ---------- */

.ah-hub-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--wp--preset--color--menta-seccion);
	padding-top: 72px;
	padding-bottom: 72px;
}
.ah-hub-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	right: -120px;
	top: -160px;
	width: 460px;
	height: 460px;
	border-radius: 50%;
	background: var(--wp--preset--color--menta-tinte);
}
.ah-eyebrow--menta { color: var(--wp--preset--color--menta-texto); }
body .ah-hub-hero__title { --theme-font-size: clamp(36px, 4.6vw, 56px); margin: 0 0 18px; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.04; }
.ah-hub-hero .ah-lead { margin-bottom: 28px; }
.ah-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-filters .ah-tab[aria-pressed="true"] { background: var(--ah-ink); border-color: var(--ah-ink); color: #fff; transform: none; }

.ah-lienzo > .ah-hub { padding-top: 40px; }
.ah-hub__count { font-size: 14px; color: var(--ah-muted); margin: 0 0 20px; }

.ah-badge--naranja { background: var(--wp--preset--color--naranja-tinte); color: var(--wp--preset--color--naranja-hover); }
.ah-badge--cielo { background: var(--wp--preset--color--cielo-tinte); color: var(--wp--preset--color--cielo-texto); }
.ah-badge--sol { background: var(--wp--preset--color--sol-tinte); color: var(--wp--preset--color--sol-texto); }

.card--ccaa { min-height: 200px; padding: 26px 28px; }
.card--ccaa::before { display: none; }
.card--ccaa .ah-badge { align-self: flex-start; margin: 0 0 48px !important; }
body .card--ccaa .card__title { --theme-font-size: 24px; font-size: 24px; margin: 0 0 8px !important; position: relative; z-index: 1; }
.card--ccaa .card__text { position: relative; z-index: 1; margin: 0; }
.card__code {
	position: absolute;
	z-index: 0;
	right: -6px;
	bottom: -22px;
	font-family: var(--ah-font-head);
	font-size: 96px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--ah-bg);
	pointer-events: none;
}
.card--ccaa .card__arrow { position: absolute; top: 22px; right: 22px; opacity: 0; transform: translateX(-6px); }
.card--ccaa:hover,
.card--ccaa:focus-within { background: #FFF6F1; }
.card--ccaa:hover .card__arrow,
.card--ccaa:focus-within .card__arrow { opacity: 1; transform: none; background: var(--ah-orange); color: #fff; }
.card--ccaa:hover .card__code { color: #FFE9DD; }
.card--ccaa[hidden] { display: none !important; }

.ah-hub__empty { margin: 8px 0 0; padding: 20px 24px; background: var(--ah-white); border: 1px dashed var(--ah-line); border-radius: 20px; color: var(--ah-muted); }
.ah-hub__empty[hidden] { display: none; }

.ah-strip {
	margin-top: 48px !important;
	padding: 32px 36px;
	gap: 20px;
	background: var(--ah-ink);
	border-radius: 28px;
	color: #C9CFDC;
}
.ah-strip p { margin: 0; }
.ah-strip__title { font-family: var(--ah-font-head); font-size: 26px; font-weight: 800; letter-spacing: -0.025em; color: #fff; margin-bottom: 6px !important; }
.ah-strip .wp-block-buttons { margin: 0; }

@media (prefers-reduced-motion: reduce) {
	.ah-related__item:hover, .card--ccaa:hover .card__arrow, .card--ccaa:focus-within .card__arrow { transform: none !important; }
}

/* Entradilla bajo un título (antiguos subtítulos encadenados convertidos en párrafo). */
.ah-article__content .ah-entradilla {
	margin-top: -.35em;
	font-size: 1.04em;
	line-height: 1.55;
	color: var(--ah-muted);
}

/* Dato pendiente de completar en páginas legales (visible a propósito). */
mark.ah-pendiente {
	padding: 1px 6px;
	border-radius: 6px;
	background: var(--wp--preset--color--sol-tinte);
	color: var(--wp--preset--color--sol-texto);
	font-weight: 700;
}
