/* Prevent horizontal overflow from full-width slider */
.home-container,
.gallery-container {
  overflow-x: hidden;
}

[data-gallery-template] .swiper-button-prev,
[data-gallery-template] .swiper-button-next,
[data-gallery-template] .home--button-prev,
[data-gallery-template] .home--button-next {
  display: none !important;
}

.gc-empty {
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 16px;
}

.gc-template {
  width: 100%;
  margin: 0 auto;
  max-width: var(--dl-size-size-maxwidth);
  padding: 24px;
}

/* Full-width slider: edge-to-edge, no borders/padding */
[data-gallery-template="full-width-slider"] {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
[data-gallery-template="full-width-slider"] .gc-template.gc-fullwrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
}

.gc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.gc-single-shell {
  width: 90%;
  min-width: 280px;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

@media (min-width: 769px) {
  .gc-single-shell {
    width: 95%;
    min-width: 600px;
    max-width: 1100px;
  }
}

/* Main page (index): single slider 3x higher on desktop */
@media (min-width: 769px) {
  .home-container [data-gallery-template="single-slider"] .gc-single-shell {
    max-width: 2200px;
    min-width: 1000px;
    min-height: 840px;
  }

  .home-container [data-gallery-template="single-slider"] .gc-slide-inner .gc-card,
  .home-container [data-gallery-template="single-slider"] .gc-card--slider {
    min-height: 800px;
  }
}

.gc-single-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 320ms ease;
}

.gc-single-track .gc-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.gc-single-track .gc-slide-inner {
  width: 100%;
}

.gc-slider-shell {
  position: relative;
  overflow: hidden;
}

.gc-slider-track {
  display: flex;
  transition: transform 320ms ease;
}

.gc-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  gap: 14px;
  padding: 0 4px;
}

.gc-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.gc-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(201, 218, 241, 0.35);
  padding: 0;
  cursor: pointer;
  transition: all 0.16s ease;
}

.gc-dot:hover {
  background: rgba(201, 218, 241, 0.6);
}

.gc-dot.active {
  width: 16px;
  background: #9fc5ff;
}

.gc-fullwrap {
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.gc-fullwrap:active {
  cursor: grabbing;
}

.gc-full-track {
  display: flex;
  gap: 18px;
  width: max-content;
  transition: transform 280ms ease;
}

.gc-card {
  position: relative;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  animation: gc-card-fade-in 360ms ease-out both;
}

@keyframes gc-card-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gc-grid .gc-card {
  min-height: 320px;
}

.gc-card--slider {
  flex: 1 1 0;
  min-width: 0;
  min-height: 320px;
}

.gc-card--full {
  width: 420px;
  min-width: 420px;
  min-height: 280px;
}

.gc-media {
  position: absolute;
  inset: 0;
}

.gc-media > img,
.gc-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 320ms ease-in-out;
}

.gc-card.fade-swap .gc-media > img,
.gc-card.fade-swap .gc-media > video {
  opacity: 0;
}

.gc-media.gc-new-media > img,
.gc-media.gc-new-media > video {
  opacity: 0;
}

.gc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78));
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  transform: translateY(10px);
}

.gc-card:hover .gc-overlay,
.gc-card:focus-within .gc-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Intro: darker with name/year visible for 3s when first appearing, then fade to regular */
.gc-card.gc-intro .gc-overlay {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.82));
}
.gc-card.gc-intro .gc-media > img,
.gc-card.gc-intro .gc-media > video {
  opacity: 0.65;
}
.gc-card.gc-intro .gc-media > img,
.gc-card.gc-intro .gc-media > video,
.gc-card.gc-intro .gc-overlay {
  transition: opacity 400ms ease, transform 400ms ease;
}

.gc-overlay h3 {
  font-size: 16px;
  line-height: 1.2;
}

.gc-overlay p {
  margin-top: 4px;
  opacity: 0.85;
  font-size: 12px;
}

.gc-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.gc-popup.open {
  display: flex;
}

body.gc-popup-open {
  overflow: hidden;
}

.gc-popup-card {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 14px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
}

.gc-popup-media {
  position: relative;
  background: #070b14;
  overflow: hidden;
  min-height: 260px;
  flex-shrink: 0;
  display: flex;
  touch-action: pan-x;
}

.gc-popup-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 260px;
  transition: transform 280ms ease-out;
}

.gc-popup-slide {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
}

.gc-popup-slide img,
.gc-popup-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gc-popup-media img,
.gc-popup-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gc-popup-body {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 45vh;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

@media (max-width: 768px) {
  .gc-popup-body {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 45vh;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overflow-x: hidden;
  }
}

.gc-popup-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gc-popup-dots .gc-dot {
  background: rgba(255, 255, 255, 0.35);
}

.gc-popup-dots .gc-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.gc-popup-dots .gc-dot.active {
  background: #9fc5ff;
}

.gc-popup-close {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 10;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* On gallery page mobile: show only tile, hide full-width */
@media (max-width: 768px) {
  .gallery-container [data-gallery-template="full-width-slider"] {
    display: none;
  }
}

@media (max-width: 900px) {
  .gc-single-track .gc-slide {
    flex-wrap: nowrap;
  }
}

@media (max-width: 640px) {
  .gc-template {
    padding: 12px;
  }
  .gc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .gc-card--slider {
    flex: 1 1 100%;
    min-height: 280px;
  }
  .gc-card--full {
    flex: 0 0 380px;
    width: 380px;
    min-width: 380px;
    min-height: 260px;
  }
}
