.gallery-main {
  padding-block: 2rem 4rem;
}

.gallery-hero {
  text-align: center;
  padding-block: 2rem 1rem;
}

.gallery-hero h1 {
  margin: 0 auto;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.gallery-intro {
  margin: 1.25rem auto 0;
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1.65;
}

.gallery-intro a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(13, 107, 114, 0.3);
  text-underline-offset: 3px;
}

.gallery-intro a:hover {
  text-decoration-color: var(--primary);
}

/* ── Carousel ── */
.carousel-section {
  padding-block: 1.5rem;
}

.carousel-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 16 / 5;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 1.6rem 1.3rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.carousel-slide-badge {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.carousel-slide-badge.ai {
  background: rgba(163, 61, 86, 0.85);
}

.carousel-slide-badge.photo {
  background: rgba(31, 122, 76, 0.85);
}

.carousel-slide-caption {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  z-index: 2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: var(--shadow-md);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 0;
}

.carousel-dot.active {
  background: #fff;
  border-color: #fff;
}

/* ── Grid ── */
.gallery-grid-section {
  padding-block: 2rem;
}

.gallery-grid-header {
  margin-bottom: 1.5rem;
}

.gallery-grid-header h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: -0.03em;
}

.gallery-grid-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.gallery-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.gallery-card-info {
  padding: 0.85rem 1rem;
}

.gallery-card-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-card-badge.ai {
  background: rgba(163, 61, 86, 0.1);
  color: var(--danger);
}

.gallery-card-badge.photo {
  background: rgba(31, 122, 76, 0.1);
  color: var(--success);
}

.gallery-card-caption {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

/* ── CTA ── */
.gallery-cta {
  padding-block: 1rem 2rem;
}

.cta-card {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.cta-card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.cta-card p {
  margin: 0 auto 1.5rem;
  max-width: 50ch;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.55;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 2rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(13, 107, 114, 0.25);
}

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

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

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background 0.15s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: -3.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.lightbox-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.lightbox-badge.ai {
  background: rgba(163, 61, 86, 0.85);
  color: #fff;
}

.lightbox-badge.photo {
  background: rgba(31, 122, 76, 0.85);
  color: #fff;
}

.lightbox-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

/* ── Navigation ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.55rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(13, 107, 114, 0.06);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .carousel-slide {
    aspect-ratio: 16 / 5.5;
  }
}

@media (max-width: 720px) {
  .gallery-main {
    padding-block: 1rem 3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .carousel-slide {
    aspect-ratio: 4 / 2.2;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
  }

  .carousel-btn svg {
    width: 16px;
    height: 16px;
  }

  .carousel-prev {
    left: 0.5rem;
  }

  .carousel-next {
    right: 0.5rem;
  }

  .lightbox-content {
    max-width: 96vw;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
  }

  .lightbox-caption {
    flex-direction: column;
    white-space: normal;
    text-align: center;
  }

  .site-nav {
    gap: 0.1rem;
  }

  .nav-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
