.cbh-gallery {
  position: relative;
  width: 100%;
  color: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.cbh-gallery__stage {
  height: var(--cbh-gallery-height, 520px);
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.cbh-gallery--hero .cbh-gallery__stage {
  height: min(var(--cbh-gallery-height, 620px), 620px);
}

.cbh-gallery__slide {
  appearance: none;
  border: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease;
  cursor: zoom-in;
  background: #0f172a;
}

.cbh-gallery__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.cbh-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cbh-gallery__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .8), rgba(15, 23, 42, .38) 65%, rgba(15, 23, 42, .12));
  pointer-events: none;
}

.cbh-gallery__hero-content {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100% - 1180px) / 2));
  top: 52%;
  transform: translateY(-50%);
  max-width: 680px;
  padding: 24px;
}

.cbh-gallery__hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1;
  margin: 0 0 24px;
  color: #fff;
  font-weight: 700;
}

.cbh-gallery__hero-content p {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.5;
  max-width: 650px;
  margin: 0 0 28px;
}

.cbh-gallery__cta {
  display: inline-flex;
  min-height: 48px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  background: #0a4976;
  color: #f8fafc !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  border-radius: 9999px;
  padding: 14px 32px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}

.cbh-gallery__nav,
.cbh-gallery__light-prev,
.cbh-gallery__light-next,
.cbh-gallery__close {
  position: absolute;
  z-index: 5;
  border: 0;
  background: rgba(15, 23, 42, .68);
  color: #fff;
  cursor: pointer;
}

.cbh-gallery__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 54px;
  font-size: 36px;
}

.cbh-gallery__nav--prev { left: 12px; }
.cbh-gallery__nav--next { right: 12px; }

.cbh-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.cbh-gallery__thumb {
  border: 3px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  height: 75px;
  opacity: .7;
}

.cbh-gallery__thumb.is-active {
  border-color: #0a4976;
  opacity: 1;
}

.cbh-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cbh-gallery__lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  background: rgba(0, 0, 0, .93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 58px;
}

.cbh-gallery__lightbox[hidden] { display: none; }

.cbh-gallery__lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
}

.cbh-gallery__close {
  top: 16px;
  right: 20px;
  font-size: 38px;
  width: 48px;
  height: 48px;
}

.cbh-gallery__light-prev,
.cbh-gallery__light-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 42px;
}

.cbh-gallery__light-prev { left: 10px; }
.cbh-gallery__light-next { right: 10px; }
.cbh-gallery-open { overflow: hidden; }

.cbh-gallery-notice {
  padding: 16px;
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  color: #0f172a;
}

.cbh-maze-header {
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 24px;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(4px);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.cbh-maze-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cbh-maze-header__logo img {
  display: block;
  width: 227px;
  max-width: 44vw;
  height: auto;
}

.cbh-maze-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.cbh-maze-header__nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #0f172a !important;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.cbh-maze-header__nav span {
  font-weight: 400;
  color: #475569;
  margin-right: .3em;
}

.cbh-maze-footer {
  padding: 32px 24px;
  text-align: center;
  background: #0f172a;
  color: #cbd5e1;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.cbh-maze-footer p { margin: 4px 0; }

.cbh-maze-footer a {
  color: #f8fafc !important;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 560px; }
  .cbh-gallery__hero-content { max-width: 620px; }
}

@media (max-width: 680px) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 500px; }
  .cbh-gallery__hero-content {
    left: 0;
    top: 55%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 20px 42px;
  }
  .cbh-gallery__hero-content h1 {
    font-size: clamp(2rem, 9vw, 2.65rem);
    line-height: 1.04;
    margin-bottom: 16px;
  }
  .cbh-gallery__hero-content p {
    font-size: .97rem;
    line-height: 1.4;
    margin-bottom: 20px;
  }
  .cbh-gallery__cta {
    min-height: 46px;
    padding: 12px 24px;
    font-size: 16px;
  }
  .cbh-gallery__nav { width: 44px; }
  .cbh-gallery__lightbox { padding: 48px 38px; }
  .cbh-gallery__thumb { min-height: 55px; height: 55px; }
  .cbh-maze-header { padding: 10px 14px; }
  .cbh-maze-header__inner { gap: 10px; }
  .cbh-maze-header__nav { gap: 12px; font-size: 14px; }
  .cbh-maze-header__nav span { display: none; }
  .cbh-maze-header__logo img { max-width: 37vw; }
  .cbh-maze-footer { padding: 26px 16px; }
}

@media (max-width: 430px) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 480px; }
  .cbh-maze-header__nav { gap: 9px; font-size: 13px; }
  .cbh-maze-header__logo img { max-width: 35vw; }
}

@media (max-width: 380px) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 460px; }
  .cbh-gallery__hero-content { padding: 18px 36px; }
  .cbh-gallery__hero-content h1 { font-size: clamp(1.8rem, 8.8vw, 2.15rem); }
  .cbh-maze-header__nav > a:first-child { display: none; }
  .cbh-maze-header__nav { font-size: 13px; }
  .cbh-maze-header__logo img { max-width: 43vw; }
}

@media (max-width: 340px) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 445px; }
  .cbh-gallery__hero-content p { font-size: .9rem; }
}

@media (max-height: 600px) and (orientation: landscape) {
  .cbh-gallery--hero .cbh-gallery__stage { height: 440px; }
  .cbh-gallery__hero-content h1 { font-size: 2rem; margin-bottom: 12px; }
  .cbh-gallery__hero-content p { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cbh-gallery__slide { transition: none; }
}
