@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&family=Roboto+Slab:wght@400;600&display=swap');

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto Slab', serif;
  color: #ccc;
  background: #0d0d0d;
  overflow-x: hidden;
  padding-top: 140px; /* Desktop header offset */
}

.background {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, #1a1a1a, #000);
  z-index: -2;
}

/* ===== Sections & Typography ===== */
.section {
  padding: 120px 8% 80px;
}

h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

/* ===== Before/After Toggle Grid ===== */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 60px;
}

.before-after-toggle {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
}

.before-after-toggle img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
  user-select: none;
  pointer-events: none;
}

.before-after-toggle .after {
  opacity: 0;
  z-index: 2;
}

.before-after-toggle.active .after {
  opacity: 1;
}

/* ===== Toggle Buttons ===== */
.before-btn,
.after-btn {
  position: absolute;
  top: 10px;
  background: #ffcc00cc;
  color: #000;
  padding: 6px 14px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  font-size: 0.9rem;
  font-family: 'Orbitron', sans-serif;
  z-index: 4;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.before-btn {
  left: 10px;
}

.after-btn {
  right: 10px;
}

.before-btn:hover,
.after-btn:hover {
  background: #ffd633cc;
}

/* ===== More Pictures Text ===== */
.more-pictures-text {
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  text-align: center;
  margin: 40px 0 20px;
}

/* ===== Auto-Scrolling Gallery ===== */
.auto-scroll-row {
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  border: 5px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
}

.auto-scroll-track {
  display: flex;
  width: max-content;
  animation: scroll-left 35s linear infinite;
}

.auto-scroll-track.paused {
  animation-play-state: paused;
}

.auto-scroll-track.scroll-right {
  animation: scroll-right 35s linear infinite;
}

.scroll-card {
  flex: 0 0 auto;
  margin-right: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  width: 300px;
}

.scroll-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ===== Scroll Animations ===== */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-20%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-15%); }
  100% { transform: translateX(0); }
}

/* ===== Responsive Navigation ===== */
.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #ffcc00;
  cursor: pointer;
  z-index: 11;
}

/* ===== Media Queries ===== */
@media (max-width: 768px) {
  .hamburger { display: block; }

  body { padding-top: 50px; }

  nav#primary-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    width: 200px;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    display: none;
  }

  nav#primary-navigation a {
    display: block;
    margin: 15px 0;
  }

  nav#primary-navigation.show {
    display: flex;
  }
}

/* ===== Desktop Specific Gallery Padding ===== */
@media (min-width: 769px) {
  body.gallery-page .section {
    padding: 60px 8% 60px; /* Reduced spacing for gallery only */
  }
}
