/* ========== COMPLETED PROJECTS PAGE STYLES ========== */
/* Following the same design language as Mission and Vision page */

/* ===== RESET & BASE FIXES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Hero Section for Completed Projects */
#CompletedHero {
  min-height: 400px;
  padding: 120px 2rem 80px 2rem;
  background: var(--grad-navy);
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* Subtle radial light bloom — matches Mission and Vision hero */
#CompletedHero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 160, 27, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

#CompletedHero .completed-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
}

#CompletedHero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
}

#CompletedHero h1::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--grad-stripe, linear-gradient(90deg, #ffcd7e, #f9a01b));
  border-radius: 2px;
}

#CompletedHero p {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.75;
  margin-top: 1.5rem;
}

/* Completed Projects Section */
#CompletedSection {
  padding: 80px 2rem;
  background: var(--surface-light, #f8fafc);
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
}

/* Filter Dropdown */
.filter-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 40px;
  padding: 0;
  flex-wrap: wrap;
}

.filter-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #0b2b40;
  font-size: 0.95rem;
}

.year-dropdown {
  padding: 10px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0b2b40;
  background: white;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230b2b40' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.year-dropdown:hover {
  border-color: #f9a01b;
}

.year-dropdown:focus {
  outline: none;
  border-color: #f9a01b;
  box-shadow: 0 0 0 3px rgba(249, 160, 27, 0.2);
}

/* Projects Grid - 3x2 layout initially */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  width: 100%;
}

/* Project Card */
.project-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(11, 43, 64, 0.06);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
  border: 1px solid #e8edf2;
  width: 100%;
}

/* Hidden states used by Completed_Projects.js — a card is shown only when it has neither class */
.project-card.filter-hidden,
.project-card.more-hidden {
  display: none !important;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.3s; }
.project-card:nth-child(7) { animation-delay: 0.35s; }
.project-card:nth-child(8) { animation-delay: 0.4s; }
.project-card:nth-child(9) { animation-delay: 0.45s; }
.project-card:nth-child(10) { animation-delay: 0.5s; }
.project-card:nth-child(11) { animation-delay: 0.55s; }
.project-card:nth-child(12) { animation-delay: 0.6s; }
.project-card:nth-child(13) { animation-delay: 0.65s; }
.project-card:nth-child(14) { animation-delay: 0.7s; }
.project-card:nth-child(15) { animation-delay: 0.75s; }
.project-card:nth-child(16) { animation-delay: 0.8s; }
.project-card:nth-child(17) { animation-delay: 0.85s; }
.project-card:nth-child(18) { animation-delay: 0.9s; }

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 43, 64, 0.1);
  border-color: rgba(249, 160, 27, 0.2);
}

/* Project Image - supports both placeholder icons and real images */
.project-image {
  position: relative;
  height: 300px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0d2545, #1a4a6f);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Actual image styling - covers the container properly */
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

/* Placeholder icon styling */
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d2545, #1a4a6f);
  color: #ffcd7e;
  overflow: hidden;
}

.image-placeholder i {
  font-size: 5rem;
  opacity: 0.7;
}

/* Project Info - adjusted for removed description */
.project-info {
  padding: 20px 25px 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: #0b2b40;
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.4em * 3);
}

.project-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f9a01b;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.project-location i {
  font-size: 0.9rem;
}

/* View Details Link */
.view-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f9a01b;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.view-details i {
  transition: transform 0.3s ease;
}

.project-card:hover .view-details {
  color: #e08a0b;
}

.project-card:hover .view-details i {
  transform: translateX(5px);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 20px;
  padding: 20px 0;
}

.load-more-btn {
  background: var(--grad-navy, linear-gradient(135deg, #0d2545 0%, #1a4a6f 50%, #0b2b40 100%));
  color: white;
  border: 1px solid rgba(45, 112, 186, 0.3);
  padding: 13px 40px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm, 0 4px 15px rgba(11, 43, 64, 0.06));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
}

.load-more-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.load-more-btn:hover {
  background: var(--grad-amber, linear-gradient(90deg, #ffcd7e, #f9a01b));
  color: var(--navy-deep, #0b2b40);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(249, 160, 27, 0.3);
}

.load-more-btn:hover i {
  transform: translateY(3px);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  background: var(--grad-navy, linear-gradient(135deg, #0d2545 0%, #1a4a6f 50%, #0b2b40 100%));
  color: white;
  box-shadow: none;
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--amber);
  color: var(--navy-deep);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(249, 160, 27, 0.4);
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  transform: translateY(-5px);
  background: var(--amber-light);
  box-shadow: 0 10px 30px rgba(249, 160, 27, 0.5);
}

.back-to-top-btn:active {
  transform: scale(0.95);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets and smaller laptops */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  #CompletedSection {
    padding: 60px 1.5rem;
  }
}

/* Tablets */
@media (max-width: 992px) {
  #CompletedHero {
    min-height: 350px;
    padding: 100px 1.5rem 60px 1.5rem;
  }
  
  #CompletedHero h1 {
    font-size: 2.5rem;
  }
  
  #CompletedHero p {
    font-size: 1rem;
  }

  .filter-container {
    justify-content: center;
    padding: 0;
  }
}

/* Mobile phones */
@media (max-width: 768px) {
  #CompletedHero {
    min-height: 300px;
    padding: 80px 1rem 50px 1rem;
  }
  
  #CompletedHero h1 {
    font-size: 2rem;
  }
  
  #CompletedHero p {
    font-size: 0.9rem;
  }
  
  #CompletedSection {
    padding: 40px 1rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-image {
    height: 260px;
  }
  
  .image-placeholder i {
    font-size: 4rem;
  }
  
  .project-info {
    padding: 18px 20px 20px;
  }
  
  .project-info h3 {
    font-size: 1.1rem;
  }
  
  .load-more-btn {
    padding: 12px 35px;
    font-size: 0.95rem;
  }

  #backToTopBtn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    bottom: 20px;
    right: 20px;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0;
  }

  .year-dropdown {
    width: 100%;
    min-width: unset;
  }

  .filter-label {
    text-align: center;
  }
}

/* Small mobile phones */
@media (max-width: 480px) {
  #CompletedHero {
    padding: 70px 0.75rem 40px 0.75rem;
  }
  
  #CompletedHero h1 {
    font-size: 1.65rem;
  }
  
  #CompletedHero p {
    font-size: 0.85rem;
  }
  
  #CompletedSection {
    padding: 30px 0.75rem;
  }
  
  .projects-grid {
    gap: 1.2rem;
  }
  
  .project-image {
    height: 220px;
  }
  
  .image-placeholder i {
    font-size: 3.5rem;
  }
  
  .project-info {
    padding: 15px 16px 18px;
  }
  
  .project-info h3 {
    font-size: 1rem;
    min-height: calc(1.3em * 3);
  }
  
  .project-location {
    font-size: 0.8rem;
  }
  
  .view-details {
    font-size: 0.8rem;
  }
  
  .load-more-btn {
    padding: 10px 28px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }
  
  #backToTopBtn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 15px;
    right: 15px;
  }

  .filter-container {
    gap: 6px;
  }

  .year-dropdown {
    padding: 8px 16px;
    font-size: 0.85rem;
    background-position: right 12px center;
    padding-right: 36px;
  }
}