/* ============================================================
   Farmàcia Martínez Solé — styles.css
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Brand colours */
  --color-navy:       #1B2A6B;   /* Primary — headers, nav, CTAs */
  --color-navy-dark:  #111D4E;   /* Hover state for navy */
  --color-lavender:   #8A8FC8;   /* Accent — decorative, dividers */
  --color-green:      #4CAF7D;   /* Pharmacy cross, secondary accent */
  --color-green-dark: #3A9468;   /* Hover state for green */

  /* Neutrals */
  --color-white:      #FFFFFF;
  --color-bg-light:   #F5F5F8;   /* Alternate section background */
  --color-bg-card:    #FFFFFF;
  --color-text:       #2C2C2C;   /* Body text */
  --color-text-muted: #6B6B7B;   /* Captions, secondary text */
  --color-border:     #E2E2EC;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Font sizes (fluid via clamp) */
  --text-xs:   clamp(0.70rem, 1.5vw, 0.75rem);
  --text-sm:   clamp(0.80rem, 1.8vw, 0.875rem);
  --text-base: clamp(0.90rem, 2vw,   1rem);
  --text-lg:   clamp(1rem,    2.2vw, 1.125rem);
  --text-xl:   clamp(1.125rem,2.5vw, 1.25rem);
  --text-2xl:  clamp(1.25rem, 3vw,   1.5rem);
  --text-3xl:  clamp(1.5rem,  3.5vw, 2rem);
  --text-4xl:  clamp(1.75rem, 4.5vw, 2.5rem);
  --text-5xl:  clamp(2rem,    5.5vw, 3.25rem);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container-max: 1160px;
  --container-pad: clamp(1rem, 5vw, 2rem);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(27,42,107,0.07);
  --shadow-md: 0 4px 16px rgba(27,42,107,0.10);
  --shadow-lg: 0 8px 32px rgba(27,42,107,0.14);

  /* Transitions */
  --transition: 0.22s ease;
}

/* ------------------------------------------------------------
   2. Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ------------------------------------------------------------
   3. Utility Classes
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-xl);
}

.section--alt {
  background: var(--color-bg-light);
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lavender);
  display: block;
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--space-lg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header .section-subtitle {
  margin-inline: auto;
}

.text-center { text-align: center; }
.text-navy   { color: var(--color-navy); }
.text-green  { color: var(--color-green); }
.text-muted  { color: var(--color-text-muted); }

/* Visually hidden (accessibility) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Divider ornament */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-block: var(--space-lg);
  color: var(--color-lavender);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-navy);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--color-navy-dark);
  box-shadow: var(--shadow-lg);
}

.btn--whatsapp {
  background: #25D366;
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}
.btn--whatsapp:hover {
  background: #1ebe5a;
  box-shadow: 0 6px 22px rgba(37,211,102,0.45);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-white);
}

.btn--green {
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.btn--green:hover {
  background: var(--color-green-dark);
  box-shadow: var(--shadow-md);
}

/* Button icon */
.btn svg {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   5. Navigation
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 80px;
  gap: var(--space-md);
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo img {
  height: 64px;
  width: auto;
  mix-blend-mode: multiply;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-inline: auto;
}

.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-navy);
  border-bottom-color: var(--color-navy);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__overlay-cta { display: none; }

.nav__lang-mobile {
  display: none; /* shown only on mobile — no lang-switcher class, no override conflict */
  position: relative;
  flex-shrink: 0;
}

.lang-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 7px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-navy);
  cursor: pointer;
  transition: border-color var(--transition);
}

.lang-mobile-toggle:hover { border-color: var(--color-navy); }

.lang-mobile-toggle svg {
  transition: transform 0.2s ease;
  color: var(--color-text-muted);
}

.lang-mobile-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.lang-mobile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
  min-width: 54px;
}

.lang-mobile-menu[hidden] { display: none; }

.lang-mobile-menu .lang-btn {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-radius: 0;
}

.lang-mobile-menu .lang-btn + .lang-btn::before { display: none; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav */
@media (max-width: 820px) {
  /* Compact nav bar — logo left, hamburger right */
  .nav__inner { height: 60px; justify-content: space-between; }
  .nav__logo img { height: 40px; }

  /* Full-screen overlay — Apple style */
  .nav__links {
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    background: #F5F5F7;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: var(--space-lg) var(--container-pad);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    pointer-events: none;
    overflow-y: auto;
  }

  .nav__links.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links a {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-navy);
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: none;
    text-align: left;
  }

  .nav__links a:hover,
  .nav__links a.active { color: var(--color-lavender); }

  /* Hide the in-menu lang switcher on mobile — it's now in the top bar */
  .nav__links .lang-switcher { display: none; }

  /* Show lang dropdown in the top bar on mobile — pushed right, next to hamburger */
  .nav__lang-mobile { display: flex; align-items: center; margin-left: auto; }

  /* Hide overlay CTAs — menu stays clean */
  .nav__overlay-cta { display: none; }

  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
}

/* Hamburger open state */
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Offset for fixed nav */
body { padding-top: 80px; }
@media (max-width: 820px) { body { padding-top: 60px; } }

/* Scroll offset so fixed nav doesn't overlap section headings */
section[id], .section[id] { scroll-margin-top: 94px; }
@media (max-width: 820px) { section[id], .section[id] { scroll-margin-top: 72px; } }

/* ------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: clamp(480px, 75vh, 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-navy-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  object-position: center 60%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(17,29,78,0.88) 0%,
    rgba(17,29,78,0.60) 50%,
    rgba(17,29,78,0.30) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding-block: var(--space-xl);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.hero__title em {
  font-style: italic;
  color: #C8CAEC; /* soft lavender on dark bg */
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ------------------------------------------------------------
   7. Icon Strip (4 highlights)
   ------------------------------------------------------------ */
.strip {
  background: var(--color-navy);
  padding-block: var(--space-lg);
}

.strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  align-items: start;
}

.strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  color: var(--color-white);
}

.strip__icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xs);
}

.strip__icon svg {
  width: 26px;
  height: 26px;
  color: var(--color-lavender);
}

.strip__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
}

.strip__desc {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
}

/* Instagram link inside strip — inherits strip__item layout without colour */
.strip__item-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 640px) {
  .strip__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------
   8. Services Grid
   ------------------------------------------------------------ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-lavender);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: #EEEEF8;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-navy);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   9. Dermocosmetics Feature Section
   ------------------------------------------------------------ */
.dermo {
  background: linear-gradient(135deg, var(--color-navy) 0%, #263580 100%);
  color: var(--color-white);
}

.dermo__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.dermo .section-label { color: var(--color-lavender); }

.dermo .section-title { color: var(--color-white); }

.dermo__text {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

/* Brands label */
.dermo__brands-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.50);
  margin-bottom: var(--space-xs);
}

.dermo__brands {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.brand-pill {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

.dermo__image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}

.dermo__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .dermo__inner {
    grid-template-columns: 1fr;
  }
  .dermo__image-wrap {
    order: -1;
  }
}

/* ------------------------------------------------------------
   10. Hours Section
   ------------------------------------------------------------ */
.hours__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 760px;
  margin-inline: auto;
}

.hours-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.hours-card--guardia {
  border-color: var(--color-green);
  background: #F0FBF5;
}

.hours-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hours-card__title svg {
  width: 20px;
  height: 20px;
  color: var(--color-green);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--color-border);
}

.hours-table tr:last-child {
  border-bottom: none;
}

.hours-table td {
  padding: 0.45rem 0;
  font-size: var(--text-sm);
}

.hours-table td:first-child {
  color: var(--color-text-muted);
  font-weight: 500;
  padding-right: var(--space-sm);
  width: 55%;
}

.hours-table td:last-child {
  font-weight: 600;
  color: var(--color-navy);
}

.hours-note {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 560px) {
  .hours__grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   11. Guardia Schedule
   ------------------------------------------------------------ */
.guardia__intro {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.guardia__intro p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Current/next guardia highlight */
.guardia__highlight {
  position: relative;
  overflow: hidden;
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-md);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Shimmer beam — always present, more visible on active */
.guardia__highlight::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -80%;
  width: 40%;
  height: 220%;
  background: linear-gradient(
    105deg,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.13) 45%,
    rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0.13) 55%,
    rgba(255,255,255,0)    100%
  );
  transform: skewX(-15deg);
  animation: guardiaShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes guardiaShimmer {
  0%        { left: -80%; }
  55%, 100% { left: 140%; }
}

/* Active state — on duty today */
.guardia__highlight--on-duty {
  background: linear-gradient(135deg, #3DA870 0%, var(--color-green) 55%, #3A9468 100%);
  box-shadow: 0 6px 28px rgba(76,175,125,0.45);
}

.guardia__highlight--on-duty::after {
  background: linear-gradient(
    105deg,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.18) 45%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0.18) 55%,
    rgba(255,255,255,0)    100%
  );
  animation-duration: 2.8s;
}

.guardia__highlight--on-duty .guardia__highlight-text span {
  color: rgba(255,255,255,0.92);
}

.guardia__highlight-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.guardia__highlight-text strong {
  display: block;
  font-size: var(--text-lg);
  margin-bottom: 0.2rem;
}

.guardia__highlight-text span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

/* Table */
.guardia__table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.guardia__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
  min-width: 700px;
}

.guardia__table thead tr {
  border-bottom: 3px solid var(--color-lavender);
}

.guardia__table th {
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.guardia__table th:first-child {
  text-align: center;
  width: 32px;
  opacity: 0.5;
  font-weight: 400;
  letter-spacing: 0;
}

.guardia__table td {
  padding: 0.55rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid rgba(0,0,0,0.05);
  font-size: 0.68rem;
  font-weight: 500;
  height: 36px;
}

/* Subtle stripe on odd rows */
.guardia__table tbody tr:nth-child(odd) td {
  background-color: rgba(27,42,107,0.025);
}

/* Override stripe for coloured cells */
.guardia__table tbody tr:nth-child(odd) td.guardia-bernal,
.guardia__table tbody tr:nth-child(odd) td.guardia-gomez,
.guardia__table tbody tr:nth-child(odd) td.guardia-martinez {
  background-color: unset;
}

.guardia__table td:first-child {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-light) !important;
  border-right: 2px solid var(--color-border);
}

.guardia__table tr:last-child td {
  border-bottom: none;
}

.guardia__table td:last-child {
  border-right: none;
}

/* Row hover */
.guardia__table tbody tr:hover td {
  background-color: rgba(138,143,200,0.08);
}
.guardia__table tbody tr:hover td.guardia-bernal,
.guardia__table tbody tr:hover td.guardia-gomez,
.guardia__table tbody tr:hover td.guardia-martinez {
  background-color: unset;
}

/* Colour-coded farmacies */
.guardia-bernal,
.guardia-gomez {
  background: #EEEEF5 !important;
  color: #8888A8;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 4px;
}

.guardia-martinez {
  background: var(--color-green) !important;
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 6px;
  font-size: 0.68rem;
  box-shadow: 0 2px 8px rgba(76,175,125,0.40);
  letter-spacing: 0.02em;
}

/* Today marker — navy outline regardless of pharmacy */
.guardia__table td.today {
  outline: 3px solid var(--color-navy);
  outline-offset: -2px;
  border-radius: 4px;
  background-color: rgba(27,42,107,0.10);
}

/* Legend */
.guardia__legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}

.guardia__legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
}

.guardia__legend-pill--us {
  background: var(--color-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(76,175,125,0.30);
}

.guardia__legend-pill--other {
  background: #EEEEF5;
  color: #8888A8;
  border: 1px solid #DDDDED;
}

/* ── Mobile list view (shown ≤820px, table hidden) ── */
.guardia__mobile-list { display: none; }

@media (max-width: 820px) {
  .guardia__table-wrap  { display: none; }
  .guardia__mobile-list { display: block; }
}

.guardia-m-month {
  margin-bottom: var(--space-md);
}

.guardia-m-month-header {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-lavender);
}

.guardia-m-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: 0.3rem;
  background: var(--color-bg-light);
}

.guardia-m-item--martinez {
  background: #ECF8F2;
  border-left: 3px solid var(--color-green);
}

.guardia-m-item--past { opacity: 0.45; }

.guardia-m-item--today {
  outline: 2px solid var(--color-navy);
  outline-offset: -1px;
}

.guardia-m-item__weekday {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  min-width: 28px;
  flex-shrink: 0;
}

.guardia-m-item--martinez .guardia-m-item__weekday {
  color: var(--color-green-dark);
}

.guardia-m-item__date {
  flex: 1;
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
}

.guardia-m-item__pharmacy {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.guardia-m-item--martinez .guardia-m-item__pharmacy {
  background: var(--color-green);
  color: #fff;
}

.guardia-m-item:not(.guardia-m-item--martinez) .guardia-m-item__pharmacy {
  background: #EEEEF5;
  color: #8888A8;
}

/* Contact card — Martínez */
.guardia__contact-us {
  max-width: 520px;
  margin-inline: auto;
}

.guardia-contact-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--text-sm);
}

.guardia-contact-card--martinez {
  position: relative;
  overflow: hidden;
  border: none;
  background: var(--color-navy);
  box-shadow: 0 6px 24px rgba(27,42,107,0.25);
  border-radius: var(--radius-md);
}

/* Shimmer — same pattern as guardia highlight */
.guardia-contact-card--martinez::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -80%;
  width: 40%;
  height: 220%;
  background: linear-gradient(
    105deg,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.08) 55%,
    rgba(255,255,255,0)    100%
  );
  transform: skewX(-15deg);
  animation: guardiaShimmer 5s ease-in-out infinite;
  pointer-events: none;
}

.guardia-contact-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: 0.35rem;
}

.guardia-contact-card__detail {
  color: rgba(255,255,255,0.68);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.guardia-contact-card__phones {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guardia-contact-card__phone {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
}

.guardia-contact-card__phone:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

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

/* ------------------------------------------------------------
   12. Map + Contact
   ------------------------------------------------------------ */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact__map {
  border-radius: var(--radius-md);
  overflow: visible;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: var(--radius-md);
}

.contact__map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.contact__map-link:hover {
  color: var(--color-lavender);
}

.contact__info-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-navy);
  margin-bottom: var(--space-md);
}

.contact__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact__item-icon {
  width: 40px;
  height: 40px;
  background: #EEEEF8;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact__item-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-navy);
}

.contact__item-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.1rem;
}

.contact__item-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.contact__item-value a {
  color: var(--color-navy);
  transition: color var(--transition);
}

.contact__item-value a:hover {
  color: var(--color-lavender);
}

.contact__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}


@media (max-width: 768px) {
  .contact__inner {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   13. Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,0.75);
  padding-block: var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: var(--space-lg);
}

.footer__logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: rgba(255,255,255,0.90);
  margin-bottom: var(--space-xs);
}

.footer__tagline {
  font-style: italic;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-sm);
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.footer__social a:hover {
  background: rgba(255,255,255,0.18);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.80);
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.footer__col-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__col-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

.footer__col-links a:hover {
  color: var(--color-white);
}

.footer__col-text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.40);
}

.footer__bottom a {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}

.footer__bottom a:hover {
  color: var(--color-white);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   14. Floating Buttons Stack (WhatsApp + Instagram)
   ------------------------------------------------------------ */
.float-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.whatsapp-float,
.instagram-float {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.whatsapp-float {
  background: #25D366;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
}
.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}
.whatsapp-float::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.35;
  animation: wa-pulse 2.5s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: 0.35; }
  60%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.instagram-float {
  background: radial-gradient(circle at 30% 110%, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 20px rgba(220,39,67,0.35);
}
.instagram-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(220,39,67,0.45);
}

.whatsapp-float svg,
.instagram-float svg {
  width: 28px;
  height: 28px;
  color: var(--color-white);
}

/* ------------------------------------------------------------
   15. Language Switcher (inline text codes)
   ------------------------------------------------------------ */
.lang-switcher {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
  position: relative;
}

.lang-btn + .lang-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.75em;
  background: var(--color-border);
}

.lang-btn:hover {
  color: var(--color-navy);
}

.lang-btn.active {
  color: var(--color-navy);
  font-weight: 700;
}

@media (max-width: 820px) {
  .lang-switcher {
    margin-top: var(--space-sm);
    align-self: flex-start;
  }
}

/* ------------------------------------------------------------
   16. On-duty notification popup
   ------------------------------------------------------------ */
.guardia-notice {
  position: fixed;
  bottom: 110px;
  left: 24px;
  z-index: 997;
  background: linear-gradient(135deg, #3DA870 0%, var(--color-green) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 2.5rem 1rem 1.25rem;
  box-shadow: 0 6px 28px rgba(76,175,125,0.5);
  max-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transform: translateY(200%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  pointer-events: none;
}
.guardia-notice.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.guardia-notice__icon { font-size: 1.75rem; flex-shrink: 0; line-height: 1; }
.guardia-notice__body { display: flex; flex-direction: column; gap: 0.2rem; }
.guardia-notice__body strong {
  font-size: var(--text-sm);
  font-weight: 700;
  display: block;
}
.guardia-notice__body span {
  font-size: var(--text-xs);
  opacity: 0.88;
  display: block;
  line-height: 1.4;
}
.guardia-notice__phone {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  margin-top: 0.3rem;
  white-space: nowrap;
}
.guardia-notice__cta {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guardia-notice__close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
  padding: 0.1rem 0.25rem;
}
.guardia-notice__close:hover { opacity: 1; }

@media (max-width: 820px) {
  .guardia-notice {
    bottom: 16px;
    left: 12px;
    right: auto;
    max-width: calc(100% - 104px); /* leaves room for float buttons on the right */
    border-radius: var(--radius-md);
  }
}

/* ------------------------------------------------------------
   17. Responsive Tweaks
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ------------------------------------------------------------
   17. Print
   ------------------------------------------------------------ */
@media print {
  .nav, .whatsapp-float, .hero { display: none; }
  body { padding-top: 0; }
}
