/* Adjust overlay and link-images for better visibility on mobile */
@media (max-width: 480px) {
  .overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align to the top */
    align-items: center;
    padding: 1em; /* Add padding for spacing */
    height: auto; /* Ensure it adjusts to content height */
    background-color: rgba(0, 0, 0, 0.7); /* Add contrast */
    gap: 1em; /* Space between text and link-images */
  }

  .link-images {
    flex-direction: column; /* Stack vertically */
    align-items: center !important; /* Center align */
    gap: 1em !important; /* Space between icons */
    width: auto; /* Fit content */
  }

  .link-image img {
    width: 4em; /* Larger size for visibility */
    height: 4em;
  }

  .main-image {
    width: 100%; /* Take full width */
    height: auto; /* Maintain aspect ratio */
  }
  .down-arrow {
    font-size: 1rem;
    color: #1eaec7;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none; /* Remove underline */
    cursor: pointer;
    animation: bounce 2s infinite;
  }
}

/* General adjustments for larger resolutions */
@media (min-width: 481px) {
  .overlay {
    flex-direction: column; /* Ensure a column layout */
    justify-content: center; /* Center text and links */
    gap: 1em; /* Add spacing */
  }

  .link-images {
    flex-direction: row; /* Keep in a row */
    gap: 2em; /* Space between icons */
  }

  .link-image img {
    width: 5em; /* Larger icons for desktop */
    height: 5em;
  }

  .main-image {
    width: 90%; /* Fit the container */
    height: auto;
  }
}

body {
    background-color: #0B1214;
    font-family: Arial, sans-serif;
    margin: 0;
    overflow: hidden;
    }
header {
    background-color: #213C45;
    color: #1eaec7;
    font-family: pain-de-mie, sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    font-size: 9.9em;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #213C45;
}
header.headertext {
  background-color: #213C45;
  color: #1eaec7;
  font-family: pain-de-mie, sans-serif;
  font-size: 4rem;
  height: 100vh; /* Ensure it takes the full viewport height */
  width: 100%; /* Full width */
  display: flex;
  flex-direction: column; /* Stack items vertically */
  justify-content: center; /* Center vertically */
  align-items: center; /* Center horizontally */
  margin: 0;
  padding: 0;
  position: relative; /* Add this line to contain absolute children */
}
nav {
    text-align: center;
    margin: 1em 0;
}
nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #147A8C;
}
* {
    max-width: 100%;
}
section {
    padding: 2em;
    margin: 0 1em;
}
.about, .projects{
    padding-bottom: 1em;
    text-align: center;
    font-family: "diazo-mvb-rough1-cond", sans-serif;
    font-weight: 700;
    font-style: normal;
    padding: 0;
    margin: 0;
}
.projects {
  min-height: auto; /* Let the section grow with its content */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align content to the top */
  align-items: center;
  padding: 20px 0; /* Add spacing */
  margin: 0;
  background-color: #0B1214;
  overflow: visible; /* Allow content to fully display */
}
.contact {
  min-height: 25vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */
  padding: 20px;
  background-color: #18292e; /* Match the theme */
  min-width: 100% !important;
}
footer {
    text-align: center;
    padding: 1em 0;
    background-color: #213C45;
    color: rgb(30, 174, 199);
    margin-top: 1em;
    font-family: "diazo-mvb-rough1-cond", sans-serif;
    font-weight: 700;
    font-style: normal;
}
/* Grid setup */
.image-grid {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping */
  gap: 20px; /* Space between images */
  justify-content: center; /* Center the grid horizontally */
  align-items: flex-start; /* Align items to the top of the grid */
  width: 90%; /* Restrict width for consistency */
  margin: 0 auto; /* Center the grid in its parent container */
  padding: 0; /* Remove extra padding */
}
  
  /* Image container */
  .image-container {
    position: relative;
    flex-basis: calc(33.333% - 20px); /* 3 images per row with gap */
    max-width: calc(33.333% - 20px);
    min-width: 200px; /* Minimum size */
    min-height: 200px; /* Ensure visibility */
    height: auto; /* Maintain aspect ratio */
    overflow: hidden;
}
  
  /* Main image */
  .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
  }
  
  /* Overlay container */
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    align-items: center !important;
    background-color: rgba(0, 0, 0, 0.5); /* Darken effect */
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
  }
  
  /* Hover effect */
  .image-container:hover .main-image {
    opacity: 0.2;
  }
  
  .image-container:hover .overlay,
  .image-container.active .overlay {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Overlay text */
  .overlay-text {
    color: white;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 1em; /* Adjust the spacing below the text */
  }
  
  /* Link images */
/* Link images container (holds all images in a row) */
.link-images {
    display: flex; /* Ensure the images are displayed in a row */
    flex-direction: row; /* Make sure it's in a row */
    gap: 2em; /* Adds spacing between images */
    justify-content: center; /* Center the images horizontally */
    width: 100%; /* Ensure the container stretches fully */
    flex-wrap: nowrap; /* Prevent wrapping to new lines */
  }
  
  /* Link images */
  .link-image img {
    width: 5em;
    height: 5em;
    border-radius: 50%;
    transition: transform 0.3s ease;
  }
  
  .link-image img:hover {
    transform: scale(1.1);
  }

  /* Make the container a scrollable area */
.snap-container {
  scroll-snap-type: y proximity; /* Change from mandatory to proximity */
  overflow-y: scroll;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Define the snapping items */
.snap-item {
  scroll-snap-align: start;
  min-height: auto; /* Let the content define the height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  overflow: visible; /* Ensure sections can grow */
  min-width: 91%; /*Helps sections take up full width */
}

.down-arrow {
  font-size: 2em;
  color: #1eaec7;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none; /* Remove underline */
  cursor: pointer;
  animation: bounce 2s infinite;
}

.down-arrow:hover {
  color: #147A8C; /* Optional: Add a hover effect */
}

@media (max-width: 480px) {
  header.headertext h1 {
    font-size: 6.5rem;
    margin: 0.7em 0;
    margin-bottom: 40px;
  }
  header.headertext p {
    font-size: 1.6rem;
    margin: 0.5rem 0;
    margin-bottom: 200px;
  }
  .down-arrow {
    font-size: 1.5em;
    margin-bottom: 80px;
  }
  .snap-container {
    scroll-snap-type: smooth;
  }
  .contact h2 {
    margin-top: -55px;
  }
  .contact .link-image {
    margin-top: -10px;
  }
}
@media (max-width: 480px) {
  .overlay {
    position: absolute;  /* Keep overlay on top of the image */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1; /* Ensure it's always visible on mobile */
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5em;  /* Reduce padding to free up space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5em; /* Reduce gap between elements */
  }
  .overlay-text {
    font-size: 1.5em;  /* Slightly smaller text */
    margin-bottom: 0.5em;
  }
  .link-images {
    flex-direction: row;
    flex-wrap: wrap;  /* Allow icons to wrap into new lines if needed */
    justify-content: center;
    gap: 0.5em;
  }
  .link-image img {
    width: 3em;  /* Reduced icon size */
    height: 3em;
  }
  .image-container {
    max-width: calc(33.333% - 20px);
    min-width: 300px; /* Minimum size */
    min-height: 300px; /* Ensure visibility */
  }
}
.image-container .overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
