* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #860DC0;
  --primary-light: #A846D6;
  --primary-dark: #6A0A9A;
  --primary-gradient: linear-gradient(135deg, #860DC0, #A846D6);
  --bg-light: #f8f5fe;
  --text-dark: #2d2d2d;
  --text-light: #666;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(134, 13, 192, 0.12);
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Top Bar ─── */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 14px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a { color: var(--white); margin-left: 16px; }
.top-bar a:hover { text-decoration: underline; }

/* ─── Header / Nav ─── */
header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.logo img { height: 48px; width: auto; }

.logo span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
  display: block;
}

nav a {
  margin-left: 24px;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

nav a:hover { color: var(--primary); }
nav a:hover::after { width: 100%; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.mobile-toggle span {
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: 0.3s;
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, #860DC0 0%, #A846D6 50%, #c084e8 100%);
  color: var(--white);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.92;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  background: #f0e6ff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.hero-image {
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ─── Sections ─── */
.section {
  padding: 70px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 17px;
}

/* ─── Welcome ─── */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.welcome-grid img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.welcome-grid h2 {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 16px;
}

/* ─── Services Grid ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid rgba(134,13,192,0.06);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(134,13,192,0.18);
}

.service-card .icon {
  width: 56px;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: white;
  font-size: 24px;
}

.service-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.service-card p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 16px;
}

.service-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

/* ─── Page Hero (inner) ─── */
.page-hero {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 60px 0 40px;
  text-align: center;
}

.page-hero h1 { font-size: 38px; margin-bottom: 8px; }
.page-hero p { opacity: 0.9; font-size: 17px; max-width: 600px; margin: 0 auto; }

/* ─── Content Pages ─── */
.content-page {
  padding: 60px 0;
}

.content-page h2 {
  color: var(--primary);
  font-size: 26px;
  margin: 36px 0 14px;
}

.content-page h2:first-child { margin-top: 0; }

.content-page h3 {
  color: var(--primary-dark);
  font-size: 20px;
  margin: 24px 0 10px;
}

.content-page p {
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 16px;
}

.content-page ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.content-page ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-light);
}

.content-page .highlight-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

.content-page .highlight-box h4 {
  color: var(--primary);
  margin-bottom: 6px;
}

.content-page .highlight-box p { margin-bottom: 0; }

.content-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 24px auto;
  box-shadow: var(--shadow);
  display: block;
}

.content-image-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

/* ─── Doctor Page ─── */
.doctor-profile {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
}

.doctor-profile img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doctor-profile h2 { margin-top: 0; }

.credentials { margin-top: 20px; }

.credentials li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
}

.credentials li i { color: var(--primary); width: 20px; }

/* ─── Contact Page ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: 8px;
  margin-top: 24px;
}

.contact-info h3:first-child { margin-top: 0; }

.contact-info p { margin-bottom: 4px; }

.contact-info i {
  width: 24px;
  color: var(--primary);
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(134,13,192,0.1);
}

.form-group textarea { height: 120px; resize: vertical; }

.btn-submit {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 14px 40px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(134,13,192,0.3);
}

.map-container {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

/* ─── Hours ─── */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.hours-table td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.hours-table td:last-child { text-align: right; font-weight: 600; }

.closed { color: #e74c3c; }

/* ─── CTA Section ─── */
.cta-section {
  background: var(--primary-gradient);
  color: var(--white);
  text-align: center;
  padding: 60px 0;
}

.cta-section h2 { font-size: 32px; margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; }
.cta-section .btn-primary { background: var(--white); color: var(--primary); }
.cta-section .btn-primary:hover { background: #f0e6ff; }

/* ─── Footer ─── */
footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.8);
  padding: 48px 0 24px;
}

footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 17px;
}

footer p { font-size: 14px; margin-bottom: 8px; }

footer a {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.3s;
}

footer a:hover { color: var(--primary-light); }

footer i { margin-right: 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .welcome-grid { grid-template-columns: 1fr; }
  .doctor-profile { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .content-image-wrap { grid-template-columns: 1fr; }
  footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  nav { display: none; }
  nav.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
  nav.active a { margin: 8px 0; }
  .mobile-toggle { display: flex; }
  .top-bar .container { justify-content: center; }
  .top-bar .contact-info-top { display: none; }
  footer .container { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; }
}

/* ─── RTL ─── */
[dir="rtl"] .top-bar .container { flex-direction: row-reverse; }
[dir="rtl"] header .container { flex-direction: row-reverse; }
[dir="rtl"] nav a { margin-left: 0; margin-right: 24px; }
[dir="rtl"] .hero .container { text-align: right; }
[dir="rtl"] .hero p { margin-left: 0; margin-right: auto; }
[dir="rtl"] .welcome-grid { text-align: right; }
[dir="rtl"] .welcome-grid img { order: 1; }
[dir="rtl"] .contact-grid .contact-info { text-align: right; }
[dir="rtl"] .hours-table td:last-child { text-align: left; }
[dir="rtl"] .hours-table td:first-child { text-align: right; }
[dir="rtl"] .credentials li { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .service-card { text-align: right; }
[dir="rtl"] .service-card .icon { margin-left: 0; margin-right: 0; }
[dir="rtl"] .top-bar a { margin-left: 0; margin-right: 16px; }
[dir="rtl"] .content-page { text-align: right; }
[dir="rtl"] .content-page ul { padding-left: 0; padding-right: 24px; }
[dir="rtl"] .highlight-box { border-left: none; border-right: 4px solid var(--primary); border-radius: var(--radius) 0 0 var(--radius); }
[dir="rtl"] .highlight-box[style*="border-left-color"] { border-right-color: #27ae60 !important; border-left: none !important; }
[dir="rtl"] footer .container { direction: rtl; }
[dir="rtl"] footer i { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .lang-toggle { direction: ltr; }

/* Phone numbers must read LTR even when the page is RTL (Arabic) */
[data-i18n="common.phone"] {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.lang-toggle {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.25);
}
