.header {
  background-color: white;
}

#contact {
  margin-left: 28vw;
  z-index: 2;
  margin-top: 7rem;
  position: relative;
}

#contact a,
#contact h3 {
  font-variation-settings: "slnt" 0, "wdth" 00, "wght" 530, "INKT" 00;
  text-decoration: none;
}

#contact a:hover {
  text-decoration: underline;
}

.content-section {
  margin-left: 24vw;
  min-height: 90vh;
}

#contact-form {
  display: flex;
  position: relative;
  justify-content: left;
  align-items: center;
  background-color: white;
  padding: 0px;
  border-radius: 10px;
}

#about {
  margin-left: 28vw;
  margin-top: 6rem;
  max-width: 68rem;
}

#media {
  display: block;
  gap: 1rem; /* Space between items */
  margin-top: 6rem;
  width: 74vw;
  margin-left: 24vw;
}

#grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Creates 3 columns */
  gap: 1rem; /* Adds space between the grid items */
}

.media-container {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1; /* Keeps items square */
  text-decoration: none;
  overflow: hidden;
}

.media-image img {
  object-fit: cover; /* Makes the image cover the entire container */
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease; /* Smooth hover scale effect */
}

.media-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
  color: white;
  font-size: 1.3rem;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-container:hover .media-image img {
  transform: scale(1.1); /* Smooth scale on hover */
  overflow: hidden;
}

.media-container:hover .media-description {
  opacity: 1; /* Fade in the description on hover */
}

#contact-form iframe {
  width: 70vw;
  height: 80vh;
  border: 2px solid #ccc;
  border-radius: 10px;
}

.about-list {
  position: fixed;
  left: 3vw;
  top: 7rem;
  z-index: 1;
}

#media-list {
  display: none;
  margin-left: 1.5rem;
}

#media-list.open {
  display: block;
}

.about-list a {
  font-size: 1.3rem;
  text-decoration: none;
  color: grey;
}

.about-list a.active {
  color: black;
}

.about-list a:hover {
  text-decoration: underline;
}

.about-list ul,
.about-list li {
  list-style-type: none;
  padding: 0;
  width: 21vw;
  margin-top: 0.6rem;
  margin-right: 0.8rem;
}

a {
  color: black;
}

.list p {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.list-details {
  display: flex; /* Align items horizontally */
  justify-content: start; /* Distribute items evenly */
  align-items: stretch; /* Ensure both columns have the same height */
}

.record {
  max-width: 42rem;
}

.trf {
  margin-left: -0.3rem !important;
  color: grey;
  display: flex;
  flex-wrap: nowrap;
  width: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch !important; /* Smooth scrolling for touch devices */

  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.trf::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Edge (WebKit browsers) */
}

.type {
  margin-left: 0.3rem;
  margin-right: 0.3rem;
}

.type:hover {
  text-decoration: underline;
}

.right {
  margin-left: 1.5rem; /* Adds space to the right side */
}

.title {
  position: absolute;
  bottom: 5.5%;
  left: 1.5rem;
  z-index: 3;
  color: white;
  font-size: 2.8rem;
  text-shadow: 1px 1px 400px black;
  animation: 0.5s titleOpen ease-in-out;
  transition: opacity 0.7s ease-in-out;
}

.subtitle {
  position: relative;
  font-size: 1.5rem;
  line-height: 100%;
  top: 0.6rem;
}

.metadata {
  position: absolute;
  bottom: 0.5rem;
  margin-left: 2.5rem;
}

strong,
b,
.content-section a {
  font-variation-settings: "slnt" 0, "wdth" 00, "wght" 530, "INKT" 00;
  font-weight: 400;
}

#content {
  background-color: white;
  position: sticky;
  margin-top: 98.5vh;
  padding-bottom: 1rem;
  box-shadow: 0px -1px 30px grey;
  bottom: 0;
  animation: 1s titleOpen ease;
}

.content-section p,
.content-section ul {
  font-size: 1.2rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes opening {
  from {
    height: 100vh;
  }
  to {
    height: 100vh;
  }
}

@keyframes titleOpen {
  from {
    transform: translateY(10%);
    opacity: 1;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 130%;
  font-variation-settings: "slnt" 0, "wdth" 00, "wght" 530, "INKT" 00;
}

@media (max-width: 1360px) {
  #media {
    margin-left: 28vw;
    width: 69vw;
  }

  #grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #about,
  #contact {
    margin-left: 28vw;
    width: 68vw;
  }
}

@media (max-width: 1280px) {
  #media {
    width: 55vw;
    margin-left: 40vw;
  }
  #grid {
    grid-template-columns: repeat(1, 1fr);
  }

  #about,
  #contact {
    width: 65vw;
  }

  .content-section {
    margin-left: 30vw;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 2.2rem;
    left: 1.3rem;
    top: 2.5rem; /* Increased to make room for metadata */
  }

  .subtitle {
    font-size: 1.2rem;
  }

  h1,
  h2,
  h3,
  h4,
  h5 {
    font-size: 1.5rem;
  }

  #media {
    padding-top: 4rem;
    margin-left: 0;
    width: 100%;
  }

  .content-section p,
  .content-section ul {
    font-size: 1rem;
    width: 100%;
    margin-left: 0%;
  }

  .about-list {
    position: fixed;
    left: 0rem;
    right: 1.3rem;
    top: 0rem;
    width: 100%;
    z-index: 1000;
    background-color: white;
  }

  .about-list ul {
    padding-top: 3rem;
    padding-left: 5vw;
    padding-bottom: 0rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .about-list li {
    width: auto;
    flex: 0 0 auto;
    margin-right: 1.5rem;
  }

  #media-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: 0;
    flex: 0 0 auto; /* Prevent shrinking or growing of items */
    position: fixed;
    background-color: white;
    left: 0rem;
    padding-left: 10vw;
    width: 100%;
    top: 5.8rem;
    padding-bottom: 0.5rem;
  }

  #media-list.open {
    display: flex !important;
  }

  .about-list a {
    font-size: 1rem;
  }

  .media-content {
    grid-template-columns: 1fr;
    width: 90%;
    margin-left: 5%;
  }

  #about,
  #contact {
    padding-top: 7rem;
    width: 90vw;
    margin: auto;
    max-width: 90vw;
  }

  #contact-form iframe {
    width: 100%;
    height: 50vh;
    border: 2px solid #ccc;
    border-radius: 10px;
  }
}
