/* ==========================================================================
   Ollie Dental Clinic — BASE
   Design tokens · reset · typography · utilities · buttons
   ========================================================================== */

:root {
  /* Brand — Royal Champagne & Imperial Gold palette (Luxurious & Sophisticated) */
  --gold-100: #fbf5e6;
  --gold-200: #f2e0b5;
  --gold-300: #e2c072;
  --gold-400: #cfa74b;   /* Royal luxury gold */
  --gold-500: #b88d32;
  --gold-600: #986f1e;
  --gold-700: #745214;
  --gold-rgb: 207, 167, 75;
  --gold-grad: linear-gradient(135deg, #f5e6c4 0%, #cfa74b 38%, #aa7e22 72%, #ebd085 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(245, 230, 196, .24), rgba(170, 126, 34, .09));

  /* Neutrals */
  --onyx-950: #070708;
  --onyx-900: #0c0c0e;
  --onyx-850: #111114;
  --onyx-800: #16161a;
  --onyx-700: #1f1f25;
  --onyx-600: #2b2b33;
  --ivory-50: #fffdf8;
  --ivory-100: #fbf8ef;
  --ivory-200: #f4efe1;
  --ivory-300: #e9e2cd;
  --ink: #141418;
  --ink-soft: #3d3c44;
  --muted: #6f6d77;
  --muted-dark: #a3a1ab;
  --line: rgba(20, 20, 24, .09);
  --line-dark: rgba(255, 255, 255, .08);

  /* Typography */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Fredoka", "Manrope", sans-serif;

  --fs-xs: .78rem;
  --fs-sm: .9rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.2rem, 1rem + .6vw, 1.45rem);
  --fs-h3: clamp(1.45rem, 1.1rem + 1vw, 1.9rem);
  --fs-h2: clamp(2.2rem, 1.4rem + 3vw, 3.9rem);
  --fs-h1: clamp(2.9rem, 1.6rem + 5.2vw, 6.2rem);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.15rem, .6rem + 2.4vw, 2.5rem);
  --section-y: clamp(5rem, 3.5rem + 6vw, 9rem);
  --header-h: 84px;

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(16, 14, 6, .06);
  --shadow-md: 0 18px 40px -18px rgba(16, 14, 6, .22);
  --shadow-lg: 0 40px 80px -30px rgba(16, 14, 6, .35);
  --shadow-gold: 0 18px 40px -14px rgba(207, 167, 75, .45);

  /* Motion */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .2s;
  --t: .45s;
  --t-slow: .9s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}
body.is-locked { overflow: hidden; }
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--gold-400); color: var(--ink); }

/* Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Safe area insets for modern mobile displays & notches */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Ultra-compact screen adjustments (iPhone SE / Fold outer screen) */
@media (max-width: 360px) {
  :root {
    --gutter: 0.85rem;
  }
  .btn {
    padding: 0 1.15rem;
    font-size: 0.82rem;
  }
  .brand__name {
    font-size: 1.25rem;
  }
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
p { max-width: 68ch; }

.text-gold {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.italic { font-style: italic; }

/* ---------- Layout utilities ---------- */
.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}
.section { padding-block: var(--section-y); position: relative; }
.section--dark { background: var(--onyx-900); color: var(--ivory-100); }
.section--ivory { background: var(--ivory-100); }
.section--cream { background: var(--ivory-200); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: .7rem 1.2rem;
  background: var(--ink);
  color: var(--gold-300);
  border-radius: var(--r-pill);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

/* Section heading block */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-600);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}
.section--dark .eyebrow { color: var(--gold-300); }

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; }
.section-head h2 { margin-top: 1.1rem; }
.section-head p {
  margin-top: 1.2rem;
  font-size: var(--fs-md);
  color: var(--muted);
}
.section-head--center p { margin-inline: auto; }
.section--dark .section-head p { color: var(--muted-dark); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--ivory-50);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 54px;
  padding: 0 1.75rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t-fast);
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--t) var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg.arrow { transform: translateX(4px); }

.btn--gold {
  --btn-fg: var(--ink);
  background: var(--gold-grad);
  background-size: 200% 200%;
  box-shadow: var(--shadow-gold);
  animation: goldShift 6s ease-in-out infinite;
}
.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .65) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease);
}
.btn--gold:hover::after { transform: translateX(120%); }

.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--ivory-50); }
.btn--dark:hover { box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .55); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1px solid rgba(20, 20, 24, .18);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold-500); color: var(--gold-700); }
.section--dark .btn--ghost,
.page-section--dark .btn--ghost,
.page-section--onyx .btn--ghost,
.btn--ghost-light {
  --btn-fg: #ffffff;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.section--dark .btn--ghost:hover,
.page-section--dark .btn--ghost:hover,
.page-section--onyx .btn--ghost:hover,
.btn--ghost-light:hover {
  color: var(--gold-200);
  background: rgba(207, 167, 75, 0.16);
  border-color: var(--gold-400);
}

.btn--sm { min-height: 44px; padding: 0 1.25rem; font-size: var(--fs-xs); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: all var(--t) var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--ink); color: var(--gold-300); border-color: var(--ink); }
.section--dark .icon-btn { border-color: var(--line-dark); }
.section--dark .icon-btn:hover { background: var(--gold-400); color: var(--ink); border-color: var(--gold-400); }

.svg-sprite { display: none; }

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

/* ==========================================================================
   ARABIC & RTL SYSTEM SUPPORT
   ========================================================================== */
html[dir="rtl"],
[dir="rtl"] body {
  font-family: "Cairo", "Manrope", system-ui, -apple-system, sans-serif;
  text-align: right;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .brand__name,
[dir="rtl"] .hero__title,
[dir="rtl"] .section-head h2,
[dir="rtl"] .page-hero-lux__title,
[dir="rtl"] .service-hero__title,
[dir="rtl"] .dr-quote,
[dir="rtl"] .modal__title {
  font-family: "Cairo", var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

[dir="rtl"] .brand__sub {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0.12em;
}

[dir="rtl"] .eyebrow {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0.08em;
}

[dir="rtl"] .eyebrow::before {
  margin-left: 0.7rem;
  margin-right: 0;
}

[dir="rtl"] .section-head--center .eyebrow::after {
  margin-right: 0.7rem;
  margin-left: 0;
}

[dir="rtl"] p {
  line-height: 1.8;
}

/* Buttons & Directional Icons */
[dir="rtl"] .btn {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0.02em;
}

[dir="rtl"] .btn svg.arrow,
[dir="rtl"] .nav__dropdown-all svg,
[dir="rtl"] .modal__action svg,
[dir="rtl"] .svc-card-lux__actions .btn--ghost svg {
  transform: scaleX(-1);
}

[dir="rtl"] .btn:hover svg.arrow {
  transform: scaleX(-1) translateX(-4px);
}

[dir="rtl"] .btn--gold::after {
  transform: translateX(120%);
}
[dir="rtl"] .btn--gold:hover::after {
  transform: translateX(-120%);
}

/* Floating Action Buttons */
[dir="rtl"] .fab-wa {
  right: auto;
  left: 24px;
}
[dir="rtl"] .to-top {
  right: auto;
  left: 92px;
}

/* Header, Language Menu & Navigation:
   Keep language switchers as international LTR components so:
   1. The toggle button keeps clean order: [Globe] [CODE] [Chevron] rather than inverted [^] [CODE] [Globe].
   2. Dropdown options keep [CODE] tightly and neatly grouped with language name without huge gaps.
   3. The dropdown menu aligns seamlessly below the toggle button. */
[dir="rtl"] .lang,
[dir="rtl"] .lang__toggle,
[dir="rtl"] .lang__menu,
[dir="rtl"] .lang__opt,
[dir="rtl"] .footer__langs {
  direction: ltr !important;
}

[dir="rtl"] .lang__menu {
  left: 0 !important;
  right: auto !important;
}

[dir="rtl"] .lang__opt {
  flex-direction: row !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 0.6rem !important;
}

[dir="rtl"] .footer__links a:hover,
[dir="rtl"] .footer__list a:hover,
[dir="rtl"] .footer__address-link:hover {
  transform: translateX(-4px);
}

[dir="rtl"] .nav__dropdown-btn {
  text-align: right;
}

[dir="rtl"] .nav__dropdown-btn:hover {
  transform: translateX(-3px);
}

[dir="rtl"] .nav__dropdown-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav__dropdown-footer a {
  flex-direction: row-reverse;
}

/* Forms & Input Fields */
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .faq-search-input {
  padding: 1.15rem 3.5rem 1.15rem 1.4rem;
  text-align: right;
}

[dir="rtl"] .faq-search-icon {
  left: auto;
  right: 1.35rem;
}

[dir="rtl"] .faq-search-clear {
  right: auto;
  left: 1.25rem;
}

[dir="rtl"] .faq-lux-btn,
[dir="rtl"] .faq-btn {
  text-align: right;
}

[dir="rtl"] .faq-lux-body,
[dir="rtl"] .faq-body {
  text-align: right;
}

/* Hero Layout & Mirrored Background in RTL */
[dir="rtl"] .hero__img {
  transform: scaleX(-1);
}

[dir="rtl"] .hero__veil {
  background: linear-gradient(
    270deg,
    rgba(12, 12, 14, 0.98) 0%,
    rgba(12, 12, 14, 0.94) 34%,
    rgba(12, 12, 14, 0.65) 48%,
    rgba(12, 12, 14, 0.04) 68%,
    rgba(12, 12, 14, 0.20) 100%
  );
}

[dir="rtl"] .hero__inner {
  padding-left: var(--gutter);
  padding-right: clamp(2rem, 12.5vw, 15rem);
}

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

@media (max-width: 900px) {
  [dir="rtl"] .hero__media {
    background-image: url('../assets/images/doctor/portrait-600.webp');
    background-size: cover;
    background-position: 70% center;
    background-repeat: no-repeat;
  }
  [dir="rtl"] .hero__img {
    transform: none;
    object-position: 70% center;
  }
  [dir="rtl"] .hero__veil {
    background: linear-gradient(
      180deg,
      rgba(12, 12, 14, 0.35) 0%,
      rgba(12, 12, 14, 0.70) 50%,
      rgba(12, 12, 14, 0.96) 100%
    );
  }
  [dir="rtl"] .hero__inner {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  [dir="rtl"] .hero__content {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Hero floating cards */
[dir="rtl"] .hero__card {
  right: auto;
  left: 2rem;
}
[dir="rtl"] .hero__badge {
  right: auto;
  left: 6rem;
}

/* Modals */
[dir="rtl"] .modal__close {
  right: auto;
  left: 1.25rem;
}

[dir="rtl"] .modal__head {
  right: auto;
  left: 1.5rem;
}

/* Phone links keep clean international LTR format */
[dir="rtl"] .footer__phone-link,
[dir="rtl"] a[href^="tel:"] {
  direction: ltr !important;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Matcher & Filter Pills */
[dir="rtl"] .matcher-pill,
[dir="rtl"] .svc-filter-btn,
[dir="rtl"] .case-filter-btn,
[dir="rtl"] .review-filter-btn,
[dir="rtl"] .faq-filter-btn {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0.02em;
}

[dir="rtl"] .matcher-result-lux {
  text-align: right;
}




/* ==========================================================================
   RTL Motion & Marquees Fixes (Seamless infinite scroll in Arabic)
   ========================================================================== */
/* Keep horizontal infinite marquee containers in LTR scroll coordinates so
   translateX(-50%) and scrollLeft advance continuously without disappearing */
[dir="rtl"] .services-marquee,
[dir="rtl"] .marquee,
[dir="rtl"] .marquee--reviews,
[dir="rtl"] .filmstrip-wrap,
[dir="rtl"] .filmstrip {
  direction: ltr !important;
}

/* Individual inner cards preserve proper Arabic RTL typography & alignment */
[dir="rtl"] .scard-v,
[dir="rtl"] .rcard {
  direction: rtl !important;
  text-align: right;
}

[dir="rtl"] .scard-v__actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .thumb__phase,
[dir="rtl"] .thumb__toggle {
  direction: rtl !important;
}

/* Services Dock Navigation Arrows in Arabic RTL (Reversed directions) */
[dir="rtl"] .services-dock__arrow-icon {
  transform: scaleX(-1);
}
[dir="rtl"] .services-dock__nav-btn--prev:hover .services-dock__arrow-icon {
  transform: scaleX(-1) translateX(-3px);
}
[dir="rtl"] .services-dock__nav-btn--next:hover .services-dock__arrow-icon {
  transform: scaleX(-1) translateX(3px);
}

/* About Section Circular Rotating Seal (strict LTR SVG path rendering) */
[dir="rtl"] .about__seal,
[dir="rtl"] .about__seal-text,
[dir="rtl"] .about__seal-text text,
[dir="rtl"] .about__seal-text textPath {
  direction: ltr !important;
  unicode-bidi: normal !important;
}

/* Before & After Interactive Comparison Slider (strict LTR coordinate sync) */
[dir="rtl"] .ba,
[dir="rtl"] .ba__range {
  direction: ltr !important;
}


