:root {
  --container-pad: 48px;
  --container-left: max(var(--container-pad), calc((100% - 1200px) / 2));
}

@media (max-width: 1100px) {
  :root {
    --container-pad: 32px;
    --container-left: 32px;
  }
}

@media (max-width: 800px) {
  :root {
    --container-pad: 22px;
    --container-left: 22px;
  }
}

body.gallery-page {
  overflow-x: clip;
}

.gallery-hero {
  background: linear-gradient(115deg, #0b2341, #103a5c);
  padding: 65px 0;
  color: white;
}
.gallery-hero .eyebrow {
  color: #58d1e1;
}
.gallery-hero h1 {
  font-size: clamp(37px, 4.2vw, 58px);
}
.gallery-hero p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.85;
  color: #bad0df;
  margin-top: 20px;
  max-width: 670px;
}

.gallery-navigation {
  border-bottom: 1px solid var(--line);
  background: white;
  position: sticky;
  top: 79px;
  z-index: 15;
}
.gallery-tabs {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}
.gallery-tabs a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: #334155;
  transition: all 0.2s ease;
}
.gallery-tabs a:hover {
  color: var(--blue);
  border-color: #89bfdf;
  background: #f8fafc;
}
.gallery-tabs a > span {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--pale);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Gallery Section */
.gallery-section {
  padding: 60px 0 65px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 135px;
  overflow: clip;
}

.gallery-section-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

.gallery-head-copy {
  flex: 1 1 540px !important;
  max-width: 760px !important;
}
.gallery-head-copy h2 {
  font-size: 34px;
  margin-bottom: 12px;
  color: #0b2341;
}
.gallery-description {
  font-size: 15px;
  line-height: 1.75;
  color: #475569;
}

.gallery-head-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  padding-bottom: 4px !important;
}

.gallery-head-controls .slider-arrow {
  height: 42px !important;
  width: 42px !important;
  display: grid !important;
  place-items: center !important;
  background: white !important;
  border: 1px solid #d7e5ee !important;
  border-radius: 50% !important;
  color: var(--blue) !important;
  font-size: 18px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  box-shadow: 0 2px 6px rgba(11, 35, 65, 0.04) !important;
}

.gallery-head-controls .slider-arrow:hover:not(:disabled) {
  background: var(--blue) !important;
  color: white !important;
  border-color: var(--blue) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(11, 35, 65, 0.15) !important;
}

.gallery-head-controls .slider-arrow:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.gallery-head-controls .slide-counter {
  font-family: var(--heading, inherit) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  padding: 0 8px !important;
  min-width: 58px !important;
  text-align: center !important;
  letter-spacing: -0.01em !important;
}

/* Full Bleed Right Carousel Wrapper */
.gallery-carousel-wrapper {
  width: 100% !important;
  margin-top: 30px !important;
  position: relative !important;
}

body.gallery-page .catalog-carousel {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.gallery-page .slide-track {
  display: flex !important;
  gap: 22px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-left: var(--container-left) !important;
  padding-right: var(--container-pad) !important;
  padding-top: 6px !important;
  padding-bottom: 24px !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  cursor: grab !important;
}

body.gallery-page .slide-track.is-dragging {
  cursor: grabbing !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  user-select: none !important;
}

body.gallery-page .slide-track::-webkit-scrollbar {
  display: none !important;
}

/* Individual Multi-Column Cards */
body.gallery-page .catalog-slide {
  flex: 0 0 340px !important;
  width: 340px !important;
  min-width: 340px !important;
  max-width: 340px !important;
  margin: 0 !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: normal !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(11, 35, 65, 0.04) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

body.gallery-page .catalog-slide:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px -4px rgba(11, 35, 65, 0.1) !important;
  border-color: #89bfdf !important;
}

/* Picture Area */
body.gallery-page .slide-picture {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f4f8fb !important;
  height: 240px !important;
  min-height: 240px !important;
  padding: 22px !important;
  text-decoration: none !important;
  overflow: hidden !important;
}

body.gallery-page .slide-picture img {
  width: 100% !important;
  height: 196px !important;
  max-height: 196px !important;
  object-fit: contain !important;
  mix-blend-mode: normal !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.gallery-page .catalog-slide:hover .slide-picture img {
  transform: scale(1.04) !important;
}

body.gallery-page .zoom-hint {
  position: absolute !important;
  right: 12px !important;
  bottom: 12px !important;
  background: var(--blue) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 12px rgba(11, 35, 65, 0.2) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(6px) !important;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.gallery-page .slide-picture:hover .zoom-hint,
body.gallery-page .slide-picture:focus .zoom-hint,
body.gallery-page .slide-picture:focus-within .zoom-hint,
body.gallery-page .slide-picture:active .zoom-hint,
body.gallery-page .slide-picture.is-touched .zoom-hint,
body.gallery-page .catalog-slide:hover .zoom-hint,
body.gallery-page .catalog-slide:focus-within .zoom-hint {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Figcaption Below Picture */
body.gallery-page .catalog-slide figcaption {
  border-top: 1px solid var(--line) !important;
  padding: 18px 20px 22px !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  min-height: 108px !important;
}

body.gallery-page .catalog-slide figcaption strong {
  display: block !important;
  font-family: var(--heading) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0b2341 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.015em !important;
}

body.gallery-page .catalog-slide figcaption p {
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  color: #526b82 !important;
  margin-top: 6px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.gallery-note {
  font-size: 12px;
  color: #64748b;
  margin: 30px 0 50px;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 800px) {
  .gallery-hero {
    padding: 50px 0;
  }
  .gallery-navigation {
    top: 75px;
  }
  .gallery-section {
    padding: 45px 0 50px;
    scroll-margin-top: 115px;
  }
  .gallery-section-head {
    align-items: flex-start !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
  }
  .gallery-head-copy h2 {
    font-size: 28px;
  }
  .gallery-head-controls {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  body.gallery-page .catalog-slide {
    flex: 0 0 295px !important;
    width: 295px !important;
    min-width: 295px !important;
    max-width: 295px !important;
  }
  body.gallery-page .slide-picture {
    height: 210px !important;
    min-height: 210px !important;
    padding: 16px !important;
  }
  body.gallery-page .slide-picture img {
    height: 175px !important;
    max-height: 175px !important;
  }
  .gallery-tabs {
    gap: 10px;
  }
  .gallery-tabs a {
    font-size: 12px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .gallery-hero h1 {
    font-size: 34px;
  }
  .gallery-hero p:not(.eyebrow) {
    font-size: 14px;
  }
  .gallery-head-copy h2 {
    font-size: 24px;
  }
  .gallery-description {
    font-size: 13.5px;
  }
  body.gallery-page .catalog-slide {
    flex: 0 0 265px !important;
    width: 265px !important;
    min-width: 265px !important;
    max-width: 265px !important;
  }
  body.gallery-page .slide-picture {
    height: 185px !important;
    min-height: 185px !important;
    padding: 14px !important;
  }
  body.gallery-page .slide-picture img {
    height: 155px !important;
    max-height: 155px !important;
  }
  body.gallery-page .catalog-slide figcaption {
    padding: 14px 16px 18px !important;
    min-height: 95px !important;
  }
  .gallery-head-controls .slider-arrow {
    height: 38px !important;
    width: 38px !important;
    font-size: 16px !important;
  }
}
