:root {
  --primary: #0a6ebd;
  --primary-dark: #084f8a;
  --secondary: #00c9a7;
  --accent: #ff6b6b;
  --bg: #f4f8fb;
  --white: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e2e8f0;
  --card-shadow: 0 4px 24px rgba(10,110,189,0.10);
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* ── NAV ── */
nav {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo span { color: var(--secondary); }

.logo svg { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
  transition: color .2s;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

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

.btn-secondary:hover { background: #00a88e; transform: translateY(-1px); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0a6ebd 0%, #084f8a 50%, #00c9a7 100%);
  color: var(--white);
  padding: 90px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 800px; margin: auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .85rem;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 span { color: #7fffea; }

.hero p {
  font-size: 1.15rem;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: .85rem; opacity: .8; }

/* ── SEARCH BAR ── */
.search-section {
  max-width: 900px;
  margin: -30px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.search-field {
  flex: 1;
  min-width: 160px;
}

.search-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  outline: none;
  transition: border .2s;
  background: var(--bg);
}

.search-field input:focus,
.search-field select:focus { border-color: var(--primary); }

/* ── SECTIONS ── */
section { padding: 72px 24px; }

.section-inner { max-width: 1200px; margin: auto; }

.section-header { text-align: center; margin-bottom: 48px; }

.section-tag {
  display: inline-block;
  background: rgba(10,110,189,0.1);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p { color: var(--muted); max-width: 560px; margin: auto; }

/* ── DOCTOR CARDS ── */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.doctor-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}

.doctor-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(10,110,189,0.15); }

.doctor-card-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 24px;
  text-align: center;
  position: relative;
}

.doctor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.5);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255,255,255,0.2);
  color: white;
}

.doctor-card-header h3 { color: white; font-size: 1.1rem; }
.doctor-card-header p { color: rgba(255,255,255,0.85); font-size: .85rem; }

.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
  color: white;
  transition: background .2s;
}

.fav-btn:hover, .fav-btn.active { background: var(--accent); }

.doctor-card-body { padding: 18px; }

.doctor-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--muted);
}

.meta-row svg { width: 15px; height: 15px; color: var(--primary); flex-shrink: 0; }

.rating { display: flex; align-items: center; gap: 4px; }
.stars { color: #f59e0b; font-size: .9rem; }

.availability-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
}

.available { background: #d1fae5; color: #065f46; }
.busy { background: #fee2e2; color: #991b1b; }

.doctor-card-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.doctor-card-footer .btn { flex: 1; justify-content: center; font-size: .85rem; padding: 8px 12px; }

/* ── FEATURES ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform .2s;
}

.feature-card:hover { transform: translateY(-3px); }

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: .88rem; color: var(--muted); }

/* ── HOW IT WORKS ── */
.steps { display: flex; gap: 0; flex-wrap: wrap; justify-content: center; }

.step {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  text-align: center;
  padding: 24px 16px;
  position: relative;
}

.step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -12px;
  top: 36px;
  font-size: 1.5rem;
  color: var(--primary);
  opacity: .4;
}

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: .85rem; color: var(--muted); }

/* ── PAYMENT ── */
.payment-section { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }

.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.payment-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--primary);
}

.payment-card.offline { border-top-color: var(--secondary); }

.payment-card h3 { font-size: 1.2rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

.payment-methods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.pay-badge {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--bg);
  border: 1.5px solid var(--border);
}

/* ── MAP SECTION ── */
.map-section { background: var(--white); }

.map-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.clinic-list { display: flex; flex-direction: column; gap: 12px; }

.clinic-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  cursor: pointer;
  transition: background .2s;
}

.clinic-item:hover { background: #e0f0ff; }
.clinic-item h4 { font-size: .95rem; margin-bottom: 4px; }
.clinic-item p { font-size: .82rem; color: var(--muted); }

.map-placeholder {
  background: linear-gradient(135deg, #e0f0ff, #d1fae5);
  border-radius: var(--radius);
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed var(--primary);
  color: var(--primary);
}

.map-placeholder svg { width: 64px; height: 64px; opacity: .5; }
.map-placeholder p { font-size: .9rem; color: var(--muted); }

/* ── REVIEWS ── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.reviewer-info h4 { font-size: .95rem; }
.reviewer-info p { font-size: .8rem; color: var(--muted); }

.review-text { font-size: .9rem; color: var(--muted); line-height: 1.7; }

/* ── CHAT WIDGET ── */
.chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
}

.chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(10,110,189,0.4);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(10,110,189,0.5); }

.chat-popup {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 320px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-popup.open { display: flex; }

.chat-header {
  background: var(--primary);
  color: white;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-info h4 { font-size: .95rem; }
.chat-header-info p { font-size: .75rem; opacity: .8; }

.online-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  margin-left: auto;
}

.chat-messages {
  padding: 16px;
  height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .85rem;
  line-height: 1.5;
}

.msg.bot {
  background: var(--bg);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.msg.user {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-input-row {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .88rem;
  outline: none;
}

.chat-input-row input:focus { border-color: var(--primary); }

.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── CTA SECTION ── */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 80px 24px;
}

.cta-section h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 14px; }
.cta-section p { opacity: .85; max-width: 500px; margin: 0 auto 32px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: #0d1b2a;
  color: rgba(255,255,255,0.75);
  padding: 60px 24px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo { color: white; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; }

.footer-col h4 {
  color: white;
  font-size: .95rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col ul li a {
  font-size: .88rem;
  transition: color .2s;
}

.footer-col ul li a:hover { color: var(--secondary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
}

.social-links { display: flex; gap: 12px; }

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: background .2s;
}

.social-link:hover { background: var(--primary); }

/* ── INNER PAGES ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 60px 24px;
  text-align: center;
}

.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p { opacity: .85; }

.page-content {
  max-width: 860px;
  margin: 60px auto;
  padding: 0 24px;
}

.page-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--primary);
}

.page-content p { color: var(--muted); margin-bottom: 14px; line-height: 1.8; }

.page-content ul {
  padding-left: 20px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 2;
}

.highlight-box {
  background: linear-gradient(135deg, #e0f0ff, #d1fae5);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
  border-left: 4px solid var(--primary);
}

.highlight-box p { color: var(--text); margin: 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body { padding: 24px; }

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

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  outline: none;
  transition: border .2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.slot {
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: .78rem;
  cursor: pointer;
  transition: all .2s;
}

.slot:hover, .slot.selected { background: var(--primary); color: white; border-color: var(--primary); }
.slot.booked { background: var(--bg); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }

.payment-toggle {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.pay-option {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}

.pay-option:hover, .pay-option.selected { border-color: var(--primary); background: #e0f0ff; color: var(--primary); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .payment-grid { grid-template-columns: 1fr; }
  .map-container { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .hero-stats { gap: 28px; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .search-card { flex-direction: column; }
  .search-field { min-width: 100%; }
}
