/* =========================================================================
   sobanpolyclinic.com - hand written, no framework.
   Brand colours match the desktop app: #0B63D6 primary, #1B8A5A accent,
   #0A1220 ink (theme.py), so the site and the app read as one product.

   Style: glassmorphism. A fixed gradient mesh sits behind everything, and
   every surface is frosted glass over it - translucent, blurred, with a
   1px light edge and a soft outer shadow. The ink text stays near-black so
   contrast holds (worst case measured against the palest glass: ~15:1).

   Only two things are allowed to be opaque: the dark footer, and the red
   stale-backup warning in the admin console. Everything else is glass.

   Mobile first: one column, breakpoints at 640px and 960px.
   ========================================================================= */

:root {
  --primary: #0B63D6;
  --primary-dark: #0A55B8;
  --primary-ink: #08498F;
  --accent: #1B8A5A;
  --accent-ink: #157349;
  --accent-light: #37C98A;
  --ink: #0A1220;
  --muted: #4E6076;
  --line: #D3E0F2;
  --soft: #E4EFFE;
  --bg: #F2F7FF;
  --white: #FFFFFF;

  /* glass */
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --hairline: rgba(10, 18, 32, 0.09);
  --shadow: 0 10px 30px rgba(10, 18, 32, 0.08);
  --shadow-glass:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 28px rgba(10, 18, 32, 0.10);
  --shadow-lift:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 46px rgba(10, 18, 32, 0.16);
  --blur: blur(18px) saturate(170%);

  --radius: 20px;
  --radius-sm: 13px;

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* the base wash the glass sits on, in case the mesh never paints */
  background: linear-gradient(180deg, #EFF5FF 0%, #FBFDFF 45%, #EFF8F4 100%);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the mesh - three colour fields, fixed, so content slides over them */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38rem 38rem at 14% 6%,  rgba(11, 99, 214, 0.20), transparent 62%),
    radial-gradient(34rem 34rem at 92% 4%,  rgba(27, 138, 90, 0.18), transparent 60%),
    radial-gradient(46rem 46rem at 70% 96%, rgba(79, 102, 214, 0.16), transparent 64%),
    radial-gradient(30rem 30rem at 4% 78%,  rgba(14, 165, 183, 0.14), transparent 62%);
  filter: blur(28px);
}

img, iframe, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.021em; font-weight: 800; }
p { margin: 0 0 12px; }
a { color: var(--primary-ink); }

/* the sticky header must not sit on top of an anchored heading */
[id] { scroll-margin-top: 88px; }

a:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); color: var(--primary);
  padding: 12px 16px; font-weight: 700; text-decoration: none;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* the shared glass surface --------------------------------------------- */
.hero-card, .trust-card, .dept-card, .card, .doctor,
.portal-card, .admin-main .card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
}

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 48px; padding: 13px 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease,
              background-color 150ms ease, border-color 150ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #2B87F0 0%, var(--primary) 46%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset,
              0 10px 24px rgba(11, 99, 214, 0.30);
}
.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset,
              0 16px 32px rgba(11, 99, 214, 0.38);
}

.btn-ghost {
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-color: rgba(27, 138, 90, 0.35);
  color: var(--accent-ink);
  box-shadow: var(--shadow-glass);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  color: var(--accent-ink);
}
.btn-sub { font-weight: 600; opacity: 0.92; }

.btn-danger {
  background: linear-gradient(135deg, #E05252 0%, #C62828 100%);
  border-color: #C62828;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 10px 24px rgba(198, 40, 40, 0.28);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(198, 40, 40, 0.34); }

/* ------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 0 var(--hairline), 0 10px 30px rgba(10, 18, 32, 0.05);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 14px; min-height: 66px; padding-block: 9px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  margin-right: auto; text-decoration: none; color: var(--ink);
  min-width: 0;
}
.brand img {
  display: block; border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 6px 16px rgba(11, 99, 214, 0.22);
}
.brand-name { font-size: 16.5px; font-weight: 800; letter-spacing: -0.018em; }

.nav ul {
  display: flex; flex-wrap: wrap; gap: 2px;
  margin: 0; padding: 0; list-style: none;
}
.nav a {
  display: block; padding: 8px 11px; border-radius: 999px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.nav a:hover { color: var(--primary-ink); background: rgba(255, 255, 255, 0.85); }
.header-cta { padding: 11px 17px; min-height: 42px; font-size: 14px; }

/* --------------------------------------------------------------- hero */
.hero { border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
.hero-inner { display: grid; gap: 30px; padding-block: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 6px 13px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  color: var(--primary-ink);
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 6.6vw, 52px); letter-spacing: -0.032em; }
.lead {
  margin: 0 0 14px; font-size: clamp(18px, 2.5vw, 23px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.35;
  background: linear-gradient(100deg, var(--accent-ink) 0%, var(--primary-ink) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--primary-ink);
}
.hero-text { max-width: 54ch; color: var(--muted); font-size: 17.5px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-card { padding: 24px; }
.hero-card-title { margin: 0 0 16px; font-size: 18.5px; }
.facts { margin: 0; display: grid; gap: 12px; }
.facts > div {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px dashed rgba(10, 18, 32, 0.13);
}
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt {
  color: var(--muted); font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.facts a { color: var(--primary-ink); text-decoration: none; }
.facts a:hover { text-decoration: underline; }

/* -------------------------------------------------------- trust strip */
.trust { border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
.trust-grid {
  display: grid; gap: 14px; margin: 0; padding: 34px 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.trust-card { padding: 19px; transition: transform 180ms ease, box-shadow 180ms ease; }
.trust-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.trust-card h3 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 7px; font-size: 16.5px;
}
/* a real vector tick in a glass badge, not a text glyph */
.trust-card h3::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23157349' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    rgba(27, 138, 90, 0.14);
  box-shadow: 0 0 0 1px rgba(27, 138, 90, 0.22) inset;
}
.trust-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ----------------------------------------------------------- sections */
.section { padding-block: 54px; }
.section-alt { border-block: 1px solid rgba(255, 255, 255, 0.5); }
.section-head { max-width: 62ch; margin-bottom: 26px; }
.kicker {
  margin: 0 0 9px; color: var(--primary-ink);
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.section h2 { margin: 0 0 10px; font-size: clamp(24px, 4vw, 33px); letter-spacing: -0.026em; }
.section-sub { margin: 0; color: var(--muted); font-size: 17px; }

/* --------------------------------------------------------- departments */
.dept-grid {
  display: grid; gap: 16px; margin: 0; padding: 0; list-style: none;
  /* 270px: three tidy columns at desktop (235px fit four and left 4+2 ragged) */
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.dept-card {
  position: relative; overflow: hidden;
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.dept-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #4FA3F5 55%, var(--accent) 100%);
}
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.dept-card h3 { margin: 0 0 8px; font-size: 18px; }
.dept-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------- consultant */
.doctor {
  display: flex; gap: 18px; align-items: flex-start;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px; max-width: 740px;
}
.doctor-mark {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(140deg, rgba(27, 138, 90, 0.20), rgba(11, 99, 214, 0.14));
  box-shadow: 0 0 0 1px rgba(27, 138, 90, 0.25) inset;
  color: var(--accent-ink);
  display: grid; place-items: center; font-size: 28px; font-weight: 800;
}
.doctor-name { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.doctor-quals { margin: 0 0 6px; color: var(--accent-ink); font-weight: 700; }
.doctor-note { margin: 0; color: var(--muted); font-size: 15px; }
/* site script v2: one display card per doctor registered in the app */
.doctor-grid {
  display: grid; gap: 16px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.doctor-card { max-width: none; }

/* ------------------------------------------------- timings and contact */
.split { display: grid; gap: 20px; }
.card { padding: 26px 24px; }
.card h2 { font-size: 24px; }
.hours, .contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.hours li, .contact-list li {
  display: flex; flex-wrap: wrap; gap: 2px 16px; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px dashed rgba(10, 18, 32, 0.13);
}
.hours li:last-child, .contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.hours-label, .contact-label {
  color: var(--muted); font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.hours-value, .contact-value { font-weight: 700; text-align: right; }
.contact-list a { color: var(--primary-ink); font-weight: 700; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- map */
.map-box {
  aspect-ratio: 16 / 11; overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
}
.map-box iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-link { margin: 14px 0 0; font-size: 15px; }
.map-link a { font-weight: 700; text-decoration: none; }
.map-link a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- footer */
.site-footer {
  position: relative;
  margin-top: 40px;
  background: linear-gradient(160deg, #12203A 0%, var(--ink) 60%);
  color: #C9D6E8; padding-block: 38px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 -14px 40px rgba(10, 18, 32, 0.14);
}
.footer-grid { display: grid; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.10); }
.footer-name { margin: 0 0 4px; color: var(--white); font-size: 17px; font-weight: 800; letter-spacing: -0.018em; }
.footer-line { margin: 0 0 4px; font-size: 15px; }
.site-footer a { color: var(--accent-light); font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { padding-top: 16px; }
.footer-legal p { margin: 0; color: #8FA2BE; font-size: 13.5px; }

/* ------------------------------------------------------- 640px and up */
@media (min-width: 640px) {
  .header-inner { padding-block: 11px; }
  .brand-name { font-size: 18px; }
  .nav a { font-size: 14.5px; padding: 9px 12px; }
  .hero-inner { padding-block: 66px; }
  .split { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map-box { aspect-ratio: 16 / 8; }
}

/* ------------------------------------------------------- 960px and up */
@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: 1.45fr 0.9fr;
    align-items: center;
    gap: 52px;
    padding-block: 92px;
  }
  .section { padding-block: 70px; }
  .nav { order: 0; }
}

/* --------------------------------------------------------------- misc */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
