/* ===========================
   Gallery Page Overrides
   =========================== */
.gallery-page-panel {
  margin-top: 0;
  min-height: 100vh;
  border-radius: 0;
  padding-top: 80px;
}

/* ===========================
   Featured Carousel
   =========================== */
.featured-photo {
  margin-top: 1rem;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-card-bg);
  border: 1px solid var(--panel-card-border);
  position: relative;
}

.featured-carousel-wrapper {
  position: relative;
  width: 100%;
}

.featured-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  max-height: 60vh;
  overflow: hidden;
}

.featured-slide img {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.featured-slide:hover img {
  transform: scale(1.02);
}

/* Arrow buttons */
.featured-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  width: 42px;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.featured-photo:hover .featured-arrow {
  opacity: 1;
}

.featured-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
}

.featured-arrow svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.featured-arrow--left {
  left: 0;
  border-radius: 0;
}

.featured-arrow--right {
  right: 0;
  border-radius: 0;
}

/* Dot indicators */
.featured-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0 0.25rem;
}

.featured-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel-card-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.featured-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* Info bar */
.featured-photo_info {
  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.featured-info_row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--panel-muted);
}

.featured-info_row svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
}

.featured-info_row.row-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--panel-text);
}

.featured-info_row.row-title svg {
  display: none;
}

.featured-info_row .keyword-tag {
  display: inline-block;
  background: var(--panel-card-border);
  color: var(--panel-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===========================
   Filters
   =========================== */
.gallery-filters {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--panel-text);
}

.filter-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 0.25rem; /* slight padding for active states if any overflow */
}

.filter-tags::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.filter-tag {
  flex-shrink: 0;
  background: var(--panel-card-bg);
  color: var(--panel-muted);
  border: 1px solid var(--panel-card-border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  background: var(--panel-bg);
  color: var(--panel-text);
  border-color: var(--panel-text);
}

.filter-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-rating-pill {
  display: inline-flex;
  align-items: center;
  background: var(--panel-card-bg);
  border: 1px solid var(--panel-card-border);
  border-radius: 20px;
  padding: 0.2rem 1rem;
  gap: 0.5rem;
  width: max-content;
}

.filter-rating-all {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--panel-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-rating-all:hover, .filter-rating-all.active {
  color: var(--primary);
}

/* Rating mode toggle (<= / =) — borderless, text only, fixed width to prevent shifting */
.filter-rating-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Space Grotesk', monospace;
  color: var(--panel-muted);
  cursor: pointer;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  user-select: none;
  transition: color 0.2s ease;
}

.filter-rating-toggle:hover {
  color: var(--panel-text);
}

.filter-rating-divider {
  width: 1px;
  height: 16px;
  background: var(--panel-card-border);
  margin: 0 0.25rem;
}

.filter-star {
  color: var(--panel-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.filter-star:hover {
  transform: scale(1.2);
}

.filter-star.active {
  color: var(--primary);
}

/* ===========================
   Masonry Grid
   =========================== */
.gallery-masonry {
  display: flex;
  gap: 0.4rem;     
  margin-top: 1rem;
}

.masonry-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;          
}

.gallery-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-card-bg);
  border: 1px solid var(--panel-card-border);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.gallery-card img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover img {
  transform: scale(1.03);
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* 80% opaque grey background with subtle blur */
.lightbox_backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(45, 45, 45, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}

.lightbox_dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--panel-card-bg);
  border: 1px solid var(--panel-card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox.active .lightbox_dialog {
  transform: scale(1);
}

.lightbox_close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox_close:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.08);
}

.lightbox_image-wrapper {
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 200px;
  max-height: 68vh;
}

.lightbox_image-wrapper img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox_nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox_nav:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.lightbox_nav svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.lightbox_nav--prev {
  left: 12px;
}

.lightbox_nav--next {
  right: 12px;
}

.lightbox_nav.hidden {
  display: none;
}

.lightbox_info {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--panel-card-bg);
  border-top: 1px solid var(--panel-card-border);
  overflow-y: auto;
  max-height: 26vh;
}

.lightbox_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lightbox_title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--panel-text);
  line-height: 1.2;
}

.lightbox_caption {
  font-size: 0.92rem;
  color: var(--panel-muted);
  line-height: 1.5;
}

.lightbox_meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

/* Rating display in info sections */
.info-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1.15rem;
  line-height: 1;
}

.info-star.filled {
  color: var(--primary);
}

.info-star.empty {
  color: var(--panel-card-border);
  opacity: 0.35;
}
