/* ═══════════════════════════════════════════════════════════
   components.css — Reusable UI Components
═══════════════════════════════════════════════════════════ */

/* ─── CONTAINER ─── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ─── SECTION BASE ─── */
.section {
  padding-block: var(--section-py);
  position: relative;
}

.section:nth-child(odd) {
  background-color: var(--clr-bg);
}

.section:nth-child(even) {
  background-color: var(--clr-bg-alt);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition:
    background-color var(--dur-mid) var(--ease),
    color var(--dur-mid) var(--ease),
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--dur-fast) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-gold-light) 0%, var(--clr-gold) 40%, var(--clr-gold-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(75, 191, 204, .30), 0 1px 3px rgba(75, 191, 204, .20);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(75, 191, 204, .45), 0 2px 6px rgba(75, 191, 204, .25);
  opacity: 1;
}

.btn-ghost {
  border: 1.5px solid var(--clr-border-soft);
  color: var(--clr-text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: var(--clr-gold-subtle);
  opacity: 1;
}

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--header-h);
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease),
    box-shadow var(--dur-mid) var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--header-border);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--space-6);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-symbol {
  font-size: 1.65rem;
  color: var(--clr-gold);
  line-height: 1;
  transition: transform var(--dur-mid) var(--ease-spring);
}

.logo:hover .logo-symbol {
  transform: scale(1.12) rotate(-5deg);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-en,
.logo-ar {
  font-family: var(--font-display-en);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

[data-lang="ar"] .logo-ar {
  font-family: var(--font-display-ar);
}

.logo-sub {
  font-size: 0.6rem;
  color: var(--clr-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body-en);
  line-height: 1;
  margin-top: 2px;
}

[data-lang="ar"] .logo-sub.ar-text {
  font-family: var(--font-body-ar);
  letter-spacing: 0;
}

/* Main Nav */
.main-nav ul {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--dur-fast) var(--ease);
  position: relative;
  padding-bottom: 2px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
  transition: width var(--dur-mid) var(--ease-expo);
  border-radius: var(--radius-full);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--clr-text);
  opacity: 1;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Language Toggle */
.lang-toggle {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--clr-border-soft);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--clr-text-muted);
  transition:
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}

.lang-toggle .lang-en,
.lang-toggle .lang-ar {
  display: block;
}

[data-lang="en"] .lang-toggle .lang-ar {
  display: none;
}

[data-lang="ar"] .lang-toggle .lang-en {
  display: none;
}

.lang-toggle:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: var(--clr-gold-subtle);
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--clr-border-soft);
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  transition:
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    transform var(--dur-mid) var(--ease-spring);
}

.theme-toggle:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: var(--clr-gold-subtle);
  transform: rotate(22deg);
}

[data-theme="light"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  width: 38px;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--clr-text);
  border-radius: var(--radius-full);
  transition:
    transform var(--dur-mid) var(--ease-expo),
    opacity var(--dur-mid) var(--ease),
    width var(--dur-mid) var(--ease);
}

.hamburger span:nth-child(1) {
  width: 100%;
}

.hamburger span:nth-child(2) {
  width: 72%;
}

.hamburger span:nth-child(3) {
  width: 100%;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  width: 100%;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: absolute;
  top: var(--header-h);
  inset-inline: 0;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border-soft);
  padding: var(--space-6) var(--container-pad) var(--space-8);
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dur-mid) var(--ease-expo),
    opacity var(--dur-mid) var(--ease);
}

.mobile-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-drawer ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-drawer a {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--clr-text-muted);
  display: block;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--clr-border-soft);
  transition: color var(--dur-fast) var(--ease), padding-inline-start var(--dur-fast) var(--ease);
}

.mobile-drawer a:hover {
  color: var(--clr-gold);
  opacity: 1;
  padding-inline-start: var(--space-3);
}

/* ─── SCROLL-TO-TOP ─── */
.scroll-top {
  position: fixed;
  bottom: var(--space-8);
  inset-inline-end: var(--space-8);
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--clr-gold-light), var(--clr-gold-dark));
  color: white;
  border-radius: var(--radius-full);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease-spring);
  box-shadow: var(--shadow-gold);
  z-index: 900;
  border: none;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(75, 191, 204, .40);
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--clr-surface-2);
  border-top: 1px solid var(--clr-border-soft);
  padding-block: var(--space-12) var(--space-10);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '⚕';
  position: absolute;
  font-size: 20rem;
  color: var(--clr-gold);
  opacity: 0.015;
  right: -4rem;
  bottom: -6rem;
  line-height: 1;
  pointer-events: none;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  position: relative;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display-en);
  font-size: var(--text-xl);
  color: var(--clr-text);
}

.footer-logo .logo-symbol {
  font-size: 1.5rem;
  color: var(--clr-gold);
}

.footer-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-gold), transparent);
  margin: var(--space-2) auto;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
}

/* ─── IMAGE PLACEHOLDERS (Black) ─── */
.hero-image-placeholder,
.about-image-placeholder,
.doctor-photo-placeholder,
.gallery-placeholder {
  background-color: var(--placeholder-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Subtle grain on placeholders */
.hero-image-placeholder::before,
.gallery-placeholder::before,
.about-image-placeholder::before,
.doctor-photo-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.08;
  pointer-events: none;
}

/* Gold edge shimmer on placeholders */
.doctor-photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(184, 151, 58, .08) 100%);
  pointer-events: none;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  opacity: 0.12;
  z-index: 1;
}

.placeholder-icon {
  font-size: 3rem;
  filter: grayscale(1);
}

.gallery-placeholder {
  border-radius: var(--radius-lg);
}

.ph-label {
  position: absolute;
  bottom: var(--space-4);
  inset-inline-start: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-body-en);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}

[data-lang="ar"] .ph-label.ar-text {
  font-family: var(--font-body-ar);
  letter-spacing: 0;
}

/* ─── REVIEW CARDS ─── */
.review-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  min-width: 320px;
  max-width: 390px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
}

.review-card::before {
  content: '\201C';
  position: absolute;
  top: var(--space-4);
  inset-inline-end: var(--space-6);
  font-family: var(--font-display-en);
  font-size: 5rem;
  color: var(--clr-gold);
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
}

.review-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: var(--clr-border);
}

.review-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.reviewer-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--clr-gold-light), var(--clr-gold-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-md);
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(75, 191, 204, .3);
}

.reviewer-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--clr-text);
  margin-bottom: 2px;
}

.review-stars {
  color: var(--clr-gold);
  font-size: var(--text-sm);
  letter-spacing: 2px;
}

.review-text {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.75;
  font-style: italic;
}

/* Carousel wrapper */
.reviews-track-wrap {
  position: relative;
  overflow: hidden;
  cursor: grab;
  padding-block: var(--space-2) var(--space-4);
  margin-inline: calc(-1 * var(--space-2));
}

.reviews-track-wrap:active {
  cursor: grabbing;
}

.reviews-track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  padding-inline: var(--space-2);
  transition: transform var(--dur-slow) var(--ease-expo);
  will-change: transform;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border-soft);
  font-size: 1.5rem;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-mid) var(--ease-spring),
    box-shadow var(--dur-mid) var(--ease);
}

.carousel-btn.prev {
  inset-inline-start: -14px;
}

.carousel-btn.next {
  inset-inline-end: -14px;
}

.carousel-btn:hover {
  background: var(--clr-gold);
  color: white;
  border-color: var(--clr-gold);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-gold);
}

.carousel-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--clr-border-soft);
  transition:
    background var(--dur-mid) var(--ease),
    width var(--dur-mid) var(--ease-spring);
  cursor: pointer;
  border: none;
}

.carousel-dot.active {
  background: var(--clr-gold);
  width: 28px;
}

/* ─── RATING SUMMARY ─── */
.rating-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.rating-summary .stars {
  color: var(--clr-gold);
  font-size: var(--text-xl);
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(75, 191, 204, .3);
}

.rating-num {
  font-family: var(--font-display-en);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--clr-text);
}

.rating-count {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

/* ─── SERVICE CARDS ─── */
.service-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
  animation-delay: calc(var(--delay, 0) * 80ms);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
  transform: scaleX(0);
  transform-origin: inset-inline-start center;
  transition: transform var(--dur-mid) var(--ease-expo);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: var(--clr-border);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-icon-wrap {
  font-size: 2.5rem;
  margin-bottom: var(--space-5);
  line-height: 1;
  display: inline-block;
}

.service-name {
  font-family: var(--font-display-en);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--clr-text);
  font-weight: 600;
}

[data-lang="ar"] .service-name {
  font-family: var(--font-display-ar);
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.75;
}

.service-tag {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--clr-gold);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 0.2rem var(--space-4);
  letter-spacing: 0.04em;
  background: var(--clr-gold-subtle);
}

/* CTA card */
.service-card.cta-card {
  background: linear-gradient(135deg, var(--clr-gold-light) 0%, var(--clr-gold) 50%, var(--clr-gold-dark) 100%);
  border-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
}

.service-card.cta-card::after {
  display: none;
}

.cta-card-label {
  font-family: var(--font-display-en);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: white;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

[data-lang="ar"] .cta-card-label {
  font-family: var(--font-display-ar);
}

.cta-card-body {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.service-card.cta-card .btn-primary {
  background: white;
  color: var(--clr-navy, #1B2E4B);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

.service-card.cta-card .btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

/* ─── DOCTOR CARDS ─── */
.doctor-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
  animation-delay: calc(var(--delay, 0) * 100ms);
}

.doctor-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
  border-color: var(--clr-border);
}

.doctor-photo-wrap {
  height: 260px;
  overflow: hidden;
  background: var(--placeholder-bg);
  position: relative;
}

.doctor-photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--placeholder-bg);
  transition: transform var(--dur-slow) var(--ease);
}

.doctor-card:hover .doctor-photo-placeholder {
  transform: scale(1.03);
}

.doctor-info {
  padding: var(--space-6) var(--space-6) var(--space-7);
}

.doctor-name {
  font-family: var(--font-display-en);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

[data-lang="ar"] .doctor-name {
  font-family: var(--font-display-ar);
}

.doctor-specialty {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--clr-gold);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 0.2rem var(--space-4);
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
  background: var(--clr-gold-subtle);
}

.doctor-quote {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  font-style: italic;
  line-height: 1.7;
  border-inline-start: 2px solid var(--clr-border);
  padding-inline-start: var(--space-4);
  margin-top: var(--space-3);
}

/* ─── DOCTORS CONTROLS ─── */
.doctors-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.doctors-search {
  width: 100%;
  max-width: 420px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-full);
  color: var(--clr-text);
  font-family: var(--font-body-en);
  font-size: var(--text-sm);
  padding: 0.7rem 1.4rem;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.doctors-search::placeholder {
  color: var(--clr-text-faint);
}

.doctors-search:focus {
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 3px rgba(184, 151, 58, 0.12);
}

.doctors-filters-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: var(--space-8);
}

.doctors-filters-wrapper::before,
.doctors-filters-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.doctors-filters-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--clr-bg) 20%, transparent);
}

.doctors-filters-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--clr-bg) 20%, transparent);
}

.doctors-filters-wrapper.can-scroll-left::before {
  opacity: 1;
}

.doctors-filters-wrapper.can-scroll-right::after {
  opacity: 1;
}

[data-lang="ar"] .doctors-filters-wrapper::before {
  left: auto;
  right: 0;
  background: linear-gradient(to left, var(--clr-bg) 20%, transparent);
}

[data-lang="ar"] .doctors-filters-wrapper::after {
  right: auto;
  left: 0;
  background: linear-gradient(to right, var(--clr-bg) 20%, transparent);
}

.filter-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clr-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.doctors-filters-wrapper.can-scroll-left .filter-arrow-left,
.doctors-filters-wrapper.can-scroll-right .filter-arrow-right {
  opacity: 0.6;
  pointer-events: auto;
}

.filter-arrow:hover {
  opacity: 1 !important;
  background: var(--clr-gold-subtle);
  color: var(--clr-gold);
  border-color: var(--clr-gold);
  box-shadow: var(--shadow-md);
}

.filter-arrow-left {
  left: -18px;
}

.filter-arrow-right {
  right: -18px;
}

[data-lang="ar"] .filter-arrow-left {
  left: auto;
  right: -18px;
  transform: translateY(-50%) scaleX(-1);
}

[data-lang="ar"] .filter-arrow-right {
  right: auto;
  left: -18px;
  transform: translateY(-50%) scaleX(-1);
}

.doctors-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  padding: 5px 24px;
  /* Space for the fade edges */
  width: 100%;
}

.doctors-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.4rem 1.1rem;
  border: 1.5px solid var(--clr-border-soft);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--clr-text-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}

.filter-btn:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: var(--clr-gold-subtle);
}

.filter-btn.active {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: var(--clr-gold-subtle);
}

/* ─── DOCTORS GRID (updated for 55 doctors) ─── */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
}

.doctor-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
}

.doctor-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
  border-color: var(--clr-border);
}

/* Hidden cards (filtered out) */
.doctor-card.hidden {
  display: none;
}

.doctor-photo-wrap {
  height: 320px;
  overflow: hidden;
  background: var(--placeholder-bg);
  position: relative;
}

.doctor-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform var(--dur-slow) var(--ease);
}

.doctor-card:hover .doctor-photo-wrap img {
  transform: scale(1.04);
}

.doctor-photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--placeholder-bg);
}

.doctor-info {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.doctor-name {
  font-family: var(--font-display-en);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
  color: var(--clr-text);
}

[data-lang="ar"] .doctor-name {
  font-family: var(--font-display-ar);
}

.doctor-specialty {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--clr-gold);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 0.2rem var(--space-4);
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
  background: var(--clr-gold-subtle);
}

.doctor-quote {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  font-style: italic;
  line-height: 1.7;
  border-inline-start: 2px solid var(--clr-border);
  padding-inline-start: var(--space-4);
  margin-top: var(--space-3);
}

/* No results message */
.doctors-empty {
  text-align: center;
  color: var(--clr-text-faint);
  font-size: var(--text-md);
  padding: var(--space-16) 0;
  width: 100%;
}

/* ─── CONTACT CARDS ─── */
.contact-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow var(--dur-mid) var(--ease),
    transform var(--dur-mid) var(--ease),
    border-color var(--dur-mid) var(--ease);
  animation-delay: calc(var(--delay, 0) * 80ms);
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-border);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.contact-card-title {
  font-family: var(--font-display-en);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

[data-lang="ar"] .contact-card-title {
  font-family: var(--font-display-ar);
}

.contact-card-body {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.contact-link {
  font-size: var(--text-sm);
  color: var(--clr-gold);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.contact-link:hover {
  color: var(--clr-gold-light);
  opacity: 1;
}

.phone-link {
  font-family: var(--font-display-en);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--clr-text);
  display: block;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
  transition: color var(--dur-fast) var(--ease);
}

.phone-link:hover {
  color: var(--clr-gold);
  opacity: 1;
}

.hours-time {
  font-family: var(--font-display-en);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--clr-gold);
  letter-spacing: -0.01em;
}

/* ─── MAP ─── */
.map-wrap {
  margin-top: var(--space-12);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--clr-border-soft);
  min-height: 380px;
  box-shadow: var(--shadow-md);
}

.map-placeholder {
  background: linear-gradient(135deg, var(--placeholder-bg) 0%, #1A1410 100%);
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  border-radius: var(--radius-xl);
}

.map-pin {
  font-size: 3.5rem;
  filter: drop-shadow(0 6px 16px rgba(75, 191, 204, .55));
  animation: mapPulse 2.5s ease-in-out infinite;
}

.map-placeholder p {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-sm);
  text-align: center;
  max-width: 36ch;
  line-height: 1.65;
}

/* ─── ABOUT SECTION ─── */
.about-image-wrap {
  position: relative;
  padding: 10px;
  border-radius: var(--radius-2xl);
}

.about-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-2xl);
  border: 1.5px solid var(--clr-gold);
  opacity: 0.35;
  pointer-events: none;
}

/* Gold corner accents */
.about-image-wrap::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  width: 36px;
  height: 36px;
  border-top: 2px solid var(--clr-gold);
  border-left: 2px solid var(--clr-gold);
  border-radius: 4px 0 0 0;
  pointer-events: none;
}

.about-image-wrap .corner-br {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 36px;
  height: 36px;
  border-bottom: 2px solid var(--clr-gold);
  border-right: 2px solid var(--clr-gold);
  border-radius: 0 0 4px 0;
  pointer-events: none;
}

.about-image-placeholder {
  border-radius: var(--radius-2xl);
  height: 520px;
  overflow: hidden;
}

.about-badge-float {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: auto;
  right: auto;
  background: linear-gradient(135deg, var(--clr-gold-light), var(--clr-gold-dark));
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-xl);
  text-align: center;
  min-width: 75px;
  z-index: 2;
}

.badge-num {
  display: block;
  font-family: var(--font-display-en);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-1);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.badge-txt {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.88;
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-features {
  margin-block: var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--clr-border-soft);
}

.about-features li:last-child {
  border-bottom: none;
}

.feat-icon {
  color: var(--clr-gold);
  font-size: 0.55rem;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--clr-gold-subtle);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-body {
  color: var(--clr-text-muted);
  font-size: var(--text-md);
  margin-bottom: var(--space-6);
  line-height: 1.82;
}

/* ─── HERO BADGE ─── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgba(184, 151, 58, .35);
  border-radius: var(--radius-full);
  background: rgba(184, 151, 58, .07);
  backdrop-filter: blur(8px);
  font-size: var(--text-xs);
  color: var(--clr-gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

/* ─── STAT ─── */
.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display-en);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: #F0EBE3;
  line-height: 1;
  margin-bottom: var(--space-1);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-xs);
  color: rgba(240, 235, 227, .50);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

[data-lang="ar"] .stat-label {
  letter-spacing: 0;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(240, 235, 227, .12);
}

/* ─── WHATSAPP FLOATING BUTTON ─── */
.whatsapp-fab {
  position: fixed;
  bottom: calc(var(--space-8) + 58px);
  /* above scroll-top */
  inset-inline-end: var(--space-8);
  width: 52px;
  height: 52px;
  background: #25D366;
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .40);
  z-index: 899;
  transition:
    transform var(--dur-mid) var(--ease-spring),
    box-shadow var(--dur-mid) var(--ease);
  text-decoration: none;
}

.whatsapp-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, .55);
  opacity: 1;
}

.whatsapp-fab:active {
  transform: scale(0.97);
}

[data-lang="ar"] .whatsapp-fab {
  inset-inline-end: auto;
  inset-inline-start: var(--space-8);
}

@media (max-width: 580px) {
  .whatsapp-fab {
    bottom: calc(var(--space-5) + 54px);
    inset-inline-end: var(--space-5);
    width: 46px;
    height: 46px;
  }

  [data-lang="ar"] .whatsapp-fab {
    inset-inline-end: auto;
    inset-inline-start: var(--space-5);
  }
}

/* ===== Map Section ===== */
.map-wrap {
  margin-top: 40px;
}

.map-wrap iframe {
  width: 100%;
  height: 380px;
  border: none;
  display: block;
}

.map-wrap>div {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Button hover effect */
.map-wrap .btn {
  transition: all 0.3s ease;
}

.map-wrap .btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ── Hero Stats Font Override ── */
.stat-number {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}

.stat-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.btn span {
  display: inline-flex;
  align-items: center;
}

/* ── WhatsApp Appointment Form ── */
.wa-form-wrap {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: var(--space-12);
  margin-bottom: var(--space-12);
}

.wa-form-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-8) var(--space-6);
  background: var(--clr-surface-2);
  border-bottom: 1px solid var(--clr-border-soft);
}

.wa-form-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.wa-form-icon svg {
  width: 100%;
  height: 100%;
}

.wa-form-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--clr-text);
  margin: 0 0 var(--space-1);
  line-height: 1.2;
}

.wa-form-sub {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin: 0;
}

.wa-form-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.wa-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.wa-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wa-field--full {
  grid-column: 1 / -1;
}

.wa-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--clr-text-faint);
}

.wa-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--clr-surface-3);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.wa-input::placeholder {
  color: var(--clr-text-faint);
  opacity: 0.7;
}

.wa-input:hover {
  border-color: var(--clr-border);
}

.wa-input:focus {
  border-color: var(--clr-gold);
  background: var(--clr-surface);
  box-shadow: 0 0 0 3px rgba(75, 191, 204, 0.12);
}

.wa-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8973A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.5rem;
}

[dir="rtl"] .wa-select {
  background-position: left 14px center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

.wa-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.wa-error {
  font-size: var(--text-sm);
  color: #c0392b;
  min-height: 1.2em;
  margin: 0;
  display: none;
  padding: var(--space-3) var(--space-4);
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: var(--radius-sm);
}

.wa-error.visible {
  display: block;
}

.wa-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--clr-gold);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
  box-shadow: var(--shadow-gold);
}

.wa-submit:hover {
  background: var(--clr-gold-dark);
  box-shadow: 0 8px 28px rgba(75, 191, 204, 0.38);
  transform: translateY(-1px);
}

.wa-submit:active {
  transform: translateY(0);
  box-shadow: var(--shadow-gold);
}

.wa-submit-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

[data-theme="dark"] .wa-input {
  background: var(--clr-surface-2);
  border-color: var(--clr-border);
}

[data-theme="dark"] .wa-input:focus {
  background: var(--clr-surface-3);
}

[data-theme="dark"] .wa-submit {
  color: var(--clr-bg);
}

[dir="rtl"] .wa-form-header {
  flex-direction: row-reverse;
  text-align: right;
}

@media (max-width: 768px) {
  .wa-form-wrap {
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
    border-radius: var(--radius-lg);
  }

  .wa-form-header {
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
  }

  .wa-form-icon {
    width: 42px;
    height: 42px;
  }

  .wa-form-title {
    font-size: var(--text-lg);
  }

  .wa-form-body {
    padding: var(--space-6);
    gap: var(--space-4);
  }

  .wa-form-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .wa-input {
    font-size: 1rem;
    /* prevents iOS auto-zoom on focus */
    padding: 0.85rem 1rem;
  }

  .wa-submit {
    padding: 1rem;
    font-size: var(--text-base);
  }
}

@media (max-width: 400px) {
  .wa-form-header {
    padding: var(--space-5);
  }

  .wa-form-body {
    padding: var(--space-5);
  }

  .wa-form-title {
    font-size: var(--text-md);
  }

  .wa-submit-icon {
    width: 18px;
    height: 18px;
  }
}

/* Container for the buttons */
.doctors-filters {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  /* This handles the smooth scroll on iOS */
  -webkit-overflow-scrolling: touch;
  gap: 12px;
  padding: 15px 10px;

  /* Modern way to hide scrollbars */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

/* Hides scrollbar for Chrome/Safari */
.doctors-filters::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}


/* Ensure buttons don't shrink */
.filter-btn {
  flex: 0 0 auto;
  /* Prevents buttons from squishing to fit the width */
  white-space: nowrap;
  /* Keeps text on one line */
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  /* Use your variables */
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Active state */
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}