/* AquaExpert Ordlista — fristående stilmall, krockar inte med temats klasser (aq- prefix) */
:root {
  --aq-navy: #23306A;
  --aq-steel: #7A9CB0;
  --aq-blue-mid: #7A9CB0;
  --aq-blue-light: #DBE6ED;
  --aq-gray-bg: #DBE6ED;
  --aq-text: #1A1A2E;
  --aq-text-muted: #5A6A80;
  --aq-white: #FFFFFF;
}

.aq-hero { padding: 56px 0 30px; }
.aq-container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.aq-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 8px 12px; border-radius: 999px; background: var(--aq-blue-light);
  color: var(--aq-navy); font-weight: 700; font-size: 14px;
}
.aq-hero h1, .aq-term h1 { margin: 0 0 18px; color: var(--aq-navy); line-height: 1.08; letter-spacing: -.04em; }
.aq-hero h1 { max-width: 900px; font-size: clamp(32px, 5vw, 56px); }
.aq-term h1 { font-size: clamp(30px, 4vw, 46px); }
.aq-lead { max-width: 820px; color: var(--aq-text-muted); font-size: 18px; margin: 0 0 24px; }

.aq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.aq-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; font-weight: 600; letter-spacing: 0; font-size: 16px;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.aq-button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(35,48,106,.16); }
.aq-button-primary { background: var(--aq-navy); color: var(--aq-white); }
.aq-button-secondary { background: var(--aq-white); color: var(--aq-navy); border-color: rgba(35,48,106,.16); }

.aq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-bottom: 64px; }
.aq-panel {
  background: rgba(255,255,255,.9); border: 1px solid rgba(35,48,106,.09);
  border-radius: 24px; box-shadow: 0 16px 40px rgba(35,48,106,.07);
}
.aq-search-panel { position: sticky; top: 16px; padding: 18px; }
.aq-search-panel label { display: block; margin-bottom: 8px; color: var(--aq-navy); font-weight: 800; font-size: 14px; }
.aq-search {
  width: 100%; border: 1px solid rgba(35,48,106,.16); border-radius: 8px;
  padding: 14px 15px; font: inherit; outline: none; background: var(--aq-white);
}
.aq-search:focus { border-color: var(--aq-blue-mid); box-shadow: 0 0 0 4px rgba(122,156,176,.25); }

.aq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.aq-filter {
  border: 1px solid rgba(35,48,106,.13); background: var(--aq-white); color: var(--aq-steel);
  border-radius: 999px; padding: 8px 11px; font-weight: 600; cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.aq-filter.is-active, .aq-filter:hover { background: var(--aq-navy); color: var(--aq-white); border-color: var(--aq-navy); }

.aq-index-card { padding: clamp(22px, 3vw, 32px); }
.aq-section-title { margin: 0 0 14px; color: var(--aq-navy); font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }

.aq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.aq-term-card {
  display: flex; flex-direction: column; min-height: 200px; padding: 20px;
  border-radius: 12px; background: var(--aq-white); border: 1px solid rgba(35,48,106,.09);
  text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.aq-term-card:hover { transform: translateY(-3px); border-color: rgba(122,156,176,.55); box-shadow: 0 14px 28px rgba(35,48,106,.10); }
.aq-term-card h3 { margin: 0 0 8px; color: var(--aq-navy); font-size: 21px; line-height: 1.2; }
.aq-term-card p { margin: 0 0 14px; color: var(--aq-text-muted); font-size: 15px; }
.aq-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; color: var(--aq-steel); font-weight: 600; font-size: 13px; }
.aq-readmore { margin-top: 12px; color: var(--aq-navy); font-weight: 700; }

.aq-pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.aq-pill {
  display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px;
  border-radius: 999px; background: var(--aq-blue-light); color: var(--aq-navy);
  text-decoration: none; font-weight: 600; font-size: 13px;
}

.aq-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; color: var(--aq-text-muted); font-size: 14px; }
.aq-breadcrumbs a { color: var(--aq-steel); text-decoration: none; font-weight: 600; }

.aq-term { padding: clamp(22px, 4vw, 38px); }
.aq-term-intro { max-width: 820px; font-size: 18px; color: var(--aq-text-muted); margin: 0 0 20px; }
.aq-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; }
.aq-chip { padding: 9px 12px; background: var(--aq-blue-light); border-radius: 999px; color: var(--aq-navy); font-size: 14px; font-weight: 600; }

.aq-content-section { padding: 20px 0; border-top: 1px solid rgba(35,48,106,.09); }
.aq-content-section h2 { margin: 0 0 8px; color: var(--aq-navy); font-size: 24px; letter-spacing: -.02em; }
.aq-content-section p { margin: 0; color: var(--aq-text-muted); }

.aq-cta { margin-top: 22px; padding: clamp(22px, 4vw, 30px); border-radius: 12px; background: var(--aq-navy); color: var(--aq-white); }
.aq-cta h2 { margin: 0 0 8px; font-size: 26px; }
.aq-cta p { margin: 0 0 18px; color: rgba(255,255,255,.82); }
.aq-cta .aq-button-primary { background: var(--aq-white); color: var(--aq-navy); }
.aq-cta .aq-button-secondary { background: transparent; color: var(--aq-white); border-color: rgba(255,255,255,.3); }

.aq-guide-note {
  margin: 20px 0; padding: 18px 20px; border-radius: 12px;
  background: var(--aq-blue-light); border: 1px solid rgba(35,48,106,.10);
}
.aq-guide-note strong { color: var(--aq-navy); }
.aq-guide-note p { margin: 4px 0 12px; color: var(--aq-text-muted); }
.aq-guide-note a { color: var(--aq-navy); font-weight: 600; text-decoration: none; }
.aq-guide-note a:hover { text-decoration: underline; }

.aq-faq { margin-top: 24px; }
.aq-faq details { background: var(--aq-white); border: 1px solid rgba(35,48,106,.09); border-radius: 10px; padding: 14px 16px; margin-top: 10px; }
.aq-faq summary { cursor: pointer; color: var(--aq-navy); font-weight: 600; }
.aq-faq p { margin: 10px 0 0; color: var(--aq-text-muted); }

.aq-empty { display: none; padding: 20px; border-radius: 12px; background: var(--aq-blue-light); color: var(--aq-navy); font-weight: 600; }

/* Overlay-panel: ordet "poppar upp" som ett centrerat kort ovanpå sidan.
   Panelen positioneras oberoende av bakgrunden (de ligger som syskon i DOM:en,
   inte förälder/barn), därför måste panelen själv vara fixed + centrerad. */
.ordlista-overlay-backdrop {
  position: fixed; inset: 0; background: rgba(35,48,106,.45);
  z-index: 9998; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.ordlista-overlay-backdrop.is-open { opacity: 1; pointer-events: auto; }

.ordlista-overlay-panel {
  position: fixed; top: 50%; left: 50%; z-index: 9999;
  width: min(680px, calc(100% - 48px)); max-height: 85vh;
  background: var(--aq-white); border-radius: 16px;
  box-shadow: 0 30px 70px rgba(35,48,106,.28);
  transform: translate(-50%, -50%) scale(.96); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  overflow-y: auto; padding: 20px clamp(20px, 4vw, 40px) 44px;
  pointer-events: none;
}
.ordlista-overlay-panel.is-open {
  transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto;
}
.ordlista-overlay-panel .aq-panel { border: none; border-radius: 0; box-shadow: none; padding: 0; }

.ordlista-overlay-close {
  position: sticky; top: 0; float: right; margin-left: 12px;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(35,48,106,.14);
  background: var(--aq-white); color: var(--aq-navy); font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.ordlista-overlay-close:hover { background: var(--aq-blue-light); }

@media (max-width: 640px) {
  .ordlista-overlay-panel {
    top: auto; bottom: 0; left: 0; right: 0; transform: translateY(100%);
    width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0;
  }
  .ordlista-overlay-panel.is-open { transform: translateY(0); }
}

/* Laddningsindikator för SPA-navigeringen (tunn balk högst upp) */
.ordlista-loading-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--aq-navy); z-index: 9999; transition: width .25s ease, opacity .3s ease;
  opacity: 0;
}
.ordlista-loading-bar.is-active { opacity: 1; }

/* Respektera användare som valt "minska rörelse" */
@media (prefers-reduced-motion: reduce) {
  .aq-term-card, .aq-button, .ordlista-loading-bar,
  .ordlista-overlay-backdrop, .ordlista-overlay-panel { transition: none !important; }
}

@media (max-width: 900px) {
  .aq-layout { grid-template-columns: 1fr; }
  .aq-search-panel { position: static; order: -1; }
  .aq-grid { grid-template-columns: 1fr; }
  .aq-term-card { min-height: 0; }
}

@media (max-width: 560px) {
  .aq-hero h1 { font-size: 32px; }
  .aq-actions { flex-direction: column; }
  .aq-button { width: 100%; }
}