.gallery-hero {
  position: relative;
  padding: 5.5rem 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 92%, rgba(31, 169, 219, 0.34), transparent 28%),
    linear-gradient(135deg, #172453 0%, #24437f 60%, #1e729c 100%);
  color: white;
}

.gallery-hero-shape {
  position: absolute;
  border: 64px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.gallery-hero-shape-one {
  top: -220px;
  right: -160px;
  width: 460px;
  height: 460px;
}

.gallery-hero-shape-two {
  bottom: -220px;
  left: 35%;
  width: 390px;
  height: 390px;
}

.gallery-hero .container {
  position: relative;
  z-index: 1;
}

.gallery-breadcrumb {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  gap: 0.5rem;
}

.gallery-breadcrumb:hover,
.gallery-breadcrumb:focus {
  color: white;
  text-decoration: none;
}

.gallery-eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  color: #82dcff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-hero h1 {
  margin-bottom: 1.25rem;
  color: white;
  font-size: clamp(3.4rem, 7vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.gallery-hero p {
  max-width: 590px;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.75;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gallery-hero-visual {
  position: relative;
  height: 470px;
  margin-left: 2.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.75rem;
  box-shadow: 0 32px 70px rgba(4, 14, 40, 0.35);
}

.gallery-hero-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 24, 60, 0.72));
  content: "";
}

.gallery-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.gallery-hero-note {
  position: absolute;
  z-index: 1;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  background: rgba(18, 36, 79, 0.76);
  backdrop-filter: blur(12px);
  gap: 0.9rem;
}

.gallery-hero-note-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #45b8e4;
  color: white;
  font-size: 1.2rem;
}

.gallery-hero-note strong,
.gallery-hero-note small {
  display: block;
}

.gallery-hero-note small {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.gallery-collection {
  padding: 6rem 0;
  background: #f5f7fb;
}

.gallery-collection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
}

.gallery-collection-heading .gallery-eyebrow {
  color: #167da9;
}

.gallery-collection-heading h2 {
  margin-bottom: 0.75rem;
  color: #17213d;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.gallery-collection-heading p {
  max-width: 630px;
  margin: 0;
  color: #66718a;
  line-height: 1.7;
}

.gallery-count {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid #dfe6f0;
  border-radius: 999px;
  background: white;
  color: #1f2f63;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 240px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #1f2f63;
  box-shadow: 0 16px 36px rgba(31, 47, 99, 0.13);
  color: white;
  grid-column: span 4;
}

.gallery-card--feature {
  grid-column: span 8;
  grid-row: span 2;
}

.gallery-card--wide {
  grid-column: span 8;
}

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

.gallery-card--feature img {
  object-position: center 20%;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 20, 50, 0.05) 30%, rgba(9, 20, 50, 0.88) 100%);
  transition: background 200ms ease;
}

.gallery-card-expand {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(16, 34, 77, 0.72);
  color: white;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-card-copy {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
}

.gallery-card-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #87dcff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gallery-card-copy strong,
.gallery-card-copy > span:last-child {
  display: block;
}

.gallery-card-copy strong {
  color: white;
  font-size: 1.25rem;
  line-height: 1.2;
}

.gallery-card-copy > span:last-child:not(.gallery-card-kicker) {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  line-height: 1.45;
}

.gallery-card:hover,
.gallery-card:focus {
  color: white;
  outline: none;
  text-decoration: none;
}

.gallery-card:hover img,
.gallery-card:focus img {
  transform: scale(1.045);
}

.gallery-card:hover .gallery-card-overlay,
.gallery-card:focus .gallery-card-overlay {
  background: linear-gradient(180deg, rgba(9, 20, 50, 0.18) 10%, rgba(9, 20, 50, 0.92) 100%);
}

.gallery-card:hover .gallery-card-expand,
.gallery-card:focus .gallery-card-expand {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(31, 169, 219, 0.38), 0 16px 36px rgba(31, 47, 99, 0.18);
}

.gallery-empty {
  padding: 5rem 2rem;
  border: 1px solid #e0e7f0;
  border-radius: 1.5rem;
  background: white;
  text-align: center;
}

.gallery-empty > span {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: #eaf7fc;
  color: #1fa9db;
  font-size: 1.8rem;
}

.gallery-empty h2 {
  color: #17213d;
  font-weight: 700;
}

.gallery-empty p {
  color: #66718a;
}

.gallery-lightbox {
  width: min(94vw, 80rem);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
  background: #101b39;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5);
  color: white;
}

.gallery-lightbox::backdrop {
  background: rgba(5, 11, 28, 0.92);
  backdrop-filter: blur(4px);
}

.gallery-lightbox__shell {
  display: flex;
  max-height: 94vh;
  flex-direction: column;
}

.gallery-lightbox__toolbar,
.gallery-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  gap: 1rem;
}

.gallery-lightbox__toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox__brand {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.5rem;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
}

.gallery-lightbox__close {
  width: 42px;
  height: 42px;
}

.gallery-lightbox__stage {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  background: #081027;
  flex: 1;
}

.gallery-lightbox__image {
  display: block;
  width: 100%;
  max-height: calc(94vh - 150px);
  object-fit: contain;
}

.gallery-lightbox__nav {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.gallery-lightbox__previous {
  left: 1rem;
}

.gallery-lightbox__next {
  right: 1rem;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus,
.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus {
  border-color: rgba(255, 255, 255, 0.42);
  background: white;
  color: #1f2f63;
  outline: none;
}

.gallery-lightbox__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox__title {
  display: block;
  color: white;
}

.gallery-lightbox__caption {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

.gallery-lightbox__counter {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .gallery-hero {
    padding: 4.5rem 0;
  }

  .gallery-hero-visual {
    height: 420px;
    margin: 2.5rem 0 0;
  }

  .gallery-card {
    grid-column: span 6;
  }

  .gallery-card--feature,
  .gallery-card--wide {
    grid-column: span 12;
  }
}

@media (max-width: 575.98px) {
  .gallery-hero {
    padding: 3.5rem 0;
  }

  .gallery-breadcrumb {
    margin-bottom: 2rem;
  }

  .gallery-hero h1 {
    font-size: 3.2rem;
  }

  .gallery-hero-actions .btn {
    width: 100%;
  }

  .gallery-hero-visual {
    height: 360px;
    border-radius: 1.25rem;
  }

  .gallery-hero-note {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .gallery-collection {
    padding: 4rem 0;
  }

  .gallery-collection-heading {
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-direction: column;
  }

  .gallery-grid {
    grid-auto-rows: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-card,
  .gallery-card--feature,
  .gallery-card--wide {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-card--feature {
    aspect-ratio: 5 / 4;
  }

  .gallery-card-expand {
    opacity: 1;
    transform: none;
  }

  .gallery-lightbox {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .gallery-lightbox__shell {
    max-height: 100vh;
  }

  .gallery-lightbox__image {
    max-height: calc(100vh - 160px);
  }

  .gallery-lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .gallery-lightbox__previous {
    left: 0.6rem;
  }

  .gallery-lightbox__next {
    right: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card img,
  .gallery-card-expand {
    transition: none;
  }
}
