/* =========================================================
   FUNASMED Centro Médico — estilos complementarios
   Colores y tipografía base: theme.json (Apariencia > Editor > Estilos)
   ========================================================= */

:root {
	--fm-blue: var(--wp--preset--color--accent-1, #0f70b7);
	--fm-amber: var(--wp--preset--color--accent-2, #f9b233);
	--fm-warm: var(--wp--preset--color--accent-3, #ebe9e6);
	--fm-deep: var(--wp--preset--color--accent-4, #0a548b);
	--fm-sky: var(--wp--preset--color--accent-5, #eaf4fb);
	--fm-night: var(--wp--preset--color--accent-6, #062a45);
	--fm-muted: var(--wp--preset--color--muted, #4f5d68);
	--fm-line: #dbe6ee;
	--fm-radius: var(--wp--custom--radius--card, 16px);
	--fm-shadow: var(--wp--custom--shadow--card, 0 14px 34px rgba(6, 42, 69, .1));
	--fm-wa: #128c4b;
	--fm-gap: 20px;
}

/* ---------- Tipografía de secciones ---------- */
.fm-eyebrow,
.fm-eyebrow a {
	margin: 0 0 .5rem;
	color: var(--fm-blue);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-decoration: none;
	text-transform: uppercase;
}

.fm-section-title {
	margin-top: 0;
	font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}

.fm-section-lead {
	max-width: 62ch;
	color: var(--fm-muted);
	font-size: 1.1rem;
}

.fm-section-head {
	margin-bottom: 2.5rem;
	text-align: center;
}

.fm-section-head .fm-section-lead {
	margin-right: auto;
	margin-left: auto;
}

.fm-center {
	justify-content: center;
	margin-top: 2.5rem;
}

.fm-small {
	color: var(--fm-muted);
	font-size: .9rem;
}

/* ---------- Botones extra ---------- */
.fm-btn-wa .wp-block-button__link,
.fm-btn--wa {
	background: var(--fm-wa) !important;
	color: #fff !important;
}

.fm-btn-wa .wp-block-button__link:hover,
.fm-btn--wa:hover {
	background: #0d6e3a !important;
}

.fm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: .75rem 1.3rem;
	border-radius: var(--wp--custom--radius--button, 10px);
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;
}

.fm-btn--accent {
	background: var(--fm-amber);
	color: #000 !important;
}

.fm-btn--ghost {
	border: 2px solid var(--fm-blue);
	color: var(--fm-blue) !important;
}

:where(.fm-site-header, .fm-site-footer, main) a:focus-visible,
.fm-btn:focus-visible {
	outline: 3px solid var(--fm-amber);
	outline-offset: 3px;
}

/* =========================================================
   CABECERA
   ========================================================= */
.fm-topbar {
	padding-top: .45rem;
	padding-bottom: .45rem;
}

.fm-topbar p {
	margin: 0;
}

.fm-topbar a {
	color: #fff;
	text-decoration: none;
}

.fm-topbar a:hover {
	color: var(--fm-amber);
}

.fm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: .8rem;
	padding-bottom: .8rem;
	border-bottom: 1px solid var(--fm-line);
	box-shadow: 0 6px 18px rgba(6, 42, 69, .05);
}

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

.fm-brand {
	gap: .75rem;
	align-items: center;
}

.fm-brand__text > * {
	margin: 0;
}

.fm-brand__name,
.fm-brand__name a {
	color: var(--fm-night);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.15;
	text-decoration: none;
}

.fm-brand__tag {
	color: var(--fm-blue);
	font-size: .76rem;
	font-weight: 700;
}

.fm-header__right {
	gap: 1.5rem;
	align-items: center;
}

.fm-nav {
	font-size: .95rem;
	font-weight: 700;
}

.fm-nav a {
	color: var(--fm-night);
	text-decoration: none;
}

.fm-nav a:hover {
	color: var(--fm-blue);
}

.fm-nav .wp-block-navigation__submenu-container {
	min-width: 280px !important;
	padding: .5rem 0;
	border: 1px solid var(--fm-line) !important;
	border-radius: 12px;
	box-shadow: var(--fm-shadow);
}

.fm-nav .wp-block-navigation__submenu-container a {
	padding: .45rem 1rem;
	font-weight: 600;
}

/* =========================================================
   HERO
   ========================================================= */
.fm-hero__cols {
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center !important;
}

.fm-hero__title {
	margin: .25rem 0 1rem;
	font-size: clamp(2.4rem, 5vw, 3.9rem);
	letter-spacing: -.04em;
	line-height: 1.04;
}

.fm-hero__promise {
	margin: 0 0 .75rem;
	color: var(--fm-blue);
	font-weight: 800;
}

.fm-hero__lead {
	color: var(--fm-muted);
	font-size: 1.12rem;
}

.fm-hero__actions {
	margin-top: 1.6rem;
}

.fm-hero__alt {
	margin-top: 1rem;
	color: var(--fm-muted);
}

.fm-hero__img img {
	width: 100%;
	aspect-ratio: 16 / 11;
	object-fit: cover;
	border-radius: 22px;
	box-shadow: var(--fm-shadow);
}

.fm-hero__card {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: 22px;
	background: var(--fm-sky);
	border: 1px solid var(--fm-line);
}

.fm-checklist {
	padding: 0;
	list-style: none;
}

.fm-checklist li {
	position: relative;
	margin: .6rem 0;
	padding-left: 1.8rem;
}

.fm-checklist li::before {
	content: "";
	position: absolute;
	top: .35em;
	left: 0;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 50%;
	background: var(--fm-amber);
	box-shadow: inset 0 0 0 4px var(--fm-amber), inset 0 0 0 7px #fff;
}

/* ---------- Beneficios ---------- */
.fm-benefits__cols {
	gap: 0 !important;
}

.fm-benefits__cols > .wp-block-column {
	padding: .5rem 1.75rem;
	border-left: 3px solid var(--fm-amber);
}

.fm-benefit__title {
	margin: 0 0 .3rem;
}

.fm-benefit__text {
	margin: 0;
	color: var(--fm-muted);
}

/* =========================================================
   TARJETAS DE SERVICIOS — cuadrícula única
   5 columnas en escritorio (2 filas exactas con 10 servicios);
   cualquier fila incompleta queda centrada.
   ========================================================= */
.fm-card-grid,
.fm-doctor-grid {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--fm-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	--fm-cols: 4;
}

.fm-doctor-grid {
	--fm-cols: 4;
}

.fm-card-grid > li,
.fm-doctor-grid > li {
	display: flex;
	flex: 0 0 calc((100% - (var(--fm-cols) - 1) * var(--fm-gap)) / var(--fm-cols));
	min-width: 0;
	margin: 0 !important;
}

.fm-card,
.fm-doctor {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--fm-line);
	border-radius: var(--fm-radius);
	background: #fff;
	transition: transform .2s ease, box-shadow .2s ease;
}

.fm-card:hover,
.fm-doctor:hover {
	transform: translateY(-4px);
	box-shadow: var(--fm-shadow);
}

.fm-card > *,
.fm-doctor > * {
	margin-block: 0 !important;
}

.fm-card__img,
.fm-doctor__img {
	overflow: hidden;
	background: var(--fm-warm);
}

.fm-card__img img,
.fm-doctor__img img {
	display: block;
	width: 100%;
	transition: transform .25s ease;
}

.fm-card:hover .fm-card__img img,
.fm-doctor:hover .fm-doctor__img img {
	transform: scale(1.03);
}

/* SVG (Enfermería y ambulancia): se ve completo, sin recorte */
.fm-card__img img[src$=".svg"],
.fm-card__img img[src*=".svg?"],
.fm-single__img img[src$=".svg"],
.fm-single__img img[src*=".svg?"] {
	padding: 10px;
	object-fit: contain !important;
	background: var(--fm-sky);
}

.fm-card__body,
.fm-doctor__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem 1.1rem 1.2rem;
}

.fm-card__body > *,
.fm-doctor__body > * {
	margin-block: 0;
}

.fm-card__tag,
.fm-card__tag a {
	margin-bottom: .4rem !important;
	color: var(--fm-blue);
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-decoration: none;
	text-transform: uppercase;
}

.fm-card__title,
.fm-doctor__name {
	margin: 0 0 .4rem !important;
	font-size: 1.05rem !important;
	line-height: 1.25;
}

.fm-card__title a,
.fm-doctor__name a {
	color: var(--fm-night);
	text-decoration: none;
}

.fm-card__excerpt {
	display: flex;
	flex: 1;
	flex-direction: column;
	font-size: .9rem;
}

.fm-card__excerpt .wp-block-post-excerpt__excerpt {
	flex: 1;
	margin: 0 0 .8rem;
	color: var(--fm-muted);
	line-height: 1.45;
}

.fm-card__excerpt .wp-block-post-excerpt__more-text {
	margin: 0;
}

.fm-card__excerpt .wp-block-post-excerpt__more-link,
.fm-doctor__more {
	color: var(--fm-blue);
	font-size: .9rem;
	font-weight: 800;
	text-decoration: none;
}

.fm-doctor__more {
	margin-top: auto !important;
}

.fm-empty {
	color: var(--fm-muted);
	text-align: center;
}

/* ---------- Pasos ---------- */
.fm-steps__cols > .wp-block-column {
	padding-top: 1rem;
	border-top: 3px solid var(--fm-amber);
}

.fm-step__num {
	margin: 0;
	color: var(--fm-blue);
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
}

.fm-step__title {
	margin: .5rem 0 .3rem;
}

.fm-step__text {
	margin: 0;
	color: var(--fm-muted);
}

/* ---------- Fundación, tarjetas informativas ---------- */
.fm-foundation__cols {
	gap: clamp(2rem, 5vw, 4rem);
}

.fm-feature {
	margin-bottom: 1rem;
	padding: 1.5rem;
	border-radius: var(--fm-radius);
	background: #fff;
	border: 1px solid var(--fm-line);
}

.fm-feature > :first-child {
	margin-top: 0;
}

.fm-feature > :last-child {
	margin-bottom: 0;
}

.fm-legal-note {
	padding-left: 1rem;
	border-left: 3px solid var(--fm-blue);
	color: var(--fm-muted);
}

/* ---------- Donación ---------- */
.fm-donate__inner {
	gap: 2rem;
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border-radius: 22px;
	background: var(--fm-sky);
	border: 1px solid var(--fm-line);
}

.fm-donate__inner > .wp-block-group {
	flex: 1 1 420px;
}

.fm-donate__inner .fm-section-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.fm-bank {
	margin: 0 0 1rem;
}

.fm-bank > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .5rem 0;
	border-bottom: 1px dashed var(--fm-line);
}

.fm-bank dt {
	color: var(--fm-muted);
}

.fm-bank dd {
	margin: 0;
	font-weight: 800;
	text-align: right;
}

/* Transferencia y código QR */
.fm-transfer {
	display: grid;
	grid-template-columns: minmax(240px, 340px) 1fr;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
	max-width: 980px;
	margin: 1.5rem auto 0;
}

.fm-transfer__qr {
	margin: 0;
	text-align: center;
}

.fm-transfer__qr img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(15, 112, 183, .15);
	border: 1px solid var(--fm-line);
}

.fm-transfer__qr figcaption {
	margin-top: .9rem;
	font-size: .92rem;
	line-height: 1.5;
	color: var(--fm-muted);
	text-align: left;
}

.fm-transfer__dl {
	display: inline-block;
	margin-top: .75rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent-1, #0f70b7);
}

.fm-transfer__data {
	padding: clamp(1.25rem, 3vw, 2rem);
	border-radius: 18px;
	background: var(--fm-sky);
	border: 1px solid var(--fm-line);
}

.fm-transfer__title {
	margin: 0 0 .75rem;
	font-size: 1.25rem;
}

.fm-transfer .fm-bank dd {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: .5rem;
	overflow-wrap: anywhere;
}

.fm-copy {
	border: 1px solid var(--wp--preset--color--accent-1, #0f70b7);
	background: #fff;
	color: var(--wp--preset--color--accent-1, #0f70b7);
	border-radius: 999px;
	padding: .2rem .7rem;
	font: inherit;
	font-size: .8rem;
	font-weight: 700;
	cursor: pointer;
}

.fm-copy:hover,
.fm-copy:focus-visible {
	background: var(--wp--preset--color--accent-1, #0f70b7);
	color: #fff;
}

.fm-donate-transfer .fm-section-title,
.fm-donate-transfer .fm-section-lead,
.fm-donate-transfer .fm-eyebrow {
	text-align: center;
}

@media (max-width: 767px) {
	.fm-transfer {
		grid-template-columns: 1fr;
	}

	.fm-transfer__qr {
		max-width: 320px;
		margin: 0 auto;
	}

	.fm-transfer .fm-bank > div {
		flex-direction: column;
		gap: .2rem;
	}

	.fm-transfer .fm-bank dd {
		justify-content: flex-start;
		text-align: left;
	}
}

/* ---------- Sede y mapa ---------- */
.fm-location__cols {
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center !important;
}

.fm-info-list {
	padding: 0;
	list-style: none;
}

.fm-info-list li {
	margin: 0 0 1rem;
}

.fm-map {
	overflow: hidden;
	border-radius: 22px;
	box-shadow: var(--fm-shadow);
}

.fm-map iframe {
	display: block;
	width: 100%;
	height: 420px;
	border: 0;
}

/* ---------- Preguntas frecuentes ---------- */
.fm-faq .fm-section-title {
	margin-bottom: 1.5rem;
}

.fm-faq__item {
	margin: 0 0 .75rem !important;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--fm-line);
}

.fm-faq__item summary {
	color: var(--fm-night);
	font-weight: 800;
	cursor: pointer;
}

.fm-faq__item[open] summary {
	margin-bottom: .5rem;
	color: var(--fm-blue);
}

.fm-faq__item p {
	margin: 0;
	color: var(--fm-muted);
}

/* ---------- Páginas internas ---------- */
.fm-page-hero .fm-section-title {
	margin-bottom: .75rem;
}

.fm-single__cols {
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center !important;
}

.fm-single__img img,
.fm-doctor__photo img {
	border-radius: 22px;
	box-shadow: var(--fm-shadow);
}

.fm-registro {
	color: var(--fm-muted);
	font-size: .9rem;
}

.fm-aside {
	position: sticky;
	top: 110px;
	padding: 1.5rem;
	border-radius: var(--fm-radius);
	background: var(--fm-sky);
	border: 1px solid var(--fm-line);
}

.fm-agenda--fallback {
	padding: clamp(1.5rem, 4vw, 2.25rem);
	border-radius: var(--fm-radius);
	background: var(--fm-sky);
	border: 1px solid var(--fm-line);
}

.fm-agenda__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 1rem;
}

.fm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1.5rem;
}

.fm-chips a {
	padding: .45rem 1rem;
	border: 1px solid var(--fm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--fm-night);
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none;
}

.fm-chips a[aria-current="page"],
.fm-chips a:hover {
	border-color: var(--fm-blue);
	background: var(--fm-blue);
	color: #fff;
}

/* =========================================================
   PIE DE PÁGINA
   ========================================================= */
.fm-site-footer {
	margin-top: 0 !important;
}

.fm-footer-cta__inner {
	gap: 1.5rem 3rem;
	align-items: center;
}

.fm-footer-cta__title {
	margin: 0 0 .35rem;
	color: #fff !important;
}

.fm-footer-cta__text {
	margin: 0;
	color: rgba(255, 255, 255, .88);
}

.fm-footer__cols {
	gap: clamp(1.5rem, 4vw, 3rem);
}

.fm-footer p,
.fm-footer li {
	color: rgba(255, 255, 255, .82);
}

.fm-footer a {
	color: #fff;
	text-decoration: none;
}

.fm-footer a:hover {
	color: var(--fm-amber);
	text-decoration: underline;
}

.fm-footer__name {
	margin: .75rem 0 .15rem;
	color: #fff !important;
	line-height: 1.2;
}

.fm-footer__backed {
	margin: 0 0 1rem;
	color: var(--fm-amber) !important;
	font-weight: 700;
}

.fm-footer__about {
	max-width: 36ch;
}

.fm-footer__title {
	margin: 0 0 1rem;
	color: var(--fm-amber) !important;
	font-size: .82rem !important;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.fm-footer__links,
.fm-footer__contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-footer__links li {
	margin: 0 0 .5rem;
	font-size: .93rem;
}

.fm-footer__contact li {
	display: flex;
	gap: .7rem;
	margin: 0 0 1rem;
	font-size: .93rem;
	line-height: 1.5;
}

.fm-footer__social {
	gap: .6rem !important;
	margin-top: 1.25rem;
}

.fm-footer__social .wp-social-link {
	color: #fff;
	fill: #fff;
}

.fm-footer__social .wp-social-link:hover {
	color: var(--fm-amber);
	fill: var(--fm-amber);
}

.fm-footer__bottom {
	gap: .5rem 2rem;
	margin-top: 3rem !important;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, .16);
}

.fm-footer__bottom p {
	margin: 0;
	color: rgba(255, 255, 255, .7);
}

/* Iconos del pie (máscaras SVG, heredan el color ámbar) */
.fm-ico {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: .2rem;
	background: var(--fm-amber);
	-webkit-mask: var(--fm-ico) center / contain no-repeat;
	mask: var(--fm-ico) center / contain no-repeat;
}

.fm-ico--pin { --fm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E"); }
.fm-ico--phone { --fm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1L6.6 10.8Z'/%3E%3C/svg%3E"); }
.fm-ico--wa { --fm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.3-.5.1-1 .1-1.7-.1-.4-.1-.9-.3-1.5-.6-2.6-1.1-4.3-3.8-4.4-4-.1-.2-1-1.4-1-2.6s.6-1.9.9-2.1c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.8 2c.1.1.1.3 0 .5l-.3.5-.4.4c-.1.1-.3.3-.1.6.2.3.7 1.2 1.5 1.9 1 .9 1.8 1.1 2.1 1.3.3.1.4.1.6-.1l.8-1c.2-.3.4-.2.6-.1l1.8.9c.3.1.4.2.5.3.1.1.1.6-.1 1.2Z'/%3E%3C/svg%3E"); }
.fm-ico--mail { --fm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm9 7.2L4 7.3V17h16V7.3l-8 4.9ZM4.6 7l7.4 4.5L19.4 7H4.6Z'/%3E%3C/svg%3E"); }
.fm-ico--clock { --fm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 10.4 3.2 3.2-1.4 1.4L11 13.2V6h2v6.4Z'/%3E%3C/svg%3E"); }

/* ---------- WhatsApp flotante ---------- */
.fm-wa-float {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .7rem 1.1rem .7rem .8rem;
	border-radius: 999px;
	background: var(--fm-wa);
	color: #fff !important;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
	transition: transform .2s ease;
}

.fm-wa-float:hover {
	transform: translateY(-2px);
}

/* =========================================================
   RESPONSIVE AUTOMÁTICO
   PC ≥ 1200 · Laptop 1024–1199 · Tablet 768–1023 · Móvil < 768
   ========================================================= */

/* Evita desbordes laterales sin romper la cabecera fija */
body {
	overflow-x: clip;
}

.fm-footer__contact a,
.fm-topbar a,
.fm-info-list a {
	overflow-wrap: anywhere;
}

/* ---------- Laptop ---------- */
@media (max-width: 1199px) {
	.fm-card-grid {
		--fm-cols: 4;
	}

	.fm-header__right {
		gap: 1rem;
	}

	.fm-nav {
		font-size: .9rem;
	}

	/* Pie en 2 × 2 */
	.fm-footer__cols {
		flex-wrap: wrap !important;
		row-gap: 2.5rem;
	}

	.fm-footer__cols > .wp-block-column {
		flex: 1 1 calc(50% - 3rem) !important;
	}
}

/* ---------- Tablet y menor: menú hamburguesa y columnas apiladas ---------- */
@media (max-width: 1023px) {
	.fm-card-grid,
	.fm-doctor-grid {
		--fm-cols: 3;
	}

	/* Menú: el núcleo solo muestra la hamburguesa < 600px; aquí la forzamos hasta 1023px */
	.fm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.fm-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.fm-nav .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.5rem;
		background: #fff !important;
		color: var(--fm-night) !important;
	}

	.fm-nav .is-menu-open .wp-block-navigation__container {
		gap: 1rem !important;
		font-size: 1.15rem;
	}

	.fm-nav .is-menu-open .wp-block-navigation__submenu-container {
		border: 0 !important;
		box-shadow: none;
		font-size: 1rem;
	}

	.fm-nav .wp-block-navigation__responsive-container-open svg,
	.fm-nav .wp-block-navigation__responsive-container-close svg {
		width: 30px;
		height: 30px;
	}

	/* Bloques de dos columnas → una sola columna, texto primero */
	.fm-hero__cols,
	.fm-foundation__cols,
	.fm-location__cols,
	.fm-single__cols,
	.fm-booking__cols {
		flex-wrap: wrap !important;
	}

	.fm-hero__cols > .wp-block-column,
	.fm-foundation__cols > .wp-block-column,
	.fm-location__cols > .wp-block-column,
	.fm-single__cols > .wp-block-column,
	.fm-booking__cols > .wp-block-column {
		flex-basis: 100% !important;
	}

	.fm-hero__img,
	.fm-single__img {
		max-width: 720px;
	}

	.fm-doctor__photo {
		max-width: 360px;
	}

	.fm-hero__title {
		max-width: 16ch;
	}

	.fm-aside {
		position: static;
	}

	.fm-donate__cols {
		flex-wrap: wrap !important;
	}

	.fm-donate__cols > .wp-block-column {
		flex: 1 1 280px !important;
	}
}

/* ---------- Móvil grande / tablet vertical ---------- */
@media (max-width: 767px) {
	.fm-topbar__address {
		display: none;
	}

	.fm-topbar .wp-block-group {
		justify-content: center !important;
	}

	.fm-card-grid,
	.fm-doctor-grid {
		--fm-cols: 2;
		--fm-gap: 14px;
	}

	.fm-benefits__cols > .wp-block-column {
		padding: .25rem 1rem;
	}

	.fm-section-head {
		margin-bottom: 1.75rem;
	}

	.fm-map iframe {
		height: 300px;
	}

	.fm-footer__cols > .wp-block-column {
		flex-basis: 100% !important;
	}

	.fm-footer__bottom {
		flex-direction: column;
		align-items: flex-start !important;
	}

	.admin-bar .fm-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .fm-header {
		top: 0;
	}
}

/* ---------- Móvil ---------- */
@media (max-width: 560px) {
	.fm-card-grid {
		--fm-cols: 1;
	}

	.fm-card__img img {
		aspect-ratio: 16 / 9 !important;
	}

	/* Botones a todo el ancho, fáciles de tocar */
	.fm-hero__actions,
	.fm-footer-cta__inner .wp-block-buttons,
	.fm-center,
	.fm-agenda__actions {
		flex-direction: column;
		align-items: stretch !important;
		width: 100%;
	}

	.fm-hero__actions .wp-block-button,
	.fm-footer-cta__inner .wp-block-button,
	.fm-center .wp-block-button,
	.fm-agenda__actions .fm-btn {
		width: 100%;
	}

	.fm-hero__actions .wp-block-button__link,
	.fm-footer-cta__inner .wp-block-button__link,
	.fm-center .wp-block-button__link {
		width: 100%;
	}

	/* Cabecera compacta: logo + "Agendar" + hamburguesa */
	.fm-brand__tag {
		display: none;
	}

	.fm-brand__name,
	.fm-brand__name a {
		font-size: .88rem;
	}

	.fm-brand .wp-block-site-logo img {
		width: 42px !important;
	}

	.fm-header__right {
		gap: .5rem;
	}

	.fm-header__cta .wp-block-button__link {
		padding: .55rem .85rem;
		font-size: .85rem;
	}

	.fm-topbar p {
		font-size: .78rem !important;
	}

	.fm-hero__title {
		font-size: clamp(2.05rem, 9vw, 2.6rem);
	}

	.fm-hero__lead {
		font-size: 1rem;
	}

	.fm-donate__inner {
		padding: 1.5rem;
	}

	.fm-wa-float span {
		display: none;
	}

	.fm-wa-float {
		right: 14px;
		bottom: 14px;
		padding: .85rem;
	}
}

/* ---------- Pantallas muy pequeñas ---------- */
@media (max-width: 380px) {
	.fm-header__cta {
		display: none;
	}

	.fm-topbar__contact {
		font-size: .72rem !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fm-card,
	.fm-doctor,
	.fm-card__img img,
	.fm-doctor__img img,
	.fm-wa-float {
		transition: none;
	}

	.fm-card:hover,
	.fm-doctor:hover,
	.fm-card:hover .fm-card__img img,
	.fm-doctor:hover .fm-doctor__img img {
		transform: none;
	}
}

/* =========================================================
   v2.2 — Cabecera móvil y barra de acciones
   ========================================================= */
.fm-header__cta .wp-block-button__link {
	white-space: nowrap;
}

.fm-header__inner {
	gap: 1rem;
}

.fm-brand {
	min-width: 0;
	flex: 1 1 auto;
}

.fm-header__right {
	flex: 0 0 auto;
}

.fm-mobile-bar {
	display: none;
}

@media (max-width: 1023px) {
	.fm-nav {
		flex: 0 0 auto;
	}
}

@media (max-width: 767px) {
	/* En móvil "Agendar cita" y WhatsApp viven en la barra inferior */
	.fm-header__cta,
	.fm-wa-float {
		display: none !important;
	}

	.fm-header {
		padding-top: .6rem;
		padding-bottom: .6rem;
	}

	.fm-mobile-bar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 98;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
		background: #fff;
		box-shadow: 0 -6px 20px rgba(6, 42, 69, .12);
	}

	.fm-mobile-bar a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		border-radius: 10px;
		font-weight: 800;
		text-decoration: none;
	}

	.fm-mobile-bar__book {
		background: var(--fm-amber);
		color: #000 !important;
	}

	.fm-mobile-bar__wa {
		background: var(--fm-wa);
		color: #fff !important;
	}

	body {
		padding-bottom: calc(68px + env(safe-area-inset-bottom));
	}
}

@media (max-width: 420px) {
	.fm-brand__name,
	.fm-brand__name a {
		font-size: .8rem;
	}

	.fm-brand .wp-block-site-logo img {
		width: 38px !important;
	}
}

/* Menú móvil: alineado a la izquierda y submenú con guía ámbar */
@media (max-width: 1023px) {
	/* Protección ante el plugin antiguo "funasmed-header-menu" (desactívelo) */
	.fm-header nav.fm-nav {
		position: relative !important;
		top: auto !important;
		right: auto !important;
		left: auto !important;
		display: flex !important;
		width: auto !important;
		height: auto !important;
		padding: 0 !important;
		overflow: visible !important;
		background: transparent !important;
		transform: none !important;
		transition: none !important;
	}

	.fm-nav .is-menu-open {
		--navigation-layout-justification-setting: flex-start;
		--navigation-layout-justify: flex-start;
	}

	.fm-nav .is-menu-open .wp-block-navigation__responsive-container-content,
	.fm-nav .is-menu-open .wp-block-navigation__container,
	.fm-nav .is-menu-open .wp-block-navigation-item {
		align-items: flex-start !important;
		text-align: left;
	}

	.fm-nav .is-menu-open .wp-block-navigation__responsive-container-content {
		padding-top: 3rem;
	}

	.fm-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > a {
		font-size: 1.25rem;
		font-weight: 800;
	}

	.fm-nav .is-menu-open .wp-block-navigation__submenu-container {
		padding: .25rem 0 .25rem 1rem !important;
		border-left: 3px solid var(--fm-amber) !important;
		border-radius: 0;
	}

	.fm-nav .is-menu-open .wp-block-navigation__submenu-container a {
		padding: .3rem 0 !important;
		font-size: 1rem;
		font-weight: 600;
	}
}

/* Protección ante el plugin antiguo: mantiene la cabecera fija */
.fm-site-header .fm-header {
	position: sticky;
	font-family: inherit;
}

/* Logo blanco del pie */
img.fm-footer__logo {
	display: block;
	width: 140px;
	height: auto;
}

/* =========================================================
   Tablas de contenido (políticas, páginas informativas)
   ========================================================= */
.wp-block-post-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--fm-line);
	border-radius: 12px;
	overflow: hidden;
	font-size: .95rem;
	line-height: 1.5;
}

.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td {
	padding: .7rem .9rem;
	border: 0;
	border-bottom: 1px solid var(--fm-line);
	text-align: left !important;
	vertical-align: top;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: auto;
}

.wp-block-post-content .wp-block-table thead th,
.wp-block-post-content .wp-block-table tr:first-child th,
.wp-block-post-content .wp-block-table table:not(:has(thead)) tr:first-child td {
	background: var(--fm-sky);
	color: var(--fm-night);
	font-weight: 800;
	border-bottom: 2px solid var(--fm-blue);
}

.wp-block-post-content .wp-block-table thead {
	border-bottom: 0;
}

.wp-block-post-content .wp-block-table tbody tr:nth-child(even) td {
	background: #f7fafc;
}

.wp-block-post-content .wp-block-table td:first-child {
	width: 38%;
	color: var(--fm-night);
	font-weight: 700;
}

.wp-block-post-content .wp-block-table.has-fixed-layout table,
.wp-block-post-content .wp-block-table table.has-fixed-layout {
	table-layout: auto;
}

@media (max-width: 600px) {
	.wp-block-post-content .wp-block-table table {
		font-size: .86rem;
	}

	.wp-block-post-content .wp-block-table th,
	.wp-block-post-content .wp-block-table td {
		padding: .55rem .6rem;
	}
}

/* =========================================================
   Easy Appointments — integración visual
   ========================================================= */
.fm-agenda--ea {
	padding: clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--fm-line);
	border-radius: var(--fm-radius);
	background: #fff;
	box-shadow: var(--fm-shadow);
}

.fm-agenda__privacy {
	margin: 0 0 1rem;
	padding: .7rem .9rem;
	border-left: 3px solid var(--fm-amber);
	border-radius: 6px;
	background: var(--fm-sky);
	color: var(--fm-muted);
	font-size: .88rem;
}

.fm-agenda--ea .ea-bootstrap,
.fm-agenda--ea .ea-bootstrap * {
	font-family: inherit;
	box-sizing: border-box;
}

.fm-agenda--ea .ea-bootstrap {
	width: 100% !important;
	max-width: 100% !important;
}

.fm-agenda--ea label,
.fm-agenda--ea .control-label {
	color: var(--fm-night);
	font-size: .9rem;
	font-weight: 700;
}

.fm-agenda--ea select,
.fm-agenda--ea input[type="text"],
.fm-agenda--ea input[type="email"],
.fm-agenda--ea input[type="tel"],
.fm-agenda--ea textarea,
.fm-agenda--ea .form-control {
	width: 100%;
	min-height: 46px;
	padding: .55rem .75rem;
	border: 1px solid #c8d6e0;
	border-radius: 10px;
	background: #fff;
	color: var(--fm-ink, #173247);
	font-size: 1rem;
}

.fm-agenda--ea select:focus,
.fm-agenda--ea input:focus,
.fm-agenda--ea textarea:focus {
	outline: 3px solid rgba(15, 112, 183, .25);
	border-color: var(--fm-blue);
}

.fm-agenda--ea .btn,
.fm-agenda--ea button,
.fm-agenda--ea input[type="submit"] {
	min-height: 46px;
	padding: .6rem 1.2rem;
	border: 0;
	border-radius: 10px;
	background: var(--fm-blue);
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

.fm-agenda--ea .btn:hover,
.fm-agenda--ea button:hover {
	background: var(--fm-deep);
}

.fm-agenda--ea .btn-default,
.fm-agenda--ea .btn-secondary {
	border: 2px solid var(--fm-blue);
	background: #fff;
	color: var(--fm-blue);
}

/* Calendario (jQuery UI datepicker) */
.fm-agenda--ea .ui-datepicker {
	width: 100% !important;
	padding: .5rem;
	border: 1px solid var(--fm-line);
	border-radius: 12px;
}

.fm-agenda--ea .ui-datepicker-header {
	border: 0;
	border-radius: 8px;
	background: var(--fm-sky);
	color: var(--fm-night);
}

.fm-agenda--ea .ui-datepicker td a,
.fm-agenda--ea .ui-datepicker td span {
	padding: .45rem 0;
	border-radius: 8px;
	text-align: center;
}

.fm-agenda--ea .ui-datepicker td a.ui-state-active,
.fm-agenda--ea .ui-datepicker td a:hover {
	background: var(--fm-blue) !important;
	color: #fff !important;
}

/* Horarios disponibles */
.fm-agenda--ea .time-value,
.fm-agenda--ea .time-row a,
.fm-agenda--ea .time-slot {
	display: inline-block;
	margin: .25rem;
	padding: .5rem .8rem;
	border: 1px solid var(--fm-blue);
	border-radius: 999px;
	color: var(--fm-blue);
	font-weight: 700;
}

.fm-agenda--ea .time-value.selected-time,
.fm-agenda--ea .time-value:hover {
	background: var(--fm-blue);
	color: #fff;
}

@media (max-width: 767px) {
	.fm-agenda--ea .col-md-6,
	.fm-agenda--ea [class*="col-"] {
		width: 100% !important;
		float: none !important;
	}
}


/* Easy Appointments: el profesional se asigna automáticamente (no se muestra) */
.fm-agenda--ea .ea-field-group:has(.ea-custom-select[data-field="worker"]),
.fm-agenda--ea .ea-field-group:has(select[name="worker"]) {
	display: none !important;
}

/* =========================================================
   Páginas de especialidad
   ========================================================= */
.fm-price-line {
	display: inline-block;
	padding: .5rem 1rem;
	border: 1px solid var(--fm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--fm-night);
	font-size: .92rem;
}

.fm-price-line strong {
	color: var(--fm-blue);
}

.fm-page-hero .fm-btn--wa {
	margin-top: .75rem;
}

.fm-spec__cols {
	gap: clamp(1.5rem, 4vw, 3rem);
}

.fm-spec-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.fm-spec-grid > .fm-feature {
	margin: 0 !important;
}

.fm-spec-group__title {
	margin-top: 0;
}

.fm-spec-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-spec-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .55rem 0;
	border-bottom: 1px dashed var(--fm-line);
}

.fm-spec-list li:last-child {
	border-bottom: 0;
}

.fm-spec-list a {
	font-weight: 700;
	text-decoration: none;
}

.fm-spec-price {
	color: var(--fm-muted);
	font-size: .85rem;
	white-space: nowrap;
}

.fm-related .wp-block-buttons {
	gap: .6rem;
}

@media (max-width: 1023px) {
	.fm-spec-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.fm-spec-grid {
		grid-template-columns: 1fr;
	}

	.fm-price-line {
		border-radius: 12px;
	}
}
