/* ==========================================================================
   Systemed Farma: estilos del tema
   ========================================================================== */

:root {
	--sm-blue: #0a57c2;
	--sm-blue-2: #1e7be6;
	--sm-blue-dark: #0a3d8f;
	--sm-ink: #0b3a7e;
	--sm-text: #24508f;
	--sm-muted: #5a77a3;
	--sm-green: #43a72f;
	--sm-green-2: #7dd24a;
	--sm-green-ink: #1f7a32;
	--sm-teal: #138aa8;
	--sm-bg: #eaf4fd;
	--sm-bg-2: #f5faff;
	--sm-card: #ffffff;
	--sm-line: #d7e7f8;
	--sm-off: #dde6f0;
	--sm-radius: 20px;
	--sm-radius-sm: 14px;
	--sm-shadow: 0 10px 30px rgba(15, 76, 160, 0.08), 0 2px 6px rgba(15, 76, 160, 0.05);
	--sm-shadow-lg: 0 24px 60px rgba(15, 76, 160, 0.14);
	--sm-wrap: 1240px;
	--sm-font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--sm-font);
	font-size: 17px;
	line-height: 1.55;
	color: var(--sm-text);
	background: var(--sm-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sm-blue); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--sm-blue); line-height: 1.15; margin: 0 0 .4em; font-weight: 900; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.sm-wrap { width: min(100% - 32px, var(--sm-wrap)); margin-inline: auto; }
.sm-sr, .sm-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sm-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sm-blue); color: #fff; padding: 10px 16px; border-radius: 10px; }
.sm-skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sm-green-2); outline-offset: 2px; border-radius: 6px; }
.sm-green { color: var(--sm-green); }
.sm-muted { color: var(--sm-muted); font-size: .95rem; }
.sm-ico { width: 1.2em; height: 1.2em; flex: none; }

.sm-bg {
	position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(900px 500px at 85% -10%, rgba(30, 123, 230, .14), transparent 60%),
		radial-gradient(700px 500px at -10% 30%, rgba(125, 210, 74, .10), transparent 60%),
		linear-gradient(180deg, #f3f9ff 0%, var(--sm-bg) 100%);
}

/* ---------- Botones ---------- */
.sm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .8em 1.5em; border: 0; border-radius: 999px; cursor: pointer;
	background: linear-gradient(135deg, var(--sm-blue-2), var(--sm-blue));
	color: #fff; font-weight: 800; text-decoration: none; line-height: 1.2;
	box-shadow: 0 10px 22px rgba(10, 87, 194, .25);
	transition: transform .15s ease, box-shadow .15s ease, filter .15s;
}
.sm-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10, 87, 194, .32); filter: brightness(1.05); }
.sm-btn--lg { font-size: 1.15rem; padding: .95em 2.2em; }
.sm-btn--sm { padding: .55em 1.2em; font-size: .95rem; border-radius: 12px; }
.sm-btn--ghost { background: #fff; color: var(--sm-blue); box-shadow: inset 0 0 0 2px var(--sm-line); }
.sm-btn--outline { background: transparent; color: var(--sm-blue); box-shadow: inset 0 0 0 2px var(--sm-blue); font-size: .92rem; }
.sm-btn[disabled] { opacity: .65; cursor: wait; }
.sm-btn.is-loading span::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .6em; vertical-align: -2px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: sm-spin .8s linear infinite; }
.sm-ico-arrow { width: 1.1em; height: 1.1em; }

.sm-iconbtn { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 0; background: transparent; color: var(--sm-blue); cursor: pointer; }
.sm-iconbtn:hover { background: var(--sm-bg); }
.sm-iconbtn .sm-ico { width: 28px; height: 28px; }

/* ---------- Encabezado ---------- */
.sm-header { position: sticky; top: 0; z-index: 50; padding: 12px 0; }
.sm-header__bar {
	display: flex; align-items: center; gap: 24px;
	background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
	border-radius: 18px; padding: 10px 14px 10px 22px; box-shadow: var(--sm-shadow);
}
.sm-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sm-blue); font-weight: 800; font-size: 1.65rem; letter-spacing: -0.01em; white-space: nowrap; }
.sm-logo b { font-weight: 800; }
.sm-logo .sm-ico-logo { width: 54px; height: 54px; }
.custom-logo-link img { max-height: 56px; width: auto; }
.sm-nav { margin-left: auto; }
.sm-nav__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.sm-nav__list a { position: relative; display: block; padding: 10px 18px; color: var(--sm-blue); font-weight: 700; text-decoration: none; border-radius: 10px; }
.sm-nav__list a:hover { background: var(--sm-bg); }
.sm-nav__list .current-menu-item > a::after,
.sm-nav__list .current_page_item > a::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 2px; height: 4px; border-radius: 4px; background: var(--sm-green); }
.sm-header__actions { display: flex; align-items: center; gap: 6px; }
.sm-menu-toggle { display: none; }
.sm-menu-close { display: none; }

/* ---------- Tarjetas ---------- */
.sm-card { background: var(--sm-card); border-radius: var(--sm-radius); box-shadow: var(--sm-shadow); border: 1px solid rgba(215, 231, 248, .7); }

/* ---------- Inicio ---------- */
.sm-hero { position: relative; display: grid; grid-template-columns: 1.45fr 1fr; align-items: center; gap: 24px; padding: 28px 0 10px; min-height: 480px; }
.sm-hero__title { margin: 0 0 22px; position: relative; z-index: 2; }
.sm-hero__title span {
	display: inline-block; color: #fff; text-transform: uppercase;
	font-size: clamp(1.9rem, 3.3vw, 3.25rem); line-height: 1.04; letter-spacing: -0.015em;
	padding: .38em .9em .42em 1.1em; margin-left: -1.1em;
	background: linear-gradient(100deg, var(--sm-teal) 0%, #1f9c9a 45%, var(--sm-green) 100%);
	border-radius: 0 999px 999px 0; box-shadow: 0 18px 40px rgba(19, 138, 168, .25);
}
.sm-hero__lema { display: flex; align-items: center; gap: .35em; flex-wrap: wrap; font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 900; color: var(--sm-blue); margin-bottom: 12px; line-height: 1.1; }
.sm-hero__heart { width: .9em; height: .9em; color: var(--sm-blue); }
.sm-hero__text { font-size: clamp(1.1rem, 1.6vw, 1.45rem); color: var(--sm-blue); max-width: 34ch; }
.sm-hero__media { position: relative; align-self: stretch; min-height: 420px; }
.sm-hero__media img { position: absolute; inset: auto 0 0 auto; height: 108%; width: auto; max-width: none; object-fit: contain; z-index: 2; filter: drop-shadow(0 20px 40px rgba(10,61,143,.15)); }
.sm-hero__placeholder { position: absolute; inset: 10% 10% 6% 14%; z-index: 2; display: grid; place-items: center; }
.sm-hero__placeholder .sm-ico { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(10,61,143,.2)); }
.sm-blob { position: absolute; border-radius: 60% 40% 55% 45% / 55% 45% 55% 45%; z-index: 1; }
.sm-blob--blue { width: 34%; aspect-ratio: 1; left: 2%; bottom: 4%; background: linear-gradient(135deg, var(--sm-blue-2), var(--sm-blue)); border-radius: 100% 0 100% 0; transform: rotate(-12deg); }
.sm-blob--green { width: 32%; aspect-ratio: 1; right: -2%; top: 24%; background: linear-gradient(135deg, var(--sm-green-2), var(--sm-green)); border-radius: 0 100% 0 100%; }
.sm-blob--blue2 { width: 26%; aspect-ratio: 1; right: -4%; bottom: -2%; background: linear-gradient(135deg, var(--sm-blue-2), var(--sm-blue)); border-radius: 100% 0 100% 0; transform: rotate(30deg); }
.sm-blob--soft { inset: 6% 4% 4% 8%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff, rgba(255,255,255,0) 70%), radial-gradient(circle at 60% 60%, rgba(30,123,230,.14), transparent 70%); }

.sm-cards3 { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: -40px; }
.sm-card--feature { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 22px 26px; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.sm-card--feature:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow-lg); }
.sm-card__ill { width: auto; height: 108px; margin-bottom: 10px; }
.sm-card--feature h2 { font-size: clamp(1.5rem, 2.3vw, 2.15rem); margin-bottom: .25em; }
.sm-card--feature p { color: var(--sm-blue); font-size: 1.15rem; margin: 0; max-width: 18ch; }

.sm-quicksearch { margin: 36px auto 56px; max-width: 760px; }

/* ---------- Buscador ---------- */
.sm-search { position: relative; display: flex; align-items: center; background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--sm-shadow); border: 1px solid var(--sm-line); }
.sm-search:focus-within { box-shadow: 0 0 0 4px rgba(30, 123, 230, .18), var(--sm-shadow); }
.sm-search__ico { color: var(--sm-blue); width: 26px; height: 26px; }
.sm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 14px; font-size: 1.08rem; color: var(--sm-ink); }
.sm-search input::placeholder { color: #6b88b3; }
.sm-search input::-webkit-search-cancel-button { cursor: pointer; }
.sm-search__btn { flex: none; display: grid; place-items: center; width: 58px; height: 52px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--sm-blue-2), var(--sm-blue)); color: #fff; cursor: pointer; }
.sm-search__btn .sm-ico { width: 26px; height: 26px; }
.sm-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 16px; box-shadow: var(--sm-shadow-lg); max-height: 360px; overflow: auto; }
.sm-suggest li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.sm-suggest li[aria-selected="true"], .sm-suggest li:hover { background: var(--sm-bg); }
.sm-suggest strong { display: block; color: var(--sm-ink); }
.sm-suggest small { color: var(--sm-muted); }
.sm-suggest__empty { color: var(--sm-muted); cursor: default !important; }

.sm-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.sm-dot--sede { background: var(--sm-blue); box-shadow: 0 0 0 3px rgba(10,87,194,.18); }
.sm-dot--on { background: var(--sm-green); }
.sm-dot--off { background: #b8c6d6; }

/* ---------- Encabezados de página ---------- */
.sm-pagehead { padding: 30px 0 22px; }
.sm-pagehead h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin: 0; }
.sm-pagehead p { font-size: 1.2rem; color: var(--sm-blue); margin: 4px 0 0; }
.sm-pagehead--split { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sm-pagehead__main { display: flex; align-items: center; gap: 18px; }
.sm-pagehead__ico { width: 70px; height: auto; filter: drop-shadow(0 12px 18px rgba(10,87,194,.25)); }
.sm-pill { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; background: #fff; border-radius: 999px; box-shadow: var(--sm-shadow); text-decoration: none; color: var(--sm-blue); max-width: 380px; line-height: 1.3; }
.sm-pill .sm-ico { width: 46px; height: 46px; }

/* ---------- Cobertura ---------- */
.sm-cob { display: grid; grid-template-columns: minmax(300px, 0.85fr) 1.4fr; gap: 24px; align-items: start; }
.sm-cob__side { display: grid; gap: 18px; position: sticky; top: 110px; }
.sm-near { padding: 6px 18px 16px; }
.sm-near summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; padding: 12px 0 8px; }
.sm-near summary::-webkit-details-marker { display: none; }
.sm-near summary h2 { font-size: 1.45rem; margin: 0; }
.sm-near summary .sm-ico { color: var(--sm-blue); transition: transform .2s; }
.sm-near:not([open]) summary .sm-ico { transform: rotate(-90deg); }
.sm-near__body { display: grid; gap: 12px; }
.sm-warn { color: #a5521b; }
.sm-nearitem { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; text-align: left; width: 100%; padding: 16px; border: 1px solid var(--sm-line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sm-nearitem:hover { border-color: var(--sm-blue-2); box-shadow: var(--sm-shadow); }
.sm-nearitem__pin { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sm-bg); color: var(--sm-blue); }
.sm-nearitem__pin svg { width: 28px; height: 28px; }
.sm-nearitem__main { display: grid; gap: 2px; min-width: 0; }
.sm-nearitem__main strong { color: var(--sm-blue); font-size: 1.12rem; line-height: 1.2; }
.sm-nearitem__main span { color: var(--sm-text); font-size: .95rem; }
.sm-nearitem__h { display: flex; align-items: center; gap: 6px; color: var(--sm-green-ink) !important; }
.sm-nearitem__h svg { width: 16px; height: 16px; }
.sm-nearitem__side { display: grid; justify-items: end; gap: 10px; }
.sm-nearitem__km { display: inline-flex; align-items: center; gap: 4px; color: var(--sm-blue); font-weight: 700; white-space: nowrap; }
.sm-nearitem__km svg { width: 16px; height: 16px; }

.sm-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.sm-badge svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; }
.sm-badge--on { background: #e3f6dd; color: var(--sm-green-ink); }
.sm-badge--on svg { background: var(--sm-green); color: #fff; }
.sm-badge--off { background: #edf1f6; color: #5f6f86; }

.sm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sm-stats div { background: #fff; border-radius: 16px; padding: 14px 10px; text-align: center; box-shadow: var(--sm-shadow); }
.sm-stats strong { display: block; font-size: 1.7rem; font-weight: 900; color: var(--sm-blue); line-height: 1; }
.sm-stats span { font-size: .82rem; color: var(--sm-muted); line-height: 1.2; display: block; margin-top: 4px; }

.sm-cob__map { position: relative; padding: 0; overflow: hidden; background: linear-gradient(180deg, #e3f0fc, #d6e9fb); }
.sm-map { position: relative; width: 100%; aspect-ratio: 8 / 9; min-height: 360px; touch-action: none; }
.sm-map svg { width: 100%; height: 100%; cursor: grab; user-select: none; }
.sm-map svg:active { cursor: grabbing; }
.sm-map__loading { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; gap: 10px; align-items: center; color: var(--sm-blue); font-weight: 700; }
.sm-spinner { width: 22px; height: 22px; border: 3px solid var(--sm-line); border-top-color: var(--sm-blue); border-radius: 50%; animation: sm-spin .8s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }

.sm-sea { fill: transparent; }
.sm-m { stroke: #fff; stroke-width: .35; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .15s, opacity .2s; }
.sm-m--off { fill: var(--sm-off); }
.sm-m--on { fill: #9ad97a; }
.sm-m--sede { fill: #5cbf3f; }
.sm-m.is-hover.sm-m--off, .sm-m--off:hover { fill: #c6d7ea; }
.sm-m.is-hover.sm-m--on, .sm-m--on:hover { fill: #84cd5f; }
.sm-m.is-hover.sm-m--sede, .sm-m--sede:hover { fill: #49ab2f; }
.sm-m.is-dim { opacity: .38; }
.sm-m.is-selected { fill: var(--sm-blue-2) !important; opacity: 1; }
.sm-dept-borders { fill: none; stroke: #fff; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.sm-country-border { fill: none; stroke: #8fb3dc; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.sm-selected path { fill: none; stroke: var(--sm-blue-dark); stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.sm-pin { cursor: pointer; }
.sm-pin__body { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sm-pin--sede .sm-pin__body { fill: var(--sm-blue); }
.sm-pin--on .sm-pin__body { fill: var(--sm-green-ink); }
.sm-pin:hover .sm-pin__body { fill: var(--sm-blue-dark); }
.sm-inset rect { fill: rgba(255,255,255,.7); stroke: #b9d3ef; }
.sm-inset text { font: 700 12px var(--sm-font); fill: var(--sm-blue); }

.sm-map__legend { position: absolute; top: 16px; right: 16px; display: grid; gap: 8px; background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--sm-shadow); font-weight: 700; color: var(--sm-blue); font-size: .95rem; }
.sm-map__legend span { display: flex; align-items: center; gap: 10px; }
.sm-map__zoom { position: absolute; right: 16px; bottom: 16px; display: grid; background: #fff; border-radius: 14px; box-shadow: var(--sm-shadow); overflow: hidden; }
.sm-map__zoom button { width: 48px; height: 46px; border: 0; background: #fff; color: var(--sm-blue); cursor: pointer; display: grid; place-items: center; }
.sm-map__zoom button + button { border-top: 1px solid var(--sm-line); }
.sm-map__zoom button:hover { background: var(--sm-bg); }
.sm-map__crumb { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 100px); }
.sm-map__crumb button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 0; border-radius: 999px; background: #fff; color: var(--sm-blue); font-weight: 800; box-shadow: var(--sm-shadow); cursor: pointer; }
.sm-map__crumb button .sm-ico { transform: rotate(180deg); width: 18px; height: 18px; }
.sm-map__crumb span { background: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 999px; font-weight: 700; color: var(--sm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-map__hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; padding: 6px 14px; background: rgba(255,255,255,.85); border-radius: 999px; font-size: .88rem; color: var(--sm-muted); white-space: nowrap; pointer-events: none; }
.sm-map.is-zoomed ~ .sm-map__hint { display: none; }
.sm-map__tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 14px)); background: var(--sm-ink); color: #fff; padding: 8px 12px; border-radius: 10px; pointer-events: none; display: grid; font-size: .9rem; line-height: 1.3; white-space: nowrap; box-shadow: var(--sm-shadow); }
.sm-map__tip strong { font-size: 1rem; }
.sm-map__tip em { font-style: normal; font-weight: 700; }
.sm-tip--sede, .sm-tip--on { color: #a8ec86; }
.sm-tip--off { color: #c8d6e8; }

/* Resultado del municipio */
.sm-result { margin-top: 28px; margin-bottom: 60px; padding: 18px; background: rgba(255,255,255,.55); border-radius: 26px; box-shadow: var(--sm-shadow); scroll-margin-top: 110px; outline: none; }
.sm-result__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 8px 16px; }
.sm-result__top h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin: 0; }
.sm-li-ico { display: inline-grid; place-items: center; color: var(--sm-blue); flex: none; }
.sm-li-ico svg { width: 22px; height: 22px; }
.sm-result__top .sm-li-ico svg { width: 28px; height: 28px; }
.sm-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: #e4f0fd; border-radius: 999px; color: var(--sm-blue); font-weight: 700; font-size: .95rem; }
.sm-chip svg { width: 20px; height: 20px; }
.sm-result__card { padding: 0; overflow: hidden; }
.sm-result__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--sm-line); }
.sm-result__head h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.7rem; }
.sm-result__head .sm-li-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--sm-bg); }
.sm-result__head .sm-li-ico svg { width: 26px; height: 26px; }
.sm-result__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; padding: 16px; }
.sm-result__col { min-width: 0; }
.sm-result__sede { padding: 18px 20px; height: 100%; }
.sm-sede__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sm-sede__head h3 { font-size: 1.2rem; margin: 0; }
.sm-sede__pin { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--sm-bg); color: var(--sm-blue); flex: none; }
.sm-sede__pin svg { width: 30px; height: 30px; }
.sm-sede__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sm-sede__list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.sm-sede__list strong { color: var(--sm-blue); display: block; }
.sm-sede__list span { display: block; color: var(--sm-ink); font-size: .96rem; }
.sm-result__empty p { color: var(--sm-ink); }
.sm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sm-tabs button { border: 1px solid var(--sm-line); background: #fff; color: var(--sm-blue); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.sm-tabs button[aria-selected="true"] { background: var(--sm-blue); color: #fff; border-color: var(--sm-blue); }

.sm-result__mapcol { position: relative; min-height: 280px; border-radius: 16px; overflow: hidden; border: 1px solid var(--sm-line); background: #eef4fa; }
.sm-detailmap { position: absolute; inset: 0; }
.sm-detailmap iframe { width: 100%; height: 100%; border: 0; }
.sm-photo { position: absolute; top: 10px; right: 10px; width: 44%; aspect-ratio: 4 / 3; padding: 0; border: 3px solid #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--sm-shadow-lg); cursor: zoom-in; background: #fff; }
.sm-photo img { width: 100%; height: 100%; object-fit: cover; }
.sm-photo span { position: absolute; right: 6px; bottom: 6px; background: rgba(11,58,126,.85); color: #fff; font-weight: 800; font-size: .8rem; padding: 2px 8px; border-radius: 999px; }
.sm-dirlink { position: absolute; left: 10px; bottom: 10px; background: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 800; text-decoration: none; box-shadow: var(--sm-shadow); font-size: .9rem; }

.sm-result__actions { display: grid; gap: 12px; align-content: start; }
.sm-action { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--sm-line); border-radius: 16px; text-decoration: none; color: var(--sm-blue); font-weight: 800; font-size: 1.05rem; line-height: 1.25; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sm-action:hover { border-color: var(--sm-blue-2); box-shadow: var(--sm-shadow); transform: translateY(-1px); }
.sm-action[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.sm-action__ico svg { width: 60px; height: 52px; }
.sm-action__txt small { display: block; font-weight: 600; font-size: .78rem; color: var(--sm-muted); }
.sm-action__go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sm-bg); font-size: 1.1rem; }

.sm-nearest { margin-top: 16px; padding: 0; overflow: hidden; }
.sm-nearest summary { display: flex; align-items: center; gap: 12px; padding: 14px 22px; cursor: pointer; list-style: none; color: var(--sm-blue); background: #f2f8fe; }
.sm-nearest summary::-webkit-details-marker { display: none; }
.sm-nearest__chev { margin-left: auto; width: 10px; height: 10px; border-right: 2.5px solid var(--sm-blue); border-bottom: 2.5px solid var(--sm-blue); transform: rotate(45deg); transition: transform .2s; }
.sm-nearest[open] .sm-nearest__chev { transform: rotate(-135deg); }
.sm-nearest__body { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 20px; align-items: center; padding: 18px 22px; }
.sm-nearest__name { display: flex; align-items: center; gap: 14px; }
.sm-nearest__name strong { display: block; color: var(--sm-blue); font-size: 1.15rem; }
.sm-nearest__name span { color: var(--sm-ink); font-size: .95rem; }
.sm-nearest__store { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--sm-bg); color: var(--sm-blue); flex: none; }
.sm-nearest__store svg { width: 32px; height: 32px; }
.sm-nearest__col { display: flex; gap: 10px; padding-left: 20px; border-left: 1px solid var(--sm-line); }
.sm-nearest__col small { display: block; font-weight: 800; color: var(--sm-blue); }
.sm-nearest__col span { display: block; font-size: .92rem; color: var(--sm-ink); }

.sm-lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); }
.sm-lightbox::backdrop { background: rgba(5, 25, 60, .82); }
.sm-lightbox img { max-height: 80vh; width: auto; margin: auto; border-radius: 14px; }
.sm-lightbox__close { position: fixed; top: 16px; right: 20px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--sm-blue); font-size: 30px; cursor: pointer; }
.sm-lightbox__nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 12px; color: #fff; font-weight: 700; }
.sm-lightbox__nav button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--sm-blue); font-size: 26px; cursor: pointer; }

/* ---------- Medicamentos ---------- */
.sm-medhero { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 28px; align-items: center; padding: 34px 0 30px; }
.sm-medhero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.sm-lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--sm-blue); }
.sm-medhero__copy .sm-search { margin: 18px 0 20px; }
.sm-medhero__info { padding: 10px 22px; align-self: start; margin-top: 10px; }
.sm-infoitem { display: flex; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; }
.sm-infoitem + .sm-infoitem { border-top: 1px solid var(--sm-line); }
.sm-infoitem__ico { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--sm-bg); flex: none; }
.sm-infoitem__ico .sm-ico { width: 34px; height: 34px; }
.sm-infoitem strong { display: block; color: var(--sm-blue); font-size: 1.12rem; }
.sm-infoitem span { color: var(--sm-text); }
.sm-medhero__media { position: relative; min-height: 340px; display: grid; place-items: center; }
.sm-medhero__media img, .sm-medhero__ill { position: relative; z-index: 2; width: 100%; height: auto; max-height: 380px; object-fit: contain; }
.sm-h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 18px; }
.sm-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 70px; }
.sm-opt { position: relative; display: flex; gap: 20px; padding: 28px 24px; align-items: flex-start; }
.sm-opt--hl { border: 3px solid var(--sm-green); }
.sm-opt__badge { position: absolute; top: -3px; right: -3px; background: var(--sm-green); color: #fff; font-weight: 800; padding: 6px 16px; border-radius: 0 18px 0 14px; font-size: .92rem; }
.sm-opt__ico { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--sm-bg); flex: none; }
.sm-opt__ico .sm-ico { width: 60px; height: 52px; }
.sm-opt h3 { font-size: 1.6rem; margin: 6px 0 8px; }
.sm-opt__time { display: flex; align-items: center; gap: 8px; color: var(--sm-blue); font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.sm-opt__txt { color: var(--sm-blue); font-size: 1.1rem; margin: 0; }

/* ---------- Aliados ---------- */
.sm-alhero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; padding: 34px 0 24px; }
.sm-alhero__head { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.sm-alhero__ico { width: 110px; height: 110px; flex: none; filter: drop-shadow(0 14px 20px rgba(10,87,194,.22)); }
.sm-alhero h1 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); margin: 0; }
.sm-alhero .sm-lead { margin: 0; }
.sm-alhero__text { font-size: 1.22rem; color: var(--sm-blue); max-width: 52ch; margin-bottom: 26px; }
.sm-alhero__media { position: relative; min-height: 340px; display: grid; place-items: center; }
.sm-alhero__media img, .sm-alhero__ill { position: relative; z-index: 2; width: 92%; height: auto; max-height: 380px; object-fit: contain; }
.sm-benefits { padding: 26px 30px 30px; }
.sm-benefits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.sm-benefits li { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 10px 18px; }
.sm-benefits li + li { border-left: 1px solid var(--sm-line); }
.sm-benefits__ico { display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; background: var(--sm-bg); }
.sm-benefits__ico .sm-ico { width: 62px; height: 62px; }
.sm-benefits strong { color: var(--sm-blue); font-size: 1.4rem; line-height: 1.2; font-weight: 900; }

.sm-formwrap { display: grid; grid-template-columns: .8fr 1.4fr; gap: 34px; align-items: start; padding: 56px 0 80px; scroll-margin-top: 100px; }
.sm-formwrap__intro p { font-size: 1.1rem; }
.sm-checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.sm-checklist li { display: flex; align-items: center; gap: 10px; color: var(--sm-ink); font-weight: 700; }
.sm-checklist .sm-ico { color: #fff; background: var(--sm-green); border-radius: 50%; padding: 4px; width: 26px; height: 26px; }
.sm-form { padding: 28px; }
.sm-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.sm-field { display: grid; gap: 6px; align-content: start; }
.sm-field--full { grid-column: 1 / -1; }
.sm-field label { font-weight: 800; color: var(--sm-ink); font-size: .96rem; }
.sm-field label span[aria-hidden] { color: #d0492b; }
.sm-field input:not([type=checkbox]), .sm-field select, .sm-field textarea {
	width: 100%; border: 1.5px solid var(--sm-line); background: var(--sm-bg-2); border-radius: 12px; padding: 12px 14px; font-size: 1rem; color: var(--sm-ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.sm-field input:focus, .sm-field select:focus, .sm-field textarea:focus { outline: 0; border-color: var(--sm-blue-2); background: #fff; box-shadow: 0 0 0 4px rgba(30,123,230,.14); }
.sm-field textarea { resize: vertical; min-height: 110px; }
.sm-nit { display: grid; grid-template-columns: 1fr auto 64px; gap: 8px; align-items: center; }
.sm-nit > span { font-weight: 800; color: var(--sm-muted); }
.sm-field__hint { color: var(--sm-muted); font-size: .85rem; }
.sm-field__hint.is-ok { color: var(--sm-green-ink); font-weight: 700; }
.sm-field__hint.is-bad { color: #c0392b; font-weight: 700; }
.sm-field.has-error input, .sm-field.has-error select, .sm-field.has-error textarea { border-color: #d0492b; background: #fff7f5; }
.sm-field__err { color: #c0392b; font-weight: 700; font-size: .86rem; }
.sm-field--check label { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--sm-text); font-size: .93rem; line-height: 1.45; }
.sm-field--check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sm-blue); flex: none; }
.sm-form__foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.sm-form__legal { font-size: .78rem; color: var(--sm-muted); margin: 0; max-width: 46ch; }
.sm-form__legal a { color: inherit; }
.sm-form__msg { margin-top: 16px; padding: 14px 18px; border-radius: 14px; font-weight: 700; }
.sm-form__msg.is-ok { background: #e3f6dd; color: var(--sm-green-ink); }
.sm-form__msg.is-error { background: #fdecea; color: #a5281b; }

/* ---------- Páginas generales ---------- */
.sm-prose { padding: 30px 34px; margin-bottom: 40px; color: var(--sm-ink); }
.sm-prose > * + * { margin-top: 1em; }
.sm-prose details { border: 1px solid var(--sm-line); border-radius: 14px; padding: 4px 18px; background: var(--sm-bg-2); }
.sm-prose details[open] { background: #fff; }
.sm-prose summary { cursor: pointer; padding: 12px 0; font-weight: 800; color: var(--sm-blue); font-size: 1.1rem; }
.sm-helpcta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 70px; }
.sm-helpcta__item { display: flex; align-items: center; gap: 16px; padding: 18px 22px; text-decoration: none; font-weight: 800; font-size: 1.15rem; color: var(--sm-blue); }
.sm-helpcta__item .sm-ico { width: 56px; height: 52px; }
.sm-404 { text-align: center; padding: 70px 0; display: grid; justify-items: center; gap: 8px; }

/* ---------- Pie ---------- */
.sm-footer { margin-top: 40px; background: linear-gradient(135deg, #0a3d8f, #0a57c2); color: #dce9fb; }
.sm-footer a { color: #fff; text-decoration: none; }
.sm-footer a:hover { text-decoration: underline; }
.sm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 46px 0 30px; }
.sm-footer .sm-logo { color: #fff; font-size: 1.4rem; }
.sm-footer .sm-logo .sm-ico-logo { width: 44px; height: 44px; filter: brightness(0) invert(1); }
.sm-footer__brand p { margin-top: 14px; max-width: 34ch; }
.sm-footer__title { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.sm-footer__links, .sm-footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sm-footer__links a { color: #dce9fb; }
.sm-footer__links .current-menu-item a::after { display: none; }
.sm-footer__contact li { display: flex; gap: 10px; align-items: center; }
.sm-footer__contact .sm-ico { width: 18px; height: 18px; color: var(--sm-green-2); }
.sm-footer__legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 26px; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.sm-nav__list a { padding: 10px 12px; }
	.sm-medhero { grid-template-columns: 1fr 1fr; }
	.sm-medhero__media { display: none; }
	.sm-result__grid { grid-template-columns: 1fr 1fr; }
	.sm-result__actions { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
	.sm-nearest__body { grid-template-columns: 1fr 1fr; }
	.sm-nearest__body .sm-btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 960px) {
	.sm-menu-toggle { display: inline-grid; }
	.sm-hide-sm { display: none !important; }
	.sm-header__bar { padding-left: 16px; backdrop-filter: none; background: #fff; }
	.sm-logo { font-size: 1.35rem; }
	.sm-logo .sm-ico-logo { width: 42px; height: 42px; }
	.sm-nav { position: fixed; inset: 84px 16px auto; margin: 0; background: #fff; border-radius: 18px; box-shadow: var(--sm-shadow-lg); padding: 10px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
	.sm-nav-open .sm-nav { opacity: 1; transform: none; pointer-events: auto; }
	.sm-nav-open .sm-menu-open { display: none; }
	.sm-nav-open .sm-menu-close { display: inline; }
	.sm-nav__list { flex-direction: column; }
	.sm-nav__list a { padding: 14px 16px; font-size: 1.1rem; }
	.sm-nav__list .current-menu-item > a::after, .sm-nav__list .current_page_item > a::after { left: 16px; right: auto; width: 32px; }
	.sm-header__actions { margin-left: auto; }

	.sm-hero { grid-template-columns: 1fr; min-height: 0; }
	.sm-hero__media { min-height: 300px; order: -1; margin-bottom: -30px; }
	.sm-hero__media img { left: 50%; right: auto; transform: translateX(-50%); height: 100%; }
	.sm-cards3 { grid-template-columns: 1fr; margin-top: 10px; }
	.sm-card--feature { flex-direction: row; text-align: left; gap: 18px; padding: 18px 20px; }
	.sm-card__ill { height: 74px; width: 90px; margin: 0; }
	.sm-card--feature h2 { font-size: 1.45rem; }
	.sm-card--feature p { font-size: 1rem; max-width: none; }

	.sm-cob { grid-template-columns: 1fr; }
	.sm-cob__side { position: static; }
	.sm-cob__map { order: -1; }
	.sm-stats { order: 3; }

	.sm-alhero, .sm-formwrap { grid-template-columns: 1fr; }
	.sm-alhero__media { display: none; }
	.sm-benefits ul { grid-template-columns: 1fr 1fr; gap: 10px 0; }
	.sm-benefits li:nth-child(3) { border-left: 0; }
	.sm-opts { grid-template-columns: 1fr; }
	.sm-footer__grid { grid-template-columns: 1fr 1fr; }
	.sm-helpcta { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.sm-header { padding: 8px 0; }
	.sm-nav { inset: 74px 12px auto; }
	.sm-hero__title span { padding-left: 1em; margin-left: -1em; }
	.sm-pagehead__ico { width: 52px; }
	.sm-pill { max-width: none; width: 100%; }
	.sm-map { aspect-ratio: 4 / 5; }
	.sm-map__legend { top: auto; bottom: 74px; left: 12px; right: auto; padding: 10px 12px; font-size: .82rem; gap: 6px; }
	.sm-map__hint { display: none; }
	.sm-map__crumb { left: 12px; bottom: 12px; }
	.sm-map__crumb span { display: none; }
	.sm-map__zoom { right: 12px; bottom: 12px; }
	.sm-result { padding: 10px; border-radius: 20px; }
	.sm-result__grid, .sm-result__actions { grid-template-columns: 1fr; }
	.sm-result__head h3 { font-size: 1.35rem; }
	.sm-nearest__body { grid-template-columns: 1fr; }
	.sm-nearest__col { border-left: 0; padding-left: 0; }
	.sm-nearitem { grid-template-columns: auto 1fr; }
	.sm-nearitem__side { grid-column: 2; justify-items: start; grid-auto-flow: column; }
	.sm-medhero { grid-template-columns: 1fr; }
	.sm-opt { padding: 22px 18px; }
	.sm-opt__ico { width: 76px; height: 76px; }
	.sm-alhero__ico { width: 76px; height: 76px; }
	.sm-benefits { padding: 20px 14px; }
	.sm-benefits__ico { width: 86px; height: 86px; }
	.sm-benefits strong { font-size: 1.1rem; }
	.sm-form { padding: 20px 16px; }
	.sm-form__grid { grid-template-columns: 1fr; }
	.sm-footer__grid { grid-template-columns: 1fr; }
	.sm-prose { padding: 22px 18px; }
}

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

/* Evita desbordes horizontales en grillas. */
.sm-cob > *, .sm-medhero > *, .sm-alhero > *, .sm-hero > *, .sm-formwrap > *, .sm-cob__side > * { min-width: 0; }
.sm-hero__media { overflow: hidden; }
@media (min-width: 961px) { .sm-hero__media { overflow: visible; } }

/* Aviso de zoom con rueda */
.sm-map { touch-action: pan-y; }
.sm-map__hint.is-flash { display: block !important; background: var(--sm-ink); color: #fff; font-weight: 700; }

/* Sitio en construcción */
.sm-uc__wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sm-uc__card { max-width: 560px; width: 100%; padding: 48px 36px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.sm-uc__logo { width: 84px; height: 84px; }
.sm-uc__brand { font-size: 1.6rem; font-weight: 800; color: var(--sm-blue); margin: 4px 0 18px; }
.sm-uc__card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.sm-uc__card p { color: var(--sm-text); font-size: 1.1rem; margin: 0; }
.sm-uc #wpadminbar { position: fixed; }
