body {
  background-color: rgb(255, 255, 255);
  font-family: sans-serif;
}
.event-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  justify-content: center;

  padding: 50px;
  box-sizing: border-box;
  gap: 30px;
  /*margin-left: 100px;*/
}

.content {
  position: relative;
  background-color: rgb(255, 255, 255); /* mørk bakgrunn */
  border: 0.5px solid rgb(210, 210, 210); /* lys ramme som på skjermbildet */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 20px 0;
  overflow: hidden;
  padding-left: 50px;
  padding-right: 50px;
  width: 800px;
  height: 300px;
}
.content-gray {
  position: relative;
  background-color: rgb(236, 236, 236); /* mørk bakgrunn */
  border: 0.5px solid rgb(210, 210, 210); /* lys ramme som på skjermbildet */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  padding-left: 50px;
  padding-right: 50px;
  width: 500px;
  height: 300px;
}
.event-container-gray {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  justify-content: flex-start;

  padding: 50px;
  box-sizing: border-box;
  gap: 30px;
  margin-left: 100px;
}

.event_image {
  position: relative;
  margin-left: auto;
  flex: 0 0 180px; /* fast bredde på bilde-delen */
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.event_image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* hele bildet vises, ingen cropping */
  border-radius: 4px;
}

.event_text {
  flex: 1;
  max-width: 500px;
  /*padding: 15px 20px;*/
  color: rgb(13, 61, 61);
}

.event_text_row {
  display: flex;
  flex-direction: row;
  margin-top: 10px;
  gap: 10px;
}

.event_text h2 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: bold;
  color: rgb(27, 61, 61);
}

.event_text h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: normal;
  color: rgb(13, 61, 61);
}

.event_text p {
  margin: 0 0 5px;
  font-size: 14px;
  color: rgb(13, 61, 61);
}

.overlay {
  position: absolute; /* Add this line */
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: 0.5s ease;
  background-color: #074b49;
}
.content:hover .overlay {
  opacity: 1;
}
.overlay_text {
  color: white;
  font-size: 20px;
  position: absolute;
  top: 40%;
  left: 20%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Hero / Tittel seksjon */
.hero-section {
  background: linear-gradient(135deg, #041a1a, #004b4b);
  color: #fff;
  padding: 100px 20px 80px 20px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  font-family: sans-serif;
}

.hero-section h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  font-family: "inter", sans-serif;
}

.hero-section p {
  font-size: 1.3rem;
  font-weight: 300;
  color: #d1e8e2;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* gjør hele kortet klikkbart og fjern link-styling */
a.event-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.little-button-gray {
  display: inline-block;
  padding: 10px;
  font-size: 1rem;
  color: white;
  background-color: darkgrey;
  border: none;
  border-radius: 80px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease;
  width: 150px;
  margin-bottom: 10px;
  margin-top: 10px;
}
.little-button:hover {
  background-color: #005f5f;
  text-decoration: none;
  color: white;
}

.tittel {
  margin-left: 150px;
  font-size: 2.5rem;
}

/* valgfritt: hover/focus-stil på boksen */
/*
a.event-card:hover .content {
  background: #ffffffdc;
  border-width: 0;
}
a.event-card:hover .content p {
  color: #004b4b;
}
a.event-card:focus-visible .content {
  outline: 2px solid #0a84ff;
  outline-offset: 4px;
}*/

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  .overlay_text {
    font-size: 16px;
    top: 50%;
    left: 50%;
  }
  .event-container,
  .event-container-gray {
    padding: 10px;
    gap: 20px;
    margin-left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .content,
  .content-gray {
    width: 90vw;

    margin-top: 20px;
    height: fit-content;
    flex-direction: column;
  }
  .event_text {
    margin-top: 40px;
    text-align: center;
    flex-wrap: wrap;
  }
  .event_text p {
    font-size: 1rem;
  }
  .event_text h2 {
    font-size: 1.5rem;
  }
  .event_text h3 {
    font-size: 1.2rem;
  }

  .little-button-gray {
    margin-top: 20px;
    width: 200px;
  }

  .tittel {
    text-align: center;
    margin-left: 0;
    font-size: 2rem;
    margin-bottom: 20px;
    margin-top: 30px;
  }
  .event_image img {
    object-fit: contain; /* hele bildet vises, ingen cropping */
    border-radius: 4px;
  }
}
