/* ============================
   Gallery Section
============================ */
.gallery-section {
  text-align: center;
  padding: 4rem 8%;
  background-color: #f5f5f5;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === Title === */
.gallery-title {
  font-weight: 700;
  font-size: 48px;
  color: #203147;
  margin-bottom: 0.5rem;
  text-shadow: rgba(128, 128, 128, 0.4) 2px 2px 4px;
  margin-top: 4rem;
}

.gallery-title span {
  color: #f7a600;
}

.gallery-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2rem;
}

/* === Define Heights using CSS Variables === */
:root {
  --gallery-height-desktop: 500px;
  --gallery-height-tablet: 600px;
  --gallery-height-mobile: 400px;
}

/* === Carousel Container === */
.curved-carousel {
  position: relative;
  width: 100%;
  height: var(--gallery-height-desktop);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

/* === Tape Background === */
.tape {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 450px;
  background: linear-gradient(to bottom, #1b2738, #0e1724);
  border-top: 20px solid #111;
  border-bottom: 20px solid #111;
  transform: translateY(-50%);
  overflow: hidden;
  box-sizing: border-box;
}

/* === Film Holes === */
.tape::before,
.tape::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 20px;
  background: repeating-linear-gradient(
    to right,
    #0c0c0c 0 25px,
    #ffffff 25px 50px
  );
  left: 0;
  z-index: 3;
}

.tape::before { top: 0; }
.tape::after { bottom: 0; }

/* === Carousel Track === */
.carousel-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  gap: 35px;
  width: max-content;
  animation: scroll 20s linear infinite;
  transform: translateY(-50%);
  z-index: 2;
}

.carousel-track img {
  width: 450px;
  height: 300px;
  border-radius: 8px;
  object-fit: cover;
  border: 8px solid #f7a600;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.carousel-track img:hover {
  transform: scale(1.05);
}

/* Infinite Scroll Animation */
@keyframes scroll {
  from { transform: translateX(0) translateY(-50%); }
  to { transform: translateX(-50%) translateY(-50%); }
}

/* Fade edges - removed for cleaner look */

/* Pause on hover */
.curved-carousel:hover .carousel-track {
  animation-play-state: paused;
}

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border: 8px solid #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox .close:hover { color: #f7a600; }

.download-btn {
  margin-top: 20px;
  background: #f7a600;
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.download-btn:hover { background: #ffb933; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hide floating weather/map launchers when lightbox is open */
body.lightbox-open .weather-icon-container,
body.lightbox-open .map-icon-container {
  display: none !important;
}

/* ============================
   Responsive
============================ */

/* Tablet */
@media (max-width: 992px) {
  .gallery-title { font-size: 3rem; }
  .gallery-subtitle { font-size: 1rem; }
  .carousel-track img { width: 350px; height: 230px; }
  .curved-carousel { height: var(--gallery-height-tablet); }
}

/* Mobile */
@media (max-width: 480px) {
  .gallery-title { font-size: 2.2rem; }
  .gallery-subtitle { font-size: 0.9rem; }
  .carousel-track { gap: 15px; }
  .carousel-track img { width: 250px; height: 180px; }
  .curved-carousel { height: var(--gallery-height-mobile); }
  .tape { height: 350px; }
}
