@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap");

* {
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}
body {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  background-color: black;
  background-size: cover;
  color: white;
}
h1, h2 {
  text-transform: uppercase;
}
h2 {
  margin-bottom: 10px;
  margin-top: 10px;
}
img {
  max-width: 100%;
  height: auto;
}
nav {
  background-color: #210202;
  height: 80px;
  width: 100%;
  position: fixed;
}
.link-container {
  width: 90%;
}

/* Allt som har med logon Smisksidan att göra */
label.logo {
  font-size: 35px;
  line-height: 80px;
  padding: 0 25px;
  font-weight: bold;
  margin-top: auto;
  margin-bottom: auto;
  float: left;
}
label.logo a {
  color: white;
}
label.logo a:hover {
  color: white;
  background-color: #210202;
}

nav ul {
  float: right;
  margin-right: 20px;
}
nav ul li {
  display: inline-block;
  line-height: 80px;
  margin: 0 5px;
}
nav ul li a {
  color: white;
  font-size: 17px;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 3px;
}
a.active,
a:hover {
  background-color: #450303;
  transition: 0.15s;
}
.checkbtn {
  font-size: 30px;
  float: right;
  line-height: 80px;
  margin-right: 40px;
  cursor: pointer;
  display: none;
}
#check {
  display: none;
}

@media (max-width: 1240px) {
  .checkbtn {
    display: block;
  }
  .rubrik {
    padding-left: 20px;
  }
  ul {
    position: fixed;
    width: 100%;
    height: 100vh;
    background-color: #210202;
    top: 80px;
    left: -100%;
    text-align: center;
    transition: all 0.15s;
  }

  @media screen and (max-width: 800px) {
    .flex-container {
      flex-wrap: wrap;
    }
    .rubrik {
      font-size: 1.6rem;
    }
    .flex-container > div {
      font-size: 1rem;
    }
    .flex-rubrik {
      min-height: 110px;
      margin: auto;
    }
    .link-container {
      width: 100%;
    }
    label.logo {
      padding: 0 0 0 20px;
    }
    .flex-footer {
      visibility: hidden;
    }
    .text {
      font-size: 1rem;
    }
    .rubrik {
      padding-left: 20px;
    }
  }

  nav ul li {
    display: block;
    margin: 50px 0;
    line-height: 30px;
  }
  nav ul li a {
    font-size: 20px;
  }
  a:hover,
  a.active {
    background: #450303;
  }
  #check:checked ~ ul {
    left: 0;
  }
}

.rubrik {
  padding-top: 80px;
  margin: auto;
}
p.text {
  width: 80vh;
  margin: auto;
  padding-top: 80px;
}
.flex-container {
  display: flex;
  justify-content: space-around;
  margin-top: 50px;
  gap: 20px;
  margin-left: 20px;
  margin-right: 20px;
  height: 40vh;
  align-items: flex-start;
}
.flex-container > div {
  min-width: 50px;
  flex-grow: 1;
  flex-basis: 100%;
  font-size: 1.2rem;
  overflow: auto;
}
.intext-link {
  color: #ffd700;
}
.intext-link:hover {
  background-color: rgb(42, 41, 41);
  transition: 0.15s;
  padding: 7px 13px;
  border-radius: 3px;
}

.flex-rubrik {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* container för alla stories på stories0X */
.grid-container {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
  font-size: 1.2rem;
  padding: 0px;
  justify-content: space-evenly;
  justify-items: start;
  -webkit-text-size-adjust: 100%; /* Prevent text scaling issues on mobile */
  text-size-adjust: 100%;
}
.grid-container > div {
  text-align: right;
  padding: 5px 0;
  overflow-wrap: break-word; /* Ensure text wraps properly */
  white-space: normal; /* Allow normal text wrapping */
}
.grid-container > div:first-child {
  text-align: left; /* Ensure left column text is left-aligned */
}

/* länkar till berättelserna på stories0X */
.story {
  color: #ffd700;
  padding: 7px 13px;
  border-radius: 3px;
  font-weight: bold;
  text-transform: uppercase;
}
.story:hover {
  background-color: rgb(42, 41, 41);
  transition: 0.15s;
}
.story:visited {
  color: #c6be91;
}

img.logo {
  width: 141px;
  height: auto;
  padding: 5px;
  float: left;
}

/* Sidorna med berättelser */
.flex-container-story {
  display: flex;
  justify-content: center;
  font-size: 1.2rem;
}
.text {
  flex-basis: 60%;
}

/* Nyare/äldre knappar (stories0x, storyxxx) */
.flex-next-prev {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  position: relative;
  bottom: -100px;
  width: 100vw;
}

.flex-footer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 40px;
  position: relative;
  bottom: -100px;
  width: 100vw;
  padding-bottom: 15px;
}
.smiskbild {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
  margin-bottom: 10px;
}
.text > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 10px;
}
@media screen and (max-width: 610px) {
  .grid-container > div {
    font-size: 0.8rem;
    margin-right: 0; /* Remove negative margin */
    padding-right: 10px; /* Add safe spacing */
  }
  img.logo {
    display: none;
  }
  .text {
    flex-basis: 80%;
  }
  .grid-container {
    grid-template-columns: auto; /* Single-column layout for mobile */
  }
}