/* ── Manthan AI Photo Galleries ── */

.manthan-gallery-preview,
.manthan-gallery-page {
  position: relative;
  z-index: 1;
}

.manthan-gallery-preview {
  padding: 28px 0 80px;
}

.manthan-gallery-page {
  padding: 80px 0 40px;
  flex: 1;
}

.manthan-gallery-page > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#gallery_hub_view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#gallery_hub_view .gallery-back-link {
  align-self: flex-start;
  width: auto;
  margin-bottom: 20px;
  padding: 5px 12px 5px 10px;
  font-size: 12px;
  gap: 6px;
}

#gallery_hub_view .gallery-hub-hero {
  flex-shrink: 0;
  margin-bottom: 28px;
}

#gallery_hub_view #gallery_album_list {
  padding-bottom: 8px;
}

#gallery_dialogue_view {
  flex: 1;
}

/* Shared typography */
.gallery-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(236, 192, 85, 0.12);
  border: 1px solid rgba(236, 192, 85, 0.35);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #ecc055;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.manthan-gallery-preview .section-heading,
.gallery-hub-hero {
  text-align: center;
  margin-bottom: 48px;
}

.manthan-gallery-preview .section-title,
.gallery-hub-hero .section-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #c7dbe6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.manthan-gallery-preview .section-subtitle,
.gallery-hub-hero .section-subtitle {
  color: #a7bebd;
  font-size: 16px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

/* Breadcrumb nav */
.gallery-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
}

.gallery-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.gallery-breadcrumb a:hover {
  color: #ecc055;
}

.gallery-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.gallery-breadcrumb-current {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* ── Gallery album cards — dialogue card format, photo-first header ── */
.gallery-album-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  opacity: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gallery-album-card:hover {
  color: inherit;
  text-decoration: none;
  transform: translateY(-8px);
  border-color: rgba(236, 192, 85, 0.4);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 30px rgba(236, 192, 85, 0.1);
}

.gallery-album-card .dialogue-gallery-link {
  pointer-events: none;
}

.gallery-album-card-header {
  line-height: 0;
}

.gallery-album-card-image {
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  background: #0c2236;
  transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-album-card:hover .gallery-album-card-image {
  transform: scale(1.04);
}

.gallery-album-card .dialogue-card-header::after {
  aspect-ratio: 21 / 10;
  background: linear-gradient(
    180deg,
    rgba(17, 49, 73, 0.05) 0%,
    rgba(12, 34, 54, 0.35) 55%,
    rgba(12, 34, 54, 0.82) 100%
  );
}

.gallery-album-card .dialogue-title {
  font-family: 'CoalhandLuke', cursive, sans-serif;
  font-size: 28px;
  font-weight: normal;
  letter-spacing: 0.5px;
}

.gallery-photo-row.is-last {
  justify-content: flex-start;
}

.gallery-photo-row.is-single {
  justify-content: flex-start;
}

/* ── Dialogue gallery hero banner ── */
.gallery-dialogue-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}

.gallery-dialogue-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gallery-dialogue-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.gallery-dialogue-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 20, 32, 0.97) 0%,
    rgba(8, 20, 32, 0.75) 40%,
    rgba(8, 20, 32, 0.35) 100%
  );
}

.gallery-dialogue-hero-content {
  position: relative;
  z-index: 1;
  padding: 36px 40px 40px;
  width: 100%;
}

.gallery-dialogue-hero-content .gallery-dialogue-page-title,
.gallery-dialogue-hero-content .dialogue-title {
  font-family: 'CoalhandLuke', cursive, sans-serif;
  font-size: 36px;
  font-weight: normal;
  margin: 0 0 16px;
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  text-align: left;
  line-height: 1.25;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.gallery-dialogue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.gallery-meta-chip i {
  color: #ecc055;
  font-size: 11px;
}

.gallery-meta-chip.is-accent {
  color: #1f3130;
  background: #ecc055;
  border-color: #ecc055;
}

/* ── Photo grid panel ── */
.gallery-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.gallery-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.gallery-panel-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  letter-spacing: 0.2px;
}

.gallery-panel-header span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.gallery-photo-grid {
  display: block;
  width: 100%;
  max-width: none;
}

.gallery-photo-grid:not(.is-ready) {
  min-height: 240px;
}

.gallery-loading {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.gallery-photo-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-photo-row.is-last {
  justify-content: flex-start;
}

.gallery-photo-item {
  display: block;
  flex: 0 0 auto;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 0;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-photo-item:hover {
  border-color: rgba(236, 192, 85, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.gallery-photo-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
}

.gallery-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-photo-item:hover .gallery-photo-overlay {
  opacity: 1;
}

.gallery-photo-overlay i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(236, 192, 85, 0.95);
  color: #1f3130;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gallery-photo-index {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-photo-item:hover .gallery-photo-index {
  opacity: 0;
}

/* Hub back link */
.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 32px;
  padding: 8px 16px 8px 12px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.25s ease;
}

.gallery-back-link:hover {
  color: #ecc055;
  border-color: rgba(236, 192, 85, 0.35);
  background: rgba(236, 192, 85, 0.08);
}

/* ── Lightbox ── */
.manthan-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 14, 24, 0.96);
  backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 72px 32px;
  box-sizing: border-box;
}

.manthan-lightbox.is-open {
  display: flex;
}

.manthan-lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
}

.manthan-lightbox-topbar > * {
  pointer-events: auto;
}

.manthan-lightbox-title {
  font-family: 'CoalhandLuke', cursive, sans-serif;
  font-size: 16px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.4px;
}

.manthan-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(1200px, 100%);
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  pointer-events: none;
}

.manthan-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.manthan-lightbox-close,
.manthan-lightbox-prev,
.manthan-lightbox-next {
  border: none;
  background: rgba(20, 32, 44, 0.92);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.manthan-lightbox-close:hover,
.manthan-lightbox-prev:hover,
.manthan-lightbox-next:hover {
  background: #ecc055;
  color: #1f3130;
  border-color: #ecc055;
  transform: scale(1.06);
}

.manthan-lightbox-close {
  position: relative;
  z-index: 21;
}

.manthan-lightbox-prev,
.manthan-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

.manthan-lightbox-prev:hover,
.manthan-lightbox-next:hover {
  transform: translateY(-50%) scale(1.06);
}

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

.manthan-lightbox-counter {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.5px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .gallery-dialogue-hero-content {
    padding: 28px 24px 32px;
  }

  .gallery-dialogue-hero-content .dialogue-title,
  .gallery-dialogue-hero-content .gallery-dialogue-page-title {
    font-size: 28px;
  }

  .manthan-lightbox {
    padding: 64px 56px 24px;
  }

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

@media (max-width: 767px) {
  .manthan-gallery-page {
    padding-top: 76px;
  }

  .manthan-gallery-preview .section-title,
  .gallery-hub-hero .section-title {
    font-size: 30px;
  }

  .gallery-photo-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .gallery-panel {
    padding: 0;
  }

  .gallery-dialogue-hero {
    min-height: 240px;
    border-radius: 14px;
  }

  .manthan-lightbox {
    padding: 56px 12px 16px;
  }

  .manthan-lightbox-close,
  .manthan-lightbox-prev,
  .manthan-lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

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

@media (min-width: 768px) and (max-width: 991px) {
  .gallery-photo-row {
    gap: 10px;
    margin-bottom: 10px;
  }
}

@media (min-width: 1200px) {
  .gallery-photo-row {
    gap: 12px;
    margin-bottom: 12px;
  }
}
