/* General Styles */
.main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  cursor:none;
  font-weight: 400;
}

footer.main{
  height:0;
}

.title-container {
  display: flex;
  align-items: flex-start; /* Vertically align elements */
  justify-content: space-between; /* Ensures elements are spaced correctly */
  flex-wrap: nowrap;
  flex-direction: column;
  padding: 0;
  z-index: 6;
  cursor:none;
}

.controls {
  display: flex; /* Use flex for the counter and button */
  align-items: center; /* Center vertically */
  margin-left: 0; /* Space between title and controls */
  cursor: none;
  padding-top: 0.25rem;
}

.project-header {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-left: .75rem;
  padding-top: .75rem;
}

.project-title {
  flex-grow: 1; 
  white-space: wrap; 
  overflow:visible;
  margin-bottom: 0;
  font-weight: 400;
}


.info-button, .next-project {
  font-family: var(--font);
  font-size: var(--font-size-s);
  color: var(--text-color-light);
  letter-spacing: var(--letter-spacing);
  text-transform: var(--font-size-s-case);
  font-weight: 400;
  margin-left: .5rem;
  cursor: none;
}

.info-button, .next-project:hover {
  color: var(--link-color-light-hover);
}


.info-button, .counter, .next-project {
  font-family: var(--font);
  font-size: var(--font-size-s);
  color: var(--text-color-light);
  letter-spacing: var(--letter-spacing);
  text-transform: var(--font-size-s-case);
  border: none;
  background: none; 
  padding: 0;
  transition: color 0.45s ease;
  z-index: 10;
  position: relative;
}

.info-button:hover {
  color: var(--link-color-light-hover);
}

.project-info {
  background-color: var(--background-color-ligh); 
  position: fixed;
  top: 5.5rem;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0rem;
  padding-bottom: 3rem;
  max-width: 550px;
  max-height: calc(100vh - 5rem); /* Height adjustment based on viewport minus some space for top/bottom */
  z-index: 5;
  overflow-y: auto; /* Scroll only when needed */
  margin-top: 1rem;
  transition: opacity 0.5s ease;
}

.overlay {
  position: fixed;
  top: 2.5rem; 
  left: 0;
  width: 100vw; 
  height: calc(100vh - 2.5rem); /* Full viewport height minus title height */
  background-color: var(--background-color-light); 
  z-index: 2; 
  display: none;
}

.project-text{
  z-index: 75;
}

.project-info::-webkit-scrollbar {
  width: 0; /* Hide scrollbar on WebKit-based browsers */
}

.project-carousel-wrapper {
  width: 100vw;
  height: calc(100vh - 12rem); /* Subtract the header height */
  display: flex;
  overflow: hidden; 
  justify-content: center;
  box-sizing: border-box;
  padding-right: 1.5rem;
  margin-top: 2.5rem;
  scrollbar-width: thin;
}


/* Ensure the carousel aligns right */
.project-carousel {
  display: flex;
  align-items: flex-start;
  width: auto;
  height: 100%;
  overflow: hidden; 
  padding: 0;
}


.gallery-img {
  max-width: 100%; /* Prevents the image from exceeding its container */
  height: 100%;
  object-fit: contain; /* Ensures aspect ratio is preserved */
  padding: 0;
}

.carousel__list {
  display: flex;
  flex-direction: row;
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100%;
}

.carousel__item {
  flex: 1 0 100%; /* Allow each item to take full width */
  padding: 0;
}

.carousel__item img {
  max-height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  border-radius: 4px; /* Set the corner radius */
  -webkit-border-smoothing: antialiased;
}



html, body {
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

body {
  margin: 0;
}



@media (max-width: 768px) {

  .next-project:hover {
    color: var(--text-color-light);
  }

  .info-button:hover{
    color: var(--text-color-light);
  }

  .carousel__item {
    flex: 1 0 100%; /* Allow each item to take full width */
  }


  .overlay{
    bottom: 0;
    top: 3.5rem;
  }

}

@media (max-width: 380px) {

  .next-project:hover {
    color: var(--text-color-light);
  }

  .info-button:hover{
    color: var(--text-color-light);
  }

  .project-info{
    bottom: 0rem;
  }

  .overlay{
    bottom: 0;
    top: 3.5rem;
  }
}
