/* Projects Section */
.projects-section {
  color: #fff;
}

.projects-title {
  text-align: center;
  font-family: 'Horizon', sans-serif;
  font-size: 36px;
  color: #ffd700;
  margin-bottom: 20px;
}

/* Carousel Container */
.projects-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden; /* Hide overflowing pages */
}

/* Wrapper for all pages */
.projects-wrapper {
  display: flex;
  justify-content: center; /* Center horizontally */
}

/* Each Page (Projects Container) */

#projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 items per row */
  grid-template-rows: repeat(2, auto); /* 2 rows */
  gap: 20px;
  justify-content: center; /* Centers the grid itself */
  max-width: 900px; /* Ensures proper alignment */
  margin: 0 auto; /* Centers the grid container */
  text-align: center; /* Align text inside projects */
}


.project-item {
  min-height: 100px; /* Adjust based on content size */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Ensures content is evenly spaced */
}


/* ✅ FIX: Set max width for images */
.project-item img {
  width: 100%;
  max-width: 300px; /* Ensures images don’t get too large */
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
}

.project-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.project-item p {
  margin: 5px 0 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; /* Adjusted size */
  color: #ffffff;
  white-space: normal; /* Allows wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%; /* Allows full width usage */
  text-align: center;
  word-break: break-word; /* Ensures long words break properly */
  line-height: 1.2; /* Adjust spacing between lines */
}


/* Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 24px;
  z-index: 1000;
}

.carousel-arrow.left-arrow {
  left: 0;
}

.carousel-arrow.right-arrow {
  right: 0;
}

.carousel-arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Cover container for hover effect */
.cover-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 300px; /* Fixes size */
  height: 200px; /* Uniform height */
  overflow: hidden;
  border-radius: 10px;
}

/* ✅ FIX: Ensures all images have the same size */
.cover-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures uniform sizing */
}

/* Play button (hidden by default) */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s ease;
}

/* Show play button on hover */
.cover-container:hover .play-button {
  display: block;
  opacity: 1;
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

/* Modal Content */
.video-modal-content {
  position: relative;
  margin: 10% auto;
  width: 80%;
  max-width: 800px;
  background-color: #000;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* Embedded YouTube Video */
.video-modal-content iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* PROJECTS FILTER */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: #ffd700; /* Golden color */
  color: #000;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.filter-btn:hover {
  background-color: #ffcc00;
  transform: scale(1.05);
}

.filter-btn.active {
  background-color: #8b5cf6; /* Purple */
  color: #fff;
}

/* Hide projects by default */
.project-item {
  display: none;
}

/* Show projects when category is selected */
.project-item.active {
  display: block;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.pagination-btn {
  background-color: #ffd700;
  color: #000;
  font-family: 'Horizon', sans-serif;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.pagination-btn:disabled {
  background-color: #888;
  cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #ffcc00;
  transform: scale(1.05);
}

#page-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Horizon', sans-serif;

  font-size: 16px;
}

@media (max-width: 768px) {
  #projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns */
    grid-auto-rows: auto; /* Automatic row sizing */
    gap: 10px; /* Adjust space between items */
    justify-content: center;
    max-width: 90%;
    margin: 0 auto;
  }

  .project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .cover-container {
    max-width: 200px; /* Increase image size */
    height: auto;
  }

  .cover-container img {
    width: 100%;
    max-width: 200px; /* Increase image width */
    height: auto;
    object-fit: cover;
  }

 
  .project-item p {
    margin: -10px 0 0; /* Reduce top margin */
    font-family: 'Montserrat', sans-serif;
    font-size: 14px; /* Slightly smaller font */
    color: #ffffff;
    white-space: normal; /* Allow text wrapping */
    text-align: center;
    word-break: break-word;
    line-height:1.2; /* Reduce line height to bring text closer */
  }
  
/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.pagination-btn {
  background-color: #ffd700;
  color: #000;
  font-family: 'Horizon', sans-serif;
  font-size: 11px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
}

@media (max-width: 480px) {
  #projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns */
    grid-auto-rows: auto; /* Automatic row sizing */
    gap: 10px; /* Adjust space between items */
    justify-content: center;
    max-width: 90%;
    margin: 0 auto;
  }

  .project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .cover-container {
    max-width: 200px; /* Increase image size */
    height: auto;
  }

  .cover-container img {
    width: 100%;
    max-width: 200px; /* Increase image width */
    height: auto;
    object-fit: cover;
  }

   
.project-item p {
  margin: -10px 0 0; /* Reduce top margin */
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; /* Slightly smaller font */
  color: #ffffff;
  white-space: normal; /* Allow text wrapping */
  text-align: center;
  word-break: break-word;
  line-height:1.2; /* Reduce line height to bring text closer */
}
}
