/**
 * Maria Fornet — global styles that theme.json can't express.
 * Design tokens (colors, fonts, spacing) live in theme.json.
 */

/* Keyboard focus — visible, high contrast, no layout shift */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--ink, #171510);
	outline-offset: 2px;
}

/* Skip link (core prints it; keep it visible above everything) */
.skip-link:focus {
	z-index: 100000;
}

/* Data tables */
table {
	border-collapse: collapse;
	width: 100%;
}
th,
td {
	padding: 0.5em 0.75em;
	text-align: left;
}
thead th {
	border-bottom: 2px solid var(--wp--preset--color--ink, #171510);
}

/* MF Home: core/image wraps images in a figure with default margins.
   The design expects images flush inside their sections. */
.mf-home .wp-block-image {
	margin: 0;
}

/* MF Home: WP global styles emit `.wp-block-image img { height: auto }`
   (0,1,1), which outranks the fixed heights in mf-home.css (.mf-lead__img,
   .mf-figure__image img). Restore the design heights at higher specificity,
   including the small-phone override from mf-home.css. */
.mf-home figure.wp-block-image img.mf-lead__img {
	height: 300px;
}

.mf-home figure.wp-block-image.mf-figure__image img {
	height: 100%;
}

@media (max-width: 480px) {
	.mf-home figure.wp-block-image img.mf-lead__img {
		height: 220px;
	}
}

/* Page-frame gutters shrink globally on small screens (header + footer). */
@media (max-width: 860px) {
	:root {
		--wp--custom--gutter--default: var(--wp--custom--gutter--md);
	}
}

@media (max-width: 480px) {
	:root {
		--wp--custom--gutter--default: var(--wp--custom--gutter--sm);
	}
}

/* Header — the v2 site header (parts/header.html). Capture-page rhythm
   overrides live in mf-home.css. */
.mf-topbar {
	padding: 26px var(--wp--custom--gutter--default) 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Design canvas: the whole composition (header, content, footer) caps at
   1240px on wide screens, per the .dc.html page wrapper. */
.mf-topbar,
.mf-masthead,
.mf-footer {
	max-width: 1240px;
	margin-right: auto;
	margin-left: auto;
}

.mf-vol {
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--custom--tint--ink-55);
}

.mf-topbar__nav {
	display: flex;
	align-items: center;
	gap: 30px;
}

/* Core's container already flexes and inherits gap from the nav element
   (`gap: inherit`), so the 30px rhythm is set once here. */
.mf-topbar .wp-block-navigation {
	gap: 30px;
}

/* Core pins the anchor to color:inherit (0,4,1), so the active color goes
   on the li; the gold bar renders on the anchor itself. */
.mf-topbar li.current-menu-item { color: var(--wp--preset--color--ink); }

.mf-topbar li.current-menu-item > a {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--gold);
}

.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu {
	gap: 7px;
}

/* Hover bridge: keeps the pointer "inside" the item while crossing the
   8px gap between the trigger and the panel. */
.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 10px;
}

/* Open state (design: ink text + gold bar under the item while the panel
   is open — core only marks custom links current, so the bar must key on
   the open state). */
.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu:hover,
.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu:focus-within {
	color: var(--wp--preset--color--ink);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--gold);
}

.mf-topbar .wp-block-navigation-submenu__toggle {
	padding: 7px 0;
	cursor: pointer;
	/* Core pins the icon button to .6em for its chevron svg. */
	width: auto;
	height: auto;
}

.mf-topbar .wp-block-navigation-submenu__toggle svg {
	display: none;
}

/* Filled triangle glyph (design ▼), 8px like the original site's.
   Explicit box: core nav sets line-height 0, which collapses an empty
   pseudo-element. */
.mf-topbar .wp-block-navigation-submenu__toggle::before {
	content: "";
	display: block;
	box-sizing: border-box;
	width: 8px;
	height: 5px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}

/* Dropdown panel: one flat level (v2 design). The 8px offset and 300px
   floor come from the design artifact; core's open-state rules pin
   min-width:200px at (0,5,0), so the floor is restated against core's
   own selectors. */
.mf-topbar .wp-block-navigation__container > li > .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--cream);
	border: 1px solid var(--wp--preset--color--ink);
	padding: 26px 30px;
	min-width: 300px;
	margin-top: 8px;
	gap: 22px;
	color: var(--wp--preset--color--ink);
}

.mf-topbar .wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within > .wp-block-navigation__submenu-container,
.mf-topbar .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	min-width: 300px;
}

.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu:hover > .wp-block-navigation__submenu-container,
.mf-topbar .wp-block-navigation__container > li.wp-block-navigation-submenu:focus-within > .wp-block-navigation__submenu-container {
	display: flex;
	width: auto;
	height: auto;
	overflow: visible;
	opacity: 1;
	visibility: visible;
}

/* Item sublabels (the design's second line under each entry) — core hides
   __description by default. */
.mf-topbar .wp-block-navigation__submenu-container .wp-block-navigation-item__description {
	display: block;
	margin-top: 6px;
	font-size: var(--wp--custom--sublabel--font-size);
	letter-spacing: var(--wp--custom--sublabel--tracking);
	color: var(--wp--custom--tint--ink-50);
}

/* Design: sublabel stacks under the label — core renders the anchor as a
   flex row (label + description side by side) and pads it .5em 1em. */
.mf-topbar .wp-block-navigation__submenu-container > li > a {
	flex-direction: column;
	align-items: flex-start;
	padding: 0;
	white-space: nowrap;
}

.mf-topbar .wp-block-navigation__submenu-container li:hover { color: var(--wp--preset--color--gold-dark); }

.mf-topbar .wp-block-navigation__submenu-container li:hover .wp-block-navigation-item__description {
	color: inherit;
}

/* Masthead */
.mf-masthead { padding: 18px var(--wp--custom--gutter--default) 0; }

.mf-masthead__inner {
	border-top: 1px solid var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding: 14px 0 16px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
}

.mf-masthead .wp-block-site-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: 46px;
	line-height: .9;
	letter-spacing: -.03em;
}

.mf-masthead .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
}

.mf-masthead .wp-block-site-tagline {
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
	padding-bottom: 12px;
	text-align: right;
}

/* Footer — the v2 site footer (parts/footer.html). Manifesto rhythm for the
   capture page lives in mf-home.css. */
.mf-footer {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
	padding: 20px var(--wp--custom--gutter--default) 44px;
}

/* Nav columns */
.mf-footer__grid {
	border-top: 1px solid var(--wp--custom--tint--cream-22);
	padding-top: 44px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px;
}

.mf-footer__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.mf-footer__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
}

/* "Punto de Inflexión" is a nav item styled as a sub-heading (design: gold
   micro label with extra top separation before "El programa"). */
.mf-footer__col li.mf-footer__heading {
	margin-top: 10px;
}

/* Column menus: PT Serif body links (theme.json styles navs Jost micro caps). */
.mf-footer__col .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--body-17);
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--custom--tint--cream-80);
}

.mf-footer__col .wp-block-navigation__container > li:hover {
	color: var(--wp--preset--color--gold);
}

.mf-footer__col .wp-block-navigation a {
	text-decoration: none;
}

/* Core renders every nav item as a row flex box (parent link + sub list
   side by side); the footer needs parent and sub items stacked. */
.mf-footer__col .wp-block-navigation .has-child {
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

/* Sub lists render static and indented (design: sub-items of a group).
   Selector matches core's `.wp-block-navigation .has-child …` specificity
   and prints later, so it wins the cascade. */
.mf-footer__col .wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
	position: static;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: auto;
	height: auto;
	min-width: 0;
	margin: 0;
	padding: 0 0 0 14px;
	background: transparent;
	border: none;
	border-left: 1px solid var(--wp--custom--tint--cream-22);
	font-style: italic;
	font-size: var(--wp--preset--font-size--body-14);
	color: var(--wp--custom--tint--cream-60);
	opacity: 1;
	visibility: visible;
	overflow: visible;
	left: auto;
	top: auto;
	z-index: auto;
	transition: none;
}

.mf-footer__col .wp-block-navigation-submenu__toggle {
	display: none;
}

/* Acceder trigger in the footer (same block style, dark-surface variant). */
.mf-footer .is-style-mf-modal a {
	margin-top: 10px;
	padding: 12px 18px;
	color: var(--wp--preset--color--cream);
	background: transparent;
	border: 1px solid var(--wp--custom--tint--cream-50);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
}

.mf-footer .is-style-mf-modal a:hover,
.mf-footer .is-style-mf-modal a:focus {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
}

/* "Habla con nosotras ; )" band */
.mf-footer__contact {
	margin-top: 54px;
	border-top: 1px solid var(--wp--custom--tint--cream-22);
	padding-top: 34px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 26px 40px;
}

.mf-footer__contact__intro {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 52ch;
}

.mf-footer__contact-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--display-34);
	line-height: 1.2;
	letter-spacing: -.02em;
	color: var(--wp--preset--color--gold);
}

.mf-footer__contact-text {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--body-17);
	line-height: 1.7;
	color: var(--wp--custom--tint--cream-80);
}

/* WhatsApp / email circles (extra class beats core's logos-only and
   brand-color rules) */
.mf-footer__social.is-style-logos-only .wp-social-link,
.mf-footer__social.is-style-logos-only .wp-social-link a {
	box-sizing: border-box;
	width: 58px;
	height: 58px;
	padding: 0;
	justify-content: center;
	color: var(--wp--preset--color--cream);
	background: transparent;
	border: 1px solid var(--wp--custom--tint--cream-50);
	border-radius: 50%;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.mf-footer__social.is-style-logos-only .wp-social-link a:hover,
.mf-footer__social.is-style-logos-only .wp-social-link a:focus {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
}

.mf-footer__social .wp-social-link svg {
	width: 28px;
	height: 28px;
}

/* Legal row */
.mf-footer__legal {
	margin-top: 44px;
	border-top: 1px solid var(--wp--custom--tint--cream-22);
	padding-top: 26px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
}

.mf-footer__sig {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
	font-size: 22px;
	line-height: .8;
	letter-spacing: -.11em;
	color: var(--wp--preset--color--gold);
}

.mf-footer__nav .wp-block-navigation__container {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 20px;
	/* Overrides the theme.json nav color (ink-60) for the dark footer. */
	color: var(--wp--custom--tint--cream-60);
}

.mf-footer__nav .wp-block-navigation__container > li + li::before {
	content: "·";
	color: var(--wp--custom--tint--cream-30);
}

.mf-footer__nav a {
	text-decoration: none;
}

.mf-footer__nav .wp-block-navigation__container > li:hover {
	color: var(--wp--preset--color--gold);
}

.mf-footer__copyright {
	margin: 0;
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--custom--tint--cream-40);
}

@media (max-width: 860px) {
	.mf-topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.mf-topbar__nav { gap: 18px; }
	.mf-topbar .wp-block-navigation__container { gap: 18px; flex-wrap: wrap; }

	.mf-masthead__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.mf-masthead .wp-block-site-tagline { padding-bottom: 0; text-align: left; }

	.mf-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.mf-topbar__nav { gap: 12px; }
	.mf-topbar .wp-block-navigation__container { gap: 12px; }

	.mf-topbar .wp-block-navigation__container > li > .wp-block-navigation__submenu-container {
		left: auto;
		right: -40px;
	}

	.mf-footer {
		padding-bottom: 32px;
	}

	.mf-footer__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}