/* ============================================================================
   MAIN STYLESHEET
   Design language: calm clinical blue + white, soft teal accent, a single
   "pulse line" signature motif (an EKG-style trace) used sparingly as a
   section divider and inside the hero — nods to "vitals" without leaning
   on a cliché stethoscope/cross icon set.
   ============================================================================ */

/* ---- Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
p { margin: 0 0 1em; }
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: .85em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); filter: brightness(0.95); }
.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---- Header / Nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31,42,55,0.06);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}
.brand img { height: 38px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2em;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  position: relative;
  padding: .3em 0;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width .2s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: .8em; }
.login-link {
  font-size: .85rem;
  color: var(--color-muted);
  border: 1px solid rgba(31,42,55,0.15);
  padding: .5em 1em;
  border-radius: 999px;
}
.login-link:hover { border-color: var(--color-primary); color: var(--color-primary); }

.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  width: 22px; height: 2px; background: var(--color-text); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 64px;
  background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: .4em 1em;
  border-radius: 999px;
  margin-bottom: 1.2em;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  max-width: 14ch;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 1em; margin-top: 1.6em; flex-wrap: wrap; }

.pulse-wrap {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 28px;
}
.pulse-line { width: 100%; height: auto; overflow: visible; }
.pulse-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-pulse 2.6s ease-out forwards, pulse-glow 2.6s 2.6s ease-in-out infinite;
}
@keyframes draw-pulse { to { stroke-dashoffset: 0; } }
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.pulse-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: .8rem;
  color: var(--color-muted);
}
.pulse-stat { text-align: center; }
.pulse-stat strong { display: block; font-family: var(--font-heading); font-size: 1.4rem; color: var(--color-primary); }

/* Section divider using the same pulse motif, very subtle */
.divider-pulse {
  display: block;
  width: 100%;
  height: 32px;
  margin: 0 auto;
}
.divider-pulse path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  opacity: .35;
}

/* ---- Section shells ------------------------------------------------------ */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 2.6em; text-align: center; }
.section-head .eyebrow { display: inline-flex; }
.section-alt { background: #fff; }

/* ---- Reveal on scroll ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Cards ----------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1px solid rgba(31,42,55,0.04);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1em;
  color: var(--color-accent);
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--color-muted); font-size: .95rem; margin-bottom: 0; }

/* ---- About / doctor profile -------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.doctor-photo-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.doctor-photo-wrap img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.credentials-badge {
  position: absolute; left: 20px; bottom: -18px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 14px 18px;
  display: flex; gap: 12px; align-items: center;
}
.credentials-badge strong { display: block; font-family: var(--font-heading); color: var(--color-primary); font-size: 1.3rem; }
.credentials-badge span { font-size: .78rem; color: var(--color-muted); }

/* ---- Booking form -------------------------------------------------------------- */
.booking-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 32px;
}
.form-row { margin-bottom: 1.3em; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .45em;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: .8em 1em;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(31,42,55,0.14);
  font: inherit;
  background: var(--color-bg);
  transition: border-color .18s ease, background .18s ease;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #fff;
}
.form-row textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: .8rem; color: var(--color-muted); margin-top: .35em; }
.form-error { font-size: .8rem; color: var(--color-danger); margin-top: .35em; display: none; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: .6em;
}
.slot-btn {
  padding: .6em .4em;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(31,42,55,0.14);
  background: #fff;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s ease;
}
.slot-btn:hover:not(:disabled) { border-color: var(--color-accent); }
.slot-btn.selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.slot-btn:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.slot-empty { color: var(--color-muted); font-size: .9rem; grid-column: 1 / -1; }

.status-banner {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.status-banner.pending { background: #FFF7E6; color: #8A5A00; }
.status-banner.success { background: var(--color-accent-soft); color: #146258; }
.status-banner.error { background: #FCEEED; color: #9A2E2A; }

/* Sidebar of the booking page: what happens next / trust info */
.info-panel {
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
}
.info-panel h3 { color: #fff; }
.info-panel ol { padding-left: 1.2em; }
.info-panel li { margin-bottom: .8em; }
.info-panel .muted-white { color: rgba(255,255,255,0.75); font-size: .88rem; }

/* ---- Contact page ------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(31,42,55,0.06);
}
.contact-list li:last-child { border-bottom: none; }
.contact-icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
}
.map-frame {
  border: none; width: 100%; height: 100%; min-height: 340px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.social-row { display: flex; gap: 12px; margin-top: 1.4em; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  transition: background .18s ease, color .18s ease;
}
.social-row a:hover { background: var(--color-primary); color: #fff; }

/* ---- Footer --------------------------------------------------------------------- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.72);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 1em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .6em; }
.footer-grid a { color: rgba(255,255,255,0.72); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: .8rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---- Admin panel shared bits ------------------------------------------------------ */
.admin-body { background: var(--color-bg); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 28px 20px;
}
.admin-sidebar .brand { color: #fff; margin-bottom: 2em; }
.admin-sidebar nav a {
  display: block;
  color: rgba(255,255,255,0.72);
  padding: .7em 1em;
  border-radius: var(--radius-sm);
  margin-bottom: .3em;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { padding: 32px 40px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.table-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-muted); padding: 14px 18px; background: var(--color-bg);
}
tbody td { padding: 14px 18px; border-top: 1px solid rgba(31,42,55,0.06); font-size: .92rem; }
.badge { padding: .3em .8em; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.badge-pending { background: #FFF7E6; color: #8A5A00; }
.badge-approved { background: var(--color-accent-soft); color: #146258; }
.badge-cancelled { background: #FCEEED; color: #9A2E2A; }
.row-actions { display: flex; gap: 8px; }
.icon-btn {
  border: none; background: var(--color-bg); border-radius: var(--radius-sm);
  padding: .5em .8em; cursor: pointer; font-size: .85rem;
}
.icon-btn.approve { color: #146258; }
.icon-btn.cancel { color: #9A2E2A; }
.icon-btn:hover { filter: brightness(0.95); }

.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); padding: 40px;
}

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .booking-shell, .contact-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta .login-link { display: none; }
  .nav-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 20px 24px; gap: 1em;
    box-shadow: var(--shadow-soft);
  }
  .hamburger { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-path { animation: none; stroke-dashoffset: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { scroll-behavior: auto !important; }
}
