/* ==========================================================================
   Páginas del sitio (bloques de WordPress con el diseño de Shop at New Horizons)
   ========================================================================== */

.nh-pg { padding-top: 24px; padding-bottom: 24px; font-size: 16px; line-height: 1.65; }
.nh-pg > * + * { margin-top: 48px; }
.nh-pg h2 { font-size: clamp(26px, 2.6vw, 36px); margin: 0 0 14px; }
.nh-pg h3 { font-size: 20px; margin: 0 0 8px; }
.nh-pg p { margin: 0 0 12px; }

/* Cabecera de color */
.nh-pg-hero { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 6vw, 72px); background: var(--nh-blue); color: #fff; isolation: isolate; }
.nh-pg-hero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; border-radius: 50%; right: -120px; top: -160px; background: rgba(255, 255, 255, .08); }
.nh-pg-hero h1 { color: inherit; font-size: clamp(32px, 4.4vw, 56px); max-width: 820px; margin: 0 0 14px; }
.nh-pg-hero .nh-pg-lead { font-size: 18px; max-width: 640px; opacity: .9; margin: 0; }
.nh-pg-eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 700; margin: 0 0 16px !important; }
.nh-pg-hero--sky { background: var(--nh-sky); color: var(--nh-ink); }
.nh-pg-hero--sky::after { background: #D6E9FA; }
.nh-pg-hero--sky .nh-pg-eyebrow { background: #fff; color: var(--nh-blue); }
.nh-pg-hero--ink { background: var(--nh-ink); }
.nh-pg-hero--peach { background: var(--nh-peach); color: var(--nh-ink); }

/* Columnas */
.nh-pg .wp-block-columns { display: flex; gap: 40px; margin-bottom: 0; }
.nh-pg .wp-block-column { flex: 1 1 0; min-width: 0; }
.nh-pg-contact > .wp-block-column:first-child { flex: 1.3 1 0; }
.nh-pg-aside { background: var(--nh-mist); border-radius: 24px; padding: 28px; margin-bottom: 24px; }
.nh-pg-aside h3 + * { margin-bottom: 18px; }

/* Tarjetas */
/* En temas clásicos WordPress envuelve el grupo en .wp-block-group__inner-container: la cuadrícula va en ese envoltorio. */
.nh-pg-cards > .wp-block-group__inner-container,
.nh-pg-cards:not(:has(> .wp-block-group__inner-container)) { display: grid; gap: 20px; grid-template-columns: repeat(var(--nh-cols, 3), minmax(0, 1fr)); }
.nh-pg-cards--4 { --nh-cols: 4; }
.nh-pg-cards .nh-pg-card { margin: 0 !important; }
.nh-pg-card { border: 1px solid var(--nh-line); border-radius: 22px; padding: 26px; background: #fff; transition: transform .2s, box-shadow .2s; }
.nh-pg-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(15, 30, 51, .35); }
.nh-pg-card p:last-child { margin: 0; color: var(--nh-muted); font-size: 15px; }
.nh-pg-icon { margin: 0 0 14px !important; }
.nh-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--nh-sky); color: var(--nh-blue); vertical-align: middle; }
.nh-pg-card:nth-child(4n+2) .nh-ico { background: var(--nh-peach); color: var(--nh-orange-dark); }
.nh-pg-card:nth-child(4n+3) .nh-ico { background: var(--nh-green-soft); color: var(--nh-green); }
.nh-pg-card:nth-child(4n+4) .nh-ico { background: #EEE9FF; color: #5B3FD9; }

/* Listas */
.nh-pg ul.wp-block-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.nh-pg ul.wp-block-list li { position: relative; padding-left: 30px; }
.nh-pg ul.wp-block-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--nh-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%231B8A5A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Línea de tiempo */
.nh-pg-timeline { border-left: 3px solid var(--nh-line); padding-left: 28px; }
.nh-pg-timeline h2 { margin-left: -28px; padding-left: 0; }
.nh-pg-step { position: relative; padding: 4px 0 18px; }
.nh-pg-step::before { content: ""; position: absolute; left: -37px; top: 10px; width: 15px; height: 15px; border-radius: 50%; background: var(--nh-orange); box-shadow: 0 0 0 4px #fff; }
.nh-pg-year { font-family: var(--nh-font-display); font-weight: 800; font-size: 22px; color: var(--nh-blue); margin: 0 !important; }

/* Preguntas frecuentes */
.nh-pg-faq { max-width: 860px; }
.nh-pg-faq h2 { margin-top: 32px; }
.nh-pg-faq h2:first-child { margin-top: 0; }
.wp-block-details { border: 1px solid var(--nh-line); border-radius: 16px; padding: 0 22px; margin: 0 0 10px; background: #fff; }
.wp-block-details summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative; font-weight: 700; font-size: 16.5px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--nh-mist); display: grid; place-items: center; font-size: 18px; font-weight: 600; color: var(--nh-blue); }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details[open] { border-color: var(--nh-blue); }
.wp-block-details > :not(summary) { color: #3D4A5C; padding-bottom: 6px; }

/* Llamada final */
.nh-pg-cta { background: var(--nh-mist); border-radius: 28px; padding: clamp(28px, 4vw, 48px); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; background: var(--nh-orange); color: #fff !important; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.wp-block-button__link:hover { background: var(--nh-orange-dark); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--nh-ink) !important; border-color: var(--nh-ink); }

/* Datos de contacto, mapa y formulario */
.nh-contact-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.nh-contact-list a { display: flex; gap: 12px; align-items: center; color: var(--nh-ink); font-weight: 600; text-decoration: none; }
.nh-contact-list svg { color: var(--nh-blue); flex: none; }
.nh-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.nh-map { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--nh-line); background: var(--nh-mist); }
.nh-map iframe { display: block; width: 100%; height: 320px; border: 0; }
.nh-map figcaption { padding: 12px 18px; font-weight: 700; }

.nh-form { display: grid; gap: 14px; }
.nh-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nh-field { margin: 0 !important; display: grid; gap: 6px; }
.nh-field label { font-weight: 600; font-size: 14px; }
.nh-field input, .nh-field select, .nh-field textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--nh-line); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 15px; background: #fff; }
.nh-field input:focus, .nh-field select:focus, .nh-field textarea:focus { outline: none; border-color: var(--nh-blue); box-shadow: 0 0 0 3px rgba(0, 84, 166, .12); }
.nh-check { margin: 0 !important; font-size: 14px; color: var(--nh-muted); }
.nh-check input { margin-right: 6px; accent-color: var(--nh-blue); }
.nh-form .nh-btn { justify-self: start; min-width: 200px; }
.nh-form__hp { position: absolute !important; left: -9999px; }
.nh-form__ok, .nh-form__error { display: flex; gap: 10px; align-items: center; margin: 0 !important; padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.nh-form__ok { background: var(--nh-green-soft); color: var(--nh-green); }
.nh-form__error { background: #FDECEC; color: #B42318; }

/* Título seguido de su contenido: sin el espacio grande entre secciones */
.nh-pg > * + h2 { margin-top: 56px; }
.nh-pg > h2 + *, .nh-pg > h2 + .nh-pg-muted + * { margin-top: 0; }
.nh-pg-cta .wp-block-buttons { margin-top: 18px; }
.nh-pg > h2 + .nh-pg-muted { margin-top: 0; margin-bottom: 22px; }
.nh-pg-muted { color: var(--nh-muted); font-size: 17px; max-width: 760px; }
.nh-pg [id] { scroll-margin-top: 140px; }
.nh-pg-link { font-weight: 700; color: var(--nh-blue); text-decoration: none; }
.nh-pg-link:hover { text-decoration: underline; }

/* Pasos numerados */
.nh-pg-steps { counter-reset: nhstep; }
.nh-pg-steps > .wp-block-group__inner-container,
.nh-pg-steps:not(:has(> .wp-block-group__inner-container)) { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nh-pg-stepcard { position: relative; margin: 0 !important; padding: 64px 22px 22px; border-radius: 22px; background: var(--nh-mist); counter-increment: nhstep; }
.nh-pg-stepcard::before { content: counter(nhstep); position: absolute; left: 22px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--nh-blue); color: #fff; font-family: var(--nh-font-display); font-weight: 800; font-size: 16px; }
.nh-pg-stepcard:not(:last-child)::after { content: ""; position: absolute; top: 37px; left: 64px; right: 14px; height: 2px; background: repeating-linear-gradient(90deg, var(--nh-line) 0 6px, transparent 6px 12px); }
.nh-pg-stepcard h3 { font-size: 18px; }
.nh-pg-stepcard p:last-child { margin: 0; color: #3D4A5C; font-size: 15px; }

/* Cifras */
.nh-pg-stats > .wp-block-group__inner-container,
.nh-pg-stats:not(:has(> .wp-block-group__inner-container)) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--nh-line); border-radius: 24px; background: #fff; overflow: hidden; }
.nh-pg-stat { margin: 0 !important; padding: 24px 26px; }
.nh-pg-stat + .nh-pg-stat { border-left: 1px solid var(--nh-line); }
.nh-pg-stat__n { font-family: var(--nh-font-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; color: var(--nh-blue); margin: 0 0 6px !important; }
.nh-pg-stat p:last-child { margin: 0; color: var(--nh-muted); font-size: 14.5px; }
.nh-pg-stat:nth-child(2) .nh-pg-stat__n { color: var(--nh-orange); }
.nh-pg-stat:nth-child(3) .nh-pg-stat__n { color: var(--nh-green); }
.nh-pg-stat:nth-child(4) .nh-pg-stat__n { color: #5B3FD9; }

/* Foto (o recuadro de marca si no hay foto) */
.nh-pg-split--media { align-items: center; }
.nh-pg-photo { margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--nh-mist); }
.nh-pg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nh-pg-photo--empty { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 32px; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .18) 0 90px, transparent 91px), radial-gradient(circle at 10% 110%, var(--nh-orange) 0 120px, transparent 121px), var(--nh-blue); }
.nh-pg-photo--empty strong { font-family: var(--nh-font-display); font-size: 26px; line-height: 1.2; }
.nh-pg-photo--empty span:last-child { opacity: .85; }
.nh-pg-photo__icon { position: absolute; top: 28px; left: 32px; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }

/* Tarjetas de ayuda [nh_ayuda] */
.nh-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.nh-help__card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--nh-line); border-radius: 20px; background: #fff; color: var(--nh-ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.nh-help__card:hover { border-color: var(--nh-blue); transform: translateY(-2px); box-shadow: 0 16px 32px -22px rgba(15, 30, 51, .4); }
.nh-help__card .nh-ico { flex: none; }
.nh-help__card:nth-child(4n+2) .nh-ico { background: var(--nh-peach); color: var(--nh-orange-dark); }
.nh-help__card:nth-child(4n+3) .nh-ico { background: var(--nh-green-soft); color: var(--nh-green); }
.nh-help__card:nth-child(4n+4) .nh-ico { background: #EEE9FF; color: #5B3FD9; }
.nh-help__txt { flex: 1; display: grid; gap: 2px; line-height: 1.35; }
.nh-help__txt strong { font-size: 15.5px; }
.nh-help__txt span { font-size: 13.5px; color: var(--nh-muted); }
.nh-help__card > svg { flex: none; color: var(--nh-orange); transition: transform .2s; }
.nh-help__card:hover > svg { transform: translateX(3px); }
.nh-pg-more h2 { margin-bottom: 18px; }
.nh-pg-more .nh-help + p { margin-top: 16px; }

/* Botones de contacto [nh_botones_contacto] */
.nh-cbtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.nh-cbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .2s; }
.nh-cbtn:hover { transform: translateY(-1px); }
.nh-cbtn--call { background: var(--nh-orange); color: #fff; }
.nh-cbtn--call:hover { background: var(--nh-orange-dark); color: #fff; }
.nh-cbtn--wa { background: #25D366; color: #fff; }
.nh-cbtn--mail { background: #fff; color: var(--nh-ink); border-color: var(--nh-line); }
.nh-pg-hero .nh-cbtns, .nh-pg-hero .wp-block-buttons { margin-top: 26px; }
.nh-pg-hero--blue .nh-cbtn--mail, .nh-pg-hero--ink .nh-cbtn--mail { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.nh-pg-hero--blue .wp-block-button.is-style-outline .wp-block-button__link { color: #fff !important; border-color: rgba(255, 255, 255, .6); }
.nh-pg-aside .nh-cbtns { margin-bottom: 16px; }
.nh-pg-bigphone { font-family: var(--nh-font-display); font-size: 26px; font-weight: 800; }
.nh-pg-bigphone a, .nh-tel { color: var(--nh-blue); text-decoration: none; white-space: nowrap; }
.nh-pg-aside .nh-social { display: flex; gap: 10px; }
.nh-pg-aside .nh-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--nh-blue); }

/* Secciones de preguntas con ancla */
.nh-pg-faq h2[id] { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.nh-pg-faq h2[id]::before { content: ""; width: 8px; height: 28px; border-radius: 4px; background: var(--nh-orange); flex: none; }
.nh-pg-faq .wp-block-details + p { margin: 14px 0 0; }
.nh-pg-details-sc .nh-hours { margin: 0; }

/* Páginas creadas en el editor: textos con ritmo normal entre párrafos y listas */
.nh-pg > :where(p, ul, ol, h3, h4, blockquote, .wp-block-table, .wp-block-quote) + :where(p, ul, ol, blockquote, .wp-block-table, .wp-block-quote) { margin-top: 0; }
.nh-pg > :where(h3, h4) + * { margin-top: 0; }
.nh-pg > :where(p, ul, ol, .wp-block-table) + h3, .nh-pg > :where(p, ul, ol, .wp-block-table) + h4 { margin-top: 28px; }
.nh-pg > :where(p, ul, ol, h3, h4, blockquote, .wp-block-table) { max-width: 860px; }
.nh-pg > ul.wp-block-list, .nh-pg > ol.wp-block-list { margin-bottom: 14px; }
.nh-pg ol.wp-block-list { padding-left: 22px; display: grid; gap: 8px; }
.nh-pg ol.wp-block-list li::marker { color: var(--nh-blue); font-weight: 700; }
.nh-pg .wp-block-image img { border-radius: 22px; height: auto; max-width: 100%; }
.nh-pg .wp-block-quote { border-left: 4px solid var(--nh-orange); margin-left: 0; padding: 4px 0 4px 18px; font-size: 18px; }
.nh-pg .wp-block-table table { width: 100%; border-collapse: collapse; }
.nh-pg .wp-block-table :is(th, td) { border: 1px solid var(--nh-line); padding: 10px 14px; text-align: left; }
.nh-pg .wp-block-table th { background: var(--nh-mist); }
.nh-pg--page > .nh-page__header h1 { margin: 0; }

/* Banda azul destacada */
.nh-pg-band { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; padding: clamp(28px, 4vw, 48px); background: var(--nh-blue); color: #fff; }
.nh-pg-band::after { content: ""; position: absolute; z-index: -1; width: 320px; height: 320px; border-radius: 50%; right: -80px; bottom: -160px; background: var(--nh-orange); opacity: .9; }
.nh-pg-band h2 { color: #fff; }
.nh-pg-band p { opacity: .9; max-width: 620px; }
.nh-pg-band .wp-block-buttons { margin-top: 18px; }

/* Páginas normales escritas en el editor */
.nh-prose .wp-block-image img { border-radius: 18px; height: auto; }
.nh-prose .wp-block-quote { border-left: 4px solid var(--nh-orange); margin: 0; padding: 4px 0 4px 18px; font-size: 18px; }

@media (max-width: 1024px) {
	.nh-pg-cards, .nh-pg-cards--4 { --nh-cols: 2; }
	.nh-pg-steps > .wp-block-group__inner-container, .nh-pg-steps:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-pg-stepcard::after { display: none; }
	.nh-pg-stats > .wp-block-group__inner-container, .nh-pg-stats:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nh-pg-stat:nth-child(3) { border-left: 0; }
	.nh-pg-stat:nth-child(n+3) { border-top: 1px solid var(--nh-line); }
}
@media (max-width: 767px) {
	.nh-pg > * + * { margin-top: 32px; }
	.nh-pg > * + h2 { margin-top: 40px; }
	.nh-pg-hero { border-radius: 24px; }
	.nh-pg .wp-block-columns { flex-direction: column; gap: 24px; }
	.nh-pg-cards, .nh-pg-cards--4 { --nh-cols: 1; }
	.nh-form__row { grid-template-columns: 1fr; }
	.nh-pg-steps > .wp-block-group__inner-container, .nh-pg-steps:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: 1fr; }
	.nh-pg-stat { padding: 18px; }
	.nh-cbtn { flex: 1 1 auto; justify-content: center; }
	.nh-form .nh-btn { width: 100%; }
}
.nh-pg .wp-block-list + p { margin-top: 16px; }
.nh-pg > .nh-pg-hero + * { margin-top: 40px; }
.nh-pg > .nh-cbtns, .nh-pg > .nh-help { margin-top: 40px; }

/* --- Páginas legales ------------------------------------------------------ */
.nh-legal-date { color: var(--nh-muted); font-size: 14px; margin-top: 0; }
.nh-legal-toc {
	max-width: 820px;
	padding: 20px 24px;
	border: 1px solid var(--nh-line);
	border-radius: 20px;
	background: var(--nh-mist);
}
.nh-legal-toc p { margin: 0 0 8px; }
.nh-pg .nh-legal-toc ul.wp-block-list { display: block; columns: 2; column-gap: 32px; }
.nh-pg .nh-legal-toc ul.wp-block-list li { padding-left: 0; margin: 0 0 8px; break-inside: avoid; }
.nh-pg .nh-legal-toc ul.wp-block-list li::before { display: none; }
.nh-legal > p + p { margin-top: 10px; }
.nh-legal-toc a { text-decoration: none; font-weight: 600; font-size: 15px; }
.nh-legal-toc a:hover { text-decoration: underline; }
.nh-legal { max-width: 820px; }
.nh-legal h2 { font-size: 24px; margin: 40px 0 12px; scroll-margin-top: 110px; }
.nh-legal > * + h2 { margin-top: 40px; }
.nh-legal p, .nh-legal li { line-height: 1.65; }
.nh-legal ul { padding-left: 22px; display: grid; gap: 6px; }
.nh-legal .nhr-cookie-link {
	border: 1px solid var(--nh-blue);
	background: #fff;
	color: var(--nh-blue);
	border-radius: var(--nh-pill);
	padding: 8px 16px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
@media (max-width: 767px) {
	.nh-pg .nh-legal-toc ul.wp-block-list { columns: 1; }
	.nh-legal h2 { font-size: 20px; }
}
.nh-legal a { overflow-wrap: anywhere; }
