/* Projects Page Specific Styles */

/* Hero Section */
.projects-hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.hero-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 54px;
  font-weight: 700;
  line-height: 1.215;
  color: #ffffff;
  z-index: 2;
  text-align: center;
}

/* Programs Section */
.programs-section {
  background-color: #ffffff;
  padding: 60px 0 0;
}

.programs-header {
  margin-bottom: 25px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.215;
  color: #000000;
  margin-bottom: 9px;
}

.title-line {
  width: 100%;
  height: 1px;
  background-color: #000000;
}

/* Search Section */
.search-section {
  margin-bottom: 41px;
}

.search-container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.search-input {
  flex: 1;
}

.search-field {
  width: 100%;
  height: 38px;
  padding: 9px 11px;
  border: none;
  border-radius: 4px;
  background-color: #ffffff;
  box-shadow: 3px 3px 10px 5px rgba(0, 0, 0, 0.2);
  font-family: "Cabin", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.215;
  color: #404040;
  outline: none;
}

.search-field::placeholder {
  color: #404040;
}

.filter-buttons {
  display: flex;
  gap: 13px;
}

.filter-btn {
  background-color: #1674bb;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 11px;
  font-family: "Cabin", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.215;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 84px;
  height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.programs-section .container {
  flex-direction: column;
}

.filter-btn:first-child {
  min-width: 98px;
}

.filter-btn:hover {
  background-color: #0d5a8a;
}

/* Year Filter Dropdown */
.year-filter {
  background-color: #ffffff;
  color: #404040;
  border: none;
  border-radius: 4px;
  padding: 12px 11px;
  font-family: "Cabin", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.215;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  height: 41px;
  box-shadow: 3px 3px 10px 5px rgba(0, 0, 0, 0.2);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 35px;
}

.year-filter:hover {
  box-shadow: 3px 3px 15px 7px rgba(0, 0, 0, 0.25);
}

.year-filter:focus {
  box-shadow: 3px 3px 15px 7px rgba(22, 116, 187, 0.3);
}

.year-filter option {
  background-color: #ffffff;
  color: #404040;
  padding: 8px 12px;
  font-family: "Cabin", sans-serif;
  font-size: 15px;
  font-weight: 400;
}

/* Programs Grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 28px;
}

.program-card {
  background-color: #ffffff;
  border-radius: 3px;
  padding: 11px 14px;
  box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.25);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 350px;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 5px 15px 5px rgba(0, 0, 0, 0.3);
}

.program-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 15px;
}

.program-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.215;
  color: #000000;
  margin-bottom: 12px;
}

.program-description {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.215;
  color: #404040;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Load More Section */
.load-more-section {
  text-align: center;
  margin-top: 28px;
}

.load-more-btn {
  background-color: #1674bb;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 11px;
  font-family: "Cabin", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.215;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 109px;
  height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.load-more-btn:hover {
  background-color: #0d5a8a;
}

/* Modal Styles */
.program-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.program-modal .modal-content {
  background: #fff;
  margin: 5% auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  border-radius: 10px;
  width: 95%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.program-modal .close-modal {
  position: absolute;
  top: clamp(10px, 2vw, 15px);
  right: clamp(15px, 3vw, 25px);
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
}

.program-modal .close-modal:hover {
  color: #1674bb;
}

.modal-slideshow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0 1.5rem 0;
}

.slide-btn {
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: #555;
  padding: 0 15px;
  transition: color 0.3s ease;
}

.slide-btn:hover {
  color: #1674bb;
}

.slide-image-container {
  width: 600px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
}

.slide-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slide-indicators {
  text-align: center;
  margin-top: 1rem;
}

.slide-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 4px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slide-dot:hover {
  background: #888;
}

.slide-dot.active {
  background: #1674bb;
}

@media (max-width: 850px) {
  .program-modal .modal-content {
    max-width: 95vw;
    padding: 2rem;
  }
  .slide-image-container {
    width: 500px;
    height: 350px;
  }
}

@media (max-width: 600px) {
  .program-modal .modal-content {
    max-width: 98vw;
    padding: 1.5rem;
  }
  .slide-image-container {
    width: 98vw;
    height: 250px;
  }
}

/* Responsive Design */
@media (max-width: 991px) {
  .projects-hero {
    height: 400px;
  }

  .hero-title {
    font-size: 48px;
  }

  .programs-section {
    padding: 40px 0 0;
  }

  .section-title {
    font-size: 28px;
  }

  .search-container {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .search-field {
    font-size: 16px;
  }

  .filter-buttons {
    justify-content: center;
  }

  .filter-btn {
    flex: 1;
    max-width: 150px;
  }

  .year-filter {
    flex: 1;
    max-width: 150px;
    font-size: 14px;
    min-width: 100px;
  }

  .program-title {
    font-size: 22px;
  }

  .program-description {
    font-size: 15px;
  }
}

@media (max-width: 767px) {
  .projects-hero {
    height: 350px;
  }

  .hero-title {
    font-size: 42px;
  }

  .programs-section {
    padding: 30px 0 0;
  }

  .section-title {
    font-size: 24px;
  }

  .search-container {
    gap: 15px;
  }

  .search-field {
    height: 35px;
    font-size: 15px;
  }

  .filter-btn {
    height: 38px;
    font-size: 14px;
    padding: 10px 15px;
  }

  .year-filter {
    height: 38px;
    font-size: 14px;
    padding: 10px 15px;
    padding-right: 30px;
    min-width: 90px;
  }

  .programs-grid {
    gap: 20px;
  }

  .program-card {
    height: auto;
    min-height: 120px;
    padding: 15px;
  }

  .program-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .program-description {
    font-size: 14px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .load-more-btn {
    height: 38px;
    font-size: 14px;
    padding: 10px 20px;
  }
}

@media (max-width: 575px) {
  .projects-hero {
    height: 300px;
  }

  .hero-title {
    font-size: 36px;
  }

  .programs-section {
    padding: 20px 0 0;
  }

  .section-title {
    font-size: 22px;
  }

  .search-field {
    height: 32px;
    font-size: 14px;
    padding: 8px 10px;
  }

  .filter-btn {
    height: 35px;
    font-size: 13px;
    padding: 8px 12px;
  }

  .year-filter {
    height: 35px;
    font-size: 13px;
    padding: 8px 12px;
    padding-right: 25px;
    min-width: 80px;
    background-size: 14px;
  }

  .program-card {
    padding: 12px;
    min-height: 300px;
  }

  .program-card img {
    height: 150px;
  }

  .program-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .program-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .load-more-btn {
    height: 35px;
    font-size: 13px;
    padding: 8px 16px;
  }

  .modal-slideshow {
    gap: 1rem;
  }

  .slide-image-container {
    width: 100%;
    height: 250px;
  }

  .slide-btn {
    padding: 5px;
    font-size: 2rem;
  }

  .program-modal .modal-content {
    margin: 2% auto;
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.5rem;
    margin-right: 2rem;
  }
}
