/* El Gebaly Family Healthcare - Theme aligned with medical template */
:root {
  --primary: #2bb673;
  --primary-dark: #22a063;
  --navy: #243a5a;
  --navy-dark: #1a2d47;
  --accent-blue: #1da1f2;
  --accent-blue-mid: #2d7bb8;
  --text: #333333;
  --text-muted: #666666;
  --white: #ffffff;
  --light-bg: #f4f8fb;
  --border: #e5e9ef;
  --shadow: 0 4px 24px rgba(36, 58, 90, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: min(1170px, 92%);
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
  color: var(--primary);
}

.social-top a {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-left: 0.25rem;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .header-inner .logo-link {
    order: 1;
  }
  .header-inner .main-nav {
    order: 2;
    flex: 1;
    display: block;
  }
  .header-inner .main-nav ul {
    justify-content: flex-end;
  }
  .header-inner .header-cta {
    order: 3;
    margin-left: 0.5rem;
  }
  .header-inner .nav-toggle {
    order: 4;
  }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.35rem;
}

.logo-link:hover {
  color: var(--navy);
}

.logo-link img.logo-mark {
  width: 48px;
  height: 48px;
}

.nav-toggle {
  display: none;
  background: var(--primary);
  border: none;
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.5rem;
}

.main-nav a {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white) !important;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white) !important;
}

.btn-navy {
  background: var(--navy);
  color: var(--white) !important;
}

.btn-navy:hover {
  background: var(--navy-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white) !important;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy) !important;
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(36, 58, 90, 0.82), rgba(43, 182, 115, 0.45));
}

.hero .container {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 1.75rem;
  opacity: 0.95;
}

.page-hero {
  min-height: 280px;
  background: var(--navy);
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0 0 0.5rem;
}

.breadcrumb {
  font-size: 0.9rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

/* Section */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--light-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-title .subtitle {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.section-title h2 {
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
}

/* About row */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.two-col img {
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
  min-height: 280px;
}

/* Feature boxes */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

.feature-box {
  padding: 2rem 1.75rem;
  color: var(--white);
  text-align: center;
}

.feature-box.navy {
  background: var(--navy);
}

.feature-box.blue-mid {
  background: var(--accent-blue-mid);
}

.feature-box.blue-light {
  background: var(--accent-blue);
}

.feature-box h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.15rem;
}

.feature-box p,
.feature-box ul {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.95;
  list-style: none;
  padding: 0;
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Service grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.service-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.service-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(43, 182, 115, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
}

.service-card h3 {
  color: var(--navy);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Navy band */
.navy-band {
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stats-grid .num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Forms */
.form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.form-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(43, 182, 115, 0.35);
  border-color: var(--primary);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: #d64545;
}

.field-error {
  color: #d64545;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.field-error.visible {
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  margin: 0.2rem 0 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.45;
}

.form-success {
  display: none;
  background: rgba(43, 182, 115, 0.12);
  border: 1px solid var(--primary);
  color: var(--navy);
  padding: 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

.form-success.visible {
  display: block;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.step-item .step-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: rgba(43, 182, 115, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
}

/* CTA banner */
.cta-banner {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 0;
}

.cta-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cta-icon {
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.price-card .price-head {
  padding: 1.5rem;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
}

.price-card .amount {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
}

.price-card .amount span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-card ul {
  list-style: none;
  padding: 1.5rem;
  margin: 0;
  flex: 1;
  text-align: left;
}

.price-card li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.price-card .btn-wrap {
  padding: 0 1.5rem 1.5rem;
}

/* Doctors */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.doctor-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}

.doctor-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.doctor-card .info {
  padding: 1.25rem;
}

.doctor-card h3 {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.doctor-card .role {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card .body {
  padding: 1.25rem;
}

.blog-date {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

/* Testimonial */
.testimonial-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.testimonial-box {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem;
  border-radius: 8px;
}

.stat-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

/* Legal content */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
}

.legal-content h2 {
  color: var(--navy);
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-content h3 {
  color: var(--navy);
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
}

/* Footer */
.footer-emergency {
  background: var(--primary);
  color: var(--white);
  padding: 1.75rem 0;
}

.footer-emergency .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-emergency h3 {
  margin: 0;
  font-size: 1.25rem;
}

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.site-footer h4 {
  color: var(--white);
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
}

.site-footer p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
}

.footer-social a:hover {
  background: var(--primary);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.65rem;
  border: none;
  border-radius: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  font-size: 0.85rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.75);
  margin-left: 1rem;
}

.footer-legal a:hover {
  color: var(--primary);
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.content-block p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-end;
}

.filter-bar .form-group {
  margin: 0;
  flex: 1;
  min-width: 180px;
}

@media (max-width: 992px) {
  .two-col,
  .form-section,
  .testimonial-wrap,
  .feature-strip,
  .service-grid,
  .pricing-grid,
  .doctor-grid,
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-strip {
    margin-top: 2rem;
  }

  .stats-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.open {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }

  .two-col,
  .form-section,
  .testimonial-wrap,
  .feature-strip,
  .service-grid,
  .pricing-grid,
  .doctor-grid,
  .blog-grid,
  .stats-grid,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 400px;
  }

  .header-cta {
    margin-left: auto;
  }
}