/* EndoCare Dental Clinic — site styles (loads after Bootstrap 5.3) */
:root {
  --ec-orange: #e77d13;
  --ec-orange-deep: #c9680a;
  --ec-blue: #114a81;
  --ec-navy: #0d1b2a;
  --ec-mist: #eef4f9;
  --ec-line: #d9e3ec;
  --ec-ink: #1c2733;
  --ec-muted: #5b6876;

  --bs-body-font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ec-ink);
  --bs-body-bg: #ffffff;
  --bs-body-line-height: 1.65;
  --bs-link-color-rgb: 17, 74, 129;
  --bs-link-hover-color-rgb: 13, 27, 42;
  --bs-border-color: var(--ec-line);
  --bs-border-radius: 0.5rem;
  --bs-border-radius-lg: 0.875rem;
}

html { scroll-padding-top: 6rem; }
body { font-size: 1.0625rem; }

h1, h2, h3, h4, .h1, .h2, .h3, .display-font {
  font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ec-navy);
}
h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3, .h3 { font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; }
.lead { font-size: 1.1875rem; color: var(--ec-muted); font-weight: 400; }
.text-muted-ec { color: var(--ec-muted); }
.measure { max-width: 62ch; }

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  overflow: hidden;
}
.icon-fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.brand-svg { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; }

:focus-visible { outline: 3px solid var(--ec-orange); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: 0.7rem; }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: 0.85rem; --bs-btn-font-size: 1.0625rem; }
.btn-sm { --bs-btn-padding-x: 0.85rem; --bs-btn-padding-y: 0.45rem; }
.btn-brand {
  --bs-btn-color: var(--ec-navy); --bs-btn-bg: var(--ec-orange); --bs-btn-border-color: var(--ec-orange);
  --bs-btn-hover-color: var(--ec-navy); --bs-btn-hover-bg: #f29030; --bs-btn-hover-border-color: #f29030;
  --bs-btn-active-color: var(--ec-navy); --bs-btn-active-bg: var(--ec-orange-deep); --bs-btn-active-border-color: var(--ec-orange-deep);
  --bs-btn-disabled-color: var(--ec-navy); --bs-btn-disabled-bg: #f1b57c; --bs-btn-disabled-border-color: #f1b57c;
}
.btn-blue {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ec-blue); --bs-btn-border-color: var(--ec-blue);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0c3a67; --bs-btn-hover-border-color: #0c3a67;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #0a3158; --bs-btn-active-border-color: #0a3158;
}
.btn-line {
  --bs-btn-color: var(--ec-blue); --bs-btn-bg: transparent; --bs-btn-border-color: var(--ec-blue);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ec-blue); --bs-btn-hover-border-color: var(--ec-blue);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ec-blue); --bs-btn-active-border-color: var(--ec-blue);
}
.btn-line-light {
  --bs-btn-color: #fff; --bs-btn-bg: transparent; --bs-btn-border-color: rgba(255,255,255,.6);
  --bs-btn-hover-color: var(--ec-navy); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff;
  --bs-btn-active-color: var(--ec-navy); --bs-btn-active-bg: #fff; --bs-btn-active-border-color: #fff;
}
.btn-whatsapp {
  --bs-btn-color: #fff; --bs-btn-bg: #128c4a; --bs-btn-border-color: #128c4a;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0e733d; --bs-btn-hover-border-color: #0e733d;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #0e733d; --bs-btn-active-border-color: #0e733d;
}
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.topbar { background: var(--ec-navy); color: #c8d3de; font-size: 0.9rem; padding: 0.45rem 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .material-symbols-rounded { font-size: 1.1rem; color: var(--ec-orange); margin-right: 0.3rem; }
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--ec-line);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  min-height: 76px;
}
.site-nav .nav-bar-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 68px;
}
.site-nav .navbar-brand { margin-right: 0.75rem; flex-shrink: 0; }
.site-nav .navbar-brand img {
  height: 84px;
  width: 148px;
  object-fit: contain;
  display: block;
}
.site-nav .navbar-collapse { align-items: center; flex-grow: 1; }
.site-nav .navbar-nav {
  flex-wrap: nowrap;
  justify-content: center;
  column-gap: 0.05rem;
  flex: 1 1 auto;
}
.site-nav .nav-link {
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ec-ink);
  padding: 0.5rem 0.5rem !important;
  border-radius: 0.45rem;
  line-height: 1.2;
}
.site-nav .nav-link:hover { color: var(--ec-blue); background: var(--ec-mist); }
.site-nav .nav-link.active {
  color: var(--ec-blue);
  box-shadow: inset 0 -3px 0 var(--ec-orange);
  border-radius: 0;
  background: transparent;
}
.site-nav .nav-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding: 0.5rem 0;
}
.site-nav .nav-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  padding: 0 0.9rem !important;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}
.site-nav .nav-btn-call { min-width: 7.5rem; }
.site-nav .nav-btn-book { min-width: 11.5rem; }
.site-nav .nav-btn-icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.site-nav .nav-btn-icon .material-symbols-rounded {
  font-size: 1.15rem !important;
  width: 1.15rem !important;
  height: 1.15rem !important;
  color: inherit !important;
}
.site-nav .nav-btn-label { line-height: 1; }
@media (max-width: 1199.98px) {
  .site-nav .nav-bar-inner { flex-wrap: wrap; }
  .site-nav .nav-cta {
    width: 100%;
    margin-left: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
  }
  .site-nav .nav-btn { flex: 1 1 auto; }
}
@media (min-width: 1200px) {
  .site-nav .nav-cta { padding: 0; }
  .site-nav .nav-link { font-size: 0.9rem; padding: 0.5rem 0.6rem !important; }
}
@media (min-width: 1400px) {
  .site-nav .nav-link { font-size: 0.9375rem; padding: 0.5rem 0.7rem !important; }
}
.site-nav .dropdown-menu {
  border: 1px solid var(--ec-line);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 16px 40px rgba(13,27,42,.12);
  min-width: 16rem;
}
.site-nav .dropdown-item {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  white-space: normal;
}
.site-nav .dropdown-item.active,
.site-nav .dropdown-item:active { background: var(--ec-mist); color: var(--ec-blue); }
.site-nav .dropdown-menu-services { max-height: min(70vh, 28rem); overflow-y: auto; }
.site-nav .dropdown-menu-treatments {
  width: min(92vw, 58rem);
  max-width: 58rem;
  padding: 0.85rem 1rem 1rem;
  max-height: min(80vh, 36rem);
  overflow-y: auto;
}
.site-nav .dropdown-item-all {
  font-weight: 700;
  color: var(--ec-blue);
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--ec-line);
  border-radius: 0.5rem 0.5rem 0 0;
  padding-bottom: 0.75rem;
}
.treatment-mega {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding-top: 0.35rem;
}
.treatment-mega-col { min-width: 0; }
.treatment-mega-heading {
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ec-orange);
  line-height: 1.35;
}
.treatment-mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.treatment-mega-col .dropdown-item {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
}
@media (max-width: 1199.98px) {
  .site-nav .dropdown-menu-treatments {
    width: 100%;
    max-width: none;
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: 0;
    padding: 0.25rem 0 0.5rem;
    max-height: none;
  }
  .treatment-mega {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .treatment-mega-heading {
    background: var(--ec-mist);
    border-radius: 0.4rem;
    margin-top: 0.25rem;
  }
}
@media (min-width: 1200px) {
  .site-nav .nav-item.dropdown:hover > .dropdown-menu,
  .site-nav .nav-item.dropdown:focus-within > .dropdown-menu { display: block; margin-top: 0; }
  .site-nav .dropdown-menu-treatments {
    left: 50%;
    right: auto;
    transform: translateX(-40%);
  }
}
.footer-treatment-dropdowns { display: grid; gap: 0.35rem; }
.footer-drop {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 0.5rem;
  background: rgba(0,0,0,.12);
  overflow: hidden;
}
.footer-drop summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  line-height: 1.35;
}
.footer-drop summary::-webkit-details-marker { display: none; }
.footer-drop summary::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  font-size: 1.15rem;
  color: var(--ec-orange);
  transition: transform .2s ease;
}
.footer-drop[open] summary::after { transform: rotate(180deg); }
.footer-drop ul {
  padding: 0 0.75rem 0.65rem !important;
  gap: 0.35rem !important;
}
.footer-drop a { font-size: 0.92rem; }
.footer-blog-list { gap: 0.85rem !important; }
.footer-blog-list li { display: grid; gap: 0.15rem; }
.footer-blog-list a {
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}
.footer-blog-date {
  font-size: 0.8rem;
  color: #9db0c3;
}
.footer-blog-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: var(--ec-orange) !important;
}
.footer-blog-more .material-symbols-rounded { font-size: 1.05rem; }
.treatment-group .section-head h2 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  margin-bottom: 0;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--ec-orange);
  display: inline-block;
}
.navbar-toggler {
  border: 1px solid var(--ec-line);
  padding: 0.4rem 0.5rem;
  color: var(--ec-navy);
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.navbar-toggler .material-symbols-rounded {
  font-size: 1.75rem !important;
  width: 1.75rem !important;
  height: 1.75rem !important;
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-tint { background: var(--ec-mist); }
.section-navy { background: var(--ec-navy); color: #c8d3de; }
.section-navy h2, .section-navy h3 { color: #fff; }
@media (min-width: 992px) { .section { padding: 6rem 0; } }
.section-head { margin-bottom: 2.5rem; }
.section-head p { color: var(--ec-muted); margin: 0.75rem 0 0; max-width: 60ch; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ec-navy); color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media .carousel-inner, .hero-media .carousel-item { height: 100%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(13,27,42,.94) 0%, rgba(13,27,42,.82) 45%, rgba(13,27,42,.55) 100%);
}
.hero > .container { position: relative; z-index: 2; padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 992px) { .hero > .container { padding-top: 5.5rem; padding-bottom: 5.5rem; } }
.hero h1 { color: #fff; }
.hero .lead { color: #d6dfe8; max-width: 52ch; }
.hero-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.6rem; }
.hero-points li { display: flex; gap: 0.6rem; align-items: flex-start; color: #e9eef3; }
.hero-points .material-symbols-rounded { color: var(--ec-orange); margin-top: 0.15rem; }

/* ---------- Booking card ---------- */
.book-card { background: #fff; color: var(--ec-ink); border-radius: 1rem; padding: 1.75rem; box-shadow: 0 24px 60px rgba(13,27,42,.28); border-top: 5px solid var(--ec-orange); }
.book-card.flat { box-shadow: none; border: 1px solid var(--ec-line); border-top: 5px solid var(--ec-orange); }
.book-card h2 { font-size: 1.625rem; }
.form-label { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.35rem; }
.form-control, .form-select { padding: 0.7rem 0.9rem; border-color: #c5d1dc; }
.form-control:focus, .form-select:focus { border-color: var(--ec-blue); box-shadow: 0 0 0 0.2rem rgba(17,74,129,.18); }
.form-note { font-size: 0.875rem; color: var(--ec-muted); display: flex; gap: 0.4rem; align-items: flex-start; margin: 0.9rem 0 0; }
.form-note .material-symbols-rounded { font-size: 1.1rem; margin-top: 0.1rem; }

/* ---------- Facts strip ---------- */
.facts { border-bottom: 1px solid var(--ec-line); }
.fact { padding: 1.5rem 0; display: flex; gap: 0.85rem; align-items: center; }
.fact .material-symbols-rounded { font-size: 2rem; width: 2rem; height: 2rem; color: var(--ec-blue); }
.fact strong { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.375rem; line-height: 1.1; color: var(--ec-navy); }
.fact span.small { color: var(--ec-muted); }

/* ---------- Lens (signature motif: the microscope's field of view) ---------- */
.lens-wrap { padding: 2.25rem; max-width: 520px; margin-inline: auto; }
.lens { position: relative; aspect-ratio: 1; border-radius: 50%; }
.lens img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.lens::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(17,74,129,.4); }
.lens::after {
  content: ""; position: absolute; inset: -32px; border-radius: 50%;
  background: repeating-conic-gradient(var(--ec-blue) 0 0.5deg, transparent 0.5deg 6deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  opacity: .55;
}
.lens-tag {
  position: absolute; right: -0.5rem; bottom: 9%; z-index: 2;
  background: var(--ec-orange); color: var(--ec-navy); font-weight: 700; font-size: 0.9375rem;
  padding: 0.55rem 0.9rem; border-radius: 0.5rem; display: flex; align-items: center; gap: 0.4rem;
}

/* ---------- Check list / credentials ---------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list .material-symbols-rounded { color: var(--ec-blue); margin-top: 0.15rem; }

/* ---------- Service cards ---------- */
.service-card { background: #fff; border: 1px solid var(--ec-line); border-radius: 0.875rem; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.service-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--ec-mist); }
.service-card .body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.service-card h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.service-card h3 .material-symbols-rounded { color: var(--ec-orange-deep); font-size: 1.6rem; width: 1.6rem; height: 1.6rem; }
.service-card p { color: var(--ec-muted); margin: 0; font-size: 1rem; }
.service-card .actions { margin-top: auto; padding-top: 0.75rem; }
.service-card:target { outline: 3px solid var(--ec-orange); outline-offset: 3px; }

/* ---------- Reasons (why choose us) ---------- */
.reason { display: flex; gap: 1rem; align-items: flex-start; }
.reason-icon { width: 3rem; height: 3rem; border-radius: 0.75rem; background: var(--ec-blue); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.reason-icon .material-symbols-rounded { font-size: 1.6rem; width: 1.6rem; height: 1.6rem; }
.reason h3 { font-size: 1.1875rem; margin: 0 0 0.3rem; }
.reason p { margin: 0; color: var(--ec-muted); font-size: 1rem; }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.5rem; }
@media (min-width: 992px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.steps li { counter-increment: step; position: relative; padding-top: 3.75rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--ec-orange); color: var(--ec-navy); display: grid; place-items: center;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.25rem;
}
@media (min-width: 992px) {
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.375rem; left: 3.5rem; right: -1rem; border-top: 2px dashed rgba(255,255,255,.25); }
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin: 0; }

/* ---------- Before / after ---------- */
.ba-carousel { border-radius: 1rem; overflow: hidden; background: var(--ec-navy); }
.ba-carousel .carousel-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ba-carousel .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; border: 0; margin: 0 5px; }
.ba-carousel .carousel-control-prev, .ba-carousel .carousel-control-next { width: 3rem; height: 3rem; top: 50%; transform: translateY(-50%); background: rgba(13,27,42,.6); border-radius: 50%; margin: 0 0.75rem; opacity: 1; }

/* ---------- Gallery ---------- */
.gallery-item { display: block; border-radius: 0.75rem; overflow: hidden; position: relative; background: var(--ec-mist); border: 0; padding: 0; width: 100%; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .zoom { position: absolute; right: 0.6rem; bottom: 0.6rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(13,27,42,.7); color: #fff; display: grid; place-items: center; }
#lightbox .modal-content { background: transparent; border: 0; }
#lightbox img { max-height: 78vh; width: auto; max-width: 100%; margin: 0 auto; display: block; border-radius: 0.5rem; }
.lb-btn { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(13,27,42,.7); color: #fff; display: grid; place-items: center; }
.lb-btn:hover { background: var(--ec-orange); color: var(--ec-navy); border-color: var(--ec-orange); }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--ec-mist); padding: 1.75rem 0 1.75rem; border-bottom: 1px solid var(--ec-line); }
.page-head h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0.35rem 0 0; }
.page-head .lead { margin: 0.5rem 0 0; max-width: 60ch; font-size: 1.05rem; }
.breadcrumb { --bs-breadcrumb-divider: "/"; font-size: 0.9375rem; margin: 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Blog ---------- */
.topic-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { border: 1px solid #c5d1dc; background: #fff; color: var(--ec-ink); border-radius: 2rem; padding: 0.4rem 1rem; font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.chip:hover { border-color: var(--ec-blue); color: var(--ec-blue); }
.chip.active, .chip[aria-pressed="true"] { background: var(--ec-blue); border-color: var(--ec-blue); color: #fff; }
.post-card { background: #fff; border: 1px solid var(--ec-line); border-radius: 0.875rem; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.post-card .thumb { display: block; }
.post-card .thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--ec-mist); }
.post-card .body { padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post-card h2, .post-card h3, .h3 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.post-card h2 a, .post-card h3 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--ec-blue); text-decoration: underline; }
.post-card p { color: var(--ec-muted); margin: 0; font-size: 1rem; }
.post-card .link-arrow { margin-top: auto; padding-top: 0.5rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.9rem; color: var(--ec-muted); align-items: center; }
.post-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.post-meta .material-symbols-rounded { font-size: 1.05rem; }
.topic-tag { display: inline-block; background: var(--ec-mist); color: var(--ec-blue); font-weight: 600; font-size: 0.85rem; padding: 0.2rem 0.65rem; border-radius: 2rem; text-decoration: none; }
@media (min-width: 992px) {
  .post-card.featured { flex-direction: row; }
  .post-card.featured .thumb { flex: 0 0 52%; }
  .post-card.featured .thumb img { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .post-card.featured .body { padding: 2.25rem; justify-content: center; gap: 0.85rem; }
  .post-card.featured h2 { font-size: 2rem; line-height: 1.15; }
  .post-card.featured p { font-size: 1.0625rem; }
  .post-card.featured .link-arrow { margin-top: 0.5rem; }
}

.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1rem; display: block; background: var(--ec-mist); }
.article { font-size: 1.125rem; line-height: 1.75; max-width: 68ch; }
.article > p:first-child { font-size: 1.25rem; color: var(--ec-ink); }
.article h2 { font-size: 1.625rem; margin: 2.25rem 0 0.75rem; }
.article ul, .article ol { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.article li { margin-bottom: 0.4rem; }
.article .callout { background: var(--ec-mist); border-left: 4px solid var(--ec-orange); padding: 1rem 1.25rem; border-radius: 0 0.5rem 0.5rem 0; margin: 1.75rem 0; font-size: 1.0625rem; }
.article .disclaimer { font-size: 0.9375rem; color: var(--ec-muted); border-top: 1px solid var(--ec-line); padding-top: 1rem; margin-top: 2.5rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.post-nav a { display: block; border: 1px solid var(--ec-line); border-radius: 0.75rem; padding: 1rem 1.25rem; text-decoration: none; height: 100%; }
.post-nav a:hover { border-color: var(--ec-blue); }
.post-nav small { color: var(--ec-muted); display: flex; align-items: center; gap: 0.25rem; }
.post-nav strong { color: var(--ec-navy); font-family: "Bricolage Grotesque", sans-serif; }
.side-card { border: 1px solid var(--ec-line); border-radius: 0.875rem; padding: 1.5rem; background: #fff; }
.side-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.side-card.cta { background: var(--ec-navy); border-color: var(--ec-navy); color: #c8d3de; }
.side-card.cta h2 { color: #fff; }
.clinic-address-card { height: auto; width: 100%; }
.clinic-address-card h2 { margin-bottom: 0.75rem; }
.clinic-address-card p { margin-bottom: 0.75rem; }
.clinic-address-card .btn { margin-top: 0.25rem; }
.side-post { display: flex; gap: 0.85rem; text-decoration: none; color: var(--ec-ink); padding: 0.6rem 0; }
.side-post + .side-post { border-top: 1px solid var(--ec-line); }
.side-post img { width: 72px; height: 60px; object-fit: cover; border-radius: 0.5rem; flex-shrink: 0; background: var(--ec-mist); }
.side-post strong { font-size: 0.975rem; line-height: 1.3; display: block; }
.side-post:hover strong { color: var(--ec-blue); text-decoration: underline; }
.side-post small { color: var(--ec-muted); }
@media (min-width: 992px) { .sidebar-sticky { position: sticky; top: 6.5rem; } }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--ec-line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .material-symbols-rounded, .contact-list .brand-svg { color: var(--ec-blue); font-size: 1.6rem; width: 1.6rem; height: 1.6rem; margin-top: 0.15rem; }
.contact-list .brand-svg { width: 1.6rem; height: 1.6rem; }
.contact-list strong { display: block; color: var(--ec-navy); }
.contact-list a { font-weight: 600; }
.map-frame { border: 0; width: 100%; height: 420px; display: block; border-radius: 1rem; background: var(--ec-mist); }

/* ---------- Quote ---------- */
.doctor-quote { border-left: 4px solid var(--ec-orange); padding: 0.25rem 0 0.25rem 1.5rem; margin: 0; }
.doctor-quote p { font-family: "Bricolage Grotesque", sans-serif; font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.3; color: var(--ec-navy); font-weight: 600; margin-bottom: 0.75rem; }
.doctor-quote footer { color: var(--ec-muted); font-size: 1rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ec-blue); color: #dbe6f0; padding: 3.5rem 0; }
.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #154d82; color: #aab7c4; padding: 4rem 0 0; font-size: 1rem; }
.site-footer h2 { font-size: 1.125rem; color: #fff; margin-bottom: 1rem; letter-spacing: 0; }
.site-footer a { color: #d6dfe8; text-decoration: none; }
.site-footer a:hover { color: var(--ec-orange); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-areas-row {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer-areas-row h2 { margin-bottom: 1rem; }
.site-footer ul.footer-areas {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem 1.35rem;
}
.site-footer ul.footer-areas li { margin: 0; display: inline; }
.site-footer ul.footer-areas a { white-space: nowrap; font-size: 0.95rem; }
.site-footer .footer-logo img { height: 100px; width: auto; max-width: 180px; object-fit: contain; 
  background: #ffffff;
  border-radius: 10px;
}
.footer-contact li { display: flex; gap: 0.65rem; align-items: flex-start; }
.footer-contact .material-symbols-rounded { color: var(--ec-orange); font-size: 1.3rem; width: 1.3rem; height: 1.3rem; margin-top: 0.15rem; }
.social { display: flex; gap: 0.6rem; }
.social a { width: 2.6rem; height: 2.6rem; border-radius: 0.6rem; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.social a:hover { background: var(--ec-orange); color: var(--ec-navy); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 3rem; padding: 1.25rem 0; font-size: 0.9rem; }

/* ---------- Floating + mobile action bar ---------- */
.fab-whatsapp { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1030; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #25d366; color: #fff; display: none; place-items: center; box-shadow: 0 8px 24px rgba(13,27,42,.3); }
.fab-whatsapp .brand-svg { width: 1.75rem; height: 1.75rem; }
.fab-whatsapp:hover { background: #128c4a; color: #fff; }
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  background: #fff; border-top: 1px solid var(--ec-line);
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: 3.25rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(13,27,42,.08);
}
.action-bar a {
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 0.35rem; padding: 0 0.35rem; margin: 0;
  font-size: 0.8125rem; font-weight: 700; line-height: 1;
  text-decoration: none; color: var(--ec-navy);
  min-height: 3.25rem;
}
.action-bar a + a { border-left: 1px solid var(--ec-line); }
.action-bar a.primary { background: var(--ec-orange); color: var(--ec-navy); }
.action-bar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; flex-shrink: 0; line-height: 0;
}
.action-bar-icon .brand-svg { width: 1.15rem; height: 1.15rem; display: block; }
.action-bar-wa { color: #25d366; }
.action-bar a.primary .action-bar-icon { color: inherit; }
body { padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 992px) {
  .action-bar { display: none; }
  .fab-whatsapp { display: grid; }
  body { padding-bottom: 0; }
}
.google-updates-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Success modal ---------- */
.success-icon { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: #e3f4ea; color: #128c4a; display: grid; place-items: center; margin: 0 auto 1rem; }
.success-icon .material-symbols-rounded { font-size: 2.5rem; width: 2.5rem; height: 2.5rem; }

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

/* ---------- Instagram section (home page) ---------- */
.ig-grid:empty { display: none; }
.ig-grid .ig-post { background: #fff; border: 1px solid var(--ec-line); border-radius: 0.75rem; overflow: hidden; }
.ig-grid .ig-scale { width: 326px; min-height: 560px; }
.ig-grid .instagram-media { min-width: 326px !important; max-width: 326px !important; width: 326px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.ig-grid .ig-fallback { display: flex; align-items: center; justify-content: center; min-height: 560px; padding: 1rem; text-align: center; font-size: 1.5rem; font-weight: 600; text-decoration: none; }

.ig-shell-slider { position: relative; }
.ig-carousel { padding: 0 2.5rem 2.25rem; }
.ig-carousel .carousel-inner { overflow: hidden; }
.ig-carousel-btn {
  width: 2.75rem;
  height: 2.75rem;
  top: 42%;
  transform: translateY(-50%);
  bottom: auto;
  opacity: 1;
  background: #fff;
  border: 1px solid var(--ec-line);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(24, 51, 62, 0.12);
}
.ig-carousel-btn:hover,
.ig-carousel-btn:focus { opacity: 1; background: var(--ec-tint, #eaf6f3); }
.ig-carousel-btn .carousel-control-prev-icon,
.ig-carousel-btn .carousel-control-next-icon {
  width: 1rem;
  height: 1rem;
  filter: none;
  background-size: 100% 100%;
}
.ig-carousel .carousel-control-prev { left: 0; }
.ig-carousel .carousel-control-next { right: 0; }
.ig-carousel-btn .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2318333e'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}
.ig-carousel-btn .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2318333e'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.ig-carousel-dots {
  position: static;
  margin: 1rem 0 0;
  gap: 0.4rem;
}
.ig-carousel-dots [data-bs-target] {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 0;
  margin: 0;
  background-color: #c5d4d8;
  opacity: 1;
}
.ig-carousel-dots .active { background-color: var(--ec-orange, #f36c22); }
@media (max-width: 767.98px) {
  .ig-carousel { padding: 0 1.75rem 2rem; }
  .ig-carousel-btn { width: 2.25rem; height: 2.25rem; }
}


/* Nav link colour overrides */
nav.navbar.site-nav .nav-link,
nav.navbar.site-nav .dropdown-item {
    color: #000000;
}
nav.navbar.site-nav .nav-link:hover,
nav.navbar.site-nav .dropdown-item:hover {
    color: #e77d13;
}
nav.navbar.site-nav .nav-btn-call {
    color: var(--ec-blue) !important;
    background: transparent !important;
    border-color: var(--ec-blue) !important;
}
nav.navbar.site-nav .nav-btn-call:hover {
    color: #fff !important;
    background: var(--ec-blue) !important;
    border-color: var(--ec-blue) !important;
}
nav.navbar.site-nav .nav-btn-book {
    color: var(--ec-navy) !important;
}
nav.navbar.site-nav .nav-btn-book .material-symbols-rounded {
    color: inherit !important;
}

/* Service / area / team / FAQ patterns */
.process-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.process-list li { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--ec-line); border-radius: 0.75rem; padding: 1rem 1.25rem; }
.process-list .num {
  flex: 0 0 2rem; height: 2rem; border-radius: 50%; background: var(--ec-orange); color: var(--ec-navy);
  font-weight: 700; display: grid; place-items: center;
}
.process-list p { margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list .material-symbols-rounded { color: var(--ec-orange); }
.faq-list { display: grid; gap: 0.55rem; }
.faq-item { border: 1px solid var(--ec-line); border-radius: 0.65rem; background: #fff; padding: 0.7rem 0.95rem; }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.65rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  font-size: 1.25rem;
  color: var(--ec-orange);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-q { font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--ec-ink); margin: 0; }
.faq-item p { margin: 0.55rem 0 0; color: var(--ec-muted); font-size: 0.95rem; line-height: 1.55; }
.faq-area-tag {
  display: inline-block; flex-shrink: 0; align-self: center;
  background: var(--ec-mist); color: var(--ec-blue);
  font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 2rem;
  white-space: nowrap;
}
.section-faqs { padding: 2rem 0 2.5rem; }
@media (min-width: 992px) {
  .section-faqs { padding: 2.5rem 0 3rem; }
}
.faq-toolbar {
  display: grid; gap: 0.75rem; margin-bottom: 1.25rem;
  max-width: 52rem;
}
.faq-search {
  position: relative; display: block; margin: 0;
}
.faq-search-icon {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--ec-muted); display: grid; place-items: center; pointer-events: none;
}
.faq-search-icon .material-symbols-rounded { font-size: 1.25rem; }
.faq-search .form-control {
  padding-left: 2.6rem; border-radius: 0.75rem; border-color: #c5d1dc;
  min-height: 2.75rem;
}
.faq-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.faq-chips .chip { padding: 0.3rem 0.8rem; font-size: 0.875rem; }
.faq-count { font-size: 0.875rem; color: var(--ec-muted); font-weight: 600; }
.faq-layout {
  display: grid; gap: 1.25rem; align-items: start;
}
@media (min-width: 992px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr) 16.5rem; gap: 1.5rem; }
  .faq-toolbar { max-width: none; }
}
.faq-group { display: grid; gap: 0.55rem; margin-bottom: 1.15rem; }
.faq-group:last-child { margin-bottom: 0; }
.faq-group-title {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ec-orange); margin: 0 0 0.15rem;
}
.faq-area-link a {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-weight: 700; font-size: 0.9rem; text-decoration: none; color: var(--ec-blue);
}
.faq-area-link a:hover { text-decoration: underline; }
.faq-area-link .material-symbols-rounded { font-size: 1rem; }
.faq-aside { display: grid; gap: 0.85rem; }
.faq-aside-card {
  background: #fff; border: 1px solid var(--ec-line); border-radius: 0.75rem;
  padding: 1rem 1.1rem 1.15rem;
}
.faq-aside-card h2 { margin: 0 0 0.4rem; }
.faq-aside-card > p { margin: 0 0 0.85rem; color: var(--ec-muted); font-size: 0.92rem; }
.faq-area-mini {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.65rem;
}
.faq-area-mini a { text-decoration: none; font-weight: 600; font-size: 0.88rem; color: var(--ec-ink); }
.faq-area-mini a:hover { color: var(--ec-blue); text-decoration: underline; }
.team-card { background: #fff; border: 1px solid var(--ec-line); border-radius: 1rem; overflow: hidden; height: 100%; }
.team-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.team-card .body { padding: 1.25rem 1.35rem 1.5rem; }
.team-card .qual { font-weight: 700; color: var(--ec-blue); margin-bottom: 0.25rem; }
.team-card .spec a { font-weight: 600; text-decoration: none; }
.team-card .exp { display: flex; align-items: center; gap: 0.35rem; color: var(--ec-muted); font-size: 0.95rem; }
.area-service-link {
  display: flex; align-items: center; gap: 0.65rem; padding: 1rem 1.1rem; border: 1px solid var(--ec-line);
  border-radius: 0.75rem; background: #fff; text-decoration: none; color: var(--ec-ink); font-weight: 600; height: 100%;
}
.area-service-link:hover { border-color: var(--ec-blue); color: var(--ec-blue); }
.area-service-link .material-symbols-rounded { color: var(--ec-orange); }
.service-card { position: relative; }
.service-card .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-toc { background: var(--ec-mist); border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.article-toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.clinic-map .map-frame { min-height: 360px; }
.sitemap-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.sitemap-list a { text-decoration: none; font-weight: 600; color: var(--ec-ink); }
.sitemap-list a:hover { color: var(--ec-blue); text-decoration: underline; }
.travel-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.travel-facts li { display: flex; gap: 0.65rem; align-items: flex-start; }
.travel-facts .material-symbols-rounded { color: var(--ec-orange); margin-top: 0.15rem; }
.travel-facts strong { display: block; color: var(--ec-navy); }
.area-route-map { min-height: 420px; }
.text-brand { color: var(--ec-orange-deep); }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tourism-table { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; border: 1px solid var(--ec-line); border-radius: 0.75rem; overflow: hidden; }
.tourism-table th, .tourism-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--ec-line); font-size: 0.95rem; vertical-align: top; }
.tourism-table th { background: var(--ec-mist); color: var(--ec-navy); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
.tourism-table tr:last-child td { border-bottom: 0; }
.tourism-table td:first-child { font-weight: 600; color: var(--ec-ink); }
.faq-item h3 { margin: 0 0 0.4rem; }


/* =========================================
   EndoCare WhatsApp Contact Popup
   ========================================= */

.whatsapp-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px;
    background: #fff;
    color: var(--ec-ink);
    border: 1px solid var(--ec-line);
    border-radius: 22px;
    box-shadow: 0 20px 70px rgba(13, 27, 42, 0.3);
    z-index: 1090;
    display: none;
    box-sizing: border-box;
}

.whatsapp-popup.is-visible {
    display: block;
    animation: whatsappPopupIn 0.25s ease-out;
}

.whatsapp-popup-content strong {
    display: block;
    padding-right: 30px;
    margin-bottom: 12px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 27px;
    line-height: 1.25;
    color: var(--ec-navy);
}

.whatsapp-popup-content p {
    margin: 0 0 24px;
    color: var(--ec-muted);
    font-size: 16px;
    line-height: 1.65;
}

.whatsapp-popup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #128c4a;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 17px;
    font-weight: 700;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.2s ease;
}

.whatsapp-popup-button:hover {
    background: #0e733d;
    color: #fff !important;
    transform: translateY(-1px);
}

.whatsapp-popup-button .brand-svg {
    width: 27px;
    height: 27px;
    flex-shrink: 0;
}

.whatsapp-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ec-mist);
    color: var(--ec-navy);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.whatsapp-popup-close:hover {
    background: var(--ec-line);
}

/* One animation definition — preserves the centred position */
@keyframes whatsappPopupIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 12px));
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile popup: centred with comfortable screen margins */
@media (max-width: 991.98px) {
    .whatsapp-popup {
        left: 50%;
        top: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(420px, calc(100vw - 28px));
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
        overflow-y: auto;
        padding: 26px 22px;
    }

    .whatsapp-popup-content strong {
        font-size: 24px;
    }

    .action-bar-icon .brand-svg {
        width: 1.3rem;
        height: 1.3rem;
    }
}

/* Larger pill-shaped floating WhatsApp button on desktop */
@media (min-width: 992px) {
    body a.fab-whatsapp {
        width: 300px !important;
        height: 68px !important;
        right: 24px !important;
        bottom: 24px !important;
        border-radius: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        background: #20cf68 !important;
        color: #fff !important;
        box-shadow: 0 8px 24px rgba(32, 207, 104, 0.3);
        text-decoration: none !important;
        padding: 0 22px !important;
        box-sizing: border-box;
    }

    body a.fab-whatsapp .brand-svg {
        width: 28px !important;
        height: 28px !important;
        flex-shrink: 0;
    }

    body a.fab-whatsapp::after {
        content: "Chat on WhatsApp";
        color: #fff;
        font-size: 19px;
        font-weight: 700;
        white-space: nowrap;
    }

    body a.fab-whatsapp:hover {
        background: #128c4a !important;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-popup.is-visible {
        animation: none;
    }

    .whatsapp-popup-button {
        transition: none;
    }
}

/* Desktop WhatsApp popup — larger, like the mobile design */
@media (min-width: 992px) {
    .whatsapp-popup {
        width: min(560px, calc(100vw - 48px));
        padding: 38px;
        border-radius: 26px;
    }

    .whatsapp-popup-content strong {
        font-size: 32px;
        margin-bottom: 16px;
        padding-right: 38px;
    }

    .whatsapp-popup-content p {
        font-size: 19px;
        line-height: 1.7;
        margin-bottom: 28px;
    }

    .whatsapp-popup-button {
        min-height: 68px;
        font-size: 19px;
        border-radius: 14px;
    }

    .whatsapp-popup-button .brand-svg {
        width: 30px;
        height: 30px;
    }

    .whatsapp-popup-close {
        width: 40px;
        height: 40px;
        top: 14px;
        right: 14px;
        font-size: 27px;
    }
}
