:root {
  --ink: #0b241d;
  --ink-soft: #344d45;
  --green: #006747;
  --green-dark: #004533;
  --mint: #dcefe8;
  --mint-soft: #f1f6f4;
  --sky: #edf2f6;
  --line: #b9c9c3;
  --control-border: #6f8d82;
  --card-line: #d5e1e5;
  --blue: #245f7d;
  --blue-dark: #173f59;
  --blue-soft: #eaf3f8;
  --violet: #654577;
  --violet-soft: #f1eafa;
  --coral: #93483e;
  --coral-soft: #f9ebe8;
  --sand: #fff5df;
  --amber: #623d00;
  --amber-bg: #ffefbd;
  --shadow: none;
  --radius: 14px;
}

body {
  background: #fff;
  color: var(--ink);
  line-height: 1.55;
}

h1 {
  font-size: clamp(2.1rem, 4.1vw, 3.55rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h2,
h3 {
  letter-spacing: -0.018em;
}

::selection {
  background: #b9e3d5;
  color: #06261d;
}

*:focus-visible {
  outline: 3px solid #d57b00;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  background: #fff;
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}

.header-row {
  min-height: 72px;
  gap: 18px;
}

.site-nav {
  align-self: stretch;
  gap: 3px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.91rem;
}

.site-nav > a {
  position: relative;
  min-height: 72px;
  border-radius: 0;
  padding: 0 10px;
}

.site-nav > a::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  background: transparent;
  content: "";
}

.site-nav > a:hover,
.site-nav > a:focus-visible {
  background: #f2f5f7;
  color: var(--blue-dark);
}

.site-nav > a[aria-current="page"] {
  color: var(--blue-dark);
  font-weight: 800;
}

.site-nav > a[aria-current="page"]::after {
  background: var(--blue);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 7px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.site-nav .nav-turnos {
  border: 1px solid #b97800;
  border-radius: 4px;
  background: var(--amber-bg);
  color: #533300;
  font-weight: 800;
  min-height: 42px;
  padding: 8px 11px;
}

.site-nav .nav-turnos:hover,
.site-nav .nav-turnos:focus-visible {
  background: #ffe498;
  color: #412800;
}

.site-nav .nav-nearby {
  border: 1px solid var(--blue-dark);
  border-radius: 4px;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 800;
  min-height: 42px;
  padding: 8px 11px;
}

.site-nav .nav-nearby:hover,
.site-nav .nav-nearby:focus-visible {
  background: #0d3046;
  color: #fff;
}

.menu-button {
  min-height: 42px;
  border: 1px solid var(--control-border);
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
}

.menu-button:hover,
.menu-button:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

#farmacia-cerca-de-mi {
  scroll-margin-top: 88px;
}

.hero {
  background: var(--blue-dark);
  padding: 82px 0 86px;
}

.hero-center {
  max-width: 900px;
  text-align: center;
}

.hero h1 {
  max-width: 855px;
  margin: 0 auto 18px;
}

.hero-highlight {
  color: #ffd99b;
  text-shadow: 0 2px 18px rgba(255, 217, 155, 0.16);
}

.hero-lead {
  max-width: 650px;
  margin: 0 auto 28px;
  color: #e3eef4;
}

.hero-search {
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  box-shadow: none;
}

.hero-search button {
  border-radius: 5px;
}

.quick-section {
  margin-top: 0;
  background: #fff;
  padding: 18px 0;
}

.quick-grid {
  gap: 12px;
}

.quick-grid > a {
  border: 0;
  border-radius: 2px;
  padding: 25px 24px;
  box-shadow: none;
}

.quick-grid > a:first-child {
  border: 0;
}

.quick-grid > a:hover {
  filter: brightness(0.975);
}

.quick-icon {
  border-radius: 6px;
}

.quick-grid > a:nth-child(1) {
  background: var(--sand);
}

.quick-grid > a:nth-child(1) .quick-icon {
  background: #fff0cf;
  color: #704400;
}

.quick-grid > a:nth-child(2) {
  background: var(--blue-soft);
}

.quick-grid > a:nth-child(2) .quick-icon {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.quick-grid > a:nth-child(3) {
  background: var(--violet-soft);
}

.quick-grid > a:nth-child(3) .quick-icon {
  background: var(--violet-soft);
  color: var(--violet);
}

.section {
  padding: 68px 0;
}

.section--soft {
  background: #f4f6fa;
}

.section--dark {
  background: #2d3147;
  color: #fff;
}

.section-heading {
  padding-bottom: 0;
  border: 0;
  margin-bottom: 28px;
}

.location-card,
.region-grid a,
.chain-grid a,
.guide-card,
.pharmacy-card,
.info-card,
.source-card,
.map-card,
.filter-panel form,
.map-panel {
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.location-card,
.region-grid a,
.chain-grid a,
.guide-card,
.pharmacy-card,
.info-card,
.source-card,
.map-card,
.filter-panel form {
  border: 0;
}

.location-card:hover {
  transform: none;
  background: #e9f3ef;
  box-shadow: none;
}

.chain-grid a {
  border: 0;
  border-radius: 2px;
  background: #f3f5f7;
}

.chain-grid a:hover {
  background: var(--blue-soft);
}

.guide-grid--page .guide-card {
  border: 0;
  border-radius: 2px;
  background: #f4f5f8;
  box-shadow: none;
}

.location-grid--featured .location-card:nth-child(4n + 1) {
  background: #eef7f3;
}

.location-grid--featured .location-card:nth-child(4n + 2) {
  background: var(--blue-soft);
}

.location-grid--featured .location-card:nth-child(4n + 3) {
  background: var(--sand);
}

.location-grid--featured .location-card:nth-child(4n) {
  background: var(--violet-soft);
}

.region-grid--home a:nth-child(4n + 1) {
  background: #eaf4ef;
}

.region-grid--home a:nth-child(4n + 2) {
  background: #e8f2f8;
}

.region-grid--home a:nth-child(4n + 3) {
  background: #fff3dc;
}

.region-grid--home a:nth-child(4n) {
  background: #f1eaf6;
}

.region-grid--home a:nth-child(4n + 2) strong {
  color: var(--blue-dark);
}

.region-grid--home a:nth-child(4n + 3) strong {
  color: #704400;
}

.region-grid--home a:nth-child(4n) strong {
  color: var(--violet);
}

.chain-grid--home a:nth-child(3n + 1) {
  background: var(--coral-soft);
}

.chain-grid--home a:nth-child(3n + 1) strong {
  color: #71342c;
}

.chain-grid--home a:nth-child(3n + 2) {
  background: var(--blue-soft);
}

.chain-grid--home a:nth-child(3n + 2) strong {
  color: var(--blue-dark);
}

.chain-grid--home a:nth-child(3n) {
  background: #eef7f3;
}

.chain-grid--home a:nth-child(3n) strong {
  color: var(--green-dark);
}

.page-shell {
  padding-top: 24px;
}

.breadcrumbs {
  margin-bottom: 26px;
}

.page-header {
  margin-bottom: 34px;
}

.page-header h1 {
  margin-bottom: 13px;
}

.local-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.local-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.commune-finder {
  margin: -5px 0 30px;
  padding: 20px;
  border: 0;
  border-radius: 2px;
  background: var(--blue-soft);
}

.commune-finder__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.commune-finder__heading h2 {
  margin-bottom: 4px;
  font-size: 1.22rem;
}

.commune-finder__heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.commune-finder__heading label {
  display: flex;
  align-items: center;
  flex: 0 1 330px;
  gap: 8px;
  border: 1px solid var(--control-border);
  border-radius: 3px;
  background: #fff;
  padding: 0 11px;
  color: var(--green-dark);
}

.commune-finder__heading input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 0;
}

.commune-finder__links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  padding-right: 5px;
}

.commune-finder__links a {
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.78);
  padding: 9px 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight:600;
}

.commune-finder__links a:hover,
.commune-finder__links a:focus-visible {
  background: #fff;
}

.commune-finder__links small {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.commune-finder__links [hidden] {
  display: none;
}

.commune-finder__empty {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

.filter-panel form {
  border: 0;
  background: #f3f5f7;
}

.filter-panel .commune-select {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding-block: 10px;
  line-height: 1.25;
}

.field-help {
  margin: -7px 0 15px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.button,
.map-toggle {
  border-radius: 4px;
}

.button:active,
.map-toggle:active {
  transform: translateY(1px);
}

.pharmacy-card {
  padding: 22px;
  border: 0;
  background: #f5f7f8;
}

.pharmacy-card[data-selected] {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  background: #edf7f2;
}

.chain-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.chain-link:hover {
  text-decoration: underline;
}

.status,
.tag {
  gap: 5px;
  border-radius: 3px;
}

.status--open {
  background: #d7f0e2;
  color: #075d39;
}

.status--closed {
  background: #fbe2df;
  color: #7a211b;
}

.status--unknown {
  background: #e9eeec;
  color: #314941;
}

.tag--shift {
  background: #fff1c9;
  color: #714900;
}

.favorite-button {
  border-radius: 6px;
}

.favorite-button--large {
  border-radius: 6px;
}

.detail-hero {
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.detail-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.detail-address svg {
  flex: none;
  margin-top: 3px;
  color: var(--green);
}

.detail-cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.detail-cta__item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 84px;
  border: 1px solid rgba(23, 45, 58, 0.1);
  border-radius: 14px;
  padding: 15px 17px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 7px 20px rgba(23, 45, 58, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.detail-cta__item--shift {
  background: var(--sand);
}

.detail-cta__item--nearby {
  background: var(--blue-soft);
}

.detail-cta__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.detail-cta__item--shift .detail-cta__icon {
  color: var(--amber-dark);
}

.detail-cta__item--nearby .detail-cta__icon {
  color: var(--blue);
}

.detail-cta__item strong,
.detail-cta__item small {
  display: block;
}

.detail-cta__item strong {
  line-height: 1.25;
}

.detail-cta__item small {
  margin-top: 3px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.detail-cta__item > svg {
  color: var(--ink-soft);
}

@media (hover: hover) {
  .detail-cta__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(23, 45, 58, 0.12);
  }
}

.section-title,
.map-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-title svg,
.map-heading svg {
  flex: none;
  color: var(--green);
}

.data-list > div {
  grid-template-columns: 155px 1fr;
}

.data-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-list dt svg {
  color: var(--green);
}

.map-card {
  padding: 14px;
  background: var(--blue-soft);
}

.hours-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #c8d9d2;
  background: #fff;
  box-shadow: 0 8px 22px rgba(12, 71, 53, 0.07);
}

.hours-card .section-title {
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid #d6e3de;
  background: #f2f9f6;
  color: var(--ink);
  font-size: 1.18rem;
}

.hours-card .section-title svg {
  color: var(--green-dark);
}

.hours-list--today {
  margin: 0;
  padding: 6px 14px 12px;
}

.hours-list--today li {
  display: grid;
  min-height: 39px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 7px 6px;
  border: 0;
  border-top: 1px solid #e0e6e4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hours-list--today li:first-child {
  border-top: 0;
}

.hours-list--today strong {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: start;
  gap: 1px;
  color: var(--ink);
  line-height: 1.25;
}

.hours-list--today strong small {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.hours-list--today .hours-list__today strong small {
  color: var(--green-dark);
}

.hours-list--today .hours-list__today {
  min-height: 45px;
  margin: 3px -6px;
  padding: 7px 11px 7px 9px;
  border: 1px solid #a9c9bc;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #eef8f4;
  box-shadow: none;
}

@media (min-width: 921px) and (max-height: 760px) {
  .detail-sidebar {
    position: static;
  }
}

.hours-list__time {
  align-self: center;
  justify-self: end;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.hours-list__time--missing {
  color: #526a62;
  font-weight: 600;
}

.detail-content .info-card:nth-child(1) {
  background: #eef5f8;
}

.detail-content .info-card:nth-child(2) {
  background: var(--violet-soft);
}

.detail-content .info-card:nth-child(3) {
  background: var(--sand);
}

.source-card {
  background: #f8f2e7;
}

.map-panel {
  background: #f2f6f8;
}

.map-heading {
  margin: 2px 2px 12px;
}

.map-card iframe,
.map-panel iframe {
  border: 1px solid var(--line);
  border-radius: 5px;
}

.map-caption {
  margin: 10px 2px 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.notice--map-missing {
  align-items: flex-start;
}

.notice--map-missing > svg {
  flex: none;
}

.source-strip {
  border-top: 1px solid #ded4c2;
  border-bottom: 1px solid #ded4c2;
  background: #f7f3eb;
}

.source-grid > div {
  border: 0;
  padding-left: 0;
}

.source-grid svg {
  color: #83530a;
}

.site-footer {
  background: #172d3a;
  color: #dce9ee;
}

.footer-grid a {
  color: #dce9ee;
}

.footer-note {
  color: #b8cbd4;
}

.site-footer {
  padding: 58px 0 54px;
}

.footer-grid {
  grid-template-columns: 1.15fr 0.75fr 1fr 1.1fr;
  gap: clamp(26px, 3.2vw, 48px);
}

.footer-brand,
.footer-column {
  min-width: 0;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 20px;
}

.footer-logo img {
  display: block;
  width: 211px;
  height: auto;
  filter: none;
}

.footer-brand p {
  max-width: 270px;
  margin-bottom: 9px;
  color: #dce9ee;
  font-size: 0.93rem;
}

.footer-brand small {
  color: #afc6cf;
  font-size: 0.79rem;
}

.footer-column h2,
.footer-column h3 {
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-column h2 {
  margin-bottom: 17px;
  font-size: 1rem;
}

.footer-column h3 {
  margin: 24px 0 11px;
  font-size: 0.88rem;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  width: fit-content;
  color: #dce9ee;
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffd99b;
  text-decoration: underline;
}

.contact-page .container {
  width: min(960px, calc(100% - 40px));
}

.contact-header {
  max-width: 700px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 22px;
}

.contact-intro {
  border: 1px solid rgba(36, 95, 125, 0.18);
  border-radius: 14px;
  background: var(--blue-soft);
  padding: 24px;
}

.contact-intro__icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 13px;
  background: #fff;
  color: var(--blue-dark);
}

.contact-intro h2 {
  margin: 19px 0 11px;
  font-size: 1.3rem;
}

.contact-intro p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.contact-intro p:last-child {
  margin-bottom: 0;
}

.contact-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: #fff;
  padding: clamp(21px, 3vw, 30px);
  box-shadow: 0 9px 26px rgba(23, 45, 58, 0.08);
}

.contact-form label:not(.contact-trap) {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--control-border);
  border-radius: 9px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  line-height: 1.4;
}

.contact-form input {
  min-height: 48px;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form__errors {
  display: grid;
  gap: 3px;
  border: 1px solid #d6a15c;
  border-left: 4px solid #b86b12;
  border-radius: 9px;
  background: #fffaf2;
  padding: 13px 15px;
  color: #643906;
  font-size: 0.9rem;
}

.contact-form__errors strong {
  color: #402506;
}

.contact-form__field-error {
  color: #9a3f27;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #bd5c43;
  background: #fffafa;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(36, 95, 125, 0.16);
  outline-offset: 1px;
}

.contact-form__submit {
  width: fit-content;
  min-width: 170px;
}

.contact-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-feedback {
  background: var(--blue-soft);
}

.empty-state {
  border-radius: 4px;
}

input[type="search"],
input[type="text"],
input[type="tel"],
select,
textarea {
  border-color: var(--control-border);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #526860;
  opacity: 1;
}

.button--quiet {
  border-color: var(--control-border);
}

.section-search {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: -6px 0 38px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-search label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
}

.section-search label svg {
  flex: none;
  color: var(--green);
}

.section-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--control-border);
  border-radius: 3px;
  background: #fff;
  padding: 10px 13px;
  font: inherit;
}

.section-search input:focus {
  border-color: var(--green-dark);
}

.section-search p {
  min-width: 155px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-align: right;
}

.locations-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 42px;
}

.locations-header > div > p {
  max-width: 680px;
}

.locations-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  min-width: 370px;
  margin: 0;
  border-block: 1px solid var(--line);
}

.locations-summary div {
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  padding: 13px 17px;
  border-left: 1px solid var(--line);
}

.locations-summary div:first-child {
  border-left: 0;
}

.locations-summary dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.locations-summary dd {
  margin: 0;
  color: var(--green-dark);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.1;
}

.locations-search {
  margin-bottom: 30px;
}

.region-index {
  margin-bottom: 64px;
  padding: 5px 0 28px;
  border-bottom: 2px solid var(--ink);
}

.region-index__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.region-index__heading h2 {
  margin: 0;
  font-size: 1.18rem;
}

.region-index__heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.region-index ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.region-index li {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.region-index a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 1px 8px;
  min-height: 69px;
  padding: 11px 6px;
  color: var(--ink);
  text-decoration: none;
}

.region-index a:hover,
.region-index a:focus-visible {
  background: #edf6f2;
}

.region-index__number {
  grid-row: 1 / span 2;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.65;
}

.region-index__name {
  overflow: hidden;
  font-size: 0.89rem;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.region-index small {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.region-jump {
  display: none;
}

.locations-directory[data-filtering] .region-index {
  display: none;
}

.locations-directory .location-sections {
  display: block;
}

.location-region {
  padding: 0 0 64px;
  scroll-margin-top: 92px;
}

.location-region__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px 18px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--ink);
}

.location-region__number {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
}

.location-region__header h2 {
  margin: 0 0 2px;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.location-region__header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.location-region__total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.location-region__total strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.location-region__header > .text-link {
  white-space: nowrap;
}

.locations-directory .location-grid--directory {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
}

.locations-directory .location-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 12px;
  min-height: 80px;
  padding: 13px 3px;
  border-width: 0 0 1px;
  border-color: var(--line);
}

.locations-directory .location-card__name {
  min-width: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
}

.locations-directory .location-card__count {
  color: var(--ink-soft);
  font-size: 0.76rem;
  white-space: nowrap;
}

.locations-directory .location-card__count strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.locations-directory .location-card small {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 5px;
  color: var(--amber);
  font-size: 0.72rem;
}

.locations-directory .location-card small svg {
  flex: none;
}

.region-pharmacy-preview {
  margin-top: 28px;
  padding: 24px;
  border: 0;
  background: #eef4f7;
}

.region-pharmacy-preview__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.region-pharmacy-preview__heading h3 {
  margin: 0;
  font-size: 1.08rem;
}

.region-pharmacy-preview__heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.region-pharmacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.region-pharmacy-grid .pharmacy-card {
  height: 100%;
  padding: 18px;
  background: #fff;
}

.region-pharmacy-grid .pharmacy-card h4 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.region-pharmacy-grid .pharmacy-card h4 a {
  color: var(--ink);
  text-decoration: none;
}

.region-pharmacy-grid .pharmacy-card h4 a:hover,
.region-pharmacy-grid .pharmacy-card h4 a:focus-visible {
  color: var(--green-dark);
  text-decoration: underline;
}

.locations-directory[data-filtering] .region-pharmacy-preview {
  display: none;
}

.filter-empty {
  max-width: 620px;
  margin: 38px auto 70px;
  padding: 34px 20px;
  border-block: 1px solid var(--line);
  text-align: center;
}

.filter-empty > svg {
  color: var(--green);
}

.filter-empty h2 {
  margin: 10px 0 5px;
  font-size: 1.35rem;
}

.filter-empty p {
  margin: 0;
  color: var(--ink-soft);
}

.location-sections > section {
  scroll-margin-top: 90px;
}

.location-sections .location-card {
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.chain-grid--large {
  gap: 14px;
}

.chain-grid--large a {
  min-height: 126px;
  padding: 22px;
}

.guide-grid--page {
  gap: 16px;
}

.guide-grid--page .guide-card {
  padding: 24px;
}

.section--dark .guide-card {
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
  box-shadow: none;
}

.section--dark .guide-card h2 a {
  color: #fff;
}

.section--dark .guide-card p {
  color: #dfe3f0;
}

.section--dark .guide-card .text-link {
  color: #ffd99b;
}

.section--dark .guide-card h2 a:hover,
.section--dark .guide-card h2 a:focus-visible,
.section--dark .guide-card .text-link:hover,
.section--dark .guide-card .text-link:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.section--dark .guide-card:hover,
.section--dark .guide-card:focus-within {
  background: rgba(255, 255, 255, 0.105);
}

.section--dark .text-link--light {
  color: #ffd99b;
}

.section--dark .text-link--light:hover,
.section--dark .text-link--light:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  right: max(18px, calc((100vw - 1180px) / 2));
  bottom: 20px;
  z-index: 30;
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 4px;
  background: var(--blue-dark);
  color: #fff;
  box-shadow: 0 3px 12px rgba(0, 32, 24, 0.22);
  cursor: pointer;
}

.back-to-top:hover {
  background: #0d3046;
}

.nearby-section {
  border: 0;
  background: var(--blue-soft);
  scroll-margin-top: 88px;
}

.nearby-content {
  text-align: center;
}

.nearby-marker {
  display: inline-grid;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  place-items: center;
  border: 0;
  background: #fff;
  color: var(--blue-dark);
}

.nearby-content h2 {
  margin-bottom: 11px;
}

.nearby-content > p {
  max-width: 610px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
}

.nearby-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button--nearby {
  min-height: 50px;
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
  padding-inline: 21px;
}

.button--nearby:hover,
.button--nearby:focus-visible {
  background: #0d3046;
  color: #fff;
}

.nearby-form .geo-message {
  margin-top: 10px;
  color: var(--ink-soft);
}

.footer-favorites {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
}

.footer-favorites svg {
  flex: none;
}

.footer-favorites strong {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 999px;
  background: #ffd99b;
  color: #3b2a0a;
  font-size: 0.72rem;
  line-height: 1;
}

.footer-brand__favorites {
  margin-top: 18px;
  color: #dce9ee;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-brand__favorites:hover,
.footer-brand__favorites:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #8bd0bb;
}

.favorites-header {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  max-width: 850px;
}

.favorites-header__icon {
  display: inline-grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 16px;
  background: var(--coral-soft);
  color: var(--coral);
}

.favorites-header h1 {
  margin-bottom: 10px;
}

.favorites-panel {
  min-height: 260px;
}

.favorites-loading {
  display: grid;
  min-height: 230px;
  place-content: center;
  justify-items: center;
  gap: 13px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--ink-soft);
}

.favorites-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #b7ccd8;
  border-top-color: var(--blue-dark);
  border-radius: 50%;
  animation: favorites-spin 0.8s linear infinite;
}

.favorites-loading p,
.favorites-unavailable p {
  margin: 0;
}

.favorites-results__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.favorites-results__heading h2,
.favorites-results__heading p {
  margin: 0;
}

.favorites-results__heading h2 {
  font-size: 1.25rem;
}

.favorites-results__heading p {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.favorites-unavailable {
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.favorites-unavailable svg {
  flex: none;
}

.favorites-unavailable .button {
  flex: none;
}

.favorites-empty,
.favorites-error {
  background: #f4f6fa;
}

.favorites-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.favorites-privacy svg {
  flex: none;
  color: var(--green-dark);
}

.chain-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin: -6px 0 25px;
  padding: 19px 20px 15px;
  border: 1px solid #d6e3e8;
  border-radius: 14px;
  background: linear-gradient(120deg, #f4f8fa, #f7f5fa);
  box-shadow: 0 7px 20px rgba(23, 45, 58, 0.055);
}

.chain-filter__field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.chain-filter select,
.chain-filter__search {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--control-border);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.chain-filter select {
  height: 48px;
  padding: 9px 38px 9px 12px;
}

.chain-filter__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--green-dark);
}

.chain-filter__search input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.chain-filter select:focus-visible,
.chain-filter__search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 95, 125, 0.14);
}

.chain-filter__actions {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
}

.chain-filter__actions .button {
  min-height: 48px;
  padding-inline: 19px;
}

.chain-filter__reset {
  font-size: 0.85rem;
  font-weight: 750;
}

.chain-filter__count {
  grid-column: 1 / -1;
  margin: -1px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.chain-empty {
  margin-top: 8px;
}

@keyframes favorites-spin {
  to {
    transform: rotate(360deg);
  }
}

.site-header {
  box-shadow: 0 4px 18px rgba(18, 46, 59, 0.08);
}

.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 6%, rgba(127, 88, 147, 0.5), transparent 31%),
    radial-gradient(circle at 82% 110%, rgba(19, 151, 116, 0.34), transparent 34%),
    radial-gradient(circle at 48% 126%, rgba(239, 139, 103, 0.18), transparent 30%),
    linear-gradient(135deg, #173f59 0%, #243653 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: -330px;
  right: -190px;
  z-index: -1;
  width: 610px;
  height: 610px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 68px rgba(255, 255, 255, 0.055),
    0 0 0 138px rgba(255, 255, 255, 0.035);
  animation: hero-rings-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.28) 1.2px, transparent 1.4px);
  background-position: 0 0;
  background-size: 27px 27px;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(105deg, transparent 5%, #000 32%, #000 68%, transparent 95%);
  mask-image: linear-gradient(105deg, transparent 5%, #000 32%, #000 68%, transparent 95%);
  animation: hero-dots-drift 24s linear infinite;
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

@keyframes hero-rings-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-28px, 24px, 0) scale(1.04);
  }
}

@keyframes hero-dots-drift {
  to {
    background-position: 54px 27px;
  }
}

.hero-search {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(5, 25, 38, 0.3);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.hero-search:focus-within {
  box-shadow: 0 20px 48px rgba(5, 25, 38, 0.4), 0 0 0 4px rgba(255, 217, 155, 0.32);
  transform: translateY(-1px);
}

.hero-search button {
  border-radius: 11px;
}

.section-heading__title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.section-heading__title h2 {
  margin: 0;
}

.section-heading__icon {
  display: inline-grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
}

.section-heading__icon--blue {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.section-heading__icon--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.section-heading__icon--coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.section-heading__icon--amber {
  background: rgba(255, 217, 155, 0.14);
  color: #ffd99b;
}

.section-heading__icon--green {
  background: #e5f4ed;
  color: var(--green-dark);
}

.section-heading--compact {
  margin-bottom: 18px;
}

.button,
.map-toggle,
.local-links a,
.menu-button,
.site-nav .nav-turnos,
.site-nav .nav-nearby {
  border-radius: 10px;
}

.quick-grid > a {
  border: 1px solid rgba(23, 45, 58, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(23, 45, 58, 0.09);
}

.quick-icon {
  border-radius: 12px;
}

.location-grid--featured .location-card,
.region-grid--home a,
.chain-grid--home a,
.chain-grid--large a,
.guide-grid--page .guide-card {
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(23, 45, 58, 0.075);
}

.location-grid--featured .location-card,
.region-grid--home a {
  border: 1px solid rgba(23, 45, 58, 0.18);
}

.pharmacy-card {
  border: 1px solid var(--card-line);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(23, 45, 58, 0.085);
}

.favorite-button {
  border-radius: 50%;
}

.favorite-button--large {
  border-radius: 11px;
}

.filter-panel form,
.commune-finder,
.region-pharmacy-preview,
.info-card,
.source-card,
.map-card,
.map-panel,
.empty-state,
.notice {
  border-radius: 14px;
}

.commune-finder__heading label,
.commune-finder__links a,
.section-search input,
.filter-panel input[type="search"],
.filter-panel select,
.region-jump select {
  border-radius: 9px;
}

.map-card iframe,
.map-panel iframe {
  border-radius: 11px;
}

.availability-notice {
  align-items: center;
  gap: 14px;
  margin: -16px 0 28px;
  border: 1px solid #bed9e4;
  background: var(--blue-soft);
  color: var(--ink);
}

.availability-notice > svg {
  flex: 0 0 auto;
  color: var(--blue-dark);
}

.availability-notice p {
  margin: 3px 0 0;
  color: var(--ink-soft);
}

.availability-notice > a {
  flex: 0 0 auto;
  margin-left: auto;
  font-weight: 800;
  white-space: nowrap;
}

.section--dark .guide-card {
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(13, 16, 30, 0.16);
}

.nearby-marker,
.back-to-top {
  border-radius: 50%;
}

.nearby-section {
  background:
    radial-gradient(circle at 18% 20%, rgba(101, 69, 119, 0.09), transparent 28%),
    radial-gradient(circle at 82% 80%, rgba(0, 103, 71, 0.1), transparent 30%),
    var(--blue-soft);
}

.quick-grid > a,
.location-grid--featured .location-card,
.region-grid--home a,
.chain-grid a,
.guide-card,
.pharmacy-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) {
  .quick-grid > a:hover,
  .location-grid--featured .location-card:hover,
  .region-grid--home a:hover,
  .chain-grid a:hover,
  .guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(23, 45, 58, 0.14);
  }

  .quick-grid > a:hover,
  .location-grid--featured .location-card:hover,
  .region-grid--home a:hover {
    border-color: rgba(23, 45, 58, 0.32);
  }

  .pharmacy-card:hover {
    border-color: #9db9c3;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(23, 45, 58, 0.13);
  }
}

@media (max-width: 1120px) {
  .site-nav a {
    padding-inline: 7px;
    font-size: 0.84rem;
  }

  .nav-actions {
    gap: 10px;
    margin-left: 2px;
    padding-left: 5px;
  }
}

@media (max-width: 920px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .site-nav {
    align-self: auto;
    gap: 6px;
  }

  .site-nav > a {
    min-height: 44px;
    border-left: 3px solid transparent;
    padding: 10px 12px;
  }

  .site-nav > a::after {
    display: none;
  }

  .site-nav > a[aria-current="page"] {
    border-left-color: var(--blue);
    background: var(--blue-soft);
  }

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

  .site-nav a,
  .site-nav .nav-turnos,
  .site-nav .nav-nearby {
    justify-content: flex-start;
    margin: 0;
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    width: 100%;
    margin: 5px 0 0;
    padding: 9px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-nav .nav-actions a {
    justify-content: center;
  }

  .quick-grid > a,
  .quick-grid > a:first-child {
    border: 1px solid rgba(23, 45, 58, 0.18);
  }

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

  .section-search {
    grid-template-columns: minmax(160px, 0.4fr) minmax(240px, 1fr);
  }

  .section-search p {
    grid-column: 2;
    margin-top: -7px;
    text-align: left;
  }

  .locations-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 22px;
  }

  .locations-summary {
    min-width: 0;
  }

  .region-index ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-region__header {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .location-region__header > .text-link {
    grid-column: 2 / -1;
  }

  .locations-directory .location-grid--directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-pharmacy-preview {
    padding: 20px;
  }

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

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

  .chain-filter__actions,
  .chain-filter__count {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .contact-page .container {
    width: min(100% - 28px, 960px);
  }

  .availability-notice {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: -8px;
  }

  .availability-notice > a {
    width: 100%;
    margin-left: 36px;
  }

  .contact-form__submit {
    width: 100%;
  }

  .card-list--grid {
    grid-template-columns: 1fr;
  }

  .detail-cta {
    grid-template-columns: 1fr;
  }

  .detail-cta__item {
    min-height: 78px;
    padding: 13px 14px;
  }

  .hero {
    padding: 54px 0 60px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero::before {
    top: -390px;
    right: -350px;
  }

  .favorites-header {
    gap: 12px;
  }

  .favorites-header__icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .favorites-results__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .favorites-unavailable {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .favorites-unavailable .button {
    width: 100%;
  }

  .chain-filter {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .chain-filter select {
    height: 50px;
    min-height: 50px;
  }

  .chain-filter__actions,
  .chain-filter__count {
    grid-column: auto;
  }

  .chain-filter__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .chain-filter__actions .button {
    width: 100%;
  }

  .chain-filter__reset {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand p {
    max-width: none;
  }

  .button--nearby {
    width: 100%;
  }

  .detail-hero {
    gap: 16px;
  }

  .favorite-button--large {
    width: 100%;
    justify-content: center;
  }

  .data-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .commune-finder {
    padding: 16px;
  }

  .commune-finder__heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .commune-finder__heading label {
    flex-basis: auto;
  }

  .commune-finder__links {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    grid-template-columns: 1fr;
  }

  .section-search {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 28px;
  }

  .section-search p {
    grid-column: auto;
    margin-top: 0;
  }

  .locations-summary div {
    padding: 11px 9px;
  }

  .locations-summary dt {
    font-size: 0.65rem;
  }

  .locations-summary dd {
    font-size: 1.2rem;
  }

  .region-index {
    margin-bottom: 44px;
    padding-bottom: 22px;
  }

  .region-index__heading,
  .region-index ol {
    display: none;
  }

  .region-jump {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 800;
  }

  .region-jump select {
    display: block;
    width: 100%;
    height: 50px;
    min-height: 50px;
    border: 1px solid var(--control-border);
    border-radius: 3px;
    background: #fff;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
    line-height: 1.25;
  }

  .location-region {
    padding-bottom: 48px;
  }

  .location-region__header {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .location-region__total,
  .location-region__header > .text-link {
    grid-column: 2;
  }

  .locations-directory .location-grid--directory {
    grid-template-columns: 1fr;
  }

  .locations-directory .location-card {
    min-height: 72px;
  }

  .region-pharmacy-preview {
    margin-top: 22px;
    padding: 17px;
  }

  .region-pharmacy-preview__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .region-pharmacy-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel .commune-select {
    height: 50px;
    min-height: 50px;
    padding-block: 11px;
    font-size: 1rem;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 50px;
    height: 50px;
  }
}

/* Comunas: navegación desplegable y fácil de escanear */
.locations-directory .location-sections {
  gap: 14px;
}

.locations-directory .location-region {
  --region-accent: var(--blue);
  --region-surface: #edf6fa;
  border-color: #b9d0da;
  border-radius: 14px;
  box-shadow: 0 5px 16px rgba(23, 45, 58, 0.06);
}

.locations-directory .location-region__summary {
  display: block;
  padding: 0;
  background: var(--region-surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.locations-directory .location-region__heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  margin: 0;
  padding: 15px 18px;
  border-left: 5px solid var(--region-accent);
}

.locations-directory .location-region__summary::-webkit-details-marker {
  display: none;
}

.locations-directory .location-region__summary:focus-visible {
  outline: 3px solid rgba(36, 95, 125, 0.32);
  outline-offset: -3px;
}

.locations-directory .location-region__title {
  font-size: clamp(1.18rem, 2vw, 1.48rem);
}

.locations-directory .location-region__action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--region-accent) 38%, #fff);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.locations-directory .location-region__action svg {
  color: var(--region-accent);
  transition: transform 0.18s ease;
}

.locations-directory .location-region__open-label {
  display: none;
}

.locations-directory .location-region[open] .location-region__closed-label {
  display: none;
}

.locations-directory .location-region[open] .location-region__open-label {
  display: inline;
}

.locations-directory .location-region[open] .location-region__action svg {
  transform: rotate(180deg);
}

.locations-directory .location-region[open] {
  border-color: color-mix(in srgb, var(--region-accent) 48%, #fff);
  box-shadow: 0 10px 25px rgba(23, 45, 58, 0.1);
}

.locations-directory .location-region:nth-child(4n + 2) {
  --region-accent: var(--violet);
  --region-surface: #f4eff8;
}

.locations-directory .location-region:nth-child(4n + 3) {
  --region-accent: #9a6100;
  --region-surface: #fff5e1;
}

.locations-directory .location-region:nth-child(4n + 4) {
  --region-accent: var(--green);
  --region-surface: #edf7f3;
}

.locations-directory .location-region__icon {
  background: #fff;
  color: var(--region-accent);
  box-shadow: 0 2px 8px rgba(23, 45, 58, 0.09);
}

.locations-directory .location-region__body {
  padding: 18px 20px 20px;
  border-top: 1px solid #d5e2e7;
  background: #fff;
}

.locations-directory .location-region__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.locations-directory .location-region__intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.locations-directory .location-region__intro .text-link {
  flex: 0 0 auto;
  color: var(--region-accent);
  font-size: 0.84rem;
}

.locations-directory .location-grid--directory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
}

.locations-directory .location-card,
.locations-directory .location-sections .location-card,
.locations-directory .location-card:nth-child(n) {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  min-height: 76px;
  padding: 11px 12px;
  border-color: #cbdce3;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.locations-directory .location-card__marker {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--region-surface);
  color: var(--region-accent);
}

.locations-directory .location-card__count {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--region-surface);
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.locations-directory .location-card__arrow {
  background: transparent;
  color: var(--region-accent);
}

@media (hover: hover) {
  .locations-directory .location-region__summary:hover {
    filter: brightness(0.985);
  }

  .locations-directory .location-card:hover {
    border-color: color-mix(in srgb, var(--region-accent) 58%, #fff);
    background: var(--region-surface);
    box-shadow: 0 7px 17px rgba(23, 45, 58, 0.1);
  }

  .locations-directory .location-card:hover .location-card__marker {
    background: #fff;
  }
}

@media (max-width: 620px) {
  .locations-directory .location-region__heading {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 70px;
    padding: 12px;
    border-left-width: 4px;
  }

  .locations-directory .location-region__title {
    font-size: 1.06rem;
  }

  .locations-directory .location-region__action {
    min-height: 36px;
    padding-inline: 8px;
  }

  .locations-directory .location-region__action span {
    display: none;
  }

  .locations-directory .location-region__body {
    padding: 14px;
  }

  .locations-directory .location-region__intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .locations-directory .location-grid--directory {
    grid-template-columns: 1fr;
    padding: 0;
  }
}

/* Estado prioritario: farmacia de turno */
.pharmacy-card--on-shift {
  position: relative;
  overflow: hidden;
  border: 2px solid #c48717;
  background: linear-gradient(180deg, #fffdf7 0%, #fff9ea 100%);
  box-shadow: 0 10px 26px rgba(105, 67, 0, 0.16);
}

.shift-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -22px -22px 18px;
  padding: 11px 16px;
  background: linear-gradient(105deg, #684000 0%, #936000 100%);
  color: #fff;
}

.shift-callout__icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
}

.shift-callout > span:last-child {
  display: grid;
  gap: 1px;
}

.shift-callout strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.shift-callout small {
  color: #fff1ce;
  font-size: 0.76rem;
  line-height: 1.3;
}

.pharmacy-card--on-shift .next-time {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #ffedbd;
  color: #5f3b00;
  font-weight: 750;
}

.tag--shift-prominent {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #a96e00;
  border-radius: 9px;
  background: #754900;
  color: #fff;
  box-shadow: 0 5px 14px rgba(105, 67, 0, 0.16);
  font-size: 0.82rem;
}

.detail-hero--on-shift {
  padding: 22px;
  border: 1px solid #d8ad4b;
  border-left: 5px solid #a96e00;
  border-radius: 16px;
  background: linear-gradient(115deg, #fffaf0 0%, #fffdf8 72%);
  box-shadow: 0 9px 24px rgba(105, 67, 0, 0.1);
}

.info-card--active-shift {
  border: 1px solid #d8ad4b;
  background: #fffaf0;
  box-shadow: 0 8px 22px rgba(105, 67, 0, 0.09);
}

.info-card--active-shift .section-title {
  color: #583700;
}

.info-card--active-shift .section-title svg {
  color: #a96e00;
}

.info-card--active-shift .shift-list em {
  padding: 4px 8px;
  border-radius: 7px;
  background: #754900;
  color: #fff;
  font-size: 0.76rem;
}

@media (hover: hover) {
  .pharmacy-card--on-shift:hover {
    border-color: #a96e00;
    box-shadow: 0 15px 32px rgba(105, 67, 0, 0.22);
  }
}

@media (max-width: 620px) {
  .shift-callout {
    padding-inline: 14px;
  }

  .detail-hero--on-shift {
    padding: 18px;
  }

  .tag--shift-prominent {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .favorites-loading span {
    animation: none;
  }
}

/* Directorio de comunas */
.locations-page {
  background:
    radial-gradient(circle at 94% 3%, rgba(36, 95, 125, 0.08), transparent 25rem),
    linear-gradient(180deg, #fbfdfd 0%, #f6f9fa 100%);
}

.locations-directory .locations-header {
  display: block;
  margin-bottom: 28px;
}

.locations-directory .locations-header p {
  max-width: 700px;
  color: var(--ink-soft);
}

.locations-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid #c7d9e0;
  border-radius: 16px;
  background: linear-gradient(125deg, #eef7fa 0%, #f7f2fa 100%);
  box-shadow: 0 10px 28px rgba(23, 45, 58, 0.08);
}

.locations-directory .locations-search,
.locations-directory .region-jump {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.locations-directory .locations-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
}

.locations-directory .locations-search__field input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.locations-directory .locations-search__field:focus-within,
.locations-directory .region-jump select:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 95, 125, 0.13);
  outline: 0;
}

.locations-directory .region-jump select {
  display: block;
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 10px 40px 10px 13px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
}

.locations-directory .location-sections {
  display: grid;
  gap: 14px;
}

.locations-directory .location-region {
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid #b9d0da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 45, 58, 0.06);
  scroll-margin-top: 92px;
}

.locations-directory .location-region__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid #d5e2e7;
  background: #eef6f9;
}

.locations-directory .location-region__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #dcecf3;
  color: var(--blue-dark);
}

.locations-directory .location-region__header h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.68rem);
}

.locations-directory .location-region__header > .text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--blue-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.locations-directory .location-region:nth-child(4n + 2) .location-region__header {
  background: #f4eff8;
}

.locations-directory .location-region:nth-child(4n + 2) .location-region__icon {
  background: #e8def0;
  color: var(--violet);
}

.locations-directory .location-region:nth-child(4n + 3) .location-region__header {
  background: #fff6e5;
}

.locations-directory .location-region:nth-child(4n + 3) .location-region__icon {
  background: #ffebbe;
  color: var(--amber);
}

.locations-directory .location-region:nth-child(4n + 4) .location-region__header {
  background: #edf7f3;
}

.locations-directory .location-region:nth-child(4n + 4) .location-region__icon {
  background: #d9eee6;
  color: var(--green-dark);
}

.locations-directory .location-grid--directory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
}

.locations-directory .location-card,
.locations-directory .location-sections .location-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid #cbdce3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.locations-directory .location-card:nth-child(4n + 1) {
  background: #fff;
}

.locations-directory .location-card:nth-child(4n + 2) {
  background: #fff;
}

.locations-directory .location-card:nth-child(4n + 3) {
  background: #fff;
}

.locations-directory .location-card:nth-child(4n + 4) {
  background: #fff;
}

.locations-directory .location-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.locations-directory .location-card__name {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.locations-directory .location-card__count {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--region-surface);
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.locations-directory .location-card__arrow {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: var(--region-accent);
}

.locations-directory .filter-empty {
  padding: 36px 20px;
  border: 1px solid #cadbe2;
  border-radius: 16px;
  background: #f4f8fa;
  box-shadow: 0 8px 24px rgba(23, 45, 58, 0.06);
}

@media (hover: hover) {
  .locations-directory .location-card:hover {
    z-index: 1;
    border-color: color-mix(in srgb, var(--region-accent) 58%, #fff);
    background: var(--region-surface);
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(23, 45, 58, 0.12);
  }

  .locations-directory .location-card:hover .location-card__arrow,
  .locations-directory .location-region__header > .text-link:hover {
    background: var(--blue-dark);
    color: #fff;
  }
}

@media (max-width: 920px) {
  .locations-tools {
    grid-template-columns: 1fr;
  }

  .locations-directory .location-grid--directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .locations-directory .locations-header {
    margin-bottom: 22px;
  }

  .locations-tools {
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 13px;
  }

  .locations-directory .location-sections {
    gap: 20px;
  }

  .locations-directory .location-region {
    border-radius: 14px;
  }

  .locations-directory .location-region__header {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
  }

  .locations-directory .location-region__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .locations-directory .location-region__header > .text-link {
    grid-column: 2;
    justify-self: start;
    min-height: 36px;
    margin-top: -5px;
    padding-left: 0;
  }

  .locations-directory .location-grid--directory {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
  }

  .locations-directory .location-card,
  .locations-directory .location-sections .location-card {
    min-height: 76px;
    padding: 11px 12px;
  }
}

.filter-panel fieldset {
  margin-top: 22px;
}

.filter-panel fieldset legend {
  margin: 0 0 9px;
}

.filter-panel .check--locked {
  cursor: not-allowed;
}

.filter-panel .check--locked input {
  opacity: 1;
}

.filter-panel .check--locked small {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.commune-discovery {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 17px 18px;
  border: 1px solid var(--surface-border, #b7cdc4);
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, rgba(31, 151, 108, 0.1), transparent 190px), #fff;
  box-shadow: 0 9px 24px rgb(20 60 48 / 7%);
}

.commune-discovery__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  background: #eaf6f1;
  color: var(--green-dark);
}

.commune-discovery__copy {
  display: grid;
  gap: 2px;
}

.commune-discovery__copy strong {
  color: var(--ink);
  font-size: 1rem;
}

.commune-discovery__copy small {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.commune-discovery .button {
  min-width: 176px;
}

@media (max-width: 620px) {
  .commune-discovery {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 15px;
  }

  .commune-discovery .button {
    width: 100%;
    grid-column: 1 / -1;
  }
}

/* Botones de favoritas: acción compacta en listados y completa en la ficha. */
.favorite-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #b7cbc3;
  border-radius: 50%;
  background: #fff;
  color: #355b50;
  box-shadow: 0 2px 8px rgb(12 54 43 / 6%);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.favorite-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.favorite-button--large {
  display: inline-flex;
  width: auto;
  min-width: 132px;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  color: var(--green-dark);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.favorite-button[aria-pressed="true"] {
  border-color: #258e6f;
  background: #e2f5ed;
  color: #00563e;
  box-shadow: 0 4px 12px rgb(0 86 62 / 14%);
}

.favorite-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.favorite-button--large[aria-pressed="true"] {
  border-color: #16765a;
  background: #dff4eb;
  box-shadow: inset 0 0 0 1px rgb(22 118 90 / 12%),
    0 5px 14px rgb(0 86 62 / 13%);
}

.favorite-button:focus-visible {
  outline: 3px solid rgb(14 118 168 / 28%);
  outline-offset: 3px;
}

@media (hover: hover) {
  .favorite-button:hover {
    border-color: #258e6f;
    background: #f0faf6;
    color: #00563e;
    box-shadow: 0 6px 16px rgb(0 86 62 / 12%);
    transform: translateY(-1px);
  }

  .favorite-button[aria-pressed="true"]:hover {
    background: #d5eee4;
  }
}

@media (max-width: 620px) {
  .detail-hero .favorite-button--large {
    width: 100%;
  }
}

/* Ficha: acceso directo y mapa principal en la columna izquierda. */
.detail-hero__actions {
  display: flex;
  flex: 0 0 auto;
  align-self: flex-start;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.button--map-jump {
  min-width: 126px;
  min-height: 46px;
  border: 1px solid #8fb2c3;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.button--map-jump svg {
  flex: 0 0 auto;
}

#ubicacion-mapa {
  scroll-margin-top: 96px;
}

.map-card--detail {
  overflow: hidden;
  padding: 18px;
  border: 1px solid #bad0da;
  border-radius: 15px;
  background: linear-gradient(145deg, #edf6fa 0%, #f8fbfc 100%);
  box-shadow: 0 10px 26px rgb(23 63 89 / 9%);
}

.map-card--detail .map-heading {
  align-items: center;
  margin: 0 0 14px;
}

.map-heading__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #dcecf3;
  color: var(--blue-dark);
}

.map-heading__icon svg {
  color: currentColor;
}

.map-card--detail .map-heading > span:last-child {
  display: grid;
  gap: 2px;
}

.map-card--detail .map-heading strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.map-card--detail .map-heading small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.map-card--detail iframe {
  display: block;
  width: 100%;
  height: clamp(330px, 40vw, 440px);
  border: 1px solid #a9c1cc;
  border-radius: 11px;
  background: #e5edf1;
}

.map-card__canvas {
  position: relative;
}

.map-card--detail .button--wide {
  min-height: 46px;
  margin-top: 14px;
}

.detail-data-card:not(.info-card--active-shift) {
  background: #eef5f8;
}

.detail-shift-card {
  background: var(--violet-soft);
}

@media (hover: hover) {
  .button--map-jump:hover {
    border-color: var(--blue);
    background: #dcecf3;
    color: var(--blue-dark);
    box-shadow: 0 6px 16px rgb(23 63 89 / 12%);
    transform: translateY(-1px);
  }
}

@media (max-width: 620px) {
  .detail-hero__actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero__actions .button--map-jump,
  .detail-hero__actions .favorite-button--large {
    width: 100%;
    min-width: 0;
  }

  .map-card--detail {
    padding: 14px;
    border-radius: 13px;
  }

  .map-card--detail iframe {
    height: 320px;
  }

}

@media (max-width: 360px) {
  .detail-hero__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hours-card .section-title {
    padding: 16px;
  }

  .hours-list--today {
    padding: 7px 10px 12px;
  }

  .hours-list--today li {
    gap: 10px;
    padding-inline: 5px;
  }

  .hours-list--today .hours-list__today {
    margin-inline: -4px;
    padding-inline: 8px;
  }

  .hours-list__time {
    font-size: 0.9rem;
  }
}

/* Superficies unificadas: blanco con un acento verde en la esquina superior izquierda. */
:root {
  --surface-card: radial-gradient(circle at 0 0, rgba(31, 151, 108, 0.075) 0, rgba(31, 151, 108, 0.028) 82px, rgba(255, 255, 255, 0) 215px), #fff;
  --surface-card-hover: radial-gradient(circle at 0 0, rgba(31, 151, 108, 0.12) 0, rgba(31, 151, 108, 0.045) 94px, rgba(255, 255, 255, 0) 235px), #fff;
  --surface-section: radial-gradient(circle at 0 0, rgba(31, 151, 108, 0.04) 0, rgba(31, 151, 108, 0.014) 190px, rgba(255, 255, 255, 0) 520px), #fff;
  --surface-border: #b7cdc4;
}

body {
  background: var(--surface-section);
}

.section--soft,
.locations-page,
.nearby-section {
  background: var(--surface-section);
}

.quick-grid > a:nth-child(n),
.location-grid--featured .location-card:nth-child(n),
.region-grid--home a:nth-child(n),
.chain-grid--home a:nth-child(n),
.chain-grid--large a,
.guide-grid--page .guide-card,
.pharmacy-card,
.info-card,
.source-card,
.map-card,
.map-panel,
.filter-panel form,
.commune-finder,
.locations-tools,
.chain-filter,
.detail-cta__item,
.contact-intro,
.contact-form,
.notice,
.availability-notice,
.section-search,
.empty-state,
.favorites-loading,
.favorites-empty,
.favorites-error,
.filter-empty,
.region-pharmacy-preview,
.locations-directory .filter-empty {
  border: 1px solid var(--surface-border);
  background: var(--surface-card);
}

.commune-finder__links a {
  border: 1px solid #d1e0da;
  background: rgba(255, 255, 255, 0.88);
}

.region-grid--home a:nth-child(n) strong,
.chain-grid--home a:nth-child(n) strong {
  color: var(--ink);
}

.quick-grid > a:nth-child(n) .quick-icon,
.section-heading__icon,
.section-heading__icon--blue,
.section-heading__icon--violet,
.section-heading__icon--coral,
.section-heading__icon--amber,
.section-heading__icon--green,
.detail-cta__icon,
.map-heading__icon,
.favorites-header__icon {
  background: #eaf6f1;
  color: var(--green-dark);
}

.detail-cta__item--shift .detail-cta__icon,
.detail-cta__item--nearby .detail-cta__icon {
  background: #eaf6f1;
  color: var(--green-dark);
}

.locations-directory .location-region:nth-child(n) {
  --region-accent: var(--green);
  --region-surface: #eaf6f1;
  border: 1px solid var(--surface-border);
  background: #fff;
}

.locations-directory .location-region:nth-child(n) .location-region__summary,
.locations-directory .location-region:nth-child(n) .location-region__header {
  background: var(--surface-card);
}

.locations-directory .location-region:nth-child(n) .location-region__icon,
.locations-directory .location-region:nth-child(n) .location-card__marker,
.locations-directory .location-region:nth-child(n) .location-card__count {
  background: #eaf6f1;
  color: var(--green-dark);
}

.locations-directory .location-region__body {
  background: #fff;
}

.locations-directory .location-card:nth-child(n),
.locations-directory .location-sections .location-card:nth-child(n) {
  border: 1px solid var(--surface-border);
  background: var(--surface-card);
}

.hours-card,
.hours-card .section-title,
.detail-data-card:not(.info-card--active-shift),
.detail-shift-card,
.map-card--detail,
.button--map-jump {
  background: var(--surface-card);
}

.hours-card .section-title svg,
.hours-list--today strong small {
  color: var(--green-dark);
}

.hours-list--today .hours-list__today {
  border-color: #a9c9bc;
  background: var(--surface-card-hover);
}

.detail-hero--on-shift,
.pharmacy-card--on-shift,
.info-card--active-shift {
  background: var(--surface-card);
}

.pharmacy-card--on-shift {
  border-color: #c48717;
}

.detail-hero--on-shift,
.info-card--active-shift {
  border-color: #d8ad4b;
}

@media (hover: hover) {
  .quick-grid > a:nth-child(n):hover,
  .location-grid--featured .location-card:nth-child(n):hover,
  .region-grid--home a:nth-child(n):hover,
  .chain-grid a:hover,
  .guide-grid--page .guide-card:hover,
  .pharmacy-card:not(.pharmacy-card--on-shift):hover,
  .detail-cta__item:hover,
  .locations-directory .location-card:nth-child(n):hover,
  .locations-directory .location-region__summary:hover {
    background: var(--surface-card-hover);
    filter: none;
  }
}

/* Efecto ambiental para las tarjetas del directorio de cadenas. */
.chain-grid--large a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--surface-border);
  background:
    radial-gradient(circle at 0 0, rgba(24, 145, 101, 0.11) 0, rgba(24, 145, 101, 0.04) 24%, rgba(255, 255, 255, 0) 57%),
    linear-gradient(145deg, #fff 42%, #f9fcfb 100%);
  box-shadow: 0 8px 24px rgba(12, 71, 53, 0.08);
}

.chain-grid--large a::before {
  position: absolute;
  top: -108px;
  left: -102px;
  z-index: 0;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(0, 103, 71, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(0, 103, 71, 0.025),
    0 0 0 47px rgba(0, 103, 71, 0.012);
  content: "";
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.chain-grid--large a > * {
  position: relative;
  z-index: 1;
}

.chain-grid--large a small {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
}

.chain-grid--large a small svg {
  transition: transform 180ms ease;
}

@media (hover: hover) {
  .chain-grid--large a:hover {
    border-color: #76a995;
    background:
      radial-gradient(circle at 0 0, rgba(24, 145, 101, 0.16) 0, rgba(24, 145, 101, 0.06) 25%, rgba(255, 255, 255, 0) 59%),
      linear-gradient(145deg, #fff 40%, #f6fbf9 100%);
    box-shadow: 0 14px 32px rgba(12, 71, 53, 0.14);
    transform: translateY(-3px);
  }

  .chain-grid--large a:hover::before {
    opacity: 0.78;
    transform: translate3d(5px, 5px, 0) scale(1.04);
  }

  .chain-grid--large a:hover small svg {
    transform: translateX(4px);
  }
}

.section--dark .guide-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero interior compartido por fichas, directorios y páginas informativas. */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 0 0 40px;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid #acc9be;
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 0, rgba(34, 151, 110, 0.12) 0, rgba(34, 151, 110, 0.035) 27%, transparent 52%),
    linear-gradient(132deg, #f6fbf9 0%, #fff 55%, #f7faf9 100%);
  box-shadow: 0 14px 34px rgba(18, 67, 53, 0.09);
}

.page-hero::before {
  position: absolute;
  top: -145px;
  right: -105px;
  z-index: -1;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(8, 115, 90, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(8, 115, 90, 0.035),
    0 0 0 70px rgba(8, 115, 90, 0.018);
  content: "";
  pointer-events: none;
}

.page-hero::after {
  position: absolute;
  right: 35px;
  bottom: 22px;
  z-index: -1;
  width: 116px;
  height: 58px;
  background-image: radial-gradient(circle, rgba(8, 115, 90, 0.2) 1.2px, transparent 1.4px);
  background-size: 13px 13px;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.page-header.page-hero h1,
.detail-hero.page-hero h1,
.article-hero.page-hero h1 {
  max-width: 920px;
  margin-bottom: 14px;
}

.page-header.page-hero > p,
.article-hero.page-hero > p {
  max-width: 790px;
}

.detail-hero.page-hero {
  align-items: center;
  padding: clamp(30px, 4vw, 46px);
}

.detail-hero.page-hero.detail-hero--on-shift {
  border-color: #d3b36c;
  background:
    radial-gradient(circle at 8% 0, rgba(209, 158, 51, 0.13) 0, rgba(209, 158, 51, 0.035) 27%, transparent 52%),
    linear-gradient(132deg, #fffbf2 0%, #fff 55%, #f7faf9 100%);
}

.article > .article-hero.page-hero {
  margin-bottom: 42px;
}

.error-hero.page-hero,
.contact-feedback.page-hero {
  margin-bottom: 0;
  text-align: center;
}

@media (max-width: 620px) {
  .page-hero,
  .detail-hero.page-hero {
    margin-bottom: 28px;
    padding: 25px 20px;
    border-radius: 17px;
  }

  .page-hero::before {
    top: -176px;
    right: -150px;
  }

  .page-hero::after {
    right: 18px;
    bottom: 14px;
    opacity: 0.28;
  }
}

/* Refinamiento visual de portal: una capa final coherente para todo el sitio. */
:root {
  --portal-bg: #f4f7f6;
  --portal-surface: #fff;
  --portal-surface-muted: #f8faf9;
  --portal-line: #cbdad5;
  --portal-line-strong: #9fbab1;
  --portal-navy: #153d50;
  --portal-green: #08745a;
  --portal-shadow-sm: 0 2px 8px rgb(18 55 44 / 7%);
  --portal-shadow-md: 0 10px 28px rgb(18 55 44 / 10%);
}

body {
  background:
    radial-gradient(circle at 0 0, rgb(8 116 90 / 5%), transparent 430px),
    var(--portal-bg);
  color: #102d25;
  font-size: 16px;
  line-height: 1.58;
}

main {
  min-height: 52vh;
}

.container {
  width: min(1200px, calc(100% - 40px));
}

.portal-utility {
  border: 0;
  background: #11372e;
  color: #eaf5f1;
  font-size: 0.76rem;
}

.portal-utility__row {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.portal-utility__identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 750;
}

.portal-utility__identity svg {
  color: #91d8c3;
}

.portal-utility__source {
  margin-left: auto;
  color: #c2dcd4;
}

.portal-utility a {
  color: #fff;
  font-weight: 750;
  text-decoration-color: rgb(255 255 255 / 42%);
}

.site-header {
  border-bottom-color: #c9d7d2;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 5px 20px rgb(20 55 44 / 8%);
}

.header-row {
  min-height: 74px;
}

.brand img {
  width: 194px;
  height: auto;
}

.site-nav > a {
  min-height: 74px;
  color: #203d35;
  font-weight: 700;
}

.site-nav > a:hover,
.site-nav > a:focus-visible {
  background: #f5f8f7;
  color: var(--green-dark);
}

.site-nav > a[aria-current="page"] {
  color: var(--green-dark);
}

.site-nav > a[aria-current="page"]::after {
  height: 3px;
  background: var(--portal-green);
}

.site-nav .nav-turnos,
.site-nav .nav-nearby {
  min-height: 42px;
  border-radius: 9px;
  box-shadow: 0 2px 7px rgb(20 55 44 / 8%);
}

.site-nav .nav-turnos {
  border-color: #d2a64b;
  background: #fff7df;
  color: #5d3a00;
}

.site-nav .nav-nearby {
  border-color: var(--portal-navy);
  background: var(--portal-navy);
}

.hero {
  padding: clamp(66px, 7vw, 88px) 0 clamp(76px, 8vw, 96px);
  background:
    radial-gradient(circle at 10% -20%, rgb(55 177 139 / 30%), transparent 37%),
    radial-gradient(circle at 92% 120%, rgb(62 105 132 / 45%), transparent 34%),
    linear-gradient(125deg, #0f493c 0%, #153d50 100%);
}

.hero h1 {
  max-width: 880px;
  font-size: clamp(2.55rem, 5.4vw, 4.5rem);
  letter-spacing: -0.045em;
}

.hero-lead {
  color: #dcece7;
}

.hero-search {
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 13px;
  box-shadow: 0 18px 42px rgb(3 28 23 / 24%);
}

.hero-search button {
  border-radius: 9px;
  background: var(--portal-green);
}

.quick-section {
  margin-top: -34px;
}

.quick-grid > a,
.location-grid--featured .location-card,
.region-grid--home a,
.chain-grid a,
.guide-card,
.pharmacy-card,
.info-card,
.map-card,
.filter-panel form,
.commune-finder,
.locations-tools,
.chain-filter,
.contact-intro,
.contact-form,
.section-search,
.notice,
.empty-state,
.detail-cta__item {
  border-color: var(--portal-line);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-sm);
}

.quick-grid > a {
  min-height: 108px;
  padding: 21px;
  border-radius: 12px;
}

.quick-grid > a:first-child {
  border-color: #d4b05c;
}

.quick-icon,
.section-heading__icon,
.section-heading__icon--blue,
.section-heading__icon--violet,
.section-heading__icon--coral,
.section-heading__icon--amber,
.section-heading__icon--green {
  border: 1px solid #c8ddd5;
  border-radius: 10px;
  background: #edf7f3;
  color: var(--portal-green);
}

.section {
  padding: clamp(54px, 6vw, 74px) 0;
}

.section--soft,
.locations-page,
.nearby-section {
  border-color: var(--portal-line);
  background:
    radial-gradient(circle at 0 0, rgb(8 116 90 / 4%), transparent 360px),
    #f7faf9;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2 {
  color: #102d25;
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
  letter-spacing: -0.032em;
}

.section-heading__icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.text-link {
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 8px;
}

.text-link:hover,
.text-link:focus-visible {
  background: #eaf5f1;
}

.location-grid--featured .location-card {
  min-height: 112px;
  padding: 19px;
  border-radius: 12px;
}

.region-grid--home a {
  min-height: 54px;
  align-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  font-weight:600;
}

.region-grid--home a > svg {
  flex: 0 0 auto;
  color: var(--portal-green);
  transition: transform 180ms ease;
}

.chain-grid a,
.chain-grid--large a,
.guide-grid--page .guide-card {
  border-radius: 12px;
  background: #fff;
}

.chain-grid--large a::before {
  opacity: 0.28;
}

.commune-discovery {
  border-color: var(--portal-line-strong);
  border-radius: 12px;
  background: linear-gradient(105deg, #f0f8f5 0%, #fff 62%);
  box-shadow: var(--portal-shadow-sm);
}

.page-shell {
  padding-top: 30px;
}

.breadcrumbs {
  margin-bottom: 22px;
  color: #526a62;
  font-size: 0.82rem;
}

.page-hero,
.detail-hero.page-hero {
  margin-bottom: 32px;
  padding: clamp(28px, 3.4vw, 40px);
  border-color: var(--portal-line-strong);
  border-radius: 14px;
  background: linear-gradient(112deg, #edf7f3 0%, #fff 58%, #f8faf9 100%);
  box-shadow: var(--portal-shadow-sm);
}

.page-hero::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: var(--portal-green);
  box-shadow: none;
}

.page-hero::after {
  right: 24px;
  bottom: 18px;
  width: 92px;
  height: 46px;
  opacity: 0.2;
}

.page-header.page-hero h1,
.detail-hero.page-hero h1,
.article-hero.page-hero h1 {
  color: #102d25;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

.detail-intro {
  max-width: 790px;
  margin: 14px 0 0;
  color: #38534a;
  font-size: 0.98rem;
  line-height: 1.65;
}

.directory-layout {
  gap: 24px;
}

.filter-panel {
  top: 92px;
}

.filter-panel form {
  padding: 22px;
  border-radius: 12px;
  border-top: 4px solid var(--portal-green);
  box-shadow: 0 7px 22px rgb(18 55 44 / 9%);
}

.filter-panel h2 {
  margin-bottom: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid #dbe5e1;
  font-size: 1.05rem;
}

.filter-panel input[type="search"],
.filter-panel select,
.section-search input,
.locations-directory .locations-search__field,
.locations-directory .region-jump select {
  min-height: 48px;
  border-color: #9fb7af;
  border-radius: 8px;
  background: #fff;
}

.filter-panel input[type="search"]:focus,
.filter-panel select:focus,
.section-search input:focus,
.locations-directory .region-jump select:focus {
  border-color: var(--portal-green);
  box-shadow: 0 0 0 3px rgb(8 116 90 / 13%);
  outline: 0;
}

.section-search--chains {
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 0;
  padding: 20px 22px;
  border: 1px solid #b9d2c8;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgb(42 160 119 / 14%), transparent 42%),
    linear-gradient(135deg, #f4fbf8 0%, #fff 68%);
  box-shadow: 0 10px 28px rgb(18 55 44 / 9%);
}

.section-search--chains input {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgb(18 55 44 / 5%);
}

@media (max-width: 720px) {
  .section-search--chains {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 18px;
  }
}

.results-bar {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  background: #fff;
}

.pharmacy-card {
  padding: 21px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--portal-shadow-sm);
}

.pharmacy-card h2 {
  font-size: 1.18rem;
}

.pharmacy-card--on-shift {
  border-width: 2px;
  border-color: #c18a22;
  background: #fffdf8;
}

.status,
.tag {
  border-radius: 6px;
}

.tag--category {
  border: 1px solid #b9d8cd;
  background: #f2f8f5;
  color: #174f40;
}

.button,
.map-toggle,
.local-links a,
.menu-button {
  border-radius: 8px;
}

.button--primary {
  border-color: var(--portal-green);
  background: var(--portal-green);
}

.button--primary:hover,
.button--primary:focus-visible {
  border-color: #075d49;
  background: #075d49;
}

.info-card,
.map-card,
.detail-cta__item,
.contact-intro,
.contact-form,
.chain-filter,
.locations-tools,
.commune-finder {
  border-radius: 12px;
}

.source-strip {
  padding: 25px 0;
  border-block: 1px solid var(--portal-line);
  background: #fff;
}

.source-grid {
  gap: 24px;
}

.source-grid > div {
  align-items: flex-start;
}

.source-grid svg {
  margin-top: 2px;
}

.site-footer {
  padding: 54px 0 58px;
  border-top: 4px solid #2c8d72;
  background: #102f27;
}

.footer-grid {
  gap: clamp(30px, 4vw, 54px);
}

.footer-column h2 {
  margin-bottom: 18px;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
}

.footer-links {
  gap: 10px;
}

.footer-links a {
  color: #d5e7e1;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  text-decoration-color: #8bd0bb;
}

.section--dark .section-heading h2,
.section--dark .guide-card h2 a {
  color: #fff;
}

.section--dark {
  background: linear-gradient(125deg, #153d50 0%, #153b32 100%);
}

.section--dark .guide-card {
  border-color: rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 7%);
  box-shadow: none;
}

.section--dark .guide-card p {
  color: #dce8e4;
}

.section--dark .text-link:hover,
.section--dark .text-link:focus-visible,
.section--dark .guide-card:hover {
  background: rgb(255 255 255 / 11%);
  color: #fff;
}

@media (hover: hover) {
  .quick-grid > a:hover,
  .location-grid--featured .location-card:hover,
  .region-grid--home a:hover,
  .chain-grid a:hover,
  .guide-card:hover,
  .pharmacy-card:not(.pharmacy-card--on-shift):hover,
  .detail-cta__item:hover {
    border-color: var(--portal-line-strong);
    background: #fff;
    box-shadow: var(--portal-shadow-md);
    transform: translateY(-2px);
  }

  .region-grid--home a:hover > svg {
    transform: translateX(3px);
  }
}

@media (max-width: 920px) {
  .portal-utility__source {
    display: none;
  }

  .site-nav {
    top: 74px;
    border-top: 1px solid #d9e3df;
    box-shadow: 0 16px 30px rgb(18 55 44 / 12%);
  }

  .site-nav > a {
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  .container,
  .narrow {
    width: min(100% - 28px, 1200px);
  }

  .portal-utility__row {
    min-height: 30px;
  }

  .portal-utility__identity,
  .portal-utility a {
    font-size: 0.7rem;
  }

  .portal-utility a {
    white-space: nowrap;
  }

  .header-row {
    min-height: 68px;
  }

  .brand img {
    width: 174px;
  }

  .site-nav {
    top: 68px;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.15rem);
  }

  .quick-section {
    margin-top: -28px;
  }

  .section {
    padding: 50px 0;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 22px;
  }

  .section-heading__title {
    align-items: flex-start;
  }

  .page-hero,
  .detail-hero.page-hero {
    padding: 24px 20px 25px;
    border-radius: 12px;
  }

  .page-hero::before {
    border-radius: 12px 0 0 12px;
  }

  .results-bar {
    align-items: flex-start;
  }

  .pharmacy-card {
    padding: 18px;
  }

  .source-grid {
    gap: 17px;
  }
}

/* Ficha enriquecida con datos verificables del establecimiento. */
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.detail-fact {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #c8d9d3;
  border-radius: 10px;
  background:
    radial-gradient(circle at 0 0, rgb(34 147 108 / 7%), transparent 48%),
    #fff;
}

.detail-fact--wide {
  grid-column: 1 / -1;
}

.detail-fact dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #4d655d;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.detail-fact dt span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #edf7f3;
  color: var(--portal-green);
}

.detail-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 680;
  line-height: 1.45;
}

.detail-fact a {
  color: var(--portal-green-dark, var(--green-dark));
}

.detail-fact__missing {
  color: #64766f;
  font-weight: 550;
}

.detail-data-card .button-row {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #d7e3df;
}

.nearby .section-heading p {
  margin: 7px 0 0;
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  .detail-facts {
    grid-template-columns: 1fr;
  }

  .detail-fact--wide {
    grid-column: auto;
  }
}

/* Columna lateral de la ficha: información operativa y navegación local. */
.detail-sidebar {
  align-content: start;
}

.detail-sidebar > .info-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--portal-line, #c8d9d3);
  background: var(--surface-card, #fff);
  box-shadow: var(--portal-shadow-sm, 0 7px 22px rgb(20 60 50 / 7%));
}

.detail-sidebar > .info-card > .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #d7e3df;
  background: transparent;
  font-size: 1.12rem;
}

.detail-sidebar > .info-card > .section-title svg {
  flex: 0 0 auto;
  color: var(--portal-green, var(--green));
}

.detail-local-links strong,
.detail-local-links small {
  display: block;
}

.detail-local-links > a > svg {
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

.detail-local-links {
  display: grid;
}

.detail-local-links a {
  display: grid;
  min-height: 66px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-top: 1px solid #e0e8e5;
  color: var(--ink);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.detail-local-links a:first-child {
  border-top: 0;
}

.detail-local-links__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d7e6e0;
  border-radius: 10px;
  background: #f3f8f6;
  color: var(--portal-green, var(--green));
}

.detail-local-links strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.detail-local-links small {
  margin-top: 2px;
  color: #597068;
  font-size: 0.76rem;
  line-height: 1.35;
}

@media (hover: hover) {
  .detail-local-links a:hover {
    background: #f1f8f5;
    color: var(--portal-green-dark, var(--green-dark));
  }

  .detail-local-links a:hover > svg {
    transform: translateX(3px);
  }
}

/* Títulos de sección sin iconos decorativos y con un acento editorial. */
.section-heading__title {
  display: block;
}

.section-heading__title h2,
.nearby-content > h2,
.detail-content .section-title,
.detail-sidebar .section-title,
.article > section > h2,
.contact-intro h2,
.site-footer h2 {
  position: relative;
  padding-bottom: 12px;
}

.section-heading__title h2::after,
.nearby-content > h2::after,
.detail-content .section-title::after,
.detail-sidebar .section-title::after,
.article > section > h2::after,
.contact-intro h2::after,
.site-footer h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 54px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--portal-green, var(--green)) 0%, #74c8ad 100%);
  box-shadow: 0 2px 7px rgb(8 115 90 / 15%);
  content: "";
}

.section--dark .section-heading__title h2::after {
  background: linear-gradient(90deg, #ffd99b 0%, #65d2b4 100%);
  box-shadow: none;
}

.nearby-content > h2 {
  display: table;
  margin-right: auto;
  margin-left: auto;
}

.nearby-content > h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.detail-sidebar > .info-card > .section-title {
  padding-bottom: 16px;
}

.detail-sidebar > .info-card > .section-title::after {
  bottom: -1px;
  left: 18px;
  width: 46px;
}

.site-footer h2::after {
  background: #65d2b4;
  box-shadow: none;
}

.locations-directory .location-region__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-left: 5px solid var(--region-accent);
}

.locations-directory .location-region__heading,
.locations-directory .location-region[open] .location-region__heading {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
}

@media (max-width: 620px) {
  .locations-directory .location-region__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 70px;
    gap: 10px;
    padding: 12px;
    border-left-width: 4px;
  }
}

/* El mapa conserva las coordenadas verificadas y deriva la interacción a Google Maps. */
.map-card__canvas {
  overflow: hidden;
  border-radius: 11px;
}

.map-card__canvas iframe {
  margin-bottom: 0;
  pointer-events: none;
}

.map-card__open-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  cursor: pointer;
}

.map-card__open-overlay:focus-visible {
  outline: 3px solid rgb(8 116 90 / 42%);
  outline-offset: -5px;
}

.map-card__place {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  width: min(360px, calc(100% - 32px));
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid rgb(27 91 72 / 20%);
  border-radius: 11px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 10px 28px rgb(18 52 42 / 18%);
  color: var(--ink);
  pointer-events: none;
  backdrop-filter: blur(7px);
}

.map-card__place-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  background: #e7f4ef;
  color: var(--green-dark);
}

.map-card__place-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.map-card__place-copy strong,
.map-card__place-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-card__place-copy strong {
  font-size: 0.94rem;
  line-height: 1.25;
}

.map-card__place-copy small {
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .map-card__place {
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    padding: 10px 11px;
  }
}

/* Ficha editorial: menos tarjetas aisladas y una jerarquía de portal más clara. */
.pharmacy-page {
  background:
    linear-gradient(180deg, transparent 0 245px, #f2f7f5 245px 78%, transparent 100%);
}

.pharmacy-page .detail-hero.page-hero {
  margin-bottom: 22px;
  border-color: #a9c8bc;
  background:
    radial-gradient(circle at 100% 0, rgb(32 139 101 / 13%), transparent 34%),
    linear-gradient(120deg, #edf7f3 0%, #fff 67%);
  box-shadow: 0 16px 36px rgb(18 55 44 / 9%);
}

.pharmacy-page .detail-intro {
  max-width: 860px;
  color: #36544a;
}

.pharmacy-page .detail-cta {
  overflow: hidden;
  gap: 0;
  margin-bottom: 30px;
  border: 1px solid #0a4f3f;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgb(99 207 170 / 20%), transparent 32%),
    linear-gradient(112deg, #0b493c 0%, #0d624e 100%);
  box-shadow: 0 13px 28px rgb(13 70 56 / 16%);
}

.pharmacy-page .detail-cta__item {
  min-height: 88px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.pharmacy-page .detail-cta__item + .detail-cta__item {
  border-left: 1px solid rgb(255 255 255 / 20%);
}

.pharmacy-page .detail-cta__item strong {
  color: #fff;
  font-size: 0.98rem;
}

.pharmacy-page .detail-cta__item small,
.pharmacy-page .detail-cta__item > svg {
  color: rgb(235 249 244 / 78%);
}

.pharmacy-page .detail-cta__icon,
.pharmacy-page .detail-cta__item--shift .detail-cta__icon,
.pharmacy-page .detail-cta__item--nearby .detail-cta__icon {
  border: 1px solid rgb(255 255 255 / 16%);
  background: rgb(255 255 255 / 11%);
  color: #d9f5eb;
}

.pharmacy-page .detail-cta__item--shift .detail-cta__icon {
  color: #ffdc9b;
}

@media (hover: hover) {
  .pharmacy-page .detail-cta__item:hover {
    border-color: transparent;
    background: rgb(255 255 255 / 8%);
    box-shadow: none;
    color: #fff;
    transform: none;
  }
}

.pharmacy-page .detail-layout {
  gap: 30px;
}

.pharmacy-page .detail-content {
  gap: 26px;
}

.pharmacy-page .detail-data-card,
.pharmacy-page .detail-data-card:not(.info-card--active-shift),
.pharmacy-page .detail-data-card.info-card--active-shift {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid #b4ccc3;
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgb(37 148 110 / 9%), transparent 38%),
    linear-gradient(135deg, #f1f8f5 0%, #fbfcfb 68%);
  box-shadow: 0 12px 28px rgb(18 55 44 / 7%);
}

.pharmacy-page .detail-data-card .section-title {
  margin-bottom: 10px;
}

.pharmacy-page .detail-facts {
  gap: 0 32px;
  border-top: 1px solid #c8d9d3;
}

.pharmacy-page .detail-fact {
  padding: 18px 2px 17px;
  border: 0;
  border-bottom: 1px solid #d2e0db;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pharmacy-page .detail-fact dt {
  margin-bottom: 5px;
}

.pharmacy-page .detail-fact dt span {
  width: 27px;
  height: 27px;
  border: 1px solid #d2e5de;
  border-radius: 50%;
  background: rgb(255 255 255 / 55%);
}

.pharmacy-page .detail-data-card .button-row {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.pharmacy-page .map-card--detail {
  padding: 20px;
  border-color: #aec7d1;
  border-radius: 16px;
  background: #f7fafb;
  box-shadow: 0 12px 28px rgb(23 63 89 / 8%);
}

.pharmacy-page .detail-sidebar {
  gap: 0;
}

.pharmacy-page .detail-sidebar__panel {
  overflow: hidden;
  border: 1px solid #d2cbbd;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgb(195 155 83 / 11%), transparent 36%),
    linear-gradient(155deg, #faf8f2 0%, #f4f6f2 100%);
  box-shadow: 0 12px 28px rgb(48 54 43 / 9%);
}

.pharmacy-page .detail-sidebar__section {
  padding: 0;
}

.pharmacy-page .detail-sidebar__section + .detail-sidebar__section {
  border-top: 1px solid #d9d4c9;
}

.pharmacy-page .detail-sidebar__section > .section-title {
  margin: 0;
  padding: 20px 20px 16px;
  border: 0;
  background: transparent;
  font-size: 1.08rem;
}

.pharmacy-page .detail-sidebar__section > .section-title::after {
  bottom: 3px;
  left: 20px;
  width: 42px;
}

.pharmacy-page .hours-list--today {
  padding: 7px 20px 22px;
}

.pharmacy-page .hours-list--today .hours-list__today {
  min-height: 52px;
  margin: 0;
  padding: 9px 8px 9px 13px;
  border: 0;
  border-left: 4px solid var(--green);
  border-radius: 0;
  background: rgb(255 255 255 / 38%);
}

.pharmacy-page .detail-local-links {
  padding: 5px 10px 11px;
}

.pharmacy-page .detail-local-links a {
  min-height: 68px;
  padding: 12px 10px;
  border: 0;
  border-top: 1px solid #ded9cf;
  background: transparent;
}

.pharmacy-page .detail-local-links__icon {
  border: 0;
  border-radius: 50%;
  background: rgb(8 115 90 / 9%);
}

@media (hover: hover) {
  .pharmacy-page .detail-local-links a:hover {
    border-radius: 9px;
    background: rgb(255 255 255 / 55%);
  }
}

@media (max-width: 920px) {
  .pharmacy-page .detail-sidebar__panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pharmacy-page .detail-sidebar__section + .detail-sidebar__section {
    border-top: 0;
    border-left: 1px solid #d9d4c9;
  }
}

@media (max-width: 620px) {
  .pharmacy-page {
    background: linear-gradient(180deg, transparent 0 190px, #f2f7f5 190px 82%, transparent 100%);
  }

  .pharmacy-page .detail-cta__item + .detail-cta__item {
    border-top: 1px solid rgb(255 255 255 / 20%);
    border-left: 0;
  }

  .pharmacy-page .detail-data-card {
    padding: 21px 18px;
  }

  .pharmacy-page .detail-facts {
    gap: 0;
  }

  .pharmacy-page .detail-sidebar__panel {
    grid-template-columns: 1fr;
  }

  .pharmacy-page .detail-sidebar__section + .detail-sidebar__section {
    border-top: 1px solid #d9d4c9;
    border-left: 0;
  }
}

/* Altura táctil estable para todos los selectores, incluidos Safari y Chrome móvil. */
select:not([multiple]):not([size]) {
  box-sizing: border-box;
  min-height: 48px;
}

@media (max-width: 620px) {
  select:not([multiple]):not([size]) {
    display: block;
    height: 52px;
    min-height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 16px;
    line-height: normal;
  }
}
