/* 1. Box model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Fjern alle margins/padding */
* {
  margin: 0;
  padding: 0;
}

/* 3. Basis body */
body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11px;
  background-color: #e8e2dd;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* 4. Medier */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 5. Formularer arver font */
input, button, textarea, select {
  font: inherit;
}

/* 6. Fjern liste-styles */
ul, ol {
  list-style: none;
}

/* 7. Links uden default styling */
a {
  text-decoration: wavy underline;
  color: inherit;
  font-weight: bold;
}

a:hover {
  color: #666;
}



header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(232, 226, 221, 0.75);
    backdrop-filter: blur(1px);
    padding-left: 6px;
    padding-top: 3px;
    padding-bottom: 3px;
    border-bottom: black dotted 1px;
    font-weight: bold;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

header p {
    cursor: pointer;
}

header img {
    cursor: grab;
}

header img:active {
  cursor: grabbing;
}

#play-btn {
    cursor: pointer;
    margin-left: auto;
    margin-right: 6px;
}



.layout {
    display: grid;
    grid-template-columns: minmax(80px, 100px) minmax(200px, 250px) minmax(250px, 400px) minmax(400px, 1fr);
    flex: 1;
    overflow: hidden;
}



.menu {
    padding: 6px;
    border-right: #ccc dotted 1px;
    overflow-y: auto;  /* tilføj */
    height: 100%;      /* tilføj */
}

.menu p {
    margin-bottom: 6px;
    cursor: pointer;
    font-weight: bold;
}

.menu p:hover {
    color: #666;
}



.submenu {
    padding: 6px;
    font-weight: bold;
    overflow-y: auto;  /* tilføj */
    height: 100%;      /* tilføj */
}

.submenu:not(:empty) {
    border-right: #ccc dotted 1px;
}

.submenu p {
    margin-bottom: 6px;
    cursor: pointer;
}

.submenu p:hover {
    color: #666;
}

.submenu a {
  display: block;
  margin-bottom: 6px;
  text-decoration: wavy underline;
  font-weight: bold;
}

.submenu a:hover {
  color: #666;
}

.menu p.active {
    text-decoration: underline;
}

.submenu p.active {
    text-decoration: underline;
}



.content {
    padding: 6px;
    font-weight: normal;
    overflow-y: auto;  /* tilføj */
    height: 100%;      /* tilføj */
}

.content:not(:empty) {
    border-right: #ccc dotted 1px;
}

.content a {
    text-decoration: wavy underline;
    font-weight: normal;
}

.content images {
    display: none;
}



.image-col {
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow-y: auto;  /* tilføj */
    height: 100%;      /* tilføj */
}

.image-col img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    padding-top: 4px;
    color: #666;
    font-size: 10px;
    padding-bottom: 6px;
}


/* Mobil */

@media (max-width: 600px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .layout {
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  .menu, .submenu, .content, .image-col {
    display: none;
    height: auto;
    overflow-y: visible;
  }

  .menu.mobile-active,
  .submenu.mobile-active,
  .content.mobile-active {
    display: block;
  }

  .image-col.mobile-active {
    display: block;
  }
}

#back-arrow {
    cursor: pointer;
    padding-right: 2px;
}

#back-arrow.inactive {
    color: #aaa;
    cursor: default;
}

#back-arrow.inactive:hover {
    color: #aaa;
}

#back-arrow:hover {
    color: #666;
}