@font-face {
  font-family: 'simplon';
  src: url('../fonts/SimplonBPMono-Light.woff2');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  display: none;
}

::selection {
  background-color: #c3c3c3; /* Custom background color */
  color: #ffffff; /* Custom text color */
}


.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr); /* Ensure three equal columns */
  width: 100vw; /* Occupy full viewport width */
  /* gap: 10px; */
  grid-auto-rows: 120px;
  box-sizing: border-box;
}

.grid a {
  text-align: left;
  padding: 0.6rem;
  /* height: 20vh; */
  box-sizing: border-box;
  text-decoration: none;
  min-width: 100px;
}

.grid hr {
  display: none;
  z-index: 10;
  grid-column: 1 / -1; 
  border: none;
  height: 0.3px;
  background-color: #333;
  width: 100%; /* Ensure hr takes up full width of grid */
  box-sizing: border-box;
}

.grid p, .grid span, grid a span a{
  font-family: simplon;
  color: black;
  text-emphasis: none;
}

.grid p {
  font-size: 7px;
  margin-bottom: 3px;
  }

.grid span {
    font-size: 10px;
}
    

.grid-item {
  display: flex;
  flex-direction: column; /* Ensures the <p> and <img> stack vertically */
}


.hover-image, .hover-video {
  width: 100%; /* Ensures the image/video can fill the grid item width */
  height: 100%; /* Ensures the image/video can fill the grid item height */
  object-fit: contain; /* Scale the image/video to fit within the grid item, maintaining aspect ratio */
  object-position: left top; /* Aligns the image/video to the left */
  box-sizing: border-box; /* Includes padding in the size calculation */
  opacity: 0;
  /* filter: grayscale(100%);  */
}

.grid-item:hover .hover-image, .grid-item:hover .hover-video {
  transition: opacity 0.3s ease;
  filter: grayscale(0%); /* Remove grayscale on hover */
  opacity: 1; /* Fully visible on hover */
}

.hover-image, .hover-video, .random-element {
  opacity: 0;
  transition: opacity 0.3s ease-in-out; /* Default transition for random appearance */
}

.span-two-columns {
  grid-column: span 2; /* Spans two columns */
  position: relative;
  padding: 0.6rem;
}

.span-two-columns p {
  grid-column: 1 / 2; /* The original title stays in the first column */
}

.span-two-columns::after {
  content: "+"; /* Title for the second column */
  position: absolute;
  left: 50%; /* Position in the second column */
  transform: translateX(-50%);
  font-family: simplon; /* Match font styles */
  font-size: 10px;
  color: black;
  left: calc(50% + 0.6rem);
}


.overlay {
  display: none; /* Initially hide the overlay */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.633);
  z-index: 100; /* Below the video */
  transition: opacity 0.5s ease;
  pointer-events: none;
}
 
.mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.633);
  z-index: 200; /* Below the video */
  pointer-events: none;
}

.mobile p {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'simplon';
  font-size: 20px;
  text-align: center;
  max-width: 90vw;
  z-index: 201;
}



/* Mobile layout */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr); /* 4 columns for mobile */
    max-width: 99vw; /* Ensure grid fits within the viewport width */
    grid-auto-rows: 100px; /* Adjust row height for mobile */
    padding: 0; /* Remove padding if it causes overflow */
  }

  .grid-item {
    height: 100px; /* Consistent height for mobile grid items */
    padding: 0.4rem; /* Adjust padding for smaller screens */
  }

  .span-two-columns {
    grid-column: span 3; /* Span all 4 columns on mobile */
  }

  .grid a {
    min-width: 0;
  }

  .grid span {
    font-size: 10px;
}

.plus {
  display: none;
}

.mobile, .mobile p {
  display: block;
}

}

