:root {
  --purple: #5a4fcf;
  --purple-dark: #4837b8;
  --sky: #e3f2fd;
  --sky-deep: #bbdefb;
  --navy: #1a2744;
  --navy-muted: #3d4f6f;
  --white: #ffffff;
  --radius-hero: clamp(28px, 5vw, 48px);
  --radius-btn: 14px;
  --font: "Cairo", system-ui, sans-serif;
  --shadow-soft: 0 20px 50px rgba(26, 39, 68, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.65;
}

main.page-main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ——— Header ——— */
.site-header {
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: var(--white);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

.logo-text strong {
  color: var(--purple);
  font-weight: 800;
}

.logo-mark svg {
  display: block;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
  justify-content: center;
}

.nav-list a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--purple);
}

.nav-list a.active {
  color: var(--purple);
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-header {
  padding: 0.65rem 1.35rem;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(90, 79, 207, 0.35);
}

.btn-header:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 360px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
  }

  .nav-list a {
    padding: 0.5rem 0;
  }

  .btn-header {
    margin-inline-start: auto;
  }
}

/* ——— Hero ——— */
.hero-wrap {
  padding: 0 clamp(0.75rem, 3vw, 1.5rem) 2.5rem;
}

.hero-carousel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-slides {
  position: relative;
  min-height: min(520px, 85vh);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  min-height: min(500px, 82vh);
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: var(--radius-hero);
  background-color: var(--sky);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80' viewBox='0 0 120 80'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.55' stroke-width='0.8' d='M0 42c20-8 40-8 60 0s40 8 60 0'/%3E%3Cpath fill='none' stroke='%23bbdefb' stroke-opacity='0.5' stroke-width='0.6' d='M0 52c25 10 50 10 75 0s35-10 45 0'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.35' stroke-width='0.5' d='M0 28c30-12 60-12 90 0'/%3E%3C/svg%3E");
  background-size: 280px 180px;
  box-shadow: var(--shadow-soft);
}

.hero-content {
  text-align: right;
  padding-inline: 0.25rem;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 800;
  color: var(--purple);
  line-height: 1.35;
}

.hero-subtitle {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--navy);
}

.hero-desc {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--navy-muted);
  max-width: 32rem;
  margin-inline-start: auto;
}

.hero-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.hero-phone-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-muted);
  margin-bottom: 0.25rem;
}

.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
}

.phone-icon-wrap {
  color: #2563eb;
  display: flex;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-hero {
  padding: 0.85rem 1.75rem;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-btn);
  font-size: 1rem;
  box-shadow: 0 10px 28px rgba(90, 79, 207, 0.4);
}

.btn-hero:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.btn-icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 6px 20px rgba(26, 39, 68, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-circle:hover {
  transform: scale(1.05);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-image-wrap {
  position: relative;
  max-width: 420px;
  width: 100%;
}

.hero-image-wrap img {
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 48px rgba(26, 39, 68, 0.15);
}

.doctor-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26, 39, 68, 0.12);
  max-width: calc(100% - 24px);
}

.doctor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.doctor-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.35;
}

.doctor-card-text strong {
  color: var(--navy);
  font-weight: 700;
}

.doctor-card-text span {
  color: var(--navy-muted);
  font-size: 0.75rem;
}

/* Carousel arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(6px);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  color: var(--purple);
}

.carousel-prev {
  inset-inline-start: 8px;
}

.carousel-next {
  inset-inline-end: 8px;
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-btn svg {
    width: 22px;
    height: 22px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    text-align: center;
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-desc {
    margin-inline: auto;
  }

  .hero-footer-row {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .doctor-card {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

/* Content sections (about, articles, services, contact) */
.content-section {
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem);
  background: var(--white);
}

.content-section--alt {
  background: #f4f8fc;
}

.content-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--purple);
  text-align: center;
}

.about-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-soft);
  text-align: right;
}

.about-lead {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--navy);
}

.about-facts {
  margin: 0 0 1.25rem;
  padding: 0 1.25rem 0 0;
  color: var(--navy-muted);
  line-height: 1.8;
}

.about-facts li {
  margin-bottom: 0.5rem;
}

.about-note {
  margin: 0;
  color: var(--navy-muted);
  font-size: 0.95rem;
}

.articles-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  padding: 1.35rem 1.5rem;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.06);
  text-align: right;
}

.content-section--alt .article-card {
  background: #fafcfe;
}

.article-card-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--navy-muted);
  line-height: 1.7;
}

.clinic-services-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .clinic-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .clinic-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.clinic-service-card {
  padding: 1.25rem 1.35rem;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.06);
  text-align: right;
}

.clinic-service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--purple);
}

.clinic-service-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--navy-muted);
  line-height: 1.65;
}

.contact-block {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  text-align: center;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-soft);
}

.contact-block p {
  margin: 0 0 0.85rem;
  color: var(--navy);
  font-size: 1rem;
}

.contact-block a {
  color: var(--purple);
  font-weight: 700;
}

.contact-block a:hover {
  text-decoration: underline;
}

.contact-cta-wrap {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--navy-muted);
  border-top: 1px solid #e8eef5;
}
