/* Global body and font styles */
body {
  background-color: black;
  color: #4dea31;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.michroma-regular {
    font-family: 'Michroma', sans-serif;
    font-weight: 400;
    font-style: normal;
}

body.bling {
  background: black;
}

body:not(.bling) {
  background: white;
  color: black;
}
body:not(.bling) #q {
  display:none;
  background-color: white;
  color: black;
}

/* Har med Matrix-scriptet att göra */
#q {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  bottom: 0;
}

/* Formatet på sidan */
header {
  padding: 5px;
  text-align: center;
  z-index: 1;
}

main {
  flex-grow: 1;
  position: relative;
  z-index: 1;
  padding: 50px;
  max-width: 800px;
  margin: 0 auto;
}

footer {
  padding: 5px;
  text-align: center;
  z-index: 1;
}

/* Länkfärger */
body a {
  color: #4dea31;
  text-decoration: none;
}

body a:hover {
  color: #BBFF99;
}

nav a {
  color: #4dea31;
  text-decoration: none;
  padding: 10px 15px;
}

nav a:hover {
  color: #BBFF99;
}

body:not(.bling) a {
  color: #1910b8;
  text-decoration: none;
}

body:not(.bling) a:hover {
  color: #1910b8;
}

body:not(.bling) nav a {
  color: #1910b8;
  text-decoration: none;
  padding: 10px 15px;
}

body:not(.bling) nav a:hover {
  color: #1910b8;
}

/* Styles for the table replacement using flexbox */
.custom-table {
    display: flex;
    flex-direction: column;
    /* Replicates the border-spacing from the original table */
    gap: 30px;
}

/* Styles for each "row" in the layout */
.table-row {
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease;
}

/* Styles for the "cells" in the row */
.table-cell {
    /* Ensures cells grow to fill space on larger screens */
    flex: 1;
    margin-top: 0.5rem;
}

.table-cell:first-child {
    font-weight: bold;
    margin-top: 0;
}

/* Media query for larger screens to make it a two-column layout */
@media (min-width: 768px) {
    .table-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 30px; /* Adds space between the columns on large screens */
    }

    .table-cell {
        margin-top: 0;
    }
}

/* Button */
[role="button"] {
  padding: 2px;
  background-color: rgb(0, 0, 0);
  color: rgb(161, 247, 174);
  cursor: default;
}

[role="button"]:hover,
[role="button"]:focus,
[role="button"]:active {
  background-color: rgb(161, 247, 174);
  color: rgb(0, 0, 0);
}


/* Flexlayout runt bilden/bilderna i modalen */
.article {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

/* Thumbnail – klickbar */
#thumbs {
  width: 160px;
  height: auto;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
#thumbs:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

/ Stor bild – visas när JS sätter display:block /
#imgstor {
  display: none;               / JS sätter block vid visning /
  max-width: min(100%, 720px); / håll dig inom modalen /
  max-height: 70vh;            / snygg höjd i modalen /
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0 auto;              / centrera i modalen /
}

/ Säkerställ att bilder aldrig spiller ut /
.modal__body img {
  max-width: 100%;
  height: auto;
}

/ Mindre skärmar: gör tumnageln lite mindre */
@media (max-width: 480px) {
  #thumbs { width: 120px; }
}