/* ==========================================================================
   PORTFOLIO 4-COLUMN GALLERY GRID & LIGHTBOX MODAL (DIVINE INTERIORS)
   Matches user screenshot design:
   - Deep luxury dark theme (#0d0f12)
   - 4-column responsive grid
   - Top-left category badge (#ff4500)
   - Top-right index counter (01/24)
   - Bottom gradient with uppercase title & location
   - Hover accent border (#ff4500) and circular expand button
   - Fullscreen lightbox modal with nav arrows and counter (e.g. 18 / 63)
   ========================================================================== */

.rs-projects-gallery-section {
  background: #0d0f12 !important;
  color: #ffffff;
  padding: 3.5rem 2rem 5rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.rs-projects-gallery-container {
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
}

/* Header & Filter Controls */
.rs-projects-gallery-header {
  margin-bottom: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rs-projects-gallery-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.rs-projects-gallery-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
  line-height: 1.1;
}

.rs-projects-gallery-count-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  letter-spacing: 0.02em;
}

/* Filter Navigation */
.rs-projects-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
}

.rs-projects-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
}

.rs-projects-filter-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.rs-projects-filter-btn.is-active {
  background: #ff4500;
  color: #ffffff;
  border-color: #ff4500;
  box-shadow: 0 4px 14px rgba(255, 69, 0, 0.4);
}

/* 4-Column Grid */
.rs-projects-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .rs-projects-grid-4col {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 860px) {
  .rs-projects-grid-4col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .rs-projects-grid-4col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Project Image Card */
.rs-project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #14161a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  user-select: none;
}

.rs-project-card:hover,
.rs-project-card.is-active-hover {
  border-color: #ff4500;
  box-shadow: 0 8px 30px rgba(255, 69, 0, 0.35);
  transform: translateY(-2px);
}

.rs-project-card__img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.rs-project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

.rs-project-card:hover .rs-project-card__img {
  transform: scale(1.05);
}

/* Badges */
.rs-project-card__badge-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 69, 0, 0.45);
  color: #ff4500;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.2;
}

.rs-project-card__badge-idx {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace, sans-serif;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.2;
}

/* Gradient Vignette */
.rs-project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0.15) 0%,
    rgba(10, 12, 16, 0) 45%,
    rgba(10, 12, 16, 0.55) 70%,
    rgba(10, 12, 16, 0.96) 100%
  );
  transition: opacity 0.3s ease;
}

/* Bottom Information */
.rs-project-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rs-project-card__title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-project-card__hover-meta {
  display: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.rs-project-card__hover-cat {
  color: #ff4500;
}

.rs-project-card__hover-sep {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

.rs-project-card__hover-loc {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.rs-project-card:hover .rs-project-card__hover-meta {
  display: block;
}

.rs-project-card:hover .rs-project-card__location {
  display: none;
}

.rs-project-card:hover .rs-project-card__title {
  font-size: 14.5px;
}

.rs-project-card:hover .rs-project-card__img {
  transform: scale(1.04);
  filter: blur(1.5px) brightness(0.68);
}

/* Expand Icon Button (shown on hover) */
.rs-project-card__expand-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff4500;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 14px rgba(255, 69, 0, 0.45);
  pointer-events: none;
}

.rs-project-card:hover .rs-project-card__expand-btn {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   FULLSCREEN LIGHTBOX MODAL (SCREENSHOT 3 & 4)
   ========================================================================== */

.rs-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(8, 9, 12, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  user-select: none;
}

.rs-lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Top Navigation Bar */
.rs-lightbox-modal__bar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 14, 18, 0.85);
  flex-shrink: 0;
  box-sizing: border-box;
}

.rs-lightbox-modal__info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.rs-lightbox-modal__cat {
  color: #ff4500;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.rs-lightbox-modal__title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rs-lightbox-modal__loc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-lightbox-modal__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.rs-lightbox-modal__counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  font-weight: 600;
  font-family: monospace, sans-serif;
  letter-spacing: 0.04em;
}

.rs-lightbox-modal__close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.rs-lightbox-modal__close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  transform: scale(1.06);
}

/* Main Viewport Stage */
.rs-lightbox-modal__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 70px;
  box-sizing: border-box;
  overflow: hidden;
}

.rs-lightbox-modal__img-frame {
  max-width: 90vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs-lightbox-modal__main-img {
  max-width: 88vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85);
  transition: opacity 0.2s ease;
}

/* Nav Arrows */
.rs-lightbox-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  padding: 0;
}

.rs-lightbox-modal__arrow:hover {
  background: #ff4500;
  border-color: #ff4500;
  transform: translateY(-50%) scale(1.08);
}

.rs-lightbox-modal__arrow--prev {
  left: 20px;
}

.rs-lightbox-modal__arrow--next {
  right: 20px;
}

@media (max-width: 768px) {
  .rs-projects-gallery-section {
    padding: 2rem 1rem 3.5rem;
  }
  .rs-projects-gallery-title {
    font-size: 1.75rem;
  }
  .rs-lightbox-modal__stage {
    padding: 16px;
  }
  .rs-lightbox-modal__main-img {
    max-width: 94vw;
    max-height: 75vh;
  }
  .rs-lightbox-modal__arrow {
    width: 40px;
    height: 40px;
  }
  .rs-lightbox-modal__arrow--prev {
    left: 8px;
  }
  .rs-lightbox-modal__arrow--next {
    right: 8px;
  }
  .rs-lightbox-modal__loc {
    display: none;
  }
}
