.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.85);
  padding-top: 0;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) repeat(4, minmax(145px, 1fr));
  gap: 34px;
  padding: 48px 0 38px;
  border-bottom: 1px solid rgba(255,255,255,0.13);
}
.footer-sitemap-col:first-child {
  padding-right: 24px;
}
.footer-sitemap-col h5 {
  color: var(--gold-400);
  font: 700 0.86rem var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 15px;
}
.footer-sitemap-col:first-child h5 {
  color: var(--white);
  font: 700 1.25rem var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}
.footer-sitemap-col p {
  max-width: 330px;
  color: rgba(255,255,255,0.67);
  font-size: 0.84rem;
  line-height: 1.65;
}
.footer-sitemap-col ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-sitemap-col li, .footer-sitemap-col a, .footer-sitemap-col span {
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  line-height: 1.4;
}
.footer-sitemap-col a {
  display: inline-block;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-sitemap-col a:hover { color: var(--gold-400); transform: translateX(3px); }
.footer-sitemap-col:last-child a { overflow-wrap: anywhere; }

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: 30px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand svg { width: 30px; height: 30px; stroke: var(--gold-400); flex-shrink: 0; }
.footer-brand h4 { color: var(--white); font-size: 1.15rem; margin-bottom: 2px; }
.footer-brand p { font-size: 0.78rem; font-style: italic; color: rgba(255,255,255,0.6); }
.footer-brand-banner-img {
  width: 285px;
  height: auto;
  max-width: none;
  filter: brightness(1.25) saturate(1.2) contrast(1.08) drop-shadow(0 0 14px rgba(212,162,79,0.35));
}
@media (max-width: 1080px) {
  .footer-brand-banner-img { width: 260px; }
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
}
.footer-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream-050);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 0 0 2px rgba(212,162,79,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer-icon-badge svg { width: 19px; height: 19px; stroke: var(--gold-600); stroke-width: 2; }
.footer-icon-img { width: 42px; height: auto; }
.footer-contact-item strong { display: block; color: var(--white); font-weight: 600; margin-bottom: 2px; }
.footer-contact-item a, .footer-contact-item span { color: rgba(255,255,255,0.75); }

.footer-socials {
  display: flex;
  gap: 10px;
  justify-self: end;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream-050);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 0 0 2px rgba(212,162,79,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-600);
  transition: transform 0.15s ease;
}
.footer-socials a:hover { transform: translateY(-2px); background: var(--gold-500); color: var(--white); box-shadow: 0 3px 10px rgba(0,0,0,0.35), 0 0 0 2px var(--gold-500); }
.footer-socials svg { width: 18px; height: 18px; stroke-width: 2; }
.footer-socials a[href="#"] { display: none; }
.footer-socials:not(:has(a[href]:not([href="#"]))) { display: none; }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-2) 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}

.footer-bottom a { color: rgba(255,255,255,0.75); }
.footer-bottom a:hover { color: var(--gold-400); }
.footer-legal { display: flex; gap: 12px; }

/* Mobile sticky call/whatsapp bar per brief */
.mobile-action-bar {
  display: none;
}
@media (max-width: 720px) {
  .mobile-action-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    visibility: hidden;
  }
  .mobile-action-bar.is-ready { visibility: visible; }
  .mobile-action-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 8px 2px 7px;
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 0.67rem;
    line-height: 1;
    color: rgba(255,255,255,0.8);
    background: var(--green-900);
    border-top: 2px solid transparent;
  }
  .mobile-action-bar a svg { width: 19px; height: 19px; stroke-width: 2; }
  .mobile-action-bar a:hover,
  .mobile-action-bar a.active { color: var(--gold-400); border-top-color: var(--gold-400); background: var(--green-800); }
  body { padding-bottom: 56px; }
}

/* Decorative corner ornaments (fixed page frame) — desktop only, hidden on small screens.
   This ornament (gold/cream mandala with its own transparency fade) reads clearly straight
   on the cream page background, no synthetic backing needed. */
.corner-ornament-wrap {
  position: fixed;
  top: 59px;
  width: 170px;
  height: 122px;
  pointer-events: none;
  z-index: 95;
  overflow: hidden;
}
.corner-ornament-wrap.tl { left: 0; }
.corner-ornament-wrap.tr { right: 0; }
.corner-ornament-wrap img {
  position: absolute;
  top: 0;
  width: 170px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.corner-ornament-wrap.tl img { left: 0; }
.corner-ornament-wrap.tr img { right: 0; transform: scaleX(-1); }

/* Site-wide quick contact button. */
.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 190;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: #25d366;
  border: 2px solid rgba(255,255,255,0.92);
  box-shadow: 0 7px 20px rgba(20,94,50,0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.floating-whatsapp:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(20,94,50,0.42);
}
.floating-whatsapp:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
}
.floating-whatsapp svg { width: 27px; height: 27px; }

/* The right corner carries the clinic identity instead of a second ornament. */
@media (max-width: 1100px) {
  .corner-ornament-wrap { display: none; }
}

@media (max-width: 720px) {
  .floating-whatsapp {
    right: 14px;
    bottom: 68px;
    width: 46px;
    height: 46px;
  }
  .floating-whatsapp svg { width: 24px; height: 24px; }
}

@media (max-width: 1080px) {
  .footer-sitemap { grid-template-columns: 1.5fr repeat(2, 1fr); }
  .footer-sitemap-col:first-child { grid-row: span 2; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-socials { justify-self: start; grid-column: span 2; }
}
@media (max-width: 760px) {
  .footer-sitemap { grid-template-columns: 1fr 1fr; gap: 28px 22px; padding: 38px 0 30px; }
  .footer-sitemap-col:first-child { grid-column: 1 / -1; grid-row: auto; padding-right: 0; }
}
@media (max-width: 560px) {
  .footer-sitemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 26px 0 22px;
  }
  .footer-sitemap-col {
    padding: 15px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.035);
  }
  .footer-sitemap-col:first-child,
  .footer-sitemap-col:last-child {
    grid-column: 1 / -1;
  }
  .footer-sitemap-col:first-child { padding-right: 14px; }
  .footer-sitemap-col h5 { font-size: 0.72rem; margin-bottom: 10px; }
  .footer-sitemap-col:first-child h5 { font-size: 1.05rem; }
  .footer-sitemap-col p { font-size: 0.76rem; line-height: 1.5; }
  .footer-sitemap-col ul { gap: 7px; }
  .footer-sitemap-col li,
  .footer-sitemap-col a,
  .footer-sitemap-col span { font-size: 0.72rem; line-height: 1.3; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-socials { grid-column: auto; }
  .footer-brand-banner-img { width: min(300px, 100%); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Corner emblem + compact contact icons + mobile footer accordion
   ========================================================= */

/* Brand emblem nested into the top-right corner flourish. */
.corner-ornament-wrap.tr::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 26px;
  width: clamp(44px, 3.6vw, 58px);
  height: clamp(44px, 3.6vw, 58px);
  border-radius: 50%;
  background-color: var(--cream-050);
  background-image: url('../assets/logo.png');
  background-size: cover;
  background-position: center;
  border: 2px solid var(--gold-500);
  box-shadow: 0 5px 16px rgba(22, 59, 41, 0.28);
}

/* Contact + social icons: smaller, and scaled to the viewport. */
.footer-icon-badge {
  width: clamp(30px, 2.6vw, 36px);
  height: clamp(30px, 2.6vw, 36px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1.5px rgba(212,162,79,0.55);
}
.footer-icon-badge svg { width: clamp(14px, 1.2vw, 16px); height: clamp(14px, 1.2vw, 16px); }
.footer-icon-img { width: clamp(30px, 2.6vw, 36px); }

.footer-socials { gap: 8px; }
.footer-socials a {
  width: clamp(30px, 2.6vw, 34px);
  height: clamp(30px, 2.6vw, 34px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1.5px rgba(212,162,79,0.55);
}
.footer-socials svg { width: clamp(14px, 1.2vw, 16px); height: clamp(14px, 1.2vw, 16px); }
.footer-socials a:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1.5px var(--gold-500);
}

/* Mobile: collapse the long link columns into tidy accordion rows so the
   footer reads as a short list instead of a wall of links. */
@media (max-width: 640px) {
  .footer-sitemap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 24px 0 18px;
  }
  .footer-sitemap-col {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .footer-sitemap-col:first-child,
  .footer-sitemap-col:last-child { grid-column: auto; }

  .footer-sitemap-col:first-child {
    padding-bottom: 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .footer-sitemap-col.is-accordion {
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .footer-sitemap-col.is-accordion h5 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 14px 2px;
    cursor: pointer;
    user-select: none;
    font-size: 0.74rem;
  }
  .footer-sitemap-col.is-accordion h5::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.6px solid var(--gold-400);
    border-bottom: 1.6px solid var(--gold-400);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
  .footer-sitemap-col.is-accordion.is-open h5::after {
    transform: rotate(-135deg) translate(-2px, -2px);
  }
  .footer-sitemap-col.is-accordion h5:focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 2px;
  }
  .footer-sitemap-col.is-accordion ul {
    max-height: 0;
    overflow: hidden;
    gap: 0;
    transition: max-height 0.28s ease;
  }
  .footer-sitemap-col.is-accordion.is-open ul {
    max-height: 340px;
    padding-bottom: 10px;
  }
  .footer-sitemap-col.is-accordion li a {
    display: block;
    padding: 7px 2px;
    font-size: 0.78rem;
  }

  .footer-sitemap-col:last-child { padding: 16px 2px 4px; }
  .footer-sitemap-col:last-child ul { gap: 10px; }
  .footer-sitemap-col:last-child li,
  .footer-sitemap-col:last-child a,
  .footer-sitemap-col:last-child span { font-size: 0.8rem; }
}


/* Staff entrance to TCOS. Muted on purpose - a patient who notices it should
   feel it is not addressed to them. */
.footer-legal .clinic-login {
  opacity: .72;
}
.footer-legal .clinic-login:hover { opacity: 1; }
