/* Lumina Dental & Aesthetics — minimalist luxury, light + dark */
:root {
  --alabaster: #FAF9F6;
  --teal: #134E4A;
  --gold: #C5A059;
  --bg: var(--alabaster);
  --surface: #FFFFFF;
  --surface-2: #F3F1EB;
  --text: #183C38;
  --muted: #5E6E6B;
  --line: rgba(19, 78, 74, .16);
  --header-bg: rgba(250, 249, 246, .95);
  --primary-bg: var(--teal);
  --primary-fg: #FFFFFF;
  --gold-deep: #8A6B2F;
  --gold-soft: rgba(197, 160, 89, .14);
  --shadow: 0 18px 50px rgba(19, 78, 74, .10);
  --shadow-hover: 0 26px 60px rgba(19, 78, 74, .17);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0C2927;
  --surface: #123B37;
  --surface-2: #0F3330;
  --text: #F3F0E8;
  --muted: #B7C8C4;
  --line: rgba(243, 240, 232, .17);
  --header-bg: rgba(12, 41, 39, .95);
  --primary-bg: var(--gold);
  --primary-fg: #0C2927;
  --gold-deep: #E4C98C;
  --gold-soft: rgba(197, 160, 89, .18);
  --shadow: 0 18px 50px rgba(0, 0, 0, .32);
  --shadow-hover: 0 26px 60px rgba(0, 0, 0, .46);
}

html[dir="rtl"] {
  --font-serif: "Segoe UI", Tahoma, Arial, sans-serif;
  --font-sans: "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-weight: 400; }
p { margin-block: 0 1rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.skip-link {
  position: absolute;
  inset-block-start: -80px;
  inset-inline-start: 1rem;
  z-index: 100;
  background: var(--gold);
  color: #0C2927;
  padding: .6rem 1rem;
}
.skip-link:focus { inset-block-start: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 78px; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: 0 0 auto; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--teal); color: var(--gold);
  border-radius: 50%; padding: 7px;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
}
[data-theme="dark"] .brand-name { color: var(--text); }
.brand-tagline {
  font-size: .66rem;
  color: var(--muted);
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.main-nav { display: flex; align-items: center; gap: clamp(.8rem, 1.7vw, 1.8rem); margin-inline: auto; }
.main-nav a { font-size: .87rem; white-space: nowrap; position: relative; padding-block: .5rem; }
.main-nav a::after {
  content: ""; position: absolute;
  inset-inline-start: 0; inset-block-end: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .25s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }
.main-nav a[aria-current="page"] { color: var(--gold-deep); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .55rem; flex: none; }
.icon-btn, .menu-toggle {
  width: 38px; height: 38px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--teal);
  cursor: pointer; transition: border-color .25s, background .25s, transform .25s;
}
[data-theme="dark"] .icon-btn, [data-theme="dark"] .menu-toggle { color: var(--text); }
.icon-btn:hover, .menu-toggle:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-1px); }
.icon-btn svg, .menu-toggle svg { width: 18px; height: 18px; }
.phone-icon svg { fill: currentColor; }
.theme-btn .icon-moon { fill: currentColor; }
.theme-btn .icon-sun { display: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
.menu-toggle { display: none; }
.menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; }
.lang-switch {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .65rem; border: 1px solid var(--line);
  border-radius: 999px; font-size: .8rem; white-space: nowrap;
  transition: border-color .25s, background .25s;
}
.lang-switch .flag { font-size: 1rem; line-height: 1; }
.lang-switch:hover { border-color: var(--gold); background: var(--gold-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.5rem;
  border: 1px solid transparent; border-radius: 2px;
  font-size: .88rem; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn-gold { background: var(--gold); color: #0C2927; }
.btn-gold:hover { background: #D3B36C; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }
.btn-header { min-height: 38px; padding: .45rem .85rem; font-size: .8rem; }
.btn-header svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- Shared typography ---------- */
.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  margin: 0 0 1rem;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; flex: none; }
.eyebrow-light { color: #E4C98C; }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.tinted-section { background: var(--surface-2); }
.section-heading { margin-block-end: clamp(2rem, 4vw, 3.2rem); }
.section-heading h2, .split-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 1rem;
}
.section-heading p, .split-copy p, .heading-text { color: var(--muted); }
.section-heading-center { text-align: center; max-width: 640px; margin-inline: auto; }
.section-heading-center .eyebrow { justify-content: center; }
.section-heading-wide { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: end; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--gold-deep); font-weight: 600; font-size: .9rem; }
.text-link:hover { text-decoration: underline; }
[dir="rtl"] .text-link span { display: inline-block; transform: scaleX(-1); }

/* ---------- Reveal animation (only when JS is active) ---------- */
.js .reveal, .js .cards-grid > *, .js .feature-list > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible, .js .reveal.is-visible .cards-grid > *, .js .reveal.is-visible .feature-list > * {
  opacity: 1; transform: none;
}
.js .cards-grid > *:nth-child(2), .js .feature-list > *:nth-child(2) { transition-delay: .09s; }
.js .cards-grid > *:nth-child(3), .js .feature-list > *:nth-child(3) { transition-delay: .18s; }
.js .cards-grid > *:nth-child(4) { transition-delay: .27s; }

/* ---------- Hero ---------- */
.hero, .page-hero {
  position: relative; isolation: isolate;
  background-image: var(--hero-image);
  background-size: cover; background-position: center;
  display: flex; align-items: center;
  color: #fff;
}
/* URLs live in this stylesheet so they resolve correctly from / and /ar/ */
.hero { --hero-image: url('../images/hero-clinic.jpg'); min-height: min(680px, 88vh); }
.page-hero { min-height: 430px; }
.page-about { --hero-image: url('../images/consultation.jpg'); }
.page-services { --hero-image: url('../images/smile.jpg'); }
.page-technology { --hero-image: url('../images/digital-scan.jpg'); }
.page-contact { --hero-image: url('../images/consultation.jpg'); }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(9, 38, 36, .93) 0%, rgba(9, 38, 36, .76) 48%, rgba(9, 38, 36, .35) 100%);
}
[dir="rtl"] .hero-shade { background: linear-gradient(270deg, rgba(9, 38, 36, .93) 0%, rgba(9, 38, 36, .76) 48%, rgba(9, 38, 36, .35) 100%); }
.hero-inner, .page-hero-inner { padding-block: 5.5rem; }
.hero h1, .page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  line-height: 1.12;
  color: #fff;
  max-width: 17ch;
  margin: 0 0 1.3rem;
}
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); max-width: 20ch; }
.hero-text, .page-hero-inner > p:last-child { color: rgba(255, 255, 255, .88); max-width: 56ch; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-block-start: 2rem; }
.hero-actions-center { justify-content: center; }
.hero-line { position: absolute; inset-block-end: 0; inset-inline-start: 0; width: 120px; height: 3px; background: var(--gold); }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--surface); padding: 2rem 1.4rem; }
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.1; color: var(--teal);
  margin: 0 0 .4rem;
}
[data-theme="dark"] .stat-number { color: var(--gold); }
.stat-label { color: var(--muted); font-size: .86rem; margin: 0; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.cards-grid-three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: .9rem;
  min-height: 258px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 2rem 1.6rem;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--gold); }
.card-icon {
  width: 50px; height: 50px; flex: none;
  display: grid; place-items: center;
  background: var(--gold-soft); color: var(--teal);
  border-radius: 50%; transition: transform .3s ease;
}
[data-theme="dark"] .card-icon { color: var(--gold); }
.card:hover .card-icon { transform: scale(1.13); }
.card-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.35; margin: 0; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card-more { margin-block-start: auto; color: var(--gold-deep); font-size: .82rem; font-weight: 600; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; border-radius: 2px; }
.media-accent {
  position: absolute; inset-block-start: -16px; inset-inline-end: -16px;
  width: 88px; height: 88px; pointer-events: none;
  border-block-start: 2px solid var(--gold); border-inline-end: 2px solid var(--gold);
}
.split-copy .btn { margin-block-start: 1rem; }
.split-reverse .split-media { order: 2; }

/* ---------- Feature list ---------- */
.feature-list { display: grid; gap: 1.4rem; }
.feature {
  display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); padding: 1.3rem;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.feature:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-3px); }
.feature img { width: 100%; height: 180px; object-fit: cover; }
.feature h3 { font-family: var(--font-serif); font-size: 1.35rem; margin: 0 0 .5rem; }
.feature p { color: var(--muted); margin: 0; }
.feature-index { color: var(--gold-deep); font-size: .75rem; letter-spacing: .15em; display: block; margin-block-end: .35rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; isolation: isolate; background: var(--teal); color: #fff; padding-block: clamp(3.5rem, 6vw, 5rem); }
.cta-band-image { --hero-image: url('../images/aligners.jpg'); background-image: var(--hero-image); background-size: cover; background-position: center; }
.cta-band-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.8rem); color: #fff; margin: 0 0 .6rem; }
.cta-band .cta-band-inner > div > p:last-child { color: rgba(255, 255, 255, .84); max-width: 60ch; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; align-items: start; }
.form-card, .details-card { background: var(--surface); border: 1px solid var(--line); padding: clamp(1.5rem, 3vw, 2.5rem); }
.form-card h2, .details-card h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0 0 .8rem; }
.form-intro { color: var(--muted); font-size: .9rem; }
.field { margin-block-end: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-block-end: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 2px;
  padding: .78rem .9rem;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.detail-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.detail-list li { padding-block: 1rem; border-block-start: 1px solid var(--line); overflow-wrap: anywhere; }
.detail-label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.detail-value { display: block; margin-block-start: .25rem; }
.detail-list a:hover { color: var(--gold-deep); text-decoration: underline; }

/* ---------- 404 ---------- */
.notfound-section { min-height: 62vh; display: grid; place-items: center; padding-block: 5rem; }
.notfound-inner { text-align: center; max-width: 620px; }
.notfound-code { font-family: var(--font-serif); font-size: clamp(5rem, 15vw, 9rem); line-height: 1; color: var(--gold); margin: 0; }
.notfound-inner h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin: 1rem 0; }
.notfound-inner > p:not(.notfound-code) { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal); color: #F3F0E8; padding-block: 4rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 3rem; }
.footer-grid .brand-name { color: #fff; }
.footer-grid .brand-mark { background: rgba(255, 255, 255, .08); color: var(--gold); }
.footer-grid .brand-tagline { color: rgba(255, 255, 255, .68); }
.footer-brand > p { color: rgba(255, 255, 255, .72); max-width: 34ch; margin-block-start: 1.2rem; font-size: .9rem; }
.footer-col h2 { font-family: var(--font-serif); font-size: 1.05rem; letter-spacing: .06em; margin: 0 0 1.2rem; color: #E4C98C; }
.site-footer .detail-label { color: #E4C98C; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.footer-links li, .footer-contact li { margin-block-end: .55rem; overflow-wrap: anywhere; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold); text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-block-start: 1px solid rgba(255, 255, 255, .18);
  margin-block-start: 3rem; padding-block-start: 1.3rem;
  font-size: .78rem; color: rgba(255, 255, 255, .72);
}
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main-nav {
    display: none;
    position: absolute; inset-block-start: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: .8rem max(24px, calc((100% - 1180px) / 2));
    background: var(--surface); border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .85rem 0; border-block-end: 1px solid var(--line); }
  .main-nav a:last-child { border-block-end: 0; }
  .menu-toggle { display: inline-grid; }
  .section-heading-wide { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: 0; }
  .split-media img { max-height: 420px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 40px); }
  .media-accent { inset-block-start: -8px; inset-inline-end: -8px; width: 60px; height: 60px; }
  .header-inner { min-height: 66px; }
  .brand-tagline, .lang-text, .cta-label { display: none; }
  .btn-header { width: 38px; padding: 0; }
  .hero, .page-hero { background-position: 65% center; }
  .hero-inner, .page-hero-inner { padding-block: 4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 1.2rem; }
  .feature img { height: 220px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { gap: .4rem; }
  .brand-mark { display: none; }
  .brand-name { font-size: 1rem; letter-spacing: .12em; }
  .header-actions { gap: .25rem; }
  .icon-btn, .menu-toggle, .btn-header, .lang-switch { width: 32px; height: 32px; padding: 0; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .btn { padding-inline: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal, .js .cards-grid > *, .js .feature-list > * { opacity: 1 !important; transform: none !important; }
}
