/* public/css/projects.css */

/* ============================================
   PROJECTS HERO - MOBILE FIRST
   ============================================ */

.projects-hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/images/hero/projects-hero.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  /* margin-top: var(--nav-height); */
}

.projects-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-green);
}

.projects-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: 0 var(--spacing-sm);
}

.projects-hero-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.projects-hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--white);
  max-width: 600px;
  margin: 0 auto;
}

/* Projects Hero - Tablet */
@media (min-width: 768px) {
  .projects-hero {
    height: 60vh;
    min-height: 400px;
  }
  
  .projects-hero-title {
    font-size: 2.5rem;
  }
}

/* Projects Hero - Desktop */
@media (min-width: 1024px) {
  .projects-hero {
    background-attachment: fixed;
  }
  
  .projects-hero-title {
    font-size: 3rem;
  }
}


/* ============================================
   FILTER SECTION - MOBILE FIRST
   ============================================ */

.projects-filter {
  background-color: var(--white);
  padding: var(--spacing-md) 0;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.filter-btn.active {
  background-color: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

/* Filter - Tablet */
@media (min-width: 768px) {
  .filter-buttons {
    gap: var(--spacing-md);
  }
}


/* ============================================
   GALLERY GRID - MOBILE FIRST
   ============================================ */

.projects-gallery {
  background-color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: var(--spacing-md);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-category {
  color: var(--white);
  font-weight: 600;
  font-size: var(--font-size-lg);
}

/* Gallery - Tablet */
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Gallery - Desktop */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================================
   LIGHTBOX - MOBILE FIRST
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--border-radius-md);
}

.lightbox-caption {
  color: var(--white);
  margin-top: var(--spacing-md);
  text-align: center;
  font-size: var(--font-size-sm);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border-radius: var(--border-radius-md);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  top: var(--spacing-md);
  right: var(--spacing-md);
}

.lightbox-prev {
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
}

/* Lightbox - Tablet */
@media (min-width: 768px) {
  .lightbox-caption {
    font-size: var(--font-size-base);
  }
  
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 60px;
    height: 60px;
  }
}

/* Lightbox - Desktop */
@media (min-width: 1024px) {
  .lightbox-content {
    max-width: 1200px;
  }
}


/* ============================================
   PROJECTS CTA - MOBILE FIRST
   ============================================ */

.projects-cta {
  background-color: var(--dark-green);
  color: var(--white);
}

.projects-cta h2 {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.projects-cta p {
  color: var(--white);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-md);
}

.cta-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: center;
}

/* Projects CTA - Tablet */
@media (min-width: 768px) {
  .cta-options {
    flex-direction: row;
    justify-content: center;
  }
}