/* ============================================================
   STYLE.CSS — samlet stylesheet
   Rækkefølge: reset → custom properties → global → layout →
   navigation → hero → komponenter → indhold → rwd → dark mode
   ============================================================ */


/* ---- FONTE ---- */

@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-regular-webfont.woff2") format("woff2"),
       url("/fonts/lato-regular-webfont.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-bold-webfont.woff2") format("woff2"),
       url("/fonts/lato-bold-webfont.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-italic-webfont.woff2") format("woff2"),
       url("/fonts/lato-italic-webfont.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-bolditalic-webfont.woff2") format("woff2"),
       url("/fonts/lato-bolditalic-webfont.woff") format("woff");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/lato-black-webfont.woff2") format("woff2"),
       url("/fonts/lato-black-webfont.woff") format("woff");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("/fonts/robotoslab-regular-webfont.woff2") format("woff2"),
       url("/fonts/robotoslab-regular-webfont.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("/fonts/robotoslab-bold-webfont.woff2") format("woff2"),
       url("/fonts/robotoslab-bold-webfont.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- MEYER RESET ---- */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn,
em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas,
details, embed, figure, figcaption, footer, header, hgroup, menu, nav,
output, ruby, section, summary, time, mark, audio, video {
  margin: 0; padding: 0; border: 0; font-size: 100%;
  font: inherit; vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header,
hgroup, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote::before, blockquote::after, q::before, q::after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* Farvepalette */
  --aspit-night-green:      HSL(175, 47%, 12%);
  --aspit-near-night-green: HSL(175, 47%, 13%);
  --aspit-darkest-green:    HSL(175, 47%, 15%);
  --aspit-darker-green:     HSL(175, 47%, 18%);
  --aspit-lighter-green:    HSL(176, 36%, 23%);
  --aspit-lightest-green:   HSL(176, 20%, 70%);
  --aspit-red:              HSL(5, 100%, 64%);
  --aspit-red-hover:        HSL(5, 100%, 54%);
  --aspit-lightest-red:     HSL(31, 82%, 89%);
  --aspit-white:            HSL(0, 0%, 100%);

  /* Neutrale farver */
  --color-white:           #fff;
  --color-black:           #000;
  --color-light-bg:        #eee;
  --color-mid-bg:          #ddd;
  --color-darker-mid-bg:   #ccc;
  --color-dark-bg:         #333;
  --color-lighter-dark-bg: #444;
  --color-footer-bg:       #1a1a1a;
  --color-muted:           #777;
  --color-border:          #ddd;
  --color-highlight:       #fff2cc;

  /* Footer rgba-værdier */
  --footer-text:        rgba(255, 255, 255, 0.6);
  --footer-text-dim:    rgba(255, 255, 255, 0.35);
  --footer-text-faint:  rgba(255, 255, 255, 0.3);
  --footer-text-bright: rgba(255, 255, 255, 0.95);
  --footer-border:      rgba(255, 255, 255, 0.1);

  /* Layout */
  --page-header-height: 3rem;
  --content-max-width:  880px;
  --border-radius-sm:   0.3rem;
  --border-radius-md:   0.5rem;
  --border-radius-lg:   1rem;
  --border-radius-pill: 100vw;

  /* Typografi */
  --font-body:    "Lato", sans-serif;
  --font-heading: "Roboto Slab", serif;

  --h1-size:          clamp(3rem, 3vw + 2rem, 4rem);
  --h2-size:          clamp(2rem, 3vw + 1rem, 3rem);
  --h3-size:          clamp(1.6rem, 1vw + 0.8rem, 1.8rem);
  --h4-size:          clamp(1.2rem, 0.5vw + 0.95rem, 1.25rem);
  --p-size:           clamp(1rem, 0.5vw + 0.725rem, 1.1rem);
  --hero-heading-size: clamp(2.5rem, 3vw + 1.5rem, 4rem);
  --hero-desc-size:   var(--p-size);
  --line-height:      1.4;

  /* Animationer */
  --transition-fast:   0.2s;
  --transition-normal: 0.3s;
  --transition-slow:   0.5s;

  /* Genbrugte SVG-ressourcer */
  --icon-arrow-url: url(/images/keyboard_arrow_down_24dp_333333_FILL0_wght400_GRAD0_opsz24.svg);
  --logo-url:       url(/images/logo.svg);
  --icon-size-sm:   1.4rem;
}

/* ============================================================
   GLOBAL
   ============================================================ */

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

body {
  padding-top: var(--page-header-height);
  font-family: var(--font-body);
  font-size: var(--p-size);
  line-height: 1.8;
  hyphens: auto;
  transition: font-size var(--transition-normal), filter var(--transition-normal);
}

a { color: inherit; }

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

video {
  aspect-ratio: 16/9 !important;
}

main strong { font-weight: bold; }

h1, h2, h3, h4, h5 { font-family: var(--font-heading); }

h4 {
  color: var(--aspit-red);
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0;
}

p, li {
  font-weight: 400;
  line-height: 1.6;
  font-size: var(--p-size);
}

main p { margin: 1rem 0; }
main p a { color: var(--aspit-red); }
main > *:nth-child(1) { margin-top: 0; }

.striped-list > * { padding: 0.5rem; }
.striped-list > *:nth-child(even) { background: rgba(0,0,0,0.1); }

.back-link {
    padding: 2rem;
    position: absolute;
    color: var(--color-muted);
}

/* ============================================================
   APP LAYOUT
   ============================================================ */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  height: var(--page-header-height);
  background-color: var(--aspit-darker-green);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: rgba(60, 64, 67, 0.3) 0 1px 2px, rgba(60, 64, 67, 0.15) 0 2px 6px 2px;
  transition: height var(--transition-normal);
}

/* ----- SITE LOGO ----- */

.site-logo {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  position: absolute;
  z-index: 10001;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
  background-color: var(--aspit-darker-green);
  transition: width var(--transition-normal), height var(--transition-normal);
}

.site-logo a {
  display: block;
  width: 100%;
  height: 100%;
}

.site-logo svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 1080px) {
  .site-logo {
    width: 5rem;
    height: 5rem;
    background-color: inherit;
  }
}

/* ----- MAIN MENU ----- */

.main-menu { width: 100%; }

.main-menu__button {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  background: #0003 var(--icon-arrow-url) no-repeat center/50%;
  background-image: url("data:image/svg+xml,%3csvg%20fill='%23fff'%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20viewBox='0%20-960%20960%20960'%20width='24'%3e%3cpath%20d='M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z'/%3e%3c/svg%3e");
  background-color: var(--aspit-red);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  width: var(--page-header-height);
  height: var(--page-header-height);
  border: none;
  cursor: pointer;
  transition: height var(--transition-normal);
}

/* ----- MOBILE MENU ----- */

#main-menu__state { display: none; }

.main-menu__items {
  display: none;
  height: 0;
}

#main-menu__state:checked ~ .main-menu__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  opacity: 1;
  color: var(--color-white);
  top: var(--page-header-height);
  position: fixed;
  left: 0;
  right: 0;
  min-height: calc(100dvh - var(--page-header-height));
  background-color: var(--aspit-lighter-green);
  padding: 2rem;
  overflow-y: auto;
}

#main-menu__state:checked ~ .main-menu__items::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 7rem;
  right: 0;
  transform: rotate(10deg) translateY(50%);
  transform-origin: center;
  background: var(--logo-url) no-repeat center;
  width: 990px;
  aspect-ratio: 1;
  z-index: 0;
  opacity: 0.05;
  filter: grayscale(100%);
  pointer-events: none;
}

.main-menu__item { flex: 1 1 200px; }

.main-menu__link {
  text-decoration: none;
  color: var(--aspit-red);
  font-size: 1.4rem;
  font-weight: bold;
}

.main-menu__link::after { display: none; }

.main-menu__sub-level {
  display: block;
  position: static;
  padding-top: 0;
}

.main-menu__item:hover .main-menu__sub-level {
  display: block;
}

.main-menu__sub-items {
  padding: 0;
  white-space: initial;
  display: grid;
}

.main-menu__sub-items::before { display: none; }

.main-menu__sub-link {
  padding: 0;
  line-height: 1.2;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
}

/* ----- MAIN MENU DESKTOP ----- */

@media (min-width: 1080px) {

  .page-header {
    --page-header-height: 4rem;
    display: grid;
    align-items: center;
  }

  .main-menu__button { display: none; }

  .main-menu__items {
    display: flex;
    column-gap: 2rem;
    height: var(--page-header-height);
    padding: 0 2rem;
    opacity: 1;
    top: 0;
    transition: opacity var(--transition-slow);
  }

  #main-menu__state:checked ~ .main-menu__items {
    top: 0;
    padding: 0 2rem;
    height: var(--page-header-height);
  }

  #main-menu__state:checked ~ .main-menu__items::after { display: none; }

  .main-menu__item {
    font-size: 1rem;
    position: relative;
    text-transform: uppercase;
    flex: unset;
  }

  .main-menu__item:nth-child(3) { margin-left: auto !important; }

  .main-menu__link {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    height: var(--page-header-height);
  }

  .main-menu__link::after {
    content: "";
    display: block;
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
    background-color: rgba(255, 255, 255, 0.5);
    mask: var(--icon-arrow-url) no-repeat center;
    mask-size: contain;
    transition: rotate var(--transition-normal), background-color var(--transition-normal);
  }

  .main-menu__item:hover > .main-menu__link::after {
    rotate: 180deg;
    background-color: var(--color-white);
  }

  .main-menu__sub-level {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 0;
    z-index: 1000;
  }

  .main-menu__item:hover .main-menu__sub-level { display: block; }

  body.is-navigating .main-menu__item:hover .main-menu__sub-level { display: none; }

  .main-menu__sub-items {
    background-color: var(--aspit-darkest-green);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    list-style: none;
    white-space: nowrap;
    position: relative;
    margin-top: 1.4rem;
  }

  .main-menu__sub-items::before {
    content: "";
    display: block;
    width: 2rem;
    height: 0.7rem;
    background-color: var(--aspit-darkest-green);
    position: absolute;
    top: -0.65rem;
    left: 2rem;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }

  .main-menu__sub-item {
    font-size: 1rem;
    text-transform: initial;
  }

  .main-menu__sub-link {
    color: rgba(255, 255, 255, 0.5);
    display: block;
    line-height: 2;
    padding: 0 0.8rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: color var(--transition-normal) linear;
  }

  .main-menu__sub-link:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.08);
  }

  .main-menu__item:last-child .main-menu__sub-level { left: auto; right: 0; }
  .main-menu__item:last-child .main-menu__sub-items::before { left: auto; right: 2rem; }
}

/* ============================================================
   THEME / DARK MODE KNAP
   ============================================================ */

.header-button-group-wrapper {
  display: flex;
  position: absolute;
  top: calc(var(--page-header-height) + 1rem);
  right: 1rem;
}

.header-btn-group { 
    display: flex; 
    gap: 1rem; 
    
    @media(max-width: 960px) {
        gap: .5rem; 
    }
}

.header-btn-group__button {
  display: block;
  width: 2rem;
  height: 2rem;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background: var(--aspit-red) no-repeat center / 50%;
  transition: 
    background-size var(--transition-fast),
    width var(--transition-fast),
    height var(--transition-fast);
  
  @media(min-width: 960px) {
    width: 3rem;
    height: 3rem; 
}
}

.header-btn-group__button.light-theme {
  background-image: url(/images/mode-dark-svgrepo-com.svg);
}
.header-btn-group__button.dark-theme-button {
  background-image: url(/images/mode-light-svgrepo-com.svg);
}

/* ============================================================
   FOOTER
   ============================================================ */

.page-footer {
  padding: 4rem 1rem;
  background-color: var(--color-footer-bg);
  color: var(--footer-text);
  line-height: var(--line-height);
  font-size: 0.9rem;
}

.footer-inner {

  margin: 0 auto;
  padding: 0;
  transition: padding .3s;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 480px) { 
    .footer-cols { 
        grid-template-columns: 1fr 1fr; 
    } 
    

    
}
@media (min-width: 960px) { 
    .footer-cols { 
        grid-template-columns: repeat(4, 1fr); 
    } 
    .footer-inner { padding: 0 5rem }
}

.footer-col__heading {
  font-size: var(--h4-size);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-text-dim);
  margin-bottom: 1rem;
}

.footer-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col__list a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.footer-col__list a:hover { color: var(--footer-text-bright); }

.footer-col__name { color: var(--footer-text); }

.footer-col__sub {
  font-size: 80%;
  color: var(--footer-text-dim);
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 2rem;
  text-align: center;
  color: var(--footer-text-faint);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--footer-text-faint);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--footer-text); }

/* ============================================================
   CONTENT GRID
   ============================================================ */

.content-grid {
  --padding-inline: 1.5rem;
  --content-max-width: 880px;
  display: grid;
  grid-template-columns:
    [full-width-start] minmax(var(--padding-inline), 1fr)
    [content-start] min(100% - (var(--padding-inline) * 2), var(--content-max-width))
    [content-end] minmax(var(--padding-inline), 1fr)
    [full-width-end];
}

.content-grid > * { grid-column: content; }
.content-grid > .cg-full-width { grid-column: full-width; }

/* ============================================================
   PAGE SECTIONS
   ============================================================ */

.page-section {
  display: grid;
  place-content: center;
  position: relative;
  padding: 5rem 0;
  width: 100%;
}

.page-section:has(.two-col-grid),
.page-section:has(.subject-group) {
  --content-max-width: 1200px;
}

.page-section__heading {
  font-size: var(--h2-size);
  color: var(--aspit-red);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 3rem;
  text-align: center;
}

.page-section__subheading {
  color: var(--aspit-red);
  font-weight: bold;
  line-height: 1.2;
  font-size: 1.8rem;
  margin: 3rem 0 1rem;
}

.page-section__text a {
  text-decoration: none;
  border-bottom: dotted 0.2rem var(--aspit-red);
}

.page-section hgroup:has(h2) {
  margin-bottom: 3rem;
  text-align: center;
}

.page-section hgroup h2 {
  margin-bottom: 0;
  text-align: center;
  font-size: var(--h2-size);
  color: var(--aspit-red);
  font-weight: bold;
  line-height: 1.2;
}

.page-section hgroup p { margin: 0; }

.page-section h3 {
  margin-bottom: 1rem;
  font-size: var(--h3-size);
}

.page-section h3:not(:first-of-type) { margin-top: 2rem; }

.page-section h3 a {
  text-decoration: none;
  color: var(--aspit-red);
  font-weight: bold;
}

.page-section h3:has(+ .grid-table) { margin-bottom: 0.5rem; }

/* ============================================================
   BACKGROUNDS
   ============================================================ */

.bg-white { background-color: var(--color-white) !important; color: var(--color-dark-bg) !important; }
.bg-green  { background-color: var(--aspit-lighter-green); color: var(--color-white); }
.bg-grey   { background-color: var(--color-light-bg); color: var(--color-dark-bg); }
.bg-red   { 
    background-color: var(--aspit-red); 
    color: var(--color-white); 
    
    h2 { color: var(--color-white) !important; }
    p { color: var(--color-mid-bg) !important; }
    .profile__name { color: var(--color-white) !important; }  
}

/* ============================================================
   TWO-COLUMN GRID
   ============================================================ */

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 960px) {
  .two-col-grid { grid-template-columns: 1fr minmax(240px, 350px); }
}

.text-columns { column-count: 1; column-gap: 0; }
.text-columns p:first-child { margin-top: 0; }

@media (min-width: 800px) {
  .text-columns { column-count: 2; column-gap: 4rem; }
}

/* ============================================================
   HERO (forside)
   ============================================================ */

.hero,
.hero-banner {
  min-height: calc(100vh - var(--page-header-height));
}

.hero-video {
  min-height: 80vh;
  margin-top: var(--page-header-height);
}

@media (max-width: 960px) {

  .hero,
  .hero-banner { min-height: calc(100dvh - 3rem); }

  .hero-video { min-height: 80vh; }
}

/* CTA knapper i hero */
.cta-btn-group__items {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.cta-btn-group__item {
  display: flex;
  align-items: center;
  transition: transform var(--transition-normal);
  font-size: 0.9rem;
}

.cta-btn-group__item:hover { transform: scale(1.05); }

.cta-btn-group__item::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background-color: var(--aspit-red);
  border-radius: 50%;
  margin-right: 0.3rem;
  flex-shrink: 0;
}

.cta-btn-group__link { color: var(--color-white); text-decoration: none; }

@media (min-width: 800px) { .cta-btn-group__item { font-size: 1.1rem; } }
@media (min-width: 960px) {
  .cta-btn-group__items { column-gap: 3rem; }
  .cta-btn-group__item  { font-size: var(--p-size); }
}

/* ============================================================
   SUBPAGE HERO
   ============================================================ */

.subpage-hero {
  display: grid;
  place-content: center;
  min-height: 45vh;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.subpage-hero:has(+ .tabs) { padding-bottom: 2rem; }

.subpage-hero__textbox {
  display: grid;
  justify-items: center;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  max-width: 1080px;
}

.subpage-hero__heading {
  font-size: var(--hero-heading-size);
  font-weight: bold;
  color: var(--aspit-red);
  text-align: center;
  transition: font-size var(--transition-normal);
  position: relative;
  line-height: 1.2;
}


.subpage-hero__heading::before {
  content: "";
  display: block;
  position: absolute;
  bottom: 0; right: 0;
  transform: rotate(10deg) translateY(50%);
  transform-origin: center;
  background: var(--logo-url) no-repeat center;
  width: 990px;
  aspect-ratio: 1;
  z-index: -1;
  opacity: 0.05;
  filter: grayscale(100%);
  pointer-events: none;
}


.subpage-hero__desc {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  font-size: var(--hero-desc-size);
}

@media (min-width: 960px) { .subpage-hero { min-height: 40vh; } }

/* ============================================================
   READ MORE BUTTON
   ============================================================ */

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem 0.5rem 1.5rem;
  border-radius: var(--border-radius-pill);
  background-color: #333;
  color: var(--color-white);
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.9rem;
  margin: 1rem auto 0;
  width: fit-content;
  transition: background-color .3s;
}

.read-more-btn::after {
  content: "";
  display: block;
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  background-color: var(--color-white);
  mask: var(--icon-arrow-url) no-repeat center;
  mask-size: contain;
  -webkit-mask: var(--icon-arrow-url) no-repeat center;
  -webkit-mask-size: contain;
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.read-more-btn:hover { background-color: var(--aspit-red); }

.btn-group {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

@media (min-width: 800px) {
  .read-more-btn { font-size: 1rem; margin-top: 2rem; }
}

/* ============================================================
   TABLE (table-two-col)
   ============================================================ */

  .table-two-col {
    overflow-x: auto;
    max-width: calc(100vw - 3rem);
  }

  .table-two-col table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 80%;
  }

  .table-two-col table tr:first-of-type {
    background-color: rgb(255 255 255 / .2);
    font-weight: 700;
    hyphens: none;
    white-space: nowrap;
  }

  .table-two-col table td {
    padding: 0.5rem 1rem;
    border: solid 0.1rem #333;
  }

  .table-two-col table td:last-of-type {
    width: fit-content;
  }
  
 

/* ============================================================
   PROFILES / MEDARBEJDERE
   ============================================================ */

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 2rem;
  white-space: initial;
}

.profile {
  padding: 1rem 1rem 2rem;
  background: rgba(0, 0, 0, 0.08);
  font-size: 80%;
  line-height: 1.5;
  border-radius: var(--border-radius-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.profile__name {
  font-weight: bold;
  margin-top: 2rem;
  color: var(--aspit-red);
  font-size: 1.3rem;
  line-height: 1.2;
}

.profile__name a { text-decoration: none; }

.profile__job { margin-top: 0.5rem; }
.profile__body { flex: 1; }

.profile_btn {
  display: block;
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  text-align: center;
  background-color: var(--aspit-red);
  color: var(--color-white);
  border-radius: var(--border-radius-md);
  margin: 1rem auto 0;
  width: fit-content;
}

.profile__image {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.profile__image img {
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.05);
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.profile__image:hover img { transform: scale(1.2); }

.profile video {
  max-width: 100%;
  display: block;
  aspect-ratio: 16/9;
}

.profile__dept-name {
  margin-top: 1rem;
  color: inherit;
  opacity: 0.7;
  /*font-size: 0.9em;*/
}

.profile__contact {
  margin-top: 0.4rem;
  /*font-size: 0.85em;*/
  word-break: break-all;
}

.profile__contact a,
.profile__tel a,
.profile__mail a {
  color: inherit;
  text-decoration: none;
}

.profile__contact a:hover,
.profile__tel a:hover,
.profile__mail a:hover { text-decoration: underline; }

.profile__mail { margin-top: 1rem; }

.profile__tel a,
.profile__mail a { font-size: 0.85em; }

/* profile-highlight */
.profile-highlight { background-color: rgba(0, 0, 0, 0.2); }
.profile-highlight .profile__name { color: var(--color-white); }
.profile-highlight .profile_btn { background-color: var(--color-dark-bg); color: var(--color-white); }

/* Medarbejder første bogstav */
.first-letter-uppercase { text-transform: lowercase; margin: 0; padding: 0; }
.first-letter-uppercase > strong,
.first-letter-uppercase > span:first-of-type { text-transform: capitalize; }

/* ============================================================
   PROFILE LIST
   ============================================================ */

.profile-list { display: grid; gap: 2rem; font-size: 1.1rem; }
.profile-list__item { display: grid; gap: 0.7rem; }

.profile-list__item-header {
  text-decoration: none;
  padding: 0;
  font-size: var(--h3-size);
  color: var(--aspit-red);
  font-weight: bold;
}

.profile-list__item-header a { text-decoration: none; }

.profile-list__item-body {
  white-space: nowrap;
  padding: 0 0 1rem;
  display: grid;
  gap: 1rem;
}

/* ============================================================
   CARDS
   ============================================================ */

.cards { display: grid; }

.card {
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius-lg);
  text-align: center; 
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.card a { text-decoration: none; }

.card__header { padding: 1.5rem 1.5rem 0; }
.card__body   { padding: 0.5rem 1.5rem; font-size: 0.95rem; line-height: 1.6; }
.card__footer { padding: 0 1.5rem 1.5rem; margin-top: 1rem; }

.card__image {
  width: 4rem;
  height: 4rem;
  background: center no-repeat;
  background-size: 40%;
  border-radius: 50%;
  background-color: var(--aspit-red);
}

.card__title {
  font-size: var(--h4-size);
  font-weight: bold;
  transition: color var(--transition-slow);
  line-height: 1.2;
}

.card__desc { font-size: 1.1rem; }

.card__btn {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background-color: var(--aspit-red);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  transition: background-color var(--transition-fast);
}
.card__btn:hover { background-color: var(--aspit-red-hover); }

/* large-cards */
.large-cards {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.large-cards .card {
  display: grid;
  overflow: hidden;
  font-size: 1.2rem;
  line-height: 1.5;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

.large-cards .card__link {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1rem;
  padding: 2rem;
  color: var(--color-muted);
  text-decoration: none;
  text-align: center;
}

.large-cards .card__image { width: 25%; aspect-ratio: 1; height: initial; }
.large-cards .card__title { font-size: 1.3rem; }
.large-cards .card__desc  { font-size: 1rem; }

/* small-cards */
.small-cards {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

.small-cards .card {
  display: grid;
  overflow: hidden;
  font-size: 1.2rem;
  line-height: 1.5;
}

.small-cards .card__link {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1rem;
  padding: 2rem;
  color: var(--color-muted);
  text-decoration: none;
  text-align: center;
}

.small-cards .card__image { width: 30%; aspect-ratio: 1; height: initial; }
.small-cards .card__title { font-size: 1rem; margin-bottom: 0.5rem; }
.small-cards .card__desc  { font-size: 0.9rem; }

/* Card-ikoner per subject-slug */
.it-teknik .card__image,
.aspitlab-t .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/server-minimalistic-svgrepo-com.svg);
}
.webudvikling .card__image,
.aspitlab-v .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/code-svgrepo-com.svg);
}
.softwareudvikling .card__image,
.aspitlab-s .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/brackets-curly-svgrepo-com.svg);
}
.kommunikation-og-personlig-udvikling .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/brain-engine-svgrepo-com.svg);
}
.samfundsforstaelse .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/law-svgrepo-com.svg);
}
.sociale-aktiviteter .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/people-group-svgrepo-com.svg);
}
.quality-assurance .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/detective-loupe-magnifying-glass-svgrepo-com.svg);
}
.cybersecurity .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/security-free-material-svgrepo-com.svg);
}
.aspitlab .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/chemistry-experiment-experiment-lab-chemitry-svgrepo-com.svg);
}
.motion .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/running-svgrepo-com.svg);
}
.adl .card__image {
  background-image: url(https://sveltepress-aspit.toco.aspitcloud.dk/wp-content/themes/aspittheme/assets/calendar-todo-svgrepo-com.svg);
}

/* ============================================================
   NYHEDER / EVENTS LISTER
   ============================================================ */

.event__link,
.news__link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  text-decoration: none;
  align-items: center;
}

.event__text,
.news__text {
  display: grid;
  line-height: var(--line-height);
  font-size: 1.1rem;
}

.event__title,
.news__title { font-size: var(--h4-size); font-weight: bold; }

.event__department,
.news__department {
  background-color: var(--aspit-red);
  color: var(--color-white);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  width: fit-content;
  font-size: 0.8rem;
}

.event__list-item,
.news__list-item { padding: 2rem 0; }

.event__list-item + .event__list-item,
.news__list-item + .news__list-item { border-top: solid 0.1rem var(--color-border); }

.news__date {
  color: var(--aspit-red);
  font-size: calc(var(--p-size) - 0.2rem);
}

.event__date { display: none; }

.news__desc,
.event__desc { font-size: var(--p-size); }

.news__thumb {
  background: var(--color-light-bg) center no-repeat;
  background-size: cover;
  /* Responsive varianter sat som CSS-vars inline af News.js og
     NewsAndEventsComponent.js — lille variant (medium, 300px) til den
     9rem brede desktop-thumb, stor variant (large, 1024px) til mobilens
     fuldbredde-thumb. Samme mønster som heroens --hero-img-sm/lg. */
  background-image: var(--thumb-sm);
  border-radius: var(--border-radius-md);
  width: 9rem;
  height: auto;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.event__thumb {
  padding: 3rem;
  background-color: var(--color-light-bg);
  color: var(--color-dark-bg);
  text-align: center;
  width: 4rem;
  height: 4rem;
  display: grid;
  place-content: center;
  gap: 0.2rem;
  border-radius: var(--border-radius-md);
  font-weight: bold;
  line-height: 1.2;
  align-items: center;
  transition: var(--transition-normal);
  flex-shrink: 0;
}

.event__date-day   { font-size: 2rem; color: var(--aspit-red); }
.event__date-month { color: var(--color-muted); text-transform: uppercase; font-size: 0.8rem; }
.event__date-year  { color: var(--color-muted); font-size: 0.8rem; }

@media (max-width: 720px) {
  .news__link { grid-template-columns: 1fr; }

  .news__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-image: var(--thumb-lg, var(--thumb-sm));
  }

  .event__thumb {
    width: 2rem;
    height: 2rem;
    border-radius: var(--border-radius-md);
  }

  .event__date-day   { font-size: 1.4rem; }
  .event__date-month,
  .event__date-year  { font-size: 0.6rem; }
}

/* NewsAndEventsComponent — 1-kol fallback når kun én kolonne har indhold */
.nae-grid--single { grid-template-columns: 1fr; max-width: 680px; }

/* ============================================================
   SOCIALE IKONER
   ============================================================ */

.some-icons__list {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.some-icons__list-item-link {
  background: var(--aspit-red) center no-repeat;
  display: block;
  background-size: 60%;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  transition: background-size var(--transition-normal);
}

.some-icons__list-item-link:hover { background-size: 75%; }

.icon-facebook  { background-image: url(/images/logo-icon-facebook.svg); }
.icon-instagram { background-image: url(/images/logo-icon-instagram.svg); }
.icon-linkedin  { background-image: url(/images/logo-icon-linkedin.svg); }

@media (min-width: 960px) {
  .some-icons__list-item-link { width: 4rem; height: 4rem; }
}

/* ============================================================
   WORDPRESS CONTENT STYLES
   ============================================================ */

.wp-content { line-height: 1.8; }

.wp-block-group + .wp-block-group { margin-top: 3rem; }
.wp-block-group.heading-group { text-align: center; }
.subject-group .wp-block-group.heading-group { margin-bottom: 2rem; }

.wp-block-heading {
  color: var(--aspit-red);
  font-weight: bold;
  line-height: 1.2;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

h1.wp-block-heading { font-size: var(--h1-size); }
h2.wp-block-heading { font-size: var(--h2-size); }
h3.wp-block-heading { font-size: var(--h3-size); }

h5.wp-block-heading {margin: 2rem 0 0 0; }

h2.wp-block-heading:first-child,
.main-column .wp-block-heading:first-child { margin-top: 0; }

h3.wp-block-heading { margin-top: 2rem; }

.main-column .wp-block-heading { transition: font-size var(--transition-normal); }

.main-column .wp-block-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-top: 3rem;
}
.main-column .wp-block-image:first-child { margin-top: 0; }

.wp-block-image.cg-full-width {
  display: block;
  overflow: hidden;
  max-height: 80vh;
  margin: 2rem 0;
}

.wp-block-image.cg-full-width img { width: 100%; }

.wp-block-embed iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  margin-top: 2rem;
  border-radius: var(--border-radius-lg);
}

.wp-block-image.size-large + p,
.wp-block-image.size-full + p { margin-top: 2rem;} 

.wp-block-image.size-full.cg-full-width img {
    width: 100%;
}

.wp-block-image.size-large {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

  .wp-block-video {
    margin: 2rem 0;

    video {
      width: 100%;
      height: auto;
    }
  }

  .wp-block-embed-youtube {

    margin: 3rem 0;

  }

ul.wp-block-list {
  padding-inline-start: 2rem;
  margin-bottom: 1rem;
}

ul.wp-block-list li {
  list-style-type: none;
  position: relative;
  padding-inline-start: 1rem;
}

ul.wp-block-list li::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  display: block;
  width: 1rem;
  height: 1rem;
  background-color: var(--aspit-red);
  transform: translate(-180%);
  border-radius: 50%;
}

strong + .wp-block-list { margin-top: 0.5rem; }

ol.wp-block-list {
  list-style-type: decimal;
  padding-inline-start: 2rem;
}




/* Fact box / highlight box */
.fact-box,
.highlight-box,
div.highlight-box {
  background-color: var(--color-highlight);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  margin-top: 2rem;
}

.fact-box ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.fact-box li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: start;
}

.fact-box li::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2rem;
  background-color: var(--aspit-red);
  mask: url(/images/check-svgrepo-com.svg) no-repeat center;
  mask-size: contain;
}

/* Skoleskema */
.school-schedule__slider {
  overflow: hidden;
  max-width: 100%;
}

.school-schedule {
  background-color: #0d4340;
  font-size: 60%;
  border: solid 0.1rem #0d4340;
  max-width: 100%;
}

.school-schedule__row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  text-align: center;
}

.school-schedule__row + .school-schedule__row { border-top: solid 0.1rem #0d4340; }
.school-schedule__col + .school-schedule__col { border-left: solid 0.1rem #0d4340; }

.school-schedule__row:nth-child(1)  { background-color: #0d4340; color: var(--color-white); }
.school-schedule__row:nth-child(1) .school-schedule__col,
.school-schedule__col:first-child   { font-weight: bold; }
.school-schedule__row:nth-child(2)  { background-color: var(--aspit-red); color: var(--color-white); }
.school-schedule__row:nth-child(3)  { background-color: var(--color-white); color: #21675c; }
.school-schedule__row:nth-child(4)  { background-color: #21675c; color: var(--color-white); }
.school-schedule__row:nth-child(5)  { background-color: var(--color-white); color: #21675c; }
.school-schedule__row:nth-child(6)  { background-color: #21675c; color: var(--color-white); }
.school-schedule__row:nth-child(7)  { background-color: #fcdbcc; color: #21675c; }
.school-schedule__row:nth-child(8)  { background-color: var(--color-white); color: #21675c; }
.school-schedule__row:nth-child(9)  { background-color: #21675c; color: var(--color-white); }
.school-schedule__row:nth-child(10) { background-color: var(--color-white); color: #21675c; }

.school-schedule__col { padding: 0.5rem; }
.school-schedule__col:first-child { background-color: #0d4340; color: var(--color-white); }

.school-schedule__row:nth-child(n+7):nth-child(-n+10) .school-schedule__col:last-child {
  background-color: #0d4340; color: var(--color-white);
}

@media (min-width: 800px) {
  .school-schedule { font-size: 70%; }
  .school-schedule__col { padding: 1rem; }
}

/* ============================================================
   ACCORDION
   ============================================================ */

.accordion {
  display: grid;
  gap: 1px;
  line-height: var(--line-height);
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
}

.accordion__item {
  display: grid;
  grid-template-rows: auto 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--transition-slow);
  color: var(--color-dark-bg);
}

.accordion__item-label {
  padding: 2rem;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-mid-bg);
  font-weight: bold;
  margin: 0.5rem 0;
  border-radius: var(--border-radius-lg);
}

.accordion__item-content {
  overflow: hidden;
  padding: 0 2rem;
  line-height: 1.8;
  background-color: #f1f1f1;
  border-radius: var(--border-radius-lg);
}

.accordion__item-content > *:first-child { margin-top: 2rem; }
.accordion__item-content > *:last-child  { margin-bottom: 2rem; }

.accordion__item.open { grid-template-rows: auto 1fr; }

@media (min-width: 800px) {
  .accordion__item-label { font-size: 1.4rem; }
}

/* Mini-accordion */
.mini-accordion {
  display: grid;
  grid-template-rows: auto 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--transition-slow);
  align-content: start;
  
}

.mini-accordion:hover { grid-template-rows: auto 1fr; }

.mini-accordion__title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.mini-accordion__title a { text-decoration: none; }

.mini-accordion__title::after {
  content: '';
  display: block;
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  transition: rotate var(--transition-normal);
  mask: var(--icon-arrow-url) no-repeat center;
  background-color: #333;
}

.mini-accordion:hover .mini-accordion__title::after { rotate: 180deg; }

.mini-accordion__body { overflow: hidden; font-size: 85%; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonials { position: relative; }

.testimonials__list-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .testimonials__list-items {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 3rem;
  }
}

.testimonials__list-item {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 2rem;
  display: grid;
  place-content: center;
  min-height: 10rem;
  color: var(--color-white);
  line-height: var(--line-height);
  font-size: 1rem;
  font-style: italic;
  position: relative;
  isolation: isolate;
  box-shadow: rgba(0,0,0,0.35) 0 5px 15px;
}

.testimonials__list-item:nth-child(3n+1) { transform: rotate(-3deg); }
.testimonials__list-item:nth-child(3n+2) { transform: rotate(1deg); }
.testimonials__list-item:nth-child(3n+3) { transform: rotate(-2deg); }

/* ============================================================
   SUBJECT TABS
   ============================================================ */

.tabs {
  position: relative;
  z-index: 10;
}

.tabs__items {
  display: flex;
  gap: 0.5rem;
  align-items: end;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.tabs__link {
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  background-color: rgba(0, 0, 0, 0.2);
  color: #999;
  display: block;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  white-space: nowrap;
}

.tabs__link.active { 
    color: var(--color-white); 
}

@media (min-width: 621px) {
  .tabs { margin-top: -3.3rem; }
}

@media (max-width: 880px) {
  .tabs {
    width: 100%;
    background-color: var(--aspit-darker-green);
    z-index: 1;
  }

  .tabs__items {
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    transition: height var(--transition-normal) ease;
    background-color: var(--color-dark-bg);
    border-bottom: solid .1rem #222;
  }

  .tabs__item {
    width: 100%;
    border-top: solid 0.1rem var(--color-dark-bg);
  }

  .tabs__item--inactive { display: none; }
  .tabs--open .tabs__item--inactive { display: block; }

  .tabs__link {
    padding: 0 1rem;
    line-height: 3.6rem;
    background-color: var(--color-lighter-dark-bg);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .tabs__link.active { 
    background-color: var(--color-dark-bg);
    font-size: 1.15rem;
    font-weight: bold;
}

  .tabs__item:has(.active) .tabs__link::after {
    content: "";
    display: inline-block;
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
    background-color: rgba(255, 255, 255, 1);
    mask: var(--icon-arrow-url) no-repeat center;
    mask-size: contain;
    transition: rotate var(--transition-normal);
  }

  .tabs--open .tabs__item:has(.active) .tabs__link::after { rotate: 180deg; }
}

/* ============================================================
   DOTTED LIST
   ============================================================ */

.dotted-list {
  width: 100%;
  margin: 0 auto;
  background-color: var(--color-light-bg);
  padding: 2rem 3rem;
  border-radius: var(--border-radius-lg);
}

.dotted-list ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.dotted-list a {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  line-height: 2;
  color: var(--color-muted);
  text-decoration: none;
}

.dotted-list a:hover { text-decoration: underline; }

.dotted-list a::before {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  background-color: var(--aspit-red);
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .dotted-list ul {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }
}

/* ============================================================
   GRID TABLE (afdeling moduloversigt)
   ============================================================ */

.grid-table {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.grid-table__row {
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 120px 100px;
  gap: 1rem;
}

.grid-table__row:nth-child(odd) { background: rgba(0, 0, 0, 0.04); }
.grid-table__row a { text-decoration: none; }
.grid-table__row a:hover { text-decoration: underline; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */

.search-btn {
  background-image: url(/images/icon-search.svg);
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.search-overlay[hidden] { display: block !important; visibility: hidden; }

.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity var(--transition-normal) ease;
  pointer-events: none;
}

.search-overlay__panel {
  position: absolute;
  top: var(--page-header-height);
  left: 0;
  right: 0;
  background: var(--aspit-darker-green);
  color: var(--color-white);
  padding: 4rem 2rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  min-height: calc(100dvh - var(--page-header-height));
  overflow-y: auto;
  transform: translateY(-110%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  isolation: isolate;
}

.search-overlay__panel::after {
  content: "";
  position: absolute;
  bottom: -5rem;
  right: -5rem;
  width: 40rem;
  aspect-ratio: 1;
  background: var(--logo-url) no-repeat center / contain;
  opacity: 0.04;
  z-index: -1;
  pointer-events: none;
  transform: rotate(10deg);
}

.search-overlay--open { pointer-events: auto; }
.search-overlay--open .search-overlay__backdrop { opacity: 1; pointer-events: auto; }
.search-overlay--open .search-overlay__panel { transform: translateY(0); pointer-events: auto; }

.search-overlay__close {
  display: none;
}

.search-overlay__heading { 
    margin: 0; 
    font-size: var(--h2-size); 
    font-weight: 700; 
    color: var(--aspit-red); 
}

.search-overlay__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
}

@keyframes search-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.search-overlay__filters--shake { animation: search-shake 0.4s ease; }

.search-overlay__filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--p-size);
  cursor: pointer;
  user-select: none;
}

.search-overlay__radio {
  appearance: none;
  position: relative;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  cursor: pointer;
}
.search-overlay__radio::before {
  content: "";
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--aspit-red);
  border-radius: 50%;
}
.search-overlay__radio::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  transition: background var(--transition-fast);
  scale: 0.55;
}
.search-overlay__radio:checked::after { background: var(--color-white); }

.search-overlay__bar {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  max-width: 700px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.search-overlay__input {
  padding: 0.6rem 1rem;
  font-size: var(--p-size);
  border: none;
  outline: none;
  width: 100%;
  background: var(--color-white);
  color: #111;
}
.search-overlay__input::-webkit-search-cancel-button { display: none; }

.search-overlay__submit {
  width: 3.5rem;
  background: var(--aspit-red) url(/images/icon-search.svg) no-repeat center / 45%;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.search-overlay__submit:hover { background-color: var(--aspit-red-hover); }

.search-overlay__results { width: 100%; max-width: 700px; }
.search-overlay__list { list-style: none; padding: 0; margin: 0; }
.search-overlay__item { display: block; }
.search-overlay__item:nth-child(odd) { background: rgba(0, 0, 0, 0.2); }

.search-overlay__item-link {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 1.1rem;
  color: var(--color-white);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.search-overlay__item-link:hover { background: var(--aspit-red); }

.search-overlay__no-results {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  text-align: center;
  padding: 1rem 0;
}

@media (max-width: 960px) {
  .search-overlay__panel { padding: 2rem 1rem 2.5rem; }
  .search-overlay__filters { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ============================================================
   SPA — states og utility
   ============================================================ */

#main-content {
  min-height: calc(100dvh - var(--page-header-height));
  transition: opacity 0.15s ease;
}

#main-content.is-loading { opacity: 0; }

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--aspit-red);
  z-index: 9999;
  transition: none;
  opacity: 0;
}

body.is-navigating::before {
  opacity: 1;
  width: 70%;
  transition: width 2s cubic-bezier(0.1, 0.05, 0.0, 1.0);
}

.page-loader {
  display: grid;
  place-content: center;
  min-height: 50vh;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
}

.not-found {
  display: grid;
  place-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 1rem;
  padding: 4rem 2rem;
  line-height: 1.2;
}

.not-found h1 { font-size: var(--h1-size); color: var(--aspit-red); font-weight: bold; }
.not-found a  { color: var(--aspit-red); font-size: var(--p-size); }

/* ============================================================
   LAYOUT SHIFT PREVENTION (CLS)
   ============================================================ */

/* Profilbilleder: fast aspect-ratio pladsholder */
.cd-profile__image,
.spv-card .profile__image,
.profile__image {
  aspect-ratio: 16 / 9;
  background-color: rgba(0, 0, 0, 0.06);
}

.news__thumb,
.event__thumb { background-color: rgba(0, 0, 0, 0.06); }

/* Sektioner med async-indhold: contain:layout forhindrer reflow */
.page-section,
.aspit-map-section,
.ts-section,
.spv-section,
.pjv-section,
.hero { contain: layout; }

.news__list-items,
.event__list-items { min-height: 20rem; }

/* ============================================================
   DARK MODE
   ============================================================ */

.dark-theme {
  background-color: #222;
  color: var(--color-white);
  --aspit-red:           #999;
  --aspit-darker-green:  #222;
  --aspit-darkest-green: #1e1e1e;
  --aspit-lighter-green: #333;
  --aspit-white:         #333;
  --color-light-bg:      #2a2a2a;
  --color-mid-bg:        #333;
  --color-border:        #111;
  --color-highlight:     #333;
}

.dark-theme .page-header        { background-color: #222; }
.dark-theme .subpage-hero       { background-color: #333; }
.dark-theme .bg-white           { background-color: #333 !important; color: #ccc !important; }
.dark-theme .bg-green           { background-color: #292929; color: #ccc; }
.dark-theme .card               { background-color: rgba(0, 0, 0, 0.2) !important; }
.dark-theme .card__title a      { color: #ccc; }
.dark-theme .accordion__item-label   { background-color: #333; color: #ddd; }
.dark-theme .accordion__item-content { background-color: #2a2a2a; color: #ccc; }
.dark-theme .fact-box,
.dark-theme div.highlight-box   { background-color: #333; }
.dark-theme .mega-menu          { background-color: #1a1a1a; }


/* ============================================================
   FAQ SECTION
   ============================================================ */

.faq-section {
  margin: 0 auto;
  padding: 1rem 0;
}

.wp-block-image + .faq-section {
    margin-top: 2rem;
}

.faq-section h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.faq-section details {
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
}

.faq-section details:first-of-type {
  border-top: 0.5px solid rgba(0, 0, 0, 0.15);
}

.faq-section summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 500;
  gap: 1rem;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary:hover {
  color: #555;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  color: #555;
  font-size: 16px;
  line-height: 1;
}

.faq-section details[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #555;
  padding: 0 2rem 1rem 0;
  max-width: 680px;
  margin: 0;
}