/* =========================================================
   MediBook – custom styles (HTML + CSS + Bootstrap only)
   ========================================================= */

:root {
  --brand: #0d6efd;
  --brand-dark: #0a3d91;
  --accent: #20c997;
  --ink: #1b2a41;
  --muted: #6c7a91;
  --soft: #f3f7fc;
  --radius: 1rem;
}

html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
}

a { text-decoration: none; }

.text-muted-2 { color: var(--muted) !important; }
.bg-soft { background: var(--soft); }
.text-accent { color: var(--accent) !important; }

/* ---------- Navbar ---------- */
.navbar { backdrop-filter: saturate(180%) blur(8px); background: rgba(255, 255, 255, .92) !important; }
.navbar-brand { font-weight: 800; letter-spacing: -.5px; color: var(--brand-dark) !important; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-size: 1.1rem; margin-right: .4rem;
}
.navbar .nav-link { font-weight: 500; color: var(--ink); }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn { border-radius: 50rem; font-weight: 600; padding: .65rem 1.5rem; }
.btn-sm { padding: .4rem 1rem; }
.btn-primary { box-shadow: 0 8px 20px rgba(13, 110, 253, .25); }
.btn-primary:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(32, 201, 151, .15), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(13, 110, 253, .12), transparent 45%),
    var(--soft);
  overflow: hidden;
}
.hero h1 { font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.hero h1 span { color: var(--brand); }
.hero-img {
  border-radius: 2rem;
  box-shadow: 0 30px 60px rgba(27, 42, 65, .18);
  object-fit: cover; width: 100%; height: 460px;
}
.hero-badge {
  position: absolute; background: #fff; border-radius: var(--radius);
  padding: .8rem 1rem; box-shadow: 0 15px 35px rgba(27, 42, 65, .15);
  font-size: .9rem;
}
.hero-badge.one { left: -1.5rem; bottom: 2.5rem; }
.hero-badge.two { right: -1rem; top: 2rem; }
.pill {
  display: inline-block; padding: .35rem .9rem; border-radius: 50rem;
  background: rgba(13, 110, 253, .1); color: var(--brand); font-weight: 600; font-size: .85rem;
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-title { font-weight: 800; letter-spacing: -.5px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; color: var(--accent); }

/* ---------- Stats ---------- */
.stat h3 { font-weight: 800; color: var(--brand-dark); margin-bottom: 0; }

/* ---------- Icon box ---------- */
.icon-box {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(13, 110, 253, .1); color: var(--brand);
}
.icon-box.green { background: rgba(32, 201, 151, .12); color: var(--accent); }

/* ---------- Cards ---------- */
.card-soft {
  border: 1px solid #e8eef6; border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background: #fff;
}
.card-soft:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(27, 42, 65, .1); border-color: transparent; }

/* ---------- How it works ---------- */
.step { position: relative; text-align: center; padding: 2rem 1.25rem; }
.step-num {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  box-shadow: 0 10px 25px rgba(13, 110, 253, .3);
}
@media (min-width: 992px) {
  .step:not(.last)::after {
    content: ""; position: absolute; top: 64px; right: -20%; width: 40%;
    border-top: 2px dashed #c7d6ea;
  }
}

/* ---------- Category cards ---------- */
.category-card { overflow: hidden; color: var(--ink); display: block; height: 100%; }
.category-card img { height: 190px; object-fit: cover; width: 100%; transition: transform .4s ease; }
.category-card:hover img { transform: scale(1.06); }
.category-card .badge { font-weight: 600; }
.category-card .go { color: var(--brand); font-weight: 600; }

.mini-cat {
  display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; color: var(--ink);
}
.mini-cat .icon-box { width: 48px; height: 48px; font-size: 1.3rem; flex-shrink: 0; }

/* ---------- Doctor cards ---------- */
.doctor-card { overflow: hidden; height: 100%; }
.doctor-card img { width: 100%; height: 260px; object-fit: cover; object-position: top center; }
.rating { color: #f5a623; font-weight: 700; }
.chip {
  display: inline-block; padding: .25rem .65rem; border-radius: 50rem; font-size: .78rem;
  background: var(--soft); color: var(--muted); margin: 0 .25rem .35rem 0;
}

/* CSS-only category filter on doctors.html:
   all categories show by default; once one is targeted (#cardiology etc.)
   only that category is shown. */
.category-section { scroll-margin-top: 90px; }
.doctors-wrap:has(.category-section:target) .category-section:not(:target) { display: none; }
.doctors-wrap:has(.category-section:target) .show-all-hint { display: block !important; }

.filter-bar a {
  display: inline-block; padding: .45rem 1rem; border-radius: 50rem; margin: .25rem;
  background: #fff; border: 1px solid #e1e8f2; color: var(--ink); font-weight: 500; font-size: .92rem;
}
.filter-bar a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Reviews ---------- */
.review { height: 100%; padding: 1.75rem; }
.review .quote { font-size: 3rem; line-height: 1; color: rgba(13, 110, 253, .2); font-family: Georgia, serif; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
}
.avatar.a1 { background: #0d6efd; }
.avatar.a2 { background: #20c997; }
.avatar.a3 { background: #6f42c1; }
.avatar.a4 { background: #fd7e14; }
.avatar.a5 { background: #d63384; }
.avatar.a6 { background: #0dcaf0; }

/* ---------- Image block ---------- */
.img-rounded-xl { border-radius: 1.5rem; object-fit: cover; width: 100%; }

/* ---------- CTA ---------- */
.cta {
  border-radius: 2rem; padding: 3.5rem 2rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--accent));
}

/* ---------- Page header ---------- */
.page-header {
  padding: 7.5rem 0 3.5rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(32, 201, 151, .18), transparent 40%),
    var(--soft);
}
.page-header h1 { font-weight: 800; letter-spacing: -.5px; }

/* Progress steps (booking flow) */
.flow { display: flex; flex-wrap: wrap; gap: .5rem; }
.flow span {
  padding: .35rem .9rem; border-radius: 50rem; font-size: .85rem; font-weight: 600;
  background: #fff; border: 1px solid #e1e8f2; color: var(--muted);
}
.flow span.done { background: rgba(32, 201, 151, .12); border-color: transparent; color: #12895f; }
.flow span.now { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Form ---------- */
.form-card { border-radius: 1.5rem; border: 1px solid #e8eef6; box-shadow: 0 25px 50px rgba(27, 42, 65, .08); }
.form-control, .form-select { border-radius: .75rem; padding: .7rem 1rem; border-color: #dbe4f0; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12); }
.form-label { font-weight: 600; font-size: .92rem; }

/* Native validation feedback without JS: only after the user has typed */
.form-control:not(:placeholder-shown):invalid { border-color: #dc3545; }
.form-control:not(:placeholder-shown):valid { border-color: #20c997; }

.visit-option input { display: none; }
.visit-option label {
  display: block; cursor: pointer; padding: .9rem 1rem; border: 1px solid #dbe4f0;
  border-radius: .9rem; text-align: center; font-weight: 600; transition: all .15s ease;
}
.visit-option input:checked + label { border-color: var(--brand); background: rgba(13, 110, 253, .07); color: var(--brand); }

/* Selected doctor summary on book.html (shown via #dr-xxx in the URL) */
.selected-doc { display: none; scroll-margin-top: 90px; }
.selected-doc:target { display: flex; }
.chosen-wrap:has(.selected-doc:target) .no-doc { display: none; }
.selected-doc img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; flex-shrink: 0; }

.side-card { border-radius: 1.5rem; overflow: hidden; }
.side-card img { height: 220px; object-fit: cover; width: 100%; }

/* ---------- Confirmation ---------- */
.success-icon {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto;
  display: grid; place-items: center; font-size: 3rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), #12a37a);
  box-shadow: 0 20px 40px rgba(32, 201, 151, .35);
}

/* ---------- Footer ---------- */
footer { background: #0e1b2e; color: #a9b6cb; }
footer h6 { color: #fff; font-weight: 700; }
footer a { color: #a9b6cb; }
footer a:hover { color: #fff; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
  .hero { padding-top: 6rem; }
  .hero-img { height: 340px; margin-top: 2.5rem; }
  .hero-badge.one { left: .5rem; }
  .hero-badge.two { right: .5rem; }
}
@media (max-width: 575.98px) {
  .section { padding: 3.5rem 0; }
  .hero-badge { display: none; }
}
