/* css/styles.css */
:root{
  --bg:#F6F7F9;
  --card:#FFFFFF;
  --ink:#1C2126;
  --muted:#5A626A;
  --line:#DCE1E7;

  --accent:#0B5CAB;
  --accentSoft:#E8F1FB;

  --shadow: 0 10px 30px rgba(16,24,40,.08);
  --radius:18px;
  --max:1180px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; } /* Added smooth scroll here as requested */
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background: linear-gradient(180deg, #F6F7F9 0%, #F2F7FF 55%, #F6F7F9 100%);
  line-height:1.4;
}

/* Reduced motion override for smooth scroll */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
a.underline{ text-decoration:underline; }

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
}

/* Safer text wrapping */
.muted, .small, .tile p, .tile li, .bioValue, .panel, .notice{
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Accessibility */
.skip-link{
  position:absolute;
  left:-999px;
  top:0;
  background:#fff;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
}
.skip-link:focus{
  left:18px;
  top:10px;
  z-index:999;
}

/* =========================
   HEADER (Sticky, not fixed)
   This prevents content being cut off.
   ========================= */
header{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Slight shrink on scroll so mobile doesn’t feel “stuck + huge” */
header.scrolled{
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 10px 24px rgba(16,24,40,.08);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
  transition: padding 0.2s ease;
}

header.scrolled .topbar{
  padding:10px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:260px;
}
.brand img{
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:10px;
  background:#fff;
  border:1px solid var(--line);
  padding:4px;
  flex:0 0 auto;
  transition: transform 0.2s ease;
}
header.scrolled .brand img{
  transform: scale(0.96);
}

.brand .name{ font-weight:900; }
.brand .tagline{ font-size:12px; color:var(--muted); }

nav{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
}

.navlink{
  display:inline-flex;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  font-weight:900;
  color:var(--muted);
  border:1px solid transparent; /* prevents hover “jump” */
}

.navlink:hover{
  background:rgba(255,255,255,.75);
  border-color:var(--line);
  color:var(--ink);
}

.navlink:focus-visible{
  outline:none;
  box-shadow: 0 0 0 4px rgba(11,92,171,.18);
  border-color: rgba(11,92,171,.35);
}

.navlink[aria-current="page"]{
  background:#fff;
  border-color:var(--line);
  color:var(--ink);
}

/* Buttons */
.cta{ display:flex; gap:10px; align-items:center; }

.btn{
  border:1px solid var(--line);
  background:#fff;
  padding:10px 14px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.btn.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

.btn.soft{
  background:var(--accentSoft);
  color:var(--accent);
  border-color:var(--line);
}

/* NEW CODE: Portal Coming Soon badge + disabled buttons */
.portalSoon{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-weight:900;
  white-space:nowrap;
}
.portalSoon .dot{
  width:8px; height:8px;
  border-radius:50%;
  background: rgba(11,92,171,.35);
}

/* NEW CODE: smaller portalSoon pill for tiles (same style as header, tighter size) */
.portalSoon.small{
  padding:8px 12px;
  font-size:13px;
  border-radius:999px;
}

.btn.disabled{
  opacity:.65;
  cursor:not-allowed;
  pointer-events:none;
}

/* MAIN */
main{
  padding: 26px 0 54px;
}

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.sectionTitle{
  margin:22px 0 10px;
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:10px;
}

.sectionTitle h1,
.sectionTitle h2,
.sectionTitle h3{
  margin:0;
  letter-spacing:-.3px;
}
.sectionTitle h1{ font-size:28px; }
.sectionTitle h2{ font-size:24px; }
.sectionTitle .hint{ color:var(--muted); font-size:13px; }

/* HERO */
.hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  padding:22px;
}

.hero::before{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(600px 260px at 20% 10%, rgba(11,92,171,.18), transparent 60%),
    radial-gradient(520px 240px at 85% 35%, rgba(11,92,171,.12), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,1), rgba(232,241,251,.65));
  pointer-events:none;
}

.hero > *{ position:relative; }

.hero h1{
  margin:0 0 10px;
  font-size:42px;
  letter-spacing:-.8px;
}
.hero p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:16px;
}
.hero .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.trustline{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.trustline .sep{ opacity:.6; }

.heroArt{
  min-height:260px;
  border-radius:16px;
  border:1px dashed var(--line);
  background:linear-gradient(135deg,#ffffff,#eef3f8);
  overflow:hidden;
}
.heroArt img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Pills */
.pillrow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.pill{
  background:var(--accentSoft);
  color:var(--accent);
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
}

/* Grid */
.grid4{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}

.tile{ padding:16px; }
.tile h3{ margin:0 0 6px; font-size:16px; }
.tile p{ margin:0 0 10px; color:var(--muted); font-size:13px; }

/* Notice */
.notice{
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  background:var(--accentSoft);
  border:1px solid var(--line);
  color:var(--accent);
  font-weight:900;
}

/* Filters */
.filters{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:10px;
  padding:14px;
}

.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
  font-weight:900;
}

.field input,
.field select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  outline:none;
}

.field input:focus,
.field select:focus{
  border-color: rgba(11,92,171,.45);
  box-shadow: 0 0 0 4px rgba(11,92,171,.12);
}

/* Directory list */
.list{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  padding:14px;
}

/* Helpers */
.row{ display:flex; gap:14px; align-items:flex-start; }
.rowTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.rowTop h3, .rowTop h4{ flex: 1 1 auto; min-width: 0; }
.grow{ flex:1 1 auto; min-width:0; }
.m0{ margin:0; }
.spacer8{ height:8px; }
.spacer12{ height:12px; }

.muted{ color:var(--muted); }
.small{ font-size:13px; color:var(--muted); }

/* Small buttons */
.mini{
  padding:9px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
  cursor:pointer;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.mini.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

.mini.soft{
  background:var(--accentSoft);
  color:var(--accent);
}

/* Rows in list */
.card.row{
  padding:16px;
  box-shadow:none;
}

/* Avatars */
.avatarWrap{
  width:88px;
  height:88px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#f1f4f7;
  overflow:hidden;
  flex:0 0 auto;
}
.avatarImg{ width:100%; height:100%; object-fit:cover; }
.avatarFallback{
  width:100%;
  height:100%;
  display:none;
  place-items:center;
  font-weight:900;
  color:var(--muted);
}

/* Detail */
.detail{ padding:18px; }
.detail .avatarWrap{ width:260px; height:260px; border-radius:20px; }

.panel{
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.panel h3,
.panel h4{ margin:0 0 8px; font-size:14px; }

.panel ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  font-size:13px;
}

.actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* Specialties */
.specTile .specTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.specTile .specTop h3{ flex: 1 1 auto; min-width: 0; }
.specTile .specTop .pill{ flex: 0 0 auto; white-space: nowrap; }

.specBullets{
  margin:10px 0 0;
  padding-left:18px;
  color:var(--muted);
  font-size:13px;
}

.tileActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* NEW CODE: Clean 2-column bullets (no weird column bullet behavior) */
.specBulletsCompact{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px 22px;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.specBulletsCompact li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:0;
}
.specBulletsCompact li::before{
  content:"";
  width:6px;
  height:6px;
  margin-top:8px;
  border-radius:999px;
  background: rgba(28, 33, 38, 0.55);
  flex:0 0 auto;
}

/* Provider bio */
.bioCard{ margin-top:12px; }

.bioRow{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap:14px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.bioRow:last-child{ border-bottom:none; }

.bioLabel{
  font-weight:900;
  color:var(--ink);
  font-size:13px;
}
.bioValue{ color:var(--muted); font-size:13px; }
.bioList{ margin:0; padding-left:18px; }

/* Footer */
.footer{
  margin-top:24px;
  padding:18px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  display:flex;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

/* =========================
   Micro-interactions (subtle)
   ========================= */
@media (hover: hover) and (pointer: fine) {
  .card {
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
    will-change: transform;
  }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
  }
  .card.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  }

  .btn, .mini {
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
    will-change: transform;
  }
  .btn:hover, .mini:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
    filter: brightness(1.02);
  }
  .btn:active, .mini:active {
    transform: translateY(0px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    filter: brightness(0.98);
  }
}

/* Keyboard focus */
.btn:focus-visible,
.mini:focus-visible,
.navlink:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 79, 117, 0.35);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card, .btn, .mini, .topbar {
    transition: none !important;
  }
  .card:hover, .btn:hover, .mini:hover {
    transform: none !important;
  }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1020px){
  .hero{ grid-template-columns:1fr; }
  .grid4{ grid-template-columns:1fr 1fr; }
  .filters{ grid-template-columns:1fr; }
  .list{ grid-template-columns:1fr; }
  .brand{ min-width:unset; }
}

@media (max-width: 820px){
  /* Header layout */
  header .topbar{
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
  }

  header .brand{
    flex: 1 1 auto;
    min-width: 220px;
  }

  header .brand .name{
    font-size:16px;
    line-height:1.1;
  }

  /* Keep Portal Login to the right */
  header .cta{
    margin-left:auto;
  }

  /* Nav becomes a single horizontal scroll row (chips) */
  header nav[aria-label="Primary navigation"]{
    width:100%;
    order:3;
    display:flex;
    flex-direction:row;
    gap:8px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding:6px 0 2px;
    margin:0;
  }

  header nav[aria-label="Primary navigation"]::-webkit-scrollbar{
    height:6px;
  }

  header nav[aria-label="Primary navigation"] .navlink{
    flex:0 0 auto;
    white-space:nowrap;
    padding:8px 12px;
    border-radius:999px;
    background: rgba(11, 79, 117, 0.08);
  }

  header nav[aria-label="Primary navigation"] .navlink[aria-current="page"]{
    background: rgba(11, 79, 117, 0.16);
  }

  /* Hero */
  .hero{ grid-template-columns:1fr; gap:14px; }
  .heroArt img{ width:100%; height:auto; }

  .grid4{ grid-template-columns:1fr; }

  /* Detail pages */
  .detail .row{ flex-direction:column; }
  .detail .avatarWrap{ width:180px; height:180px; }
  .bioRow{ grid-template-columns: 1fr; }

  /* NEW CODE: bullets stack to one column on mobile */
  .specBulletsCompact{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .hero h1{ font-size:34px; }
}