/* Neurosalud - Preguntas frecuentes (work item faq-v1).
   Scoped to .nsf and the .nsx-faq page container; reuses the site tokens
   (--ns-*) with the same fallbacks the directory uses. */

/* ---------- page container (same measure as the directory) ---------- */
.nsx-faq{
  background:var(--ns-surface,#F5F6F8);
  --padding-block-start:8px;
  --padding-block-end:56px;
  --padding-inline-start:max(24px, calc((100% - 1240px) / 2));
  --padding-inline-end:max(24px, calc((100% - 1240px) / 2));
}
.nsx-faq__intro p{
  font-family:var(--ns-sans,"Poppins",system-ui,sans-serif);
  font-size:16px;
  line-height:1.65;
  color:var(--ns-muted,#667F96);
  max-width:68ch;
  margin:0 0 30px;
}
@media (max-width:767px){
  .nsx-faq{ --padding-inline-start:20px; --padding-inline-end:20px; }
}

/* ---------- tokens ---------- */
.nsf{
  --nsf-ink:var(--ns-text,#173F66);
  --nsf-blue:var(--ns-primary,#1764C0);
  --nsf-deep:var(--ns-primary-deep,#0B3D91);
  --nsf-teal:var(--ns-accent,#19A7D1);
  --nsf-line:var(--ns-line,#D9E8F2);
  --nsf-muted:var(--ns-muted,#667F96);
  --nsf-sans:var(--ns-sans,"Poppins",system-ui,sans-serif);
  --nsf-serif:"Lora",Georgia,serif;
  --nsf-tint:rgba(23,100,192,.07);
  --nsf-radius:14px;
  font-family:var(--nsf-sans);
  color:var(--nsf-ink);
}
.nsf *{ box-sizing:border-box; }

/* ---------- important notice (emergencies) ---------- */
.nsf-alert{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:18px;
  align-items:start;
  background:#FFF6EE;
  border:1px solid #F1CBAA;
  border-left:5px solid #D9822B;
  border-radius:var(--nsf-radius);
  padding:22px 26px;
  margin:0 0 34px;
}
.nsf-alert__icon{
  width:44px; height:44px; border-radius:50%;
  background:#fff; border:1px solid #F1CBAA; color:#B35F12;
  display:flex; align-items:center; justify-content:center;
}
.nsf-alert__icon svg{ width:22px; height:22px; }
.nsf-alert__eyebrow{
  margin:0 0 4px;
  font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:#8A4A0E;
}
.nsf-alert__title{
  margin:0 0 10px;
  font-family:var(--nsf-serif);
  font-size:21px; line-height:1.3; font-weight:500;
  color:var(--nsf-deep);
}
.nsf-alert__text{ max-width:78ch; }
.nsf-alert__text p{ margin:0 0 10px; font-size:15px; line-height:1.65; }
.nsf-alert__text p:last-child{ margin-bottom:0; }
.nsf-alert__text strong{ color:var(--nsf-deep); font-weight:600; }

/* ---------- search + count ---------- */
.nsf-toolbar{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:14px 24px;
  margin:0 0 30px;
}
.nsf-search{ position:relative; margin:0; flex:1 1 380px; max-width:580px; }
.nsf-search svg{
  position:absolute; left:17px; top:50%; transform:translateY(-50%);
  width:18px; height:18px; color:var(--nsf-blue); pointer-events:none;
}
.nsf .nsf-search input{
  width:100%; min-height:50px;
  padding:13px 18px 13px 48px !important;
  font:400 15px var(--nsf-sans);
  color:var(--nsf-ink);
  background:#fff;
  border:1px solid var(--nsf-line);
  border-radius:999px;
  box-shadow:0 8px 24px rgba(23,63,102,.05);
}
.nsf .nsf-search input::placeholder{ color:var(--nsf-muted); opacity:1; }
.nsf .nsf-search input:focus-visible{
  outline-style:solid !important; outline-width:3px !important; outline-color:#19A7D1 !important; outline-offset:2px !important;
  border-color:#1764C0 !important;
  box-shadow:0 0 0 3px rgba(25,167,209,.55) !important;
}
.nsf-count{ margin:0; font-size:14px; color:var(--nsf-muted); }
/* search and counts need JS; without it the page is a plain list */
.nsf:not(.nsf--js) .nsf-toolbar{ display:none; }

/* ---------- layout ---------- */
.nsf-layout{
  display:grid;
  grid-template-columns:272px minmax(0,1fr);
  gap:44px;
  align-items:start;
}
.nsf-nav{ position:sticky; top:112px; }
.nsf-nav__title{
  margin:0 0 12px;
  font-size:12px; font-weight:600; letter-spacing:.09em; text-transform:uppercase;
  color:var(--nsf-muted);
}
.nsf-nav ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.nsf-nav li{ margin:0; }
.nsf-nav a{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:11px 14px;
  font-size:14.5px; line-height:1.35;
  color:var(--nsf-ink); text-decoration:none;
  border:1px solid transparent; border-radius:12px;
  transition:background .2s, color .2s, border-color .2s;
}
.nsf-nav a:hover{ background:var(--nsf-tint); }
.nsf-nav a[aria-current="true"]{
  background:#fff; border-color:var(--nsf-line);
  color:var(--nsf-deep); font-weight:500;
  box-shadow:0 6px 18px rgba(23,63,102,.06);
}
.nsf-nav a.is-empty{ opacity:.5; }
.nsf-nav__n{
  flex:0 0 auto; min-width:28px; text-align:center;
  padding:2px 8px; border-radius:999px;
  background:var(--nsf-tint); color:var(--nsf-blue);
  font-size:12.5px; font-weight:500;
}
.nsf-nav a[aria-current="true"] .nsf-nav__n{ background:var(--nsf-blue); color:#fff; }
.nsf-nav a:focus-visible{ outline:3px solid #19A7D1; outline-offset:2px; }

/* ---------- categories + accordion ---------- */
.nsf-cat{ margin:0 0 40px; scroll-margin-top:110px; }
.nsf-cat[hidden]{ display:none; }
.nsf-cat__title{
  margin:0 0 18px;
  font-family:var(--nsf-serif);
  font-size:26px; line-height:1.25; font-weight:500;
  color:var(--nsf-deep);
}
.nsf-list{ display:flex; flex-direction:column; gap:12px; }
.nsf-item{
  background:#fff;
  border:1px solid var(--nsf-line);
  border-radius:var(--nsf-radius);
  scroll-margin-top:110px;
  transition:border-color .2s, box-shadow .2s;
}
.nsf-item[hidden]{ display:none; }
.nsf-item:hover{ border-color:#B9D3EC; }
.nsf-item[open]{ border-color:#9EC3E8; box-shadow:0 12px 30px rgba(23,63,102,.08); }
.nsf-item__q{
  list-style:none; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:19px 22px;
  font-size:16px; line-height:1.45; font-weight:500;
  color:var(--nsf-deep);
  border-radius:var(--nsf-radius);
}
.nsf-item__q::-webkit-details-marker{ display:none; }
.nsf-item__q::marker{ content:""; }
.nsf-item__q:focus-visible{ outline:3px solid #19A7D1; outline-offset:2px; }
.nsf-item__icon{
  flex:0 0 auto; width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--nsf-tint); color:var(--nsf-blue);
  transition:transform .25s ease, background .2s, color .2s;
}
.nsf-item__icon svg{ width:14px; height:14px; }
.nsf-item[open] .nsf-item__icon{ transform:rotate(180deg); background:var(--nsf-blue); color:#fff; }
.nsf-item__a{
  padding:0 22px 22px;
  max-width:76ch;
  font-size:15px; line-height:1.7;
  color:var(--nsf-ink);
}
.nsf-item[open] .nsf-item__a{ animation:nsf-in .28s ease both; }
.nsf-item__a p{ margin:0 0 12px; }
.nsf-item__a p:last-child{ margin-bottom:0; }
.nsf-item__a a,
.nsf-alert__text a{ color:var(--nsf-blue); font-weight:500; text-decoration:underline; text-underline-offset:3px; }
@keyframes nsf-in{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:none; } }

/* ---------- empty state ---------- */
.nsf-empty{
  background:#fff; border:1px dashed #9EC3E8; border-radius:var(--nsf-radius);
  padding:36px 28px; text-align:center;
}
.nsf-empty[hidden]{ display:none; }
.nsf-empty__title{ margin:0 0 8px; font-family:var(--nsf-serif); font-size:20px; font-weight:500; color:var(--nsf-deep); }
.nsf-empty__text{ margin:0 0 18px; font-size:15px; color:var(--nsf-muted); }
.nsf-empty__btn{
  min-height:44px; padding:0 22px;
  font:500 14.5px var(--nsf-sans);
  color:var(--nsf-blue); background:#fff;
  border:1.5px solid #9EC3E8; border-radius:999px; cursor:pointer;
}
.nsf-empty__btn:hover{ background:var(--nsf-tint); }
.nsf-empty__btn:focus-visible{ outline:3px solid #19A7D1; outline-offset:2px; }

/* ---------- tablet / mobile ---------- */
@media (max-width:960px){
  .nsf-layout{ grid-template-columns:1fr; gap:22px; }
  .nsf-nav{ position:static; margin:0 -20px; padding:0 20px; }
  .nsf-nav__title{ display:none; }
  .nsf-nav ul{ flex-direction:row; gap:8px; overflow-x:auto; padding:2px 0 8px; scrollbar-width:none; }
  .nsf-nav ul::-webkit-scrollbar{ display:none; }
  .nsf-nav a{ white-space:nowrap; padding:9px 14px; background:#fff; border-color:var(--nsf-line); border-radius:999px; }
  .nsf-nav a[aria-current="true"]{ background:var(--nsf-blue); border-color:var(--nsf-blue); color:#fff; box-shadow:none; }
  .nsf-nav a[aria-current="true"] .nsf-nav__n{ background:#fff; color:var(--nsf-blue); }
  .nsf-cat__title{ font-size:23px; }
}
@media (max-width:560px){
  .nsf-alert{ grid-template-columns:1fr; padding:20px; }
  .nsf-item__q{ padding:16px; font-size:15.5px; }
  .nsf-item__a{ padding:0 16px 18px; }
  .nsf-toolbar{ margin-bottom:22px; }
}
@media (prefers-reduced-motion:reduce){
  .nsf *{ animation:none !important; transition:none !important; }
}

/* closing CTA on the FAQ page: link + emphasis inside the message */
.nsx-faq + .nsx-cta .nsx-cta__text a{ color:var(--ns-primary,#1764C0); font-weight:500; text-decoration:underline; text-underline-offset:3px; }
.nsx-faq + .nsx-cta .nsx-cta__text strong{ color:var(--ns-primary-deep,#0B3D91); font-weight:500; }
