/**
 * Clue Dental Marketing - Template Styles
 *
 * Custom styles for dental practice websites
 * Uses CSS variables for easy theming - see client.css for customization
 */


/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

/* Skip to main content link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  /* PHYSICAL ON PURPOSE: centring. left:50% + translateX(-50%) is
     direction-neutral; inset-inline-start:50% would pair with a physical
     translateX and land the box off-centre under RTL. */
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.375rem 0.375rem;
  z-index: 100000;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* Global focus indicator for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Step headings receive programmatic focus for screen readers only — no visible ring */
.appt-step-heading:focus {
  outline: none;
}

/* Stronger focus indicator for Bootstrap btn-check (radio/checkbox buttons) */
.btn-check:focus-visible + .btn {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: none;
}

/* Keyboard focus ring for every Bootstrap button (.btn). Bootstrap's own
   .btn:focus-visible sets outline: 0 and swaps in a 4px box-shadow of its
   stock blue at 50% alpha, rgba(49, 132, 253, .5), fading in over 0.15s. It
   outranks the global :focus-visible outline (0,2,0 against 0,1,0), so no
   client colour ever reached a focused button, and that pale blue measures
   under 2:1 against light bands and disappears on dark ones. This replaces it
   with a three-band ring (light, dark, light): whatever surrounds the button,
   one band contrasts at least 3:1 with its neighbours (the dark band against
   the light bands on any light page or brand-filled button, the outer light
   band against a dark band). The transparent outline is what Windows
   forced-colours mode draws, since it drops box-shadow. The :active/.active/
   .show selectors mirror Bootstrap's so the ring stays while a key is held.
   A more specific focus rule for one component still wins over this. */
.btn:focus-visible,
.btn.active:focus-visible,
.btn.show:focus-visible,
.btn:first-child:active:focus-visible,
:not(.btn-check) + .btn:active:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px var(--text-white, #ffffff),
    0 0 0 4px var(--text-primary, #212529),
    0 0 0 6px var(--text-white, #ffffff);
}

/* Respect reduced-motion user preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Make Sienna ADA button smaller. Its brand colors are in sienna.css. */
.asw-menu-btn {
  transform: scale(0.75);
}


/* ========================================================================
   TYPOGRAPHY
   ======================================================================== */

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: 300;
}

/* Remove underline from icon section links (homepage: General, Cosmetic, Emergency, Kids) */
/* Specific selector to avoid affecting other links */
.text-center.pt-2 a {
  text-decoration: none !important;
}

a h2 {
  font-size: 1.25rem;
}


/* ========================================================================
   NAVIGATION BAR
   ======================================================================== */

#logo {
  position: relative;
  z-index: 9999;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

#top-header .navbar {
  margin-top: 1em;
}

@media (min-width: 992px) {
  .navbar {
    margin-top: initial !important;
  }
  #logo {
    margin-inline-start: initial;
    margin-inline-end: initial;
  }
}

#top-header .navbar-nav {
  margin-top: 3em;
}

#headercontact .social {
  display: none !important;
}

#headercontact .social .fa {
  font-size: 1.25rem !important;
  color: var(--primary-color);
}

@media (min-width: 992px) {
  #headercontact .social {
    display: inline-block !important;
  }
}

.navbar-expand-lg .navbar-nav .nav-link {
  font-size: 1rem;
  font-weight: 400;
}

@media (max-width: 1100px) {
  .navbar-expand-lg .navbar-nav .nav-link {
    font-size: .85rem;
  }
}

.navbar-side-content {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.navbar .dropdown:hover>.dropdown-menu,
.navbar .dropdown-menu:hover {
  display: block;
}

a.text-dark,
a.text-dark:focus {
  font-size: .875rem;
}

a.text-dark:hover,
a.text-dark:focus {
  color: var(--primary-color) !important;
}

.dropdown-menu {
  margin: 0;
}

.dropdown-item {
  padding: 0.35rem 0.75rem;
  font-size: .85rem;
}

.dropdown-item,
.dropdown-item:focus {
  color: black;
  text-decoration: none;
  background-color: #F8F8F8;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: white;
  background-color: var(--primary-color);
}


/* ========================================================================
   SIDEBAR MENU
   ======================================================================== */

/* Sidebar base styles - hidden by default, slides in from left */
.navbar-side {
  position: fixed;
  z-index: 9999;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  inset-inline-start: 0;
  transform: translateX(-100%);
  transition: 0.2s ease background-color, 0s linear transform 0.2s;
}

.navbar-side.show {
  transform: translateX(0);
  background-color: rgba(0, 0, 0, 0.5);
  transition: 0.2s ease background-color, 0s linear transform;
}

.navbar-side .navbar-side-content {
  background: var(--sidebar-bg);
  padding: 15px;
  padding-bottom: 30px;
  height: 100%;
  width: 100%;
  max-width: 400px;
  transform: translateX(-100%);
  transition: 0.2s ease transform;
  overflow-y: auto;
}

.navbar-side.show .navbar-side-content {
  transform: translateX(0);
}

#headers-4-sidebar .navbar-nav {
  margin-top: 0em;
}

#top-header .navbar-side .text-white {
  font-weight: 400;
}

.navbar-side .navbar-side-content .nav-link {
  font-size: 1.15rem;
  line-height: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-side .dropdown-menu {
  display: none;
  position: static;
  float: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.navbar-side .dropdown-menu.show {
  display: block;
}

.navbar-side .dropdown-item,
.navbar-side .dropdown-item:focus {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: var(--sidebar-bg);
  padding-inline-start: 2rem;
}

.navbar-side .dropdown-item:hover,
.navbar-side .dropdown-item:focus {
  color: var(--primary-color);
  background-color: white;
}

.navbar-side .social .fa {
  color: white;
  font-size: 1.25rem;
}


/* ========================================================================
   RESPONSIVE HEADER BUTTONS
   ======================================================================== */

#headercontact {
  margin-top: .5em;
}

#headercontact .btn-outline-primary {
  display: inline-block;
}

@media (max-width: 465px) {
  #headercontact .btn-outline-primary {
    display: block;
  }
}

@media (max-width: 992px) {
  #headercontact {
    position: relative !important;
    margin-top: 0em;
  }
  #headercontact .small {
    margin-inline-end: auto;
    margin-inline-start: auto;
    text-align: center !important;
  }
  #headercontact .btn-primary {
    margin-bottom: .25rem;
  }
}


/* ========================================================================
   HOMEPAGE COVER / HERO
   ======================================================================== */

#homepage-cover {
  background-color: var(--hero-bg-color);
  position: relative;
  overflow: hidden;
  background-image: url("../vid/home-cover.jpg");
  background-position: center center;
  background-size: cover;
}

#homepage-cover h1 {
  font-size: 2.5rem;
  color: white;
  padding: 0px;
}

#homepage-cover p {
  font-size: 1rem;
  padding: 0px;
}

/* White buttons in hero section - solid white with primary color text */
#homepage-cover .btn-outline-primary {
  background-color: white;
  border-color: white;
  border-radius: 30px;
  color: var(--primary-color) !important;
}

#homepage-cover .btn-outline-primary:hover {
  background-color: var(--primary-color-bright);
  border-color: var(--primary-color-bright);
  color: white !important;
}

@media (min-width: 766px) {
  #homepage-cover h1 {
    font-size: 3.5rem;
    padding: 0px;
  }

  #homepage-cover p {
    font-size: 1.25rem;
    padding-inline-start: 4rem;
    padding-inline-end: 4rem;
  }
}


/* ========================================================================
   BACKGROUND VIDEO
   ======================================================================== */

.background-video-container {
  pointer-events: none;
  position: absolute;
  top: 0rem;
  inset-inline-end: 0rem;
  bottom: 0rem;
  inset-inline-start: 0rem;
  z-index: 0;
}

.background-video-container video {
  /* Pure CSS background-size: cover behavior */
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.background-video-container-overlay {
  position: absolute;
  top: 0px;
  inset-inline-end: 0px;
  bottom: 0px;
  inset-inline-start: 0px;
  background-color: rgba(64, 64, 64, 0.75);
  z-index: 2;
}

/* Hero video pause/play toggle (WCAG 2.2.2) */
.hero-video-toggle {
  position: absolute;
  bottom: 1rem;
  inset-inline-end: 1rem;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.hero-video-toggle:hover,
.hero-video-toggle:focus-visible {
  opacity: 1;
}

/* Content above video */
.bg-cover {
  position: relative;
  z-index: 10;
}


/* ========================================================================
   HOMEPAGE SLIDESHOW
   ======================================================================== */

#homepage-slideshow .carousel-control-prev,
#homepage-slideshow .carousel-control-next {
  color: white;
  font-size: 3rem;
}

#homepage-slideshow .bg-cover {
  background-color: rgba(0, 0, 0, 0);
}

.swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.2);
}

.swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  background-color: white;
}

.swiper-slide {
  background-position: center center;
  position: relative;
}

.swiper-slide-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
}

.images-ratio.ratio-16-9 {
  height: 600px;
}

#homepage-slideshow {
  background-color: var(--hero-bg-color);
  min-height: 600px;
  height: calc(30rem);
  position: relative;
  overflow: hidden;
  background-position: center center;
  background-size: cover;
  display: none;
}

#homepage-slideshow h1 {
  font-size: 2.5rem;
  color: white;
  padding: 0px 90px;
}

#homepage-slideshow p {
  font-size: 1rem;
  padding: 0px 60px;
}

@media (min-width: 766px) {
  #homepage-slideshow h1 {
    font-size: 3.5rem;
    padding: 0px;
  }

  #homepage-slideshow p {
    font-size: 1.25rem;
  }

  #homepage-slideshow {
    display: block;
  }
}


/* ========================================================================
   MOBILE TOP BANNER
   ======================================================================== */

#mobile-top-banner {
  background-image: url("../img/request-background.svg");
  background-position: center center;
  background-size: cover;
  position: initial;
  display: block;
}

#mobile-top-banner h1 {
  color: white;
}

#mobile-top-banner p {
  color: white;
}

/* White buttons in mobile banner - solid white with primary color text */
#mobile-top-banner .btn-outline-primary {
  background-color: white;
  border-color: white;
  border-radius: 30px;
  color: var(--primary-color) !important;
}

#mobile-top-banner .btn-outline-primary:hover {
  background-color: var(--primary-color-bright);
  border-color: var(--primary-color-bright);
  color: white !important;
}

@media (min-width: 765px) {
  #mobile-top-banner {
    display: none !important;
  }
}


/* ========================================================================
   BUTTONS
   ======================================================================== */

/* Override default button sizing - make slightly smaller */
/* Excludes appointment wizard buttons (.appt-nextstep) which have unique styling */
.btn:not(.appt-nextstep) {
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-lg:not(.appt-nextstep) {
  padding: 0.625rem 1.5rem;
  font-size: 1rem;
}

.btn-sm:not(.appt-nextstep) {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
}

/* Primary buttons - solid color background with white text */
/* Primary buttons - solid color background with white text.
   Both .btn-primary and .btn-outline-primary render the same solid
   brand-colored pill here (the template uses "outline-primary" as a
   styled label rather than the Bootstrap outline variant). Keeping
   them visually identical ensures .btn-primary doesn't fall back to
   Bootstrap's stock blue when used in content. */
.btn-primary,
.btn-outline-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 30px;
  color: white !important;
}

.btn-primary:hover,
.btn-outline-primary:hover,
.btn-primary:focus,
.btn-outline-primary:focus,
.btn-primary:active,
.btn-outline-primary:active {
  background-color: var(--primary-color-bright);
  border-color: var(--primary-color-bright);
  color: white !important;
}

.btn-primary a,
.btn-outline-primary a {
  color: white !important;
}

.btn-primary i,
.btn-outline-primary i {
  color: inherit;
}

/* Ensure icons in buttons display inline with text */
.btn i,
.btn .fa {
  display: inline-block;
  margin-inline-end: 0.25rem;
}

/* Button group layout fixes - buttons next to each other on desktop, stacked on mobile */
/* Bootstrap 5 removed .btn-block, so we need custom styling */
.btn-block {
  display: block;
  width: 100%;
}

/* On desktop, make button containers display inline with natural width */
@media (min-width: 768px) {
  /* Target button rows in content sections */
  .row.text-center.text-md-start .btn-block,
  .row.text-md-start .btn-block {
    display: inline-block;
    width: auto;
    margin-inline-end: 0.5rem;
  }

  /* Remove column-based layout on desktop for button groups */
  .row.text-center.text-md-start > [class*="col-"],
  .row.text-md-start > [class*="col-"] {
    width: auto;
    flex: 0 0 auto;
  }

  /* Hero section button layout - side by side on desktop */
  #homepage-cover .row.text-center > [class*="col-"] {
    width: auto;
    flex: 0 0 auto;
  }
}

/* Hero section buttons - ensure consistent height and inline icons */
#homepage-cover .btn {
  white-space: nowrap;
}


/* ========================================================================
   PROMO BANNER
   ======================================================================== */

#promo-banner {
  background-color: #fafafa !important;
}

@media (min-width: 1200px) {
  #promo-banner {
    background-image: url("../img/promo-background.jpg");
    background-color: #fafafa;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    height: auto;
  }
}


/* ========================================================================
   SECOND BANNER
   ======================================================================== */

#second-banner {
  background-color: #fafafa !important;
}

@media (min-width: 1200px) {
  #second-banner {
    background-image: url("../img/savings-plan-background.jpg");
    background-color: #fafafa;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    height: auto;
  }
}


/* ========================================================================
   REVIEWS BANNER
   ======================================================================== */

#reviews-banner {
  overflow: hidden;
  padding-bottom: 3rem;
}

#reviews-banner .fa-star,
#reviews-banner .bi-star-fill {
  color: #ffc107;
  font-size: 1.5rem;
}

#reviews-banner .swiper-wrapper {
  align-items: stretch;
}

#reviews-banner .swiper-slide {
  padding: 2rem 1.5rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  height: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 340px;
}

@media (max-width: 767.98px) {
  #reviews-banner .swiper-slide {
    width: 85%;
  }
}

#reviews-banner .swiper-slide p {
  line-height: 1.6;
}

#reviews-banner .swiper-slide .text-center:first-child {
  margin-bottom: 0;
}

#reviews-banner .review-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.15rem;
  margin-bottom: 1rem;
}

#reviews-banner .bi-google {
  color: #EA4335;
}

.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.reviews-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.reviews-nav-btn:hover {
  background: var(--primary-color);
  color: #fff;
}

.reviews-nav-fraction {
  font-size: 0.95rem;
  color: #666;
  min-width: 50px;
  text-align: center;
}


/* ========================================================================
   SPLIT SCREEN SECTION
   ======================================================================== */

#split-first .btn-round {
  border-radius: 30px;
}

#split-first .bg-color {
  background-color: var(--primary-color);
}

#split-first h1 {
  color: white;
}

#split-first h2 {
  color: white;
}

#split-first a {
  color: white;
}

@media (min-width: 766px) {
  #split-first .h-md-100 {
    height: 500px;
  }
}


/* ========================================================================
   REQUEST CONSULT BANNER
   ======================================================================== */

#request-banner {
  background-image: url("../img/request-background.svg");
  background-size: 500px 500px;
  background-position: center center;
  padding: 1rem 0;
}

#request-banner .form-control {
  background-color: white;
}

#request-banner h1 {
  color: white;
}

/* White buttons in request banner - solid white with primary color text */
#request-banner .btn-outline-primary {
  background-color: white;
  border-color: white;
  border-radius: 30px;
  color: var(--primary-color) !important;
}

#request-banner .btn-outline-primary:hover {
  background-color: var(--primary-color-bright);
  border-color: var(--primary-color-bright);
  color: white !important;
}


/* ========================================================================
   LINKS SECTION
   ======================================================================== */

#links {
  background-image: url("../img/background-banner.svg");
  background-size: 300px 300px;
  background-position: center center;
  padding: 1rem 0;
}

/* Button Styles */
.icon-btn button {
  margin: 10px;
}

.btn-text {
  width: 60%;
  font-size: 1.2rem;
}

.btn-gradient {
  width: 40%;
  position: relative;
  display: inline-block;
  inset-inline-start: -20px;
  background: rgba(0, 0, 0, 0.15);
  border-start-end-radius: 60px;
  padding-block: 8px;
  padding-inline: 16px 24px;
  box-shadow: 2px 0px 0px 0px rgba(78, 72, 72, 0.4);
}

.btn-gradient i {
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.radius-style button {
  border-radius: 30px;
}

.radius-btn {
  border-start-start-radius: 30px;
  border-end-start-radius: 30px;
}

a:hover span {
  border-bottom: none !important;
}

.btn-clue {
  font-size: 23px;
  padding: 0px 20px;
  color: #fff;
  background-color: var(--primary-color);
  border: none;
  justify-content: center;
  align-items: center;
  display: flex;
  max-width: 100% !important;
  width: 100%;
  box-shadow: 0 0 1px #ccc;
  -webkit-transition: all 0.5s ease-in-out;
  text-align: center;
  margin-inline-end: auto !important;
  margin-inline-start: auto !important;
}

.btn-clue:hover {
  -webkit-transform: scale(1.1);
  background: var(--primary-color);
}

@media (min-width: 414px) {
  .icon-btn button {
    margin: 10px;
  }

  .btn-clue {
    width: 450px;
  }
}


/* ========================================================================
   APPOINTMENT FORMS
   ======================================================================== */

/* Honeypot spam protection */
#lastname {
  display: none;
}

/* Multi-Step Appointments (APPT3) */
.multistep-appt p {
  font-size: 120%;
}

.multistep-appt input,
.multistep-appt textarea {
  background-color: white !important;
}

.appt-day {
  background-color: rgba(215, 223, 238, 0.8);
  border-radius: 2em;
  padding: 0.5rem;
  border: 4px white solid;
}

#content .appt-day h2 {
  margin: 0.5rem 0 0.25rem;
  padding-top: 0;
  font-size: 1.4rem;
}

/* Compact vertical spacing for day/time grid */
#multistep-appt-3 > .btn-group > .row {
  --bs-gutter-y: 0.5rem;
}

#multistep-appt-3 .appt-day {
  padding: 0.15rem 0.5rem 0.35rem;
  border-radius: 1rem;
}

/* Appointment wizard buttons - preserve original outline style */
.appt-day .btn-outline-primary,
.appt-nextstep {
  background-color: white !important;
  color: var(--primary-color) !important;
  border: 1px solid var(--primary-color);
  border-radius: 2em;
}

.appt-day .btn-outline-primary i {
  font-size: 3em;
  display: block;
  margin-bottom: -0.25em;
  margin-top: -0.05em;
}

.appt-day .btn-outline-primary:hover,
.appt-nextstep:hover {
  background-color: #eaf3ff !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color);
}

.appt-day .btn-check:active+.btn-outline-primary,
.btn-check:checked+.btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show,
.btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color);
}

.appt-day .btn-check:active+.btn-outline-primary i,
.btn-check:checked+.btn-outline-primary i,
.btn-outline-primary.active i,
.btn-outline-primary.dropdown-toggle.show i,
.btn-outline-primary:active i {
  color: white !important;
}

#appt-medicare-warning {
  background-color: #ff3b30 !important;
  color: white !important;
  border-color: red !important;
  font-weight: 700;
}

#appt-medicare-warning i {
  color: white !important;
}

.appt-disclaimer {
  font-size: 0.85rem !important;
}

/* Tight gutters on time-slot buttons so they fill the row evenly */
#multistep-appt-3 .appt-day fieldset > .row {
  --bs-gutter-x: 0.25rem;
  justify-content: center;
}

/* Appointment wizard form placeholders */
#content .form-control-lg::placeholder {
  font-size: 0.9rem;
  color: #adb5bd;
}

/* ========================================================================
   FOOTER - Modern & Accessible Design
   ======================================================================== */

#footer {
  background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 40%, var(--primary-color-bright) 100%);
  color: white;
}

/* Footer heading styles */
#footer .footer-heading {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Address styling - remove italic */
#footer .footer-address {
  font-style: normal;
}

/* Footer links with smooth transitions */
#footer .footer-links a {
  transition: all 0.3s ease;
  position: relative;
  padding-inline-start: 0;
}

#footer .footer-links a:hover {
  padding-inline-start: 8px;
  opacity: 0.85;
}

/* Footer link hover underline effect */
#footer .footer-links a::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: white;
  transition: width 0.3s ease;
}

#footer .footer-links a:hover::before {
  width: 30px;
}

/* Social media icons */
#footer .footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

#footer .footer-social-link:hover {
  background-color: white;
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Light button styling in footer */
#footer .btn-light {
  background-color: white;
  border-color: white;
  border-radius: 30px;
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

#footer .btn-light:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Contact info link hover effects */
#footer address a:hover {
  opacity: 0.85;
  text-decoration: underline !important;
}

/* Footer bottom bar */
#footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

/* Footer bottom navigation */
#footer-bottom a:hover {
  text-decoration: underline !important;
  opacity: 0.85;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  #footer .footer-heading {
    text-align: center;
  }

  #footer .footer-links,
  #footer address {
    text-align: center;
  }

  #footer .footer-links a {
    display: inline-block;
  }
}


/* ========================================================================
   INSIDE PAGES
   ======================================================================== */

#inside-header {
  background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 40%, var(--primary-color-bright) 100%);
  padding: 1rem 0;
}

#inside-header h1 {
  color: white;
}

/* Video watch-page eyebrow above the topic name in the gradient banner. */
#inside-header h1 .video-header-prefix {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

/* Video library index — grid of clickable cards */
.video-library-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: inherit;
}
.video-library-card:hover,
.video-library-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  color: inherit;
}
.video-library-thumb {
  overflow: hidden;
  background: #f0f5fa;
}
.video-library-card .card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  display: block;
}
.video-library-play-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.video-library-card:hover .video-library-play-icon,
.video-library-card:focus-visible .video-library-play-icon {
  opacity: 1;
  transform: scale(1.06);
}
.video-library-duration {
  position: absolute;
  bottom: 0.5rem;
  inset-inline-end: 0.5rem;
  padding: 0.15rem 0.45rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  line-height: 1.4;
}
.video-library-card .card-title {
  color: var(--primary-color);
}

#content {
  padding-top: 1em;
  padding-bottom: 1em;
}

/* Redesigned treatment pages: use standard band padding, not legacy #content values */
.treatment-band#content {
  padding: 3rem 0;
}

@media (min-width:992px) {
  #content {
    padding-top: 6em;
    padding-bottom: 6em;
  }
}

#content img {
  max-width: 100%;
  width: 100%;
}

#content hr {
  clear: both;
  margin-bottom: 2rem !important;
  margin-top: 2rem !important;
}

#content .images-ratio {
  background-position: center;
  height: auto;
}

/* Office gallery carousel */
.office-gallery-carousel {
  max-width: 900px;
  margin: 0 auto;
}
.gallery-slide-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.gallery-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gallery-nav-btn:hover {
  background: var(--primary-color);
  color: #fff;
}
.gallery-nav-fraction {
  font-size: 0.95rem;
  color: #666;
  min-width: 50px;
  text-align: center;
}

.cracked-teeth img {
  padding-top: 1rem;
  padding-bottom: 1rem;
  max-width: 100%;
  width: 80px !important;
}


/* ========================================================================
   OFFICE HOURS TABLE
   ======================================================================== */

.table {
  width: auto;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.table th {
  font-weight: 500;
  color: white;
  background-color: var(--primary-color);
}

.table .closed {
  color: rgb(216, 0, 0);
}

@media (min-width:766px) {
  .table {
    width: auto;
    margin-inline-start: initial;
    margin-inline-end: initial;
  }
}

#gentlewave-slide .swiper {
  margin-inline-start: auto !important;
  margin-inline-end: auto !important;
}

#content .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

#content .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  background-color: var(--primary-color) !important;
}


/* ========================================================================
   HOVERING GALLERY - MEET THE TEAM
   ======================================================================== */

#hover-gallery .row {
  position: relative;
}

#hover-gallery .image {
  opacity: 1;
  display: block;
  width: 100%;
  height: auto;
  transition: .5s ease;
  backface-visibility: hidden;
}

#hover-gallery .middle {
  transition: .5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  /* PHYSICAL ON PURPOSE: centring, as .skip-link above. */
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
}

#hover-gallery .gallery-item:hover .image {
  opacity: 0.3;
}

#hover-gallery .gallery-item:hover .middle {
  opacity: 1;
}

#hover-gallery .text {
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  padding: 10px 20px;
}

#hover-gallery .text a {
  color: white;
}

#hover-gallery .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0;
  border-bottom: 0 solid #f6f6f6;
}

#hover-gallery .close span {
  font-size: 1.5em;
  padding-inline-end: .25em;
}

@media (min-width: 576px) {
  #hover-gallery .modal-dialog {
    max-width: 750px !important;
  }

  #hover-gallery .modal-body {
    padding: 1em;
  }

  #hover-gallery .modal-body h2 {
    color: var(--primary-color);
  }

  #hover-gallery .modal-body img {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}


/* ========================================================================
   TOOTHORITY VIDEO PLAYER
   ======================================================================== */

/* Rounded corners + subtle shadow — apply via .media-styled class */
.media-styled {
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

video.media-styled {
  width: 100%;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}


/* ========================================================================
   HOMEPAGE SECTIONS
   ======================================================================== */

/* Section rhythm */
.hp-section { padding: 4rem 0; }
.hp-section-tinted { background-color: #f0f5fa; }

/* Eyebrow label */
.hp-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Section headings */
.hp-section-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}
.hp-section-sub {
  max-width: 620px;
  margin: 0 auto;
  color: #555;
  font-size: 1.05rem;
}

/* Highlight chips */
.hp-highlights { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #e4edf6;
  color: var(--primary-color);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
}

/* Media frames (images & video) */
.hp-media-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.hp-media-frame img,
.hp-media-frame video {
  width: 100%;
  display: block;
}
.hp-media-frame iframe {
  width: 100%;
  display: block;
  border: 0;
}

/* Technology mini-cards */
.hp-tech-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid #e4edf6;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hp-tech-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(52, 119, 173, 0.1);
}
.hp-tech-card i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* People cards (Doctor & Team) */
.hp-people-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hp-people-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.hp-people-img {
  aspect-ratio: 5 / 4;
  overflow: hidden;
}
.hp-people-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-people-body {
  padding: 1.5rem;
}
.hp-people-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}
.hp-people-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.hp-people-body p:last-of-type {
  margin-bottom: 1rem;
}

/* Contact info cards */
.contact-card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.5rem;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.contact-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e4edf6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.contact-card-icon i {
  font-size: 1.5rem;
  color: var(--primary-color);
}
.contact-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}
/* Phones: the contact card's phone number and Call button are primary actions,
   so each gets a 44px target (.btn-sm alone falls short of it). Directions
   stays .btn-sm size. */
@media (max-width: 767.98px) {
  .contact-phone a {
    display: inline-flex;
    align-items: center;
    min-block-size: 2.75rem;
  }
  .contact-card a.btn[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    min-block-size: 2.75rem;
  }
}
.contact-phone a {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}
.contact-phone a:hover {
  color: var(--primary-color-dark);
}
.contact-hours {
  text-align: start;
  max-width: 220px;
  margin: 0 auto;
  font-size: 0.9rem;
}
.contact-hours .d-flex {
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.contact-hours .d-flex:last-child {
  border-bottom: none;
}

/* Contact gallery dark section */
#contact-gallery {
  background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 100%);
  color: #fff;
}
.contact-gallery-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}
.contact-gallery-heading {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.contact-gallery-sub {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.85;
  font-size: 1.05rem;
}
.contact-gallery-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.contact-gallery-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.contact-gallery-card:hover img {
  transform: scale(1.04);
}

/* Ghost button variant */
.btn-ghost-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  padding: 0.625rem 1.5rem;
}
.btn-ghost-primary:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

@media (max-width: 767px) {
  .hp-section { padding: 2.5rem 0; }
  .hp-section-heading { font-size: 1.6rem; }
  .hp-media-frame { border-radius: 10px; }
  .hp-people-card { border-radius: 10px; }
  .contact-gallery-heading { font-size: 1.7rem; }
  .contact-gallery-card { border-radius: 10px; }
}


/* ========================================================================
   TREATMENT PAGE COMPONENTS
   ======================================================================== */

/* --- Content Boxes --- */
.treatment-content-box {
  background-color: #f8fafb;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.treatment-box-heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-color);
}

.treatment-box-heading .bi {
  font-size: 1rem;
}

/* --- Lists inside content boxes --- */
.treatment-list {
  padding-inline-start: 1.25rem;
}

.treatment-list li {
  margin-bottom: 0.6rem;
  line-height: 1.65;
}

/* --- Quick Facts cards --- */
.treatment-fact-card {
  background-color: #f8fafb;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.treatment-fact-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.treatment-fact-icon .bi {
  font-size: 1.75rem;
  color: var(--primary-color);
}

.treatment-fact-card h3 {
  color: var(--primary-color);
}

/* --- Inline CTA bar --- */
.treatment-cta {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.25rem 0;
}

/* --- FAQ accordion --- */
.treatment-faq-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.treatment-faq-card .card-header {
  background-color: transparent;
  cursor: pointer;
  padding: 1rem 1.25rem;
  transition: background-color 0.15s ease;
}

.treatment-faq-card .card-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.treatment-faq-card .card-header a,
.treatment-faq-card .card-header button.btn-link {
  color: var(--primary-color);
  font-weight: 500;
}

.treatment-faq-card .card-body {
  padding: 1rem 1.25rem 1.25rem;
  line-height: 1.7;
}

/* --- Intro section image wrapper --- */
.treatment-img-wrap {
  border-radius: 0.5rem;
  overflow: hidden;
}

.treatment-img-wrap img {
  padding: 0 !important;
}

/* --- Content images inside treatment sections --- */
.treatment-section-img {
  border-radius: 0.5rem;
  padding: 0 !important;
}

/* --- Section spacing --- */
#content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

/* --- Alternating light/dark section bands --- */
.treatment-band {
  padding: 3rem 0;
}

.treatment-band-dark {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.92);
  margin-inline-start: 0.75rem;
  margin-inline-end: 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .treatment-band-dark {
    margin-inline-start: 2rem;
    margin-inline-end: 2rem;
    border-radius: 1rem;
  }
}

/* Remove bottom padding when CTA forms the lower edge */
.treatment-band-dark:has(> .container > .treatment-cta:last-child) {
  padding-bottom: 0;
}

.treatment-band-dark h2,
.treatment-band-dark h3,
.treatment-band-dark .treatment-box-heading,
.treatment-band-dark .lead,
.treatment-band-dark .h5 {
  color: #fff;
}

.treatment-band-dark p {
  color: rgba(255, 255, 255, 0.92);
}

.treatment-band-dark a:not(.btn) {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.treatment-band-dark a:not(.btn):hover {
  color: #fff;
}

/* Phones: the video pages' guide button (macros/video.njk, the only
   .btn-light.btn-lg in a dark band). A long topic name wraps into even lines with
   the arrow after its last words, never alone on the second line. */
@media (max-width: 767.98px) {
  .treatment-band-dark .btn-light.btn-lg {
    text-wrap: balance;
  }
}

/* Dark band: content boxes */
.treatment-band-dark .treatment-content-box {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.treatment-band-dark .treatment-list li {
  color: rgba(255, 255, 255, 0.92);
}

/* Dark band: quick facts */
.treatment-band-dark .treatment-fact-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.treatment-band-dark .treatment-fact-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.12);
}

.treatment-band-dark .treatment-fact-card h3,
.treatment-band-dark .treatment-fact-icon .bi {
  color: #fff;
}

.treatment-band-dark .treatment-fact-card .text-secondary {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Dark band: inline CTA — darker shade forming bottom edge */
.treatment-band-dark .treatment-cta {
  background-color: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  /* Stretch background to full width of dark band */
  margin-inline-start: -9999px;
  margin-inline-end: -9999px;
  padding-inline-start: 9999px;
  padding-inline-end: 9999px;
  /* Sit flush at bottom edge */
  margin-bottom: 0 !important;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Dark band: buttons */
.treatment-band-dark .btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.treatment-band-dark .btn-outline-primary:hover {
  background-color: #fff;
  border-color: #fff;
  color: var(--primary-color);
}

/* Dark band: FAQ cards */
.treatment-band-dark .treatment-faq-card {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.06);
}

.treatment-band-dark .treatment-faq-card .card-header a,
.treatment-band-dark .treatment-faq-card .card-header button.btn-link {
  color: #fff;
}

.treatment-band-dark .treatment-faq-card .card-header:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.treatment-band-dark .treatment-faq-card .card-body {
  color: rgba(255, 255, 255, 0.9);
}

/* Dark band: alert box override */
.treatment-band-dark .alert-warning {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 200, 50, 0.3);
  color: #fff;
}

/* Dark band: images keep their border-radius */
.treatment-band-dark .treatment-img-wrap {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- Related topics pills --- */
.related-pill {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--primary-color);
  border-radius: 50px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.related-pill:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Full-width h2s: centered with extra bottom spacing */
.treatment-band .container > h2 {
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Reset h2 top margin for first h2 in each band */
.treatment-band h2:first-child {
  margin-top: 0;
}


/* ========================================================================
   ANIMATIONS
   ======================================================================== */

@media (min-width: 992px) {
  [data-animation] {
    visibility: hidden;
  }
  [data-animation].animate__animated {
    visibility: visible;
  }
}


/* ========================================================================
   RIGHT-TO-LEFT (RTL)
   ========================================================================
   Everything above this block is written with CSS logical properties, so an
   RTL page mirrors on its own: margins, padding, borders, insets, radii and
   text alignment all follow the inline axis. This block carries ONLY the
   things logical properties cannot express, and it matches nothing on an
   LTR page, so it costs an English site nothing but the bytes.

   Three kinds of thing live here:
     1. glyphs whose meaning is tied to reading direction,
     2. physical transforms and physical shadows, which ignore `dir`,
     3. runs of digits that must not be reordered by the bidi algorithm.
   ======================================================================== */

/* --- 1. Directional glyphs ---------------------------------------------
   An icon is mirrored only when it POINTS somewhere: an arrow or chevron
   that means "onward" has to keep meaning onward once onward is leftwards.

   Deliberately NOT mirrored, because flipping them reads as a rendering
   bug rather than a translation: bi-chevron-down / bi-chevron-up and every
   other vertical caret; bi-arrow-left-right and any other bilateral glyph;
   logos; play, pause and the rest of the media transport set; and the
   non-pointing icons this template uses -- bi-chat-dots-fill, bi-robot,
   bi-x-lg, bi-calendar-event, bi-telephone-fill, bi-clock, bi-search.

   Three of those were adjudicated rather than assumed, so a later sweep
   does not "fix" them into the list below:
     bi-sign-turn-right   depicts a literal real-world turn. Mirroring it
                          says "turn left", which is a different instruction,
                          not a translated one. Same rule as a play button.
     bi-telephone-outbound  its arrow is outbound-call semantics, not reading
                          flow, and the handset it sits on is pictorial.
     bi-graph-up-arrow    (oral-cancer-screening) reads as directional but is
                          a trending-up pictogram -- the arrow encodes "rising
                          over time", and a chart's time axis is not the
                          page's reading axis. Mirroring it would say
                          "declining".
   All three stay unflipped deliberately.

   The transform is applied to ::before rather than to the <i> itself.
   Bootstrap Icons draws the glyph in that pseudo-element and already gives
   it `display: inline-block`; the <i> is a non-replaced inline box, which
   transforms do not affect. */
[dir="rtl"] .bi-arrow-right::before,
[dir="rtl"] .bi-arrow-right-short::before,
[dir="rtl"] .bi-arrow-right-circle::before,
[dir="rtl"] .bi-arrow-right-circle-fill::before,
[dir="rtl"] .bi-arrow-right-square::before,
[dir="rtl"] .bi-arrow-left::before,
[dir="rtl"] .bi-arrow-left-short::before,
[dir="rtl"] .bi-arrow-left-circle::before,
[dir="rtl"] .bi-arrow-left-circle-fill::before,
[dir="rtl"] .bi-arrow-left-square::before,
[dir="rtl"] .bi-arrow-return-left::before,
[dir="rtl"] .bi-arrow-return-right::before,
[dir="rtl"] .bi-chevron-right::before,
[dir="rtl"] .bi-chevron-left::before,
[dir="rtl"] .bi-chevron-double-right::before,
[dir="rtl"] .bi-chevron-double-left::before,
[dir="rtl"] .bi-caret-right::before,
[dir="rtl"] .bi-caret-right-fill::before,
[dir="rtl"] .bi-caret-left::before,
[dir="rtl"] .bi-caret-left-fill::before,
[dir="rtl"] .bi-box-arrow-right::before,
[dir="rtl"] .bi-box-arrow-left::before,
[dir="rtl"] .bi-reply::before,
[dir="rtl"] .bi-reply-fill::before,
[dir="rtl"] .bi-send::before,
[dir="rtl"] .bi-send-fill::before {
  display: inline-block;
  transform: scaleX(-1);
}

/* Bootstrap's carousel controls are background-image chevrons rather than
   icon-font glyphs, so the rule above cannot reach them. The controls
   themselves now mirror (the remap swaps .carousel-control-prev/next), and
   the arrows inside them have to follow or "previous" would point the wrong
   way. Used by src/pages/gentlewave-procedure.njk. */
[dir="rtl"] .carousel-control-prev-icon,
[dir="rtl"] .carousel-control-next-icon {
  transform: scaleX(-1);
}

/* --- 2. Physical transforms and shadows --------------------------------
   .navbar-side is the classic mobile sidebar. It is pinned across the
   viewport and slid out of frame with translateX, which is a physical
   transform and ignores `dir`, so the off-screen sign has to be flipped by
   hand. The open states are restated here rather than left to inherit:
   `[dir="rtl"] .navbar-side` and `.navbar-side.show` carry identical
   specificity, and this block is later in the file, so without the restate
   the closed position would win over the open one. */
[dir="rtl"] .navbar-side { transform: translateX(100%); }
[dir="rtl"] .navbar-side.show { transform: translateX(0); }
[dir="rtl"] .navbar-side .navbar-side-content { transform: translateX(100%); }
[dir="rtl"] .navbar-side.show .navbar-side-content { transform: translateX(0); }

/* .btn-gradient overlaps the button before it and casts its shadow away
   from that seam. Both the overlap (inset-inline-start) and the rounded
   corner mirror on their own; box-shadow offsets are physical. */
[dir="rtl"] .btn-gradient { box-shadow: -2px 0px 0px 0px rgba(78, 72, 72, 0.4); }

/* --- 2b. The Sienna accessibility widget must swap corners too ---------
   Sienna is third-party and injects its own stylesheet at runtime, pinning
   its launcher to the physical left (`.asw-menu-btn { left: 30px }`) and its
   panel to the physical left edge (`.asw-menu { left: 0 }`). Physical, so it
   does not mirror, and it is unaware of this template entirely.

   That is a COLLISION, not a cosmetic issue. In LTR the two launchers sit in
   opposite corners -- Sienna bottom-left, chat bottom-right. Under RTL the
   chat launcher correctly mirrors to bottom-left via inset-inline-end and
   lands underneath Sienna, which carries z-index 500000 against the chat's
   1100. The chat button is then completely unclickable: a real pointer press
   at its centre is swallowed by Sienna's SVG.

   So Sienna mirrors as well, and the two swap corners exactly as they would
   in a right-to-left design. This is also simply the correct RTL placement
   for Sienna: it occupies the inline-start corner, which is the right-hand
   one in Arabic.

   The two overrides win by DIFFERENT mechanisms, which is worth knowing
   before either is touched.

   The PANEL (.asw-menu) is the simple case. Sienna writes inline positioning
   on it only when its own config asks for a right-hand position
   (`S?.position?.includes("right")` -> `style.right="0px"`), and this
   template initialises it with no config at all, so nothing competes and
   plain specificity decides: (0,2,0) here against its (0,1,0), which its
   runtime-injected sheet cannot beat regardless of source order.

   The LAUNCHER (.asw-menu-btn) is NOT that case. Its markup carries
   `style="bottom: 20px; left: 20px;"` unconditionally, in every direction,
   and an inline declaration outranks any selector -- so the rule below does
   not out-specify it and was never going to. What actually happens is that
   adding `right` leaves the box over-constrained: `left`, `width` and
   `right` are all non-auto at once. CSS 2.1 section 10.3.7 resolves that by
   discarding one of the two insets, and WHICH one is chosen by the
   containing block's `direction` -- `right` is dropped under ltr, `left`
   under rtl. On an Arabic page the containing block is rtl, so the inline
   `left` is the one discarded and the button is placed from the right.

   That is a real dependency on the over-constraint rule, not a specificity
   win, and it is verifiable: flipping the root `dir` to ltr while changing
   nothing else moves the button straight back to the left edge.

   The caveat therefore stands and gets sharper. If Sienna is ever given a
   `position` option containing "right", it will write an inline `right`,
   which beats this rule outright -- inline against a stylesheet, with no
   over-constraint left to exploit because only one inset would remain in
   play. Revisit this block if that config is ever introduced. */
[dir="rtl"] .asw-menu-btn {
  left: auto;
  right: 30px;
}

[dir="rtl"] .asw-menu {
  left: auto;
  right: 0;
}

/* The "selected" tick sits in the inline-end corner of each tool button
   (Sienna 2.1.0 hangs it 8px outside the corner: top/right -8px). */
[dir="rtl"] .asw-btn.asw-selected:after {
  right: auto;
  left: -8px;
}

/* --- 3. Digit runs that must stay left-to-right ------------------------
   Numbers are Bidi_Class EN/AN and the separators between them are neutral,
   so "8am - 5pm" and "(555) 123-4567" are re-ordered into nonsense when the
   surrounding paragraph is RTL. Isolating each run as its own LTR context
   fixes the order without disturbing how the row itself is aligned.

   The hours selector is coupled to the shape of practice-summary.njk and
   the homepage contact card, where each row is a two-span flex line and the
   time is the second span. If that markup changes, this follows it. */
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] .contact-phone a,
[dir="rtl"] .contact-hours .d-flex > span:last-child,
[dir="rtl"] .video-library-duration,
[dir="rtl"] code,
[dir="rtl"] kbd,
[dir="rtl"] samp {
  direction: ltr;
  unicode-bidi: isolate;
}

[dir="rtl"] pre {
  direction: ltr;
  text-align: left;
}
