:root {
  --primary: #4ca7df;
  --primary-dark: #2c7da0;
  --bg: #f5f7fb;
  --text: #1f2933;
  --white: #fff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo {
  height: 42px;
  object-fit: contain;
}
.brand {
  font-weight: 600;
  font-size: 1.15rem;
  color: #243849;
  opacity: 0.95;
  letter-spacing: 0.02em;
  font-style: italic;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.main-nav a {
  text-decoration: none;
  color: #4a5563;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: rgba(76, 167, 223, 0.12);
  color: var(--primary-dark);
}
main {
  padding: 1.5rem 1.5rem 4rem;
  min-height: calc(100vh - 60px);
}
.page-section {
  display: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.hero {
  background: radial-gradient(circle at top, #ffffff 0%, #e8f5ff 100%);
  border: 1px solid rgba(76,167,223,0.15);
  border-radius: 1.25rem;
  padding: 3.5rem 2.5rem;
  text-align: left;
  box-shadow: 0 12px 34px rgba(0,0,0,0.04);
}
.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  color: #143a4f;
  margin-bottom: 1.5rem;
}
.hero p {
  max-width: 40rem;
  margin-bottom: 0.5rem;
}
.hero .sub {
  margin-bottom: 1.75rem;
  color: #3d5f73;
  font-weight: 500;
}
.btn {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}
.btn:hover {
  background: var(--primary-dark);
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0;
}
.container.narrow {
  max-width: 700px;
}
h2 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
  color: #123345;
}
p {
  line-height: 1.6;
  margin-bottom: 1rem;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}
.service-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid rgba(76,167,223,0.1);
  box-shadow: 0 5px 18px rgba(0,0,0,0.02);
}
.service-card h3 {
  margin-bottom: 0.4rem;
  color: #16485f;
}
.contact-form {
  background: #fff;
  border-radius: 1rem;
  padding: 1.1rem 1.2rem 1.3rem;
  border: 1px solid rgba(76,167,223,0.1);
  box-shadow: 0 3px 14px rgba(0,0,0,0.02);
}
.form-group {
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
label {
  font-weight: 500;
  font-size: 0.9rem;
}
input, textarea {
  border: 1px solid #d0d7dd;
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
}
input:focus, textarea:focus {
  outline: 2px solid rgba(76,167,223,0.2);
  border-color: var(--primary);
}
.contact-meta {
  margin-top: 1rem;
}
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: #6b7a8a;
  font-size: 0.8rem;
}
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0.7rem;
  }
  .main-nav ul {
    flex-wrap: wrap;
  }
  main {
    padding: 1rem;
  }
  .hero {
    padding: 2.5rem 1.4rem;
  }
}
.logo {
  height: auto;
  width: clamp(90px, 12vw, 180px);
  transition: width 0.3s ease;
}
.hero h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero p, p {
  font-weight: 400;
  font-size: 1rem;
}
.topbar {
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.brand {
  font-weight: 600;
  font-size: 1.15rem;
  color: #243849;
  opacity: 0.95;
  letter-spacing: 0.02em;
  font-style: italic;
}
.btn {
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.service-card h3 {
  font-weight: 600;
  font-size: 1.1rem;
}
h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* --- Elegant dynamic improvements --- */
body {
  background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
  transition: background 1s ease-in-out;
}
/* Fade-in for sections */
.page-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.page-section.active {
  opacity: 1;
  transform: translateY(0);
}
/* Smooth fade-up for hero content */
.hero h1, .hero p, .hero .btn {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}
.hero h1 { animation-delay: 0.1s; }
.hero p { animation-delay: 0.3s; }
.hero .btn { animation-delay: 0.6s; }
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Button glow hover */
.btn:hover {
  box-shadow: 0 0 10px rgba(76,167,223,0.4);
  transform: translateY(-2px);
}
/* Service card hover lift */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
/* Section transitions smoother */
main {
  scroll-behavior: smooth;
}
h1, h2, h3 {
  transition: color 0.3s ease;
}
h1:hover, h2:hover {
  color: var(--primary-dark);
}
/* --- Full motion for all sections --- */
.page-section.active {
  animation: fadeSlideIn 0.8s ease forwards;
}
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(25px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
/* --- Icons styling --- */
.icon {
  font-size: 2.2rem;
  color: var(--primary-dark);
  margin-top: 0.4rem;
}
.icon-title {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-left: 0.4rem;
  vertical-align: middle;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.service-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
/* --- Brand refinement --- */
.brand {
  font-weight: 600;
  font-size: 1.15rem;
  color: #243849;
  opacity: 0.95;
  letter-spacing: 0.02em;
  font-style: italic;
}
/* --- Modern Card Layout for All Sections --- */
.page-section {
  min-height: 100vh;
  align-items: flex-start; /* statt center */
  padding-top: 5rem;
}
.page-section .container {
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 2.5rem 2rem;
  max-width: 1000px;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-section .container:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}
body {
  background: linear-gradient(180deg, #f3f8fb 0%, #ffffff 100%);
}
@media (max-width: 768px) {
  .page-section .container {
    padding: 1.5rem 1.2rem;
    border-radius: 1rem;
  }
}

/* 🚀 RTL-ANPASSUNGEN FÜR ARABISCH (Rechts-nach-Links) 🚀 */
/* -------------------------------------------------------- */

/* Allgemeine Textrichtung */
body[dir="rtl"] {
  text-align: right; /* Textausrichtung für gesamten Inhalt */
}

/* Navigationsleiste: Elemente von rechts nach links */
body[dir="rtl"] .topbar {
  flex-direction: row-reverse; /* Logo rechts, Nav links */
}
body[dir="rtl"] .main-nav ul {
  flex-direction: row-reverse; /* Nav-Items von rechts nach links */
}

/* Logo und Brand-Bereich: Elemente bleiben von links nach rechts, aber der Text ist rechtsbündig */
body[dir="rtl"] .logo-area {
  flex-direction: row-reverse; /* Logo links, Text rechts */
}

/* Service-Grid: Flippen der Grid-Anordnung */
body[dir="rtl"] .service-grid {
  /* Standardmäßig sollte das Grid RTL von selbst handhaben, 
     aber wir stellen sicher, dass die Textausrichtung innerhalb der Karten rechts ist. */
}
body[dir="rtl"] .service-card .icon {
  text-align: right; /* Icon Textausrichtung */
}

/* Formulare: Beschriftungen rechtsbündig */
body[dir="rtl"] .form-group {
  align-items: flex-end; /* Labels und Inputs rechts ausrichten */
}

/* Kontakt-Metadaten */
body[dir="rtl"] .contact-meta p {
  text-align: right;
}

/* Responsives Verhalten der Topbar */
@media (max-width: 720px) {
  body[dir="rtl"] .topbar {
    flex-wrap: wrap;
    flex-direction: row; /* Hier beibehalten, da Logo oben, Nav unten besser ist */
  }
  body[dir="rtl"] .main-nav {
    width: 100%;
  }
  body[dir="rtl"] .main-nav ul {
    flex-direction: row-reverse; /* Nav-Items von rechts nach links */
    justify-content: flex-end; /* Menüpunkte rechtsbündig */
  }
}
/* الأنماط الإضافية التي يجب إضافتها إلى style.css */

/* نمط الغلاف لضمان امتداد الفاصل الأفقي عبر كل الأعمدة */
.service-divider-wrap {
    grid-column: 1 / -1; /* يضمن امتداد العنصر على كامل عرض الشبكة (3 أعمدة) */
    padding: 2.5rem 0;   /* تباعد رأسي لجعل الخط واضحاً */
}

/* نمط الخط الفاصل (خط أفقي رقيق) */
.service-divider {
    border: none;
    border-top: 1px solid #ddd; /* خط أفقي رقيق بلون رمادي فاتح */
    width: 100%;
    margin: 0;
}
/* --- Spezifische Anpassungen für Medical Power and More --- */
.hero h1 {
  /* Erhöht den Abstand unterhalb der Hauptüberschrift (für die leere Zeile) */
  margin-bottom: 2rem; 
}

.tagline {
  font-size: 1.35rem; /* Größe größer als normaler Text */
  font-weight: 600;  /* Halbfett für bessere Sichtbarkeit */
  margin-bottom: 1.5rem; /* Abstand zum nachfolgenden Text */
}
.tagline1 {
  font-size: 1.35rem; /* Größe größer als normaler Text */
  font-weight: 600;  /* Halbfett für bessere Sichtbarkeit */
  margin-bottom: 1.5rem; /* Abstand zum nachfolgenden Text */
  color:#0099DB;
}

/* 🚀 RTL-ANPASSUNGEN FÜR ARABISCH (Rechts-nach-Links) 🚀 */
/* -------------------------------------------------------- */

/* Allgemeine Textrichtung */
body[dir="rtl"] {
  text-align: right; 
}

/* Navigationsleiste: Elemente von rechts nach links */
body[dir="rtl"] .topbar {
  flex-direction: row-reverse; /* Logo rechts, Nav links */
}
body[dir="rtl"] .main-nav ul {
  flex-direction: row-reverse; /* Nav-Items von rechts nach links */
}

/* Logo und Brand-Bereich: Elemente von rechts nach links */
body[dir="rtl"] .logo-area {
  flex-direction: row-reverse; 
}

/* Formulare: Beschriftungen rechtsbündig */
body[dir="rtl"] .form-group {
  align-items: flex-end; 
}

/* Listenpunkte */
body[dir="rtl"] ul {
    list-style-position: inside;
    padding-right: 0; /* Entfernt den Standard-padding-left */
}

/* --- Service Grid Divider (Teilt die 6 Karten in zwei Reihen) --- */
.service-divider-wrap {
    grid-column: 1 / -1; /* Dehnt das Element über alle Spalten aus (3) */
    padding: 2.5rem 0;   /* Vertikaler Abstand um die Linie */
}
.service-divider {
    border: none;
    border-top: 1px solid #ddd; /* Dünne graue horizontale Linie */
    width: 100%;
    margin: 0;
}

/* --- Spezifisches Styling für die Überschriften der Spezialisierungen --- */

#medical_consultation h3 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.8rem;
    border-bottom: 2px solid #e8f5ff; /* Dünne Linie unter der Spezialisierung */
    padding-bottom: 0.5rem;
    width: 100%;
    text-align: right; 
}

/* --- Styling für die Arztkarten (doctor-card) --- */
.doctor-card {
    /* Setzt das Layout der Karte auf die Basis der service-card */
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriert Inhalt */
    text-align: center;  /* Zentriert Text */
}

/* Bild-Styling (Placeholder) */
.doctor-img {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Rundes Bild */
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary); /* Blauer Farbakzent */
}

/* Namen-Styling */
.doctor-card .doctor-name {
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    font-size: 1.1rem;
}

/* Email-Styling */
.doctor-card .doctor-email {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.2rem;
}