/* =========================================================
   Leo Heart Clinic - Ivuriro ry'Umutima
   Stylesheet
   ========================================================= */

:root {
  --green-900: #0f331f;
  --green-800: #133f28;
  --green-700: #1a5334;
  --green-600: #237042;
  --green-100: #e6efe9;
  --green-50:  #f2f7f4;

  --blue-700: #2c5c7a;
  --blue-600: #3b7291;
  --blue-100: #e5eef3;

  --gray-900: #1c1f1e;
  --gray-700: #454b49;
  --gray-500: #6c7371;
  --gray-300: #c9cfcc;
  --gray-200: #e2e6e4;
  --gray-100: #f4f6f5;
  --white:    #ffffff;

  --font-main: Arial, Helvetica, "Segoe UI", sans-serif;
  --max-width: 1120px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(15, 51, 31, 0.08), 0 1px 2px rgba(15, 51, 31, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-main);
  color: var(--green-900);
  line-height: 1.25;
  margin: 0 0 0.6em 0;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; }

ul, ol { margin: 0 0 1em 0; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--gray-100);
}

.section-title {
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-700);
  max-width: 700px;
  margin: 0 auto 40px auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: bold;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--green-800);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--green-900);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--green-800);
  text-decoration: none;
}

.btn-secondary {
  background: var(--white);
  border-color: var(--green-800);
  color: var(--green-800);
}
.btn-secondary:hover {
  background: var(--green-50);
  text-decoration: none;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Top info bar ---------- */
.topbar {
  background: var(--green-900);
  color: var(--gray-200);
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 8px;
}
.topbar a { color: var(--gray-200); }
.topbar .topbar-links { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar .topbar-links span { white-space: nowrap; }

/* ---------- Header / Nav ---------- */
header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.brand-text .brand-name {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--green-900);
  display: block;
  line-height: 1.1;
}
.brand-text .brand-sub {
  font-size: 0.82rem;
  color: var(--gray-500);
  font-style: italic;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--gray-900);
  padding: 10px 14px;
  display: block;
  border-radius: var(--radius);
  font-size: 0.96rem;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--green-50);
  color: var(--green-800);
  text-decoration: none;
}

.nav-cta {
  background: var(--green-800) !important;
  color: var(--white) !important;
}
.nav-cta:hover { background: var(--green-900) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--green-800);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-800);
  margin: 4px 0;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  color: var(--white);
  padding: 70px 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { color: var(--white); font-size: 2.4rem; }
.hero p.lead { font-size: 1.1rem; color: var(--green-100); max-width: 540px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.hero-art {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

/* ---------- Hero slideshow ---------- */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--green-900);
}
.slideshow .slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.slideshow .slide.active { opacity: 1; }
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 51, 31, 0.55);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.slide-nav:hover { background: rgba(15, 51, 31, 0.8); }
.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }
.slide-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 2;
}
.slide-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
}
.slide-dots .dot.active { background: #fff; }
.hero-address {
  color: var(--green-100);
  text-align: center;
  margin: 16px 0 0 0;
  font-size: 0.92rem;
}

.page-hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 8px; }
.page-hero p { color: var(--green-100); max-width: 640px; margin: 0 auto; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.icon-badge svg { width: 24px; height: 24px; }

.condition-list {
  columns: 2;
  column-gap: 32px;
  list-style: none;
  padding: 0;
}
.condition-list li {
  break-inside: avoid;
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--gray-200);
}
.condition-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-600);
}

/* ---------- Test / diagram cards ---------- */
.test-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.test-card.reverse { grid-template-columns: 1fr 220px; }
.test-card.reverse .diagram-box { order: 2; }
.diagram-box {
  background: var(--blue-100);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.diagram-box svg { width: 100%; height: auto; max-height: 170px; }
.diagram-box img { width: 100%; height: auto; max-height: 320px; object-fit: contain; border-radius: 4px; }
.test-meta {
  font-size: 0.85rem;
  color: var(--blue-700);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.test-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.test-meta-row .test-meta { margin-bottom: 0; }
.coming-soon-badge {
  display: inline-block;
  background: var(--green-900);
  color: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.lab-table th, .lab-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.lab-table th {
  background: var(--gray-100);
  color: var(--green-900);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lab-table tr:last-child td { border-bottom: none; }

/* ---------- Doctor cards ---------- */
.doctor-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.doctor-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--gray-100);
}
.doctor-body { padding: 22px; }
.doctor-role {
  color: var(--blue-700);
  font-weight: bold;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.doctor-tag {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.doctor-body h4 {
  margin: 18px 0 6px 0;
  font-size: 0.98rem;
  color: var(--green-900);
}
.doctor-body ul { padding-left: 1.1em; }
.doctor-body li { font-size: 0.95rem; margin-bottom: 6px; }

/* ---------- Doctor full profiles ---------- */
.doctor-profile {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
}
.doctor-profile:first-child { padding-top: 0; }
.doctor-profile:last-child { border-bottom: none; }
.doctor-profile .profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.doctor-profile h4 {
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--green-900);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.doctor-profile h4:first-of-type { margin-top: 4px; }

/* ---------- Symptom list ---------- */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.symptom-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius);
  padding: 20px;
}
.symptom-card h4 { margin-bottom: 6px; }

.alert-box {
  background: #fbeeee;
  border: 1px solid #e3b6b6;
  border-left: 5px solid #a43a3a;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.alert-box h3 { color: #7a2a2a; margin-bottom: 8px; }
.alert-box p:last-child { margin-bottom: 0; }

/* ---------- Healthy living topic cards ---------- */
.topic-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.topic-card h3 { display: flex; align-items: center; gap: 10px; }

.bmi-tool {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  padding: 26px;
}
.bmi-tool .row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bmi-tool label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--green-900);
  margin-bottom: 4px;
}
.bmi-tool input {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  width: 160px;
  font-family: var(--font-main);
}
#bmi-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-weight: bold;
  display: none;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.contact-item .icon-badge { flex-shrink: 0; margin-bottom: 0; }
.contact-item h4 { margin-bottom: 4px; }
.map-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--green-900);
  color: var(--gray-300);
  padding: 44px 0 20px 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}
.footer-grid h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-grid a { color: var(--gray-300); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-brand img { width: 42px; height: 42px; border-radius: 50%; }
.footer-brand strong { color: var(--white); font-size: 1.05rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.88rem; color: var(--gray-500); }
.divider { height: 1px; background: var(--gray-200); margin: 40px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .doctor-profile { grid-template-columns: 1fr; }
  .doctor-profile .profile-photo { max-width: 280px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { margin-top: 28px; padding: 12px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .test-card, .test-card.reverse { grid-template-columns: 1fr; }
  .test-card.reverse .diagram-box { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .symptom-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; padding: 10px 20px 18px; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .condition-list { columns: 1; }
  .symptom-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; }
  .hero { padding: 44px 0; }
  .topbar .container { flex-direction: column; align-items: flex-start; }
}
