html, body {
  background-color: #ffffff; /* white background */
}

body {
  @apply bg-white text-black;
  position: relative;
}

/* Remove the blurred background image */
body::before {
  content: none;
}

a {
  @apply text-black hover:underline;
}

main {
  max-height: calc(100vh - 110px);
  overflow-y: scroll;
  mask-image: linear-gradient(to bottom, transparent, black 30px);
}

.main-content-width {
  max-width: 93%;
  margin-left: auto;
  margin-right: auto;
}

/* Underline effect on project title hover */
.shadow-lg:hover h3 {
  text-decoration: underline;
}

.shadow-lg-no-radius {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0;
}

/* New styles for image overlay */
.project-thumbnail-container {
  position: relative;
  overflow: hidden;
  display: block; /* Ensure the anchor tag behaves as a block for positioning */
}

.project-thumbnail-container img {
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.project-thumbnail-container:hover img {
  transform: scale(1.05); /* Zoom in by 5% on hover */
  filter: brightness(0.8); /* Dim the image on hover */
}

.project-description-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dimming effect */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  text-align: center;
  pointer-events: none; /* Allow clicks to pass through */
}

.project-thumbnail-container:hover img {
  filter: brightness(1.2); /* Brighten the image on hover */
}

.project-thumbnail-container:hover .project-description-overlay {
  opacity: 1; /* Show the overlay on hover */
}

/* Image zoom effect for justified gallery thumbnails */
[id^="justified-gallery-"] img {
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
  transform-origin: center center;
  will-change: transform, filter;
}

[id^="justified-gallery-"] a:hover img {
  transform: scale(1.05); /* Zoom in by 5% on hover */
  filter: brightness(1.2); /* Brighten to match index.html */
}

.project-thumbnail-container video {
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.project-thumbnail-container:hover video,
.project-thumbnail-container:hover .video-responsive iframe {
  transform: scale(1.05); /* Zoom in by 5% on hover */
  filter: brightness(0.8); /* Dim the video/iframe on hover */
}

.video-responsive {
  overflow: hidden;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
  height: 0;
}

.video-responsive iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

/* Header Styles */
header p {
  font-size: 0.875rem; /* 14px */
  color: #6b7280; /* gray-500 */
}

header nav a {
  color: #000000; /* black */
  display: inline-block; /* Ensures padding and transform apply correctly */
  vertical-align: middle; /* Ensures consistent vertical alignment */
  padding: 2px 8px; /* Added horizontal padding */
  border-radius: 0px; /* Set shadow rounding to 0px */
  transform: translateY(1px); /* Apply default transform to all links */
  transition: box-shadow 0.1s ease-out; /* Smooth transition for the shadow */
}

.active-link {
  box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.15); /* Toned down intensity, adjusted spread */
}

/* Remove blue border on gallery focus */
.image-gallery:focus {
  outline: none;
}

/* Project Title and Description Styles */
.project-title {
  font-size: 1rem; /* Corresponds to text-base */
  color: #000; /* Black color */
  font-weight: bold;
  margin-top: 0.75rem; /* Corresponds to mt-3 */
}

.project-description {
  font-size: 0.875rem; /* Corresponds to text-sm */
  color: #000; /* Black color */
}

/* Project Gallery Title and Description Styles */
.project-gallery-title {
  font-size: 1rem; /* Changed from 1.5rem to match project-title */
  font-weight: bold; /* Changed from 600 to bold to match project-title */
  margin-bottom: 1.5rem; /* Corresponds to mb-6 */
  text-align: center;
  color: #000; /* Black color */
}

.project-gallery-description {
  text-align: center;
  margin-bottom: 2rem; /* Corresponds to mb-8 */
  color: #6b7280; /* Changed to gray-500 */
  font-size: 0.875rem; /* Added to match project-description */
}

/* Main Description Text Style (for about/contact pages) */
.main-description-text {
  font-size: 0.875rem; /* 14px */
  color: #6b7280; /* gray-500 */
}

.scroll-button {
  position: fixed;
  right: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none; /* Hidden by default */
  z-index: 1000;
}

.scroll-button.up {
  top: 50%;
  transform: translateY(-150%);
}

.scroll-button.down {
  top: 50%;
  transform: translateY(50%);
}

.scroll-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-style: solid;
  border-color: #888;
  border-width: 4px 4px 0 0;
}

.scroll-button.up::after {
  transform: translate(-50%, -25%) rotate(-45deg);
}

.scroll-button.down::after {
  transform: translate(-50%, -75%) rotate(135deg);
}

/* Responsive Styles */
@media (max-width: 767px) {
  header {
    flex-wrap: wrap;
  }

  #nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }

  #nav-links.nav-open {
    display: flex;
  }

  header nav a {
    margin-bottom: 0.5rem;
  }

  body {
    padding-top: 60px; /* Adjust to new header height */
  }

  main {
    padding: 1rem;
    max-height: calc(100vh - 60px);
  }

  .main-content-width {
    max-width: 100%;
  }
}

.video-gallery {
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  padding: 1px;
}

.video-responsive {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-bottom: 1px; /* 1px border between videos */
}

.video-responsive:last-child {
  margin-bottom: 0;
}

.video-responsive iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}