/* ============================================================
   Kanylen: udvalgssektionen
   Bygger oven på style.css. Tokens, navbar og body arves derfra,
   så farver og typografi ikke duplikeres endnu et sted.
   ============================================================ */

:root { color-scheme: light; }

/* display: flex på .udvalg-filter slår ellers browserens egen [hidden]-regel,
   så en tom boks ville stå og fylde. */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

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

.udvalg-side {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 20px 0;
}

/* ------------------------------------------------------------ overskrift */

.udvalg-intro {
  margin-bottom: 32px;
}

.udvalg-intro h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}

.udvalg-intro h1::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 4px;
  height: 12px;
  background: var(--highlight);
  opacity: 0.55;
  transform: rotate(-1deg);
  z-index: -1;
}

.udvalg-intro p {
  max-width: 58ch;
  font-size: 1.05rem;
  color: #3d5375;
}

/* ---------------------------------------------------------------- filter */

.udvalg-filter {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin-bottom: 28px;
  background: #f7f7f5;
  border-bottom: 2px solid var(--stroke);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 15px;
  border: 2px solid var(--stroke);
  border-radius: 50px;
  background: var(--paper);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.chip:hover { background: var(--highlight); }
.chip[aria-pressed='true'] { background: #1d3557; background: var(--text); color: #ffffff; }
.chip:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.filter-soeg {
  position: relative;
  flex: 0 1 260px;
  min-width: 200px;
}

.filter-soeg .material-icons-round {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: #5a6f92;
  pointer-events: none;
}

.filter-soeg input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  padding: 9px 12px 9px 38px;
  border: 2px solid var(--stroke);
  border-radius: 50px;
  background: var(--paper);
}

.filter-soeg input::placeholder { color: #5a6f92; }
.filter-soeg input:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--stroke);
}

/* ------------------------------------------------------------------ grid */

.udvalg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 70px;
}

.udvalg-kort {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  box-shadow: 4px 4px 0 var(--stroke);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.udvalg-kort:hover,
.udvalg-kort:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--stroke);
}

.udvalg-kort:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.kort-billede {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 2px solid var(--stroke);
  background: var(--highlight);
  overflow: hidden;
}

.kort-billede img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Uden billede: initialer på gul, i stedet for et brudt img */
.kort-initialer {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: 1px;
  color: var(--text);
  background:
    repeating-linear-gradient(45deg, rgba(29, 53, 87, 0.06) 0 10px, transparent 10px 20px),
    var(--highlight);
}

.kort-indhold {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  flex: 1;
}

.kort-indhold h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.kort-indhold p {
  font-size: 0.95rem;
  color: #3d5375;
  flex: 1;
}

.kategori-pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 11px;
  border-radius: 50px;
  color: var(--primary);
  background: #fdecee;
  border: 1.5px solid var(--primary);
}

.kort-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 12px;
  border-top: 1.5px dashed rgba(29, 53, 87, 0.25);
  font-size: 0.82rem;
  color: #5a6f92;
}

.kort-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kort-meta .material-icons-round { font-size: 1rem; }

/* Første kort fylder to spalter og lægger sig vandret */
.udvalg-kort--stor { grid-column: span 2; }

@media (min-width: 700px) {
  .udvalg-kort--stor { flex-direction: row; }
  .udvalg-kort--stor .kort-billede {
    aspect-ratio: auto;
    flex: 0 0 46%;
    border-bottom: none;
    border-right: 2px solid var(--stroke);
  }
  .udvalg-kort--stor .kort-indhold { padding: 26px; gap: 12px; }
  .udvalg-kort--stor .kort-indhold h3 { font-size: 1.8rem; }
  .udvalg-kort--stor .kort-indhold p { font-size: 1.02rem; }
}

@media (max-width: 1000px) {
  .udvalg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .udvalg-grid { grid-template-columns: 1fr; gap: 20px; }
  .udvalg-kort--stor { grid-column: span 1; }
}

/* ----------------------------------------------------- tomt, fejl, loader */

.tilstand {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 2px dashed rgba(29, 53, 87, 0.35);
  border-radius: var(--radius);
  background: var(--paper);
}

.tilstand .material-icons-round {
  font-size: 2.6rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.tilstand h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.tilstand p { color: #5a6f92; max-width: 42ch; margin: 0 auto 18px; }

.skelet {
  background: linear-gradient(90deg, #eceff4 25%, #f6f8fa 50%, #eceff4 75%);
  background-size: 200% 100%;
  animation: skelet-glid 1.4s infinite;
  border-radius: 6px;
}

@keyframes skelet-glid {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skelet-kort {
  border: 2px solid rgba(29, 53, 87, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.skelet-kort .skelet-billede { aspect-ratio: 16 / 10; border-radius: 0; }
.skelet-kort .skelet-tekst { height: 14px; margin: 0 20px 10px; }
.skelet-kort .skelet-tekst:first-of-type { margin-top: 20px; height: 24px; width: 60%; }

/* ------------------------------------------------------------- knapper */

.knap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  padding: 12px 22px;
  border: 2px solid var(--stroke);
  border-radius: 50px;
  background: var(--highlight);
  color: var(--text);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--stroke);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.knap:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--stroke);
}

.knap:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.knap .material-icons-round { font-size: 1.15rem; }

.knap--rod { background: var(--primary); color: #fff; }
.knap--hvid { background: var(--paper); }

/* --------------------------------------------------------------- afslut */

.udvalg-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
  margin-bottom: 70px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  background: #1d3557;
  background: var(--text);
  color: #ffffff;
  box-shadow: 5px 5px 0 var(--highlight);
}

.udvalg-cta h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 6px;
}

.udvalg-cta p { color: #c6d3e8; max-width: 46ch; }

/* ============================================================
   Detaljeside
   ============================================================ */

.tilbage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 22px;
  padding: 8px 16px 8px 12px;
  border: 2px solid var(--stroke);
  border-radius: 50px;
  background: var(--paper);
  transition: background 0.15s;
}

.tilbage:hover { background: var(--highlight); }
.tilbage .material-icons-round { font-size: 1.1rem; }

.detalje-cover {
  aspect-ratio: 16 / 6;
  min-height: 190px;
  max-height: 400px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--highlight);
  box-shadow: 5px 5px 0 var(--stroke);
  margin-bottom: 28px;
}

.detalje-cover img { width: 100%; height: 100%; object-fit: cover; }

.detalje-titel { margin-bottom: 40px; }

.detalje-titel h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 12px 0 12px;
}

.detalje-titel .manchet {
  font-size: 1.1rem;
  color: #3d5375;
  max-width: 62ch;
}

.detalje-krop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  margin-bottom: 70px;
}

@media (max-width: 900px) {
  .detalje-krop { grid-template-columns: 1fr; gap: 32px; }
}

.blok { margin-bottom: 46px; }

.blok > h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.blok > h2::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: 2px;
  height: 9px;
  background: var(--highlight);
  opacity: 0.6;
  transform: rotate(-0.8deg);
  z-index: -1;
}

.brodtekst {
  max-width: 65ch;
  font-size: 1.02rem;
  line-height: 1.75;
}

.brodtekst p + p { margin-top: 1em; }

/* ------------------------------------------------------- kontaktkortet */

.kontakt-kort {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--highlight);
  overflow: hidden;
}

@media (max-width: 900px) {
  .kontakt-kort { position: static; }
}

.kontakt-hoved {
  padding: 18px 22px;
  background: #1d3557;
  background: var(--text);
  color: #ffffff;
}

.kontakt-hoved h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: #fff;
}

.kontakt-krop { padding: 22px; display: flex; flex-direction: column; gap: 18px; }

.kontakt-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kontakt-person .navn { font-weight: 700; font-size: 1.05rem; }
.kontakt-person .klasse { font-size: 0.85rem; color: #5a6f92; }

.kontakt-fakta { display: flex; flex-direction: column; gap: 10px; }

.fakta {
  display: flex;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.fakta .material-icons-round {
  font-size: 1.15rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.fakta .etiket {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #5a6f92;
}

.kontakt-handlinger { display: flex; flex-direction: column; gap: 10px; }
.kontakt-handlinger .knap { width: 100%; }

/* --------------------------------------------------------------- galleri */

.galleri {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.galleri button {
  padding: 0;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--highlight);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.galleri button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--stroke);
}

.galleri button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.galleri img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 53, 87, 0.92);
}

.lightbox.aaben { display: flex; }

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  width: auto;
  border: 2px solid #fff;
  border-radius: 8px;
}

.lightbox-tekst {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
}

.lightbox-knap {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(29, 53, 87, 0.6);
  color: #fff;
  cursor: pointer;
}

.lightbox-knap:hover { background: var(--primary); }
.lightbox-knap:focus-visible { outline: 3px solid var(--highlight); outline-offset: 3px; }
.lightbox-luk { top: 20px; right: 20px; }
.lightbox-forrige { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-naeste { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox-forrige { left: 10px; }
  .lightbox-naeste { right: 10px; }
}

/* ------------------------------------------------------ ledere, medlemmer */

.ledere {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.leder-kort {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 22px 16px 18px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--stroke);
}

.leder-kort .rolle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 2px;
}

.leder-kort .navn { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.leder-kort .klasse { font-size: 0.85rem; color: #5a6f92; }

.leder-kort .mail {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--primary);
  word-break: break-all;
}

.leder-kort .mail:hover { text-decoration: underline; }

.portraet {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  object-fit: cover;
  margin-bottom: 12px;
  background: var(--highlight);
}

.portraet--tekst {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text);
}

.portraet--lille { width: 40px; height: 40px; font-size: 0.95rem; margin-bottom: 0; }

.medlem-hold { margin-bottom: 22px; }

.medlem-hold h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #5a6f92;
  margin-bottom: 10px;
}

.medlem-liste { display: flex; flex-wrap: wrap; gap: 8px; }

.medlem {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 15px;
  border: 2px solid var(--stroke);
  border-radius: 50px;
  background: var(--paper);
  font-size: 0.92rem;
}

.medlem .rolle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
}

/* --------------------------------------------------------------- footer */

footer {
  background: #1d3557;
  background: var(--text);
  color: #ffffff;
  padding: 60px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-col h4 { color: var(--primary); margin-bottom: 20px; font-size: 1.2rem; font-family: var(--font-head); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--highlight); text-decoration: underline; }

/* -------------------------------------------------------------- bevaegelse */

.ind {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.ind.vist { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ind { opacity: 1; transform: none; }
  .udvalg-kort:hover, .knap:hover, .galleri button:hover { transform: none; }
}
