/* ==========================================================================
   Método H.A.C.K. — tema hijo de Twenty Twenty-Three
   Paleta: fondo #0B0F1A · superficie #101525 · pie #080B14 · teal #5BB8B0
           texto #F5F5F5 · atenuado #8892A0 · blanco #FFFFFF
   Tipografía: Playfair Display (titulares) · Inter (cuerpo) · Courier New (mono)
   ========================================================================== */

:root {
	--mh-bg: #0B0F1A;
	--mh-surface: #101525;
	--mh-footer: #080B14;
	--mh-teal: #5BB8B0;
	--mh-teal-dim: rgba(91, 184, 176, 0.12);
	--mh-teal-line: rgba(91, 184, 176, 0.18);
	--mh-text: #F5F5F5;
	--mh-muted: #8892A0;
	--mh-white: #FFFFFF;
	--mh-line: rgba(255, 255, 255, 0.06);
	--mh-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--mh-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--mh-mono: 'Courier New', Courier, monospace;
	--mh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Base global
   -------------------------------------------------------------------------- */
html {
	scroll-behavior: smooth;
	background: var(--mh-bg);
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
	background-color: var(--mh-bg);
	color: var(--mh-text);
	font-family: var(--mh-sans);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
}

/* Todo el texto blanco por defecto */
body, p, li, td, th, dd, dt, span, label, figcaption, blockquote {
	color: var(--mh-text);
}

h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-heading {
	font-family: var(--mh-display);
	color: var(--mh-white);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

h1 { font-weight: 900; }

h4, h5, h6 {
	font-family: var(--mh-sans);
	font-weight: 600;
}

/* Enlaces: blancos, teal al pasar el cursor */
a {
	color: var(--mh-text);
	text-decoration: none;
	transition: color 0.25s var(--mh-ease), opacity 0.25s var(--mh-ease);
}

a:hover,
a:focus-visible {
	color: var(--mh-teal);
}

a:focus-visible {
	outline: 2px solid var(--mh-teal);
	outline-offset: 3px;
	border-radius: 2px;
}

.mh-entry a,
.wp-block-post-content a,
.entry-content a {
	color: var(--mh-teal);
	border-bottom: 1px solid var(--mh-teal-line);
}

.mh-entry a:hover,
.wp-block-post-content a:hover {
	color: var(--mh-white);
	border-bottom-color: var(--mh-teal);
}

/* Selección y barra de desplazamiento */
::selection {
	background: var(--mh-teal);
	color: var(--mh-bg);
}

::-moz-selection {
	background: var(--mh-teal);
	color: var(--mh-bg);
}

* {
	scrollbar-width: thin;
	scrollbar-color: rgba(91, 184, 176, 0.45) var(--mh-bg);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--mh-bg); }
::-webkit-scrollbar-thumb {
	background: #1B2236;
	border-radius: 999px;
	border: 2px solid var(--mh-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--mh-teal); }

img, video, svg { max-width: 100%; height: auto; }

hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--mh-teal-line);
	opacity: 1;
}

.wp-block-separator.is-style-wide { width: 100%; }

code, kbd, pre, samp {
	font-family: var(--mh-mono);
}

/* --------------------------------------------------------------------------
   Sin créditos, marcas de agua ni "Powered by" (en cualquier variante)
   -------------------------------------------------------------------------- */
.powered-by,
.site-info .powered-by,
.wp-block-site-tagline.powered,
a[href*="wordpress.org"],
a[href*="wordpress.com"],
a[href*="hostinger.com"],
a[href*="hostinger.mx"],
a[href*="hostinger.es"],
[class*="powered-by"],
[id*="powered-by"],
[class*="poweredby"],
[class*="watermark"],
[id*="watermark"],
[class*="site-credit"],
[class*="theme-credit"],
[class*="theme-author"],
[class*="designed-by"],
.wp-block-loginout a[href*="wordpress"],
.privacy-policy-link + .sep,
.site-footer .credits {
	display: none !important;
	visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   Estructura general
   -------------------------------------------------------------------------- */
.wp-site-blocks {
	background: var(--mh-bg);
}

/* Portada (Home V4): sin relleno lateral, la página trae su propio HTML/CSS */
body.mh-front-page .wp-site-blocks,
body.home.page .wp-site-blocks {
	padding: 0 !important;
}

body.mh-front-page .wp-site-blocks > * {
	margin-block-start: 0;
}

.mh-front-content,
.wp-block-post-content.mh-front-content {
	margin: 0;
	max-width: none;
}

.mh-front-content > * {
	max-width: none;
}

/* Contenido principal */
.mh-main {
	min-height: 50vh;
}

.mh-kicker {
	font-family: var(--mh-mono);
	font-size: 0.875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mh-teal);
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */
.mh-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(11, 15, 26, 0.92);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--mh-line);
}

.admin-bar .mh-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .mh-header { top: 46px; }
}

.mh-header__inner {
	min-height: 72px;
}

.mh-logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	border: 0;
}

.mh-logo img {
	width: 140px;
	height: auto;
	display: block;
	transition: opacity 0.25s var(--mh-ease);
}

.mh-logo:hover img { opacity: 0.85; }

.mh-nav,
.mh-nav .wp-block-navigation-item__content {
	font-family: var(--mh-sans);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.mh-nav .wp-block-navigation-item__content {
	color: var(--mh-text);
	padding: 0.25rem 0;
	position: relative;
	text-decoration: none;
}

.mh-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 1px;
	background: var(--mh-teal);
	transition: width 0.3s var(--mh-ease);
}

.mh-nav .wp-block-navigation-item__content:hover,
.mh-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--mh-teal);
	text-decoration: none;
}

.mh-nav .wp-block-navigation-item__content:hover::after { width: 100%; }

/* Menú móvil (overlay) */
.mh-nav .wp-block-navigation__responsive-container-open,
.mh-nav .wp-block-navigation__responsive-container-close {
	color: var(--mh-text);
}

.mh-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--mh-bg);
	color: var(--mh-text);
	padding: 5rem 2rem 2rem;
}

.mh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--mh-display);
	font-size: 2rem;
	font-weight: 700;
	color: var(--mh-white);
}

/* Botón CTA "Agendar" y botones en general: blancos con texto oscuro */
.wp-block-button__link,
.wp-element-button,
.mh-btn .wp-block-button__link,
button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close),
input[type="submit"],
input[type="button"] {
	background: var(--mh-white) !important;
	color: var(--mh-bg) !important;
	font-family: var(--mh-sans);
	font-weight: 600;
	font-size: 15px;
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.4rem;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.25s var(--mh-ease), color 0.25s var(--mh-ease), transform 0.25s var(--mh-ease), box-shadow 0.25s var(--mh-ease);
}

.wp-block-button__link:hover,
.wp-element-button:hover,
button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):hover,
input[type="submit"]:hover {
	background: var(--mh-teal) !important;
	color: var(--mh-bg) !important;
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(91, 184, 176, 0.18);
}

.mh-header__cta .wp-block-button__link {
	padding: 0.65rem 1.35rem;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.mh-header__cta { display: none; }
	.mh-logo img { width: 120px; }
}

/* --------------------------------------------------------------------------
   Blog: cabecera y rejilla de tarjetas
   -------------------------------------------------------------------------- */
.mh-blog__title {
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	max-width: 22ch;
}

.mh-blog__lead {
	max-width: 56ch;
	font-size: 1.0625rem;
	font-weight: 300;
	color: var(--mh-muted);
}

.mh-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

@media (max-width: 1024px) {
	.mh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.mh-cards { grid-template-columns: 1fr; }
}

.mh-cards > li { list-style: none; margin: 0; }

.mh-card {
	background: var(--mh-surface);
	border: 1px solid var(--mh-line);
	border-radius: 12px;
	height: 100%;
	transition: transform 0.35s var(--mh-ease), border-color 0.35s var(--mh-ease), box-shadow 0.35s var(--mh-ease);
}

.mh-card:hover {
	transform: translateY(-4px);
	border-color: var(--mh-teal-line);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--mh-teal-line);
}

.mh-card__image { margin: 0; }

.mh-card__image img {
	border-radius: 8px;
	display: block;
	width: 100%;
	object-fit: cover;
	transition: opacity 0.35s var(--mh-ease);
}

.mh-card:hover .mh-card__image img { opacity: 0.9; }

.mh-card__date,
.wp-block-post-date {
	font-family: var(--mh-mono);
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	color: var(--mh-muted);
}

.mh-card__title {
	font-family: var(--mh-display);
	font-size: 1.375rem;
	line-height: 1.25;
	margin: 0;
}

.mh-card__title a {
	color: var(--mh-white);
	transition: color 0.25s var(--mh-ease);
}

.mh-card:hover .mh-card__title a { color: var(--mh-teal); }

.mh-card__excerpt,
.wp-block-post-excerpt__excerpt {
	color: var(--mh-muted);
	font-size: 0.9375rem;
	line-height: 1.7;
}

.wp-block-post-excerpt__more-link {
	color: var(--mh-teal);
	font-weight: 500;
	font-size: 0.9375rem;
}

/* Paginación */
.mh-pagination,
.wp-block-query-pagination {
	font-size: 0.9375rem;
	font-weight: 500;
}

.wp-block-query-pagination a,
.wp-block-query-pagination-numbers .page-numbers {
	color: var(--mh-muted);
	padding: 0.4rem 0.7rem;
	border-radius: 6px;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination-numbers .page-numbers.current {
	color: var(--mh-white);
	background: var(--mh-surface);
}

/* --------------------------------------------------------------------------
   Entrada individual y páginas
   -------------------------------------------------------------------------- */
.mh-single__title,
.mh-page-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.1;
}

.mh-single__header { text-align: left; }

.mh-single__date { color: var(--mh-muted); }

.mh-single__image img {
	border-radius: 12px;
	width: 100%;
	object-fit: cover;
}

.mh-kicker.wp-block-post-terms a { color: var(--mh-teal); border: 0; }

.mh-entry {
	font-size: 1.0625rem;
	line-height: 1.8;
}

.mh-entry > * + * { margin-block-start: 1.4em; }

.mh-entry h2 { margin-top: 2.5em; }
.mh-entry h3 { margin-top: 2em; }

.mh-entry blockquote,
.wp-block-quote {
	border-left: 2px solid var(--mh-teal);
	padding: 0.5rem 0 0.5rem 1.5rem;
	font-family: var(--mh-display);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--mh-white);
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--mh-mono);
	font-style: normal;
	font-size: 0.875rem;
	color: var(--mh-muted);
}

.mh-entry img,
.wp-block-image img { border-radius: 8px; }

.mh-entry pre,
.wp-block-code {
	background: var(--mh-surface);
	border: 1px solid var(--mh-line);
	border-radius: 8px;
	padding: 1.25rem;
	overflow-x: auto;
	color: var(--mh-teal);
	font-size: 0.875rem;
}

.mh-entry table,
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table td,
.wp-block-table th {
	border: 1px solid var(--mh-line);
	padding: 0.75rem 1rem;
}

.wp-block-table th { background: var(--mh-surface); color: var(--mh-white); }

/* Navegación entre entradas */
.mh-post-nav a {
	color: var(--mh-muted);
	font-size: 0.9375rem;
}

.mh-post-nav a:hover { color: var(--mh-teal); }

.mh-post-nav .post-navigation-link__label {
	display: block;
	font-family: var(--mh-mono);
	font-size: 0.875rem;
	letter-spacing: 0.06em;
	color: var(--mh-muted);
	margin-bottom: 0.25rem;
}

.mh-post-nav .post-navigation-link__title {
	font-family: var(--mh-display);
	color: var(--mh-white);
}

/* Autor: nunca mostrar el nombre completo (solo "JB" via footer) */
.wp-block-post-author,
.wp-block-post-author-name,
.wp-block-post-author-biography,
.byline,
.author-info,
.entry-meta .author {
	display: none !important;
}

/* Comentarios en tema oscuro */
.wp-block-comments,
.wp-block-post-comments {
	color: var(--mh-text);
}

.comment-body {
	background: var(--mh-surface);
	border: 1px solid var(--mh-line);
	border-radius: 10px;
	padding: 1.25rem;
}

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select,
.wp-block-search__input {
	width: 100%;
	background: var(--mh-surface);
	color: var(--mh-text);
	border: 1px solid var(--mh-line);
	border-radius: 8px;
	padding: 0.85rem 1rem;
	font-family: var(--mh-sans);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color 0.25s var(--mh-ease), box-shadow 0.25s var(--mh-ease);
	-webkit-appearance: none;
	appearance: none;
}

textarea { min-height: 140px; resize: vertical; }

input:focus,
textarea:focus,
select:focus,
.wp-block-search__input:focus {
	outline: none;
	border-color: var(--mh-teal);
	box-shadow: 0 0 0 3px var(--mh-teal-dim);
}

::placeholder { color: var(--mh-muted); opacity: 1; }

label,
.wp-block-search__label {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--mh-text);
}

/* Bloque de búsqueda con botón dentro */
.mh-search .wp-block-search__inside-wrapper,
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	background: var(--mh-surface);
	border: 1px solid var(--mh-line) !important;
	border-radius: 999px;
	padding: 4px;
}

.mh-search .wp-block-search__input,
.wp-block-search__button-inside .wp-block-search__input {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding-left: 1.25rem;
}

.wp-block-search__button {
	border-radius: 999px;
	margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Pie de página
   -------------------------------------------------------------------------- */
.mh-footer {
	background: var(--mh-footer);
	border-top: 1px solid var(--mh-line);
	text-align: center;
	font-size: 14px;
}

.mh-footer__logo { line-height: 0; }

.mh-footer__logo img {
	width: 80px;
	height: auto;
	opacity: 0.45;
	display: inline-block;
	transition: opacity 0.3s var(--mh-ease);
}

.mh-footer__logo a:hover img { opacity: 0.8; }

.mh-footer__socials {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin: 0.5rem 0;
}

.mh-footer__socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--mh-muted);
	border: 1px solid transparent;
	transition: color 0.25s var(--mh-ease), border-color 0.25s var(--mh-ease), transform 0.25s var(--mh-ease);
}

.mh-footer__socials a:hover {
	color: var(--mh-teal);
	border-color: var(--mh-teal-line);
	transform: translateY(-2px);
}

.mh-footer__socials svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
}

.mh-footer__legal {
	font-size: 14px;
	color: var(--mh-muted);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 0.6rem;
}

.mh-footer__legal a {
	color: var(--mh-muted);
	font-size: 14px;
}

.mh-footer__legal a:hover { color: var(--mh-teal); }

.mh-footer__legal .mh-sep {
	color: rgba(136, 146, 160, 0.5);
	font-size: 14px;
}

.mh-footer__copy {
	font-family: var(--mh-mono);
	font-size: 14px;
	letter-spacing: 0.04em;
	color: var(--mh-muted);
	margin-top: 0.5rem;
}

/* Legibilidad: nunca menos de 14 px en textos secundarios (WCAG) */
.mh-footer,
.mh-footer *,
.wp-block-post-date,
figcaption,
.wp-element-caption,
small {
	font-size: max(14px, 1em);
}

.mh-footer p,
.mh-footer a,
.mh-footer span { font-size: 14px; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.mh-404 h1 {
	font-size: clamp(2.25rem, 6vw, 4rem);
}

/* --------------------------------------------------------------------------
   Accesibilidad / utilidades
   -------------------------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.skip-link:focus {
	background: var(--mh-teal);
	color: var(--mh-bg);
	padding: 0.75rem 1rem;
	z-index: 100000;
	top: 8px;
	left: 8px;
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
}
