/* Reset og generelle stilarter */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body og wrapper – 6px sorte kanter */
body {
  font-family: Arial, sans-serif;
  background-color: black; /* Sorte sider */
  color: #e0e0e0;
  line-height: 1.6;
}

#wrapper {
  background-color: #121212;
  margin: 0 auto;
  width: calc(100% - 12px); /* Efterlader 6px på hver side */
  min-height: 100vh;
}

/* Hero-sektion */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* NOTE: Bruger top: 30% som i din sidst indsendte CSS. Ændr til 60% hvis ønsket. */
.hero-overlay {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  padding: 20px;
  border-radius: 10px;
}

.hero-title {
  font-size: 2.5rem;
  color: orange;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* Navigation */
.overlay-nav {
  position: absolute;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  padding: 10px 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-nav > .cv-nav {
  position: absolute;
  left: 10px;
  padding: 5px 10px;
  border: 2px solid orange;
  border-radius: 5px;
  animation: blink 1s infinite;
  text-shadow: 0 0 5px orange;
  text-decoration: none;
  color: white;
  font-weight: bold;
}

@keyframes blink {
  0%   { opacity: 1; text-shadow: 0 0 5px orange; }
  50%  { opacity: 0.5; text-shadow: 0 0 15px orange; }
  100% { opacity: 1; text-shadow: 0 0 5px orange; }
}

.overlay-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay-nav li {
  margin: 0 15px;
}

.overlay-nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Introduktionsbokse (grid-layout) */
.three-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.three-boxes .box {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #333;
  transition: none;
  cursor: default;
}

.three-boxes .cv-box {
  grid-column: 1 / -1;
  cursor: pointer;
  transition: background 0.3s ease;
  max-width: 600px;
  margin: 0 auto;
  display: block;
  text-align: center;
  border: 1px solid #333;
}
.three-boxes .cv-box:hover {
  background: rgba(40,40,40,0.9);
}

.three-boxes .cv-box .cv-image {
    width: auto;
    height: auto;
    max-width: 230px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
}

.three-boxes .cv-box .cv-content {
   display: block;
   text-align: center;
   gap: 0;
}
.three-boxes .cv-box .cv-content h2 {
    margin-top: 0;
    border-bottom: none;
}
.three-boxes .cv-box .cv-content p {
    margin-bottom: 1em;
}
.three-boxes .cv-box .cv-content p:last-child {
     margin-top: 0;
     margin-bottom: 0;
     font-style: italic;
}

/* Speciel regel for elementer, der eksplicit IKKE skal have hover-effekt */
.text-box.no-hover, .box.no-hover, .fact-box.no-hover, .small-box.no-hover {
  transition: none !important;
  cursor: default !important;
}

/* Sikrer at no-hover elementer ikke ændrer baggrund på hover */
.text-box.no-hover:hover, .fact-box.no-hover:hover, .small-box.no-hover:hover {
    background: rgba(20,20,20,0.9) !important;
}
.three-boxes .box.no-hover:hover {
     background: #1e1e1e !important;
}


/* Split-section layout */
.split-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 40px 10%;
  gap: 20px;
  margin-bottom: 60px;
}

.split-section.reverse {
  flex-direction: row-reverse;
}

.text-half, .image-half {
  flex: 1;
  min-width: 300px;
}

.text-box {
  background: rgba(20,20,20,0.9);
  padding: 20px;
  border: 1px solid #333;
  border-radius: 8px;
  transition: none;
  cursor: default;
}

/* Slideshow */
.slideshow-wrapper { }
.image-container {
  position: relative;
  overflow: hidden;
  height: 400px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.image-container:hover {
    transform: scale(1.02);
    opacity: 0.9;
}
.slideshow-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
  border-radius: 8px;
}

.thumbnail-container {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
}
.thumbnail-container img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.1s ease;
  border-radius: 5px;
}
.thumbnail-container img.active {
  border-color: orange;
}
.thumbnail-container img:hover {
    border-color: #555;
    transform: scale(1.1);
}

/* To-kolonne layout for afslutningssektion (NU med 2 tekstbokse) */
.two-column {
  display: flex;
  flex-wrap: wrap; /* Tillad wrap på mindre skærme */
  justify-content: space-between; /* Fordel plads */
  align-items: flex-start; /* Juster toppen */
  max-width: 800px;
  margin: 0 auto 20px auto;
  width: 100%;
  gap: 20px;
}
/* Gør tekstbokse i two-column fleksible */
.two-column > .text-box {
  flex: 1; /* Del pladsen */
  min-width: calc(50% - 10px); /* Sæt minimum bredde (juster efter gap) */
}

/* Faktaboks (ikke længere i brug her, men reglen beholdes for en sikkerheds skyld) */
.fact-box {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 0;
  transition: none;
  cursor: default;
}
.fact-box.small { font-size: 0.9rem; }
.fact-box h3 { margin-bottom: 10px; font-size: 1.3rem; color: orange; }
.fact-box ul { list-style: none; line-height: 1.5; padding-left: 0; }
.fact-box li { margin-bottom: 5px; }

/* Boks-gruppering */
.box-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 800px;
  margin: 20px auto;
}
.small-box {
  flex: 1;
  min-width: 280px;
  padding: 15px;
  font-size: 0.9rem;
  background: rgba(20,20,20,0.9);
  border: 1px solid #333;
  border-radius: 8px;
  transition: none;
  cursor: default;
}

/* Grid til afslutningsbilleder */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}
.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.image-grid img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* *** NY REGEL TILFØJET HER *** */
/* Gør specifikke billeder i grid mindre end fuld bredde og centreret */
.image-grid .full-width-grid-image {
  grid-column: 1 / -1;   /* Spænd stadig fra første til sidste kolonne (så den får sin egen række) */
  width: 100%;           /* Sæt bredden til 70% af den tilgængelige plads */
  height: auto;         /* Bevar billedets proportioner */
  display: block;       /* Nødvendig for at margin auto virker på et img-element */
  margin-left: auto;    /* Centrerer billedet horisontalt */
  margin-right: auto;   /* Centrerer billedet horisontalt */
  /* Alternativt kan de to linjer ovenfor erstattes med: margin: 0 auto; */
}
/* *** SLUT PÅ NY REGEL *** */


/* Lightbox modal - Opdateret med nav-styling */
.lightbox {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  padding: 60px 20px 20px 20px; /* Giver plads til knapper/caption */
}
.lightbox-content {
  display: block;
  max-width: calc(100% - 80px); /* Giver plads til pile på siderne */
  max-height: calc(100% - 80px); /* Giver plads til luk-knap og caption */
  object-fit: contain;
  margin: auto;
}
.lightbox .close {
  position: absolute;
  top: 15px; /* Justeret */
  right: 25px; /* Justeret */
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 101;
}
/* Lightbox navigation */
.lightbox .prev,
.lightbox .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    z-index: 101;
}
.lightbox .prev {
    left: 10px; /* Lidt ind fra kanten */
    border-radius: 3px 0 0 3px;
}
.lightbox .next {
    right: 10px; /* Lidt ind fra kanten */
    border-radius: 0 3px 3px 0;
}
.lightbox .prev:hover,
.lightbox .next:hover {
    background-color: rgba(255,255,255,0.2); /* Lysere hover */
}
.lightbox .prev.disabled,
.lightbox .next.disabled {
    color: #666;
    cursor: default;
    background-color: rgba(0,0,0,0.1);
    pointer-events: none; /* Gør knappen ikke-klikbar */
}
/* Lightbox caption/counter */
.lightbox-caption {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 0.9em;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 3px;
    z-index: 101;
    text-align: center;
}


/* Tilbage til toppen-knap */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff9800;
  color: #fff;
  border: none;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 50;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #333;
  margin-top: 40px;
}
footer p { font-size: 0.9rem; }
footer a.cv-footer { color: orange; text-decoration: none; font-weight: bold; border-bottom: 1px dotted orange; }

/* Medie-queries for responsivitet */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .overlay-nav { flex-direction: column; padding-top: 40px; }
  .overlay-nav > .cv-nav { position: static; margin-bottom: 10px; align-self: flex-start; margin-left: 10px; animation: none; text-shadow: none; border: none; color: orange; font-weight: normal; }
   .overlay-nav ul { flex-direction: column; }
   .overlay-nav li { margin: 5px 0; }

  .three-boxes { grid-template-columns: 1fr; padding: 10px; }
  .three-boxes .box { padding: 15px; text-align: left; }
  .three-boxes .cv-box { max-width: 100%; padding: 15px; text-align: center; }
    .three-boxes .cv-box .cv-image { margin-bottom: 10px; max-width: 100px; width: auto; height: auto; }

  .split-section { flex-direction: column !important; padding: 20px 10px; margin-bottom: 40px; }
  .split-section.reverse { flex-direction: column !important; }
  .text-half, .image-half { min-width: 100%; }
  .image-container { height: 300px; }
   .text-box { padding: 15px; }

  /* Responsivitet for two-column */
  .two-column {
      flex-direction: column; /* Stak kolonner vertikalt */
      max-width: 100%; /* Brug fuld bredde minus padding */
      gap: 10px; /* Mindre gap */
  }
  /* Sørg for tekstbokse i two-column fylder bredden på små skærme */
  .two-column > .text-box {
      width: 100%;
      min-width: auto; /* Nulstil min-width */
  }

  .image-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; padding: 0 10px; }
  /* Responsivitet for fuld bredde billede i grid */
  .image-grid .full-width-grid-image {
      /* Ingen specifik ændring nødvendig her, da grid-column styrer det */
  }


   .box-group { flex-direction: column; max-width: 100%; padding: 0 10px; gap: 10px; }
    .small-box { min-width: auto; padding: 15px; }

  /* Responsivitet for Lightbox */
   .lightbox-content {
     max-width: calc(100% - 20px); /* Mindre margin på små skærme */
     max-height: calc(100% - 100px); /* Mere plads til knapper/caption */
   }
   .lightbox .prev, .lightbox .next {
      padding: 12px; /* Mindre knapper */
      font-size: 18px;
   }
   .lightbox .prev { left: 5px; }
   .lightbox .next { right: 5px; }
}