/* ─── PORTFOLIO SECTION ─── */

.portfolio-section {
  padding: 60px 0 80px 0;
}

.portfolio-intro {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 50px auto;
}

.portfolio-intro h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: #333;
}

.portfolio-intro p {
  font-family: "Nunito", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #666;
}

/* ─── FILTER BUTTONS ─── */

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 45px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: "Playfair Display", serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 1px solid #ccc;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #0b1a33;
  color: #ffffff;
  border-color: #0b1a33;
}

/* ─── GRID ─── */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #e0dedb;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.portfolio-item:hover img,
.portfolio-item:hover video {
  transform: scale(1.06);
  filter: brightness(0.7);
}

.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s ease;
}

.portfolio-item:hover .video-play-icon {
  background: rgba(198, 166, 103, 0.7);
  border-color: #c6a667;
}

.lightbox-content video {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border: 2px solid rgba(198, 166, 103, 0.3);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.portfolio-overlay span {
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ─── LIGHTBOX ─── */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border: 2px solid rgba(198, 166, 103, 0.3);
}

.lightbox-caption {
  margin-top: 16px;
  text-align: center;
}

.lightbox-caption h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lightbox-caption span {
  font-family: "Nunito", sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: -10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.lightbox-close:hover {
  border-color: #c6a667;
  color: #c6a667;
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1001;
}

.lightbox-arrow:hover {
  background: rgba(198, 166, 103, 0.25);
  border-color: #c6a667;
}

.lightbox-prev {
  left: 25px;
}
.lightbox-next {
  right: 25px;
}

.lightbox-counter {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Nunito", sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.15em;
  z-index: 1001;
}

/* ─── FILTER NAV (collapsed category strip) ─── */

.filter-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.filter-nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: transparent;
  color: #555;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.filter-nav-arrow:hover {
  background: #0b1a33;
  color: #fff;
  border-color: #0b1a33;
}

.filter-nav-label {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 28px;
  border: 1px solid #0b1a33;
  background: #0b1a33;
  color: #fff;
  cursor: default;
}

.filter-nav-back {
  font-family: "Playfair Display", serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1px solid #ccc;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-nav-back:hover {
  border-color: #0b1a33;
  color: #0b1a33;
}

/* ─── CATEGORY VIEW (grouped carousels) ─── */

.category-view {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-group {
  background: #fff;
  border: 1px solid #e8e0d4;
  overflow: hidden;
}

.project-group-header {
  padding: 18px 24px;
  background: #f7f5f2;
  border-bottom: 1px solid #e8e0d4;
}

.project-group-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0b1a33;
  margin: 0;
}

.project-group-header span {
  font-family: "Nunito", sans-serif;
  font-size: 0.8rem;
  color: #999;
  margin-left: 12px;
}

.project-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.project-carousel {
  display: flex;
  overflow: hidden;
  flex: 1;
}

.project-carousel .carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}

.project-carousel .carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 10;
  cursor: pointer;
}

.project-carousel .carousel-slide img,
.project-carousel .carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(11, 26, 51, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #0b1a33;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.carousel-arrow-btn:hover {
  background: #0b1a33;
  color: #fff;
  border-color: #0b1a33;
}

.carousel-arrow-prev {
  left: 12px;
}

.carousel-arrow-next {
  right: 12px;
}

.carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-family: "Nunito", sans-serif;
  font-size: 0.8rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.1em;
  z-index: 2;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .portfolio-section {
    padding: 40px 0 60px 0;
  }

  .portfolio-intro h2 {
    font-size: 1.6rem;
  }

  .portfolio-filters {
    gap: 8px;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .portfolio-overlay {
    transform: translateY(0);
    padding: 12px;
  }

  .portfolio-overlay h3 {
    font-size: 0.85rem;
  }
  .portfolio-overlay span {
    font-size: 0.75rem;
  }

  .lightbox-content img,
  .lightbox-content video {
    max-width: 95vw;
    max-height: 70vh;
  }

  .video-play-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .lightbox-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }

  .filter-nav {
    gap: 10px;
  }

  .filter-nav-arrow {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .filter-nav-label {
    font-size: 0.85rem;
    padding: 8px 20px;
  }

  .filter-nav-back {
    font-size: 0.7rem;
    padding: 6px 14px;
  }

  .category-view {
    gap: 24px;
  }

  .project-group-header {
    padding: 14px 16px;
  }

  .project-group-header h3 {
    font-size: 1rem;
  }

  .carousel-arrow-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .carousel-arrow-prev {
    left: 8px;
  }
  .carousel-arrow-next {
    right: 8px;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
