:root {
  --bg: #f7f9fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9;
  --brand-ink: #0b7fb3;
  --accent: #10b981;
  --warning: #b45309;
  --ring: 0 0 0 3px rgba(14, 165, 233, 0.25);
  --text: #333;
  --reverse-text: #eee;
  --footer-bg: #333;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Cairo, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  /* BUG 14 FIX: removed duplicate color declaration — keeping var(--text) */
  color: var(--text);
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.container {
  width: min(1600px, 92vw);
  margin-inline: auto;
}
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e5e7eb;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding-block: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  /* BUG 16 FIX: prevent logo from shrinking and disappearing on small screens */
  flex-shrink: 0;
}
.logo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand);
  color: var(--reverse-text);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  /* Prevent blue btn text from being overridden by global a { color } */
  color: var(--reverse-text);
}
.btn.secondary {
  background: var(--accent);
}
.btn.link {
  background: transparent;
  color: var(--brand);
  padding: 0;
}
.btn:focus {
  outline: none;
  box-shadow: var(--ring);
}
.hero-bg {
  background: url('../images/hero_bg.jpg') center center;
  background-size: cover;
  overflow-x: clip;
}
.hero {
  position: relative;
  display: flex;
  height: 100vh;
  gap: 32px;
  align-items: flex-end;
  justify-content: end;
  padding-block: 48px;
  color: var(--reverse-text);
}
.hero div{
  position: relative;
}
#heroimage {
  position: absolute;
  height: 110%;
  bottom: 0px;
  /*right: 0px;*/
  right: clamp(-15vw, calc(34.6vw - 595px), 0px);
  overflow: hidden;
}
#heroimage img{
  height: 100%;
}
.hero h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.2;
  margin: 0;
  text-shadow: 0px 0px 10px #000;
}
/* BUG 10+11 FIX: .hero-lead replaces .hero .lead — correct element is now a <ul>
   not a <p>. Color is set to var(--reverse-text) so it's readable on the hero image. */
.hero-lead {
  color: var(--reverse-text);
  font-size: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 12px 0 20px;
  text-shadow: 0px 0px 10px #000;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card {
  background: var(--card);
  color: var(--text);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.06);
}
.p24 {
  padding: 24px;
}
#weekSchedule ul {
  font-size: 0.75rem;
  list-style: disc;
}
.week-schedule {
  height: 80vh;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: #fff6;
  backdrop-filter: blur(10px);
}
.week-schedule::-webkit-scrollbar {
  display: none;
}
.week-schedule h3 {
  color: white;
}
.section {
  padding-block: 56px;
}
.section h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 12px;
}
.kpis {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  color: var(--reverse-text);
}
.kpi {
  padding: 16px;
  border-radius: 12px;
  background: #0a6a959c;
  border: 1px solid #bae6fd;
  text-align: center;
  flex: 1;
  font-weight: 700;
}
.kpi .notice{
  color: inherit;
}
.kpi strong {
  font-size: 2.5rem;
  font-weight: lighter;
  direction: ltr;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eff6ff;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
#locList {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.loc-card {
  width: calc(50% - 16px);
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.list {
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.loc-card .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.badges {
  display: flex;
  gap: 8px;
}
.badge {
  display: inline-block;
  background: #ecfeff;
  color: var(--text);
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 10px;
}
.tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.map {
  border: 0;
  width: 100%;
  height: 220px;
  border-radius: 12px;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.table tr {
  background: var(--card);
  box-shadow: 0 1px 0 #e5e7eb;
}
.table td {
  padding: 12px 16px;
}
.faq details {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
}
.footer {
  padding-block: 24px;
  color: var(--reverse-text);
  background-color: var(--footer-bg);
  border-top: 1px solid #e5e7eb;
}
.footer .notice {
  color: var(--reverse-text);
}
.notice {
  font-size: 0.8rem;
  color: var(--text);
}
.cta-group {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.mt-12 {
  margin-top: 12px;
}
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-block: 10px;
  margin-bottom: 18px;
  align-items: center;
}



@media screen and (max-width: 860px){
  .hero {
    flex-direction: column;
    align-items: initial;
  }
  #locList {
    flex-wrap: no-wrap;
  }
  .loc-card {
    width: 100%;
  }
  .week-schedule {
    display: none;
  }
}
@media screen and (max-width: 640px) {
  #heroimage {
    right: initial;
    left: -50vw;
  }
  .kpis{
    /*flex-direction: column;*/
    gap: 6px;
  }
  .kpi {
    padding: 0px;
  }
  .kpi strong {
    font-size: 6vw;
  }
  .kpi small {
    font-size: 2vw;
  }
  .nav {
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-links {
    gap: 10px;
    font-size: 0.85rem;
  }
  .nav-links a:not(.btn) {
    display: none;
  }
  .table tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #0002;
  }
}



/* BUG 15 FIX: filter label now styled to be clearly separate from the select */
.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.book-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.inputs-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.input,
.select,
.textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.no-top-margin > h3:first-child,
.card h3:first-child {
  margin-top: 0;
}
/* ── NEXT AVAILABLE DIALOG ── */
dialog#nextAvailDialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(640px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(2, 8, 23, 0.22);
  /* native <dialog> is display:none until open; no z-index needed */
}
dialog#nextAvailDialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: var(--card);
  border-radius: 16px 16px 0 0;
}
.dialog-title {
  font-size: clamp(16px, 2vw, 20px);
  margin: 0;
  color: var(--ink);
}
.dialog-close {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid #e2e8f0;
}
.dialog-close:hover {
  background: #e2e8f0;
  color: var(--ink);
}
.dialog-body {
  overflow-y: auto;
  padding: 20px 24px 24px;
  /*background: var(--bg);*/
  border-radius: 0 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-clinic-card {
  box-shadow: none;
  width: initial;
  border: none;
  background-color: inherit;
}
/* Highlight the matching day tag */
.tag-highlight {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
  font-weight: 700;
}


  .grid3 {
    grid-template-columns: 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .inputs-2 {
    grid-template-columns: 1fr;
  }
}

