:root {
  --gallery-navy: #072854;
  --gallery-purple: #8753d4;
  --gallery-purple-dark: #7040be;
  --gallery-lilac: #f0e8ff;
  --gallery-surface: #f8f7fc;
}

.gallery-page { color: var(--gallery-navy); }

.gallery-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 64px;
  background:
    radial-gradient(circle at 82% 30%, rgba(153, 100, 231, .23), transparent 25%),
    linear-gradient(120deg, #faf8ff 0%, #efe6ff 100%);
}

.gallery-hero::after {
  position: absolute;
  right: -75px;
  bottom: -180px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(135, 83, 212, .16);
  border-radius: 50%;
  content: "";
}

.gallery-breadcrumb { margin-bottom: 42px; font-size: 12px; }
.gallery-breadcrumb a { color: var(--gallery-purple-dark); text-decoration: none; }
.gallery-breadcrumb .active { color: #667085; }

.gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--gallery-purple-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gallery-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.04;
}

.gallery-hero p { max-width: 740px; margin: 18px 0 0; color: #596579; font-size: 17px; line-height: 1.75; }

.gallery-hero-mark {
  display: grid;
  width: 130px;
  height: 130px;
  place-items: center;
  border: 1px solid rgba(135, 83, 212, .22);
  border-radius: 40px;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 20px 50px rgba(63, 37, 104, .12);
  color: var(--gallery-purple);
  font-size: 46px;
  transform: rotate(5deg);
}

.gallery-list-section, .gallery-grid-section { padding: 76px 0 92px; background: #fff; }

.gallery-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.gallery-section-heading span { color: var(--gallery-purple-dark); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.gallery-section-heading h2 { margin: 7px 0 0; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.035em; }
.gallery-section-heading > p { margin: 0; color: #7c8597; font-size: 13px; }

.gallery-albums-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px;
}

.gallery-album-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #e8e3ef;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(23, 38, 70, .08);
  color: inherit;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-album-card:hover { transform: translateY(-5px); box-shadow: 0 26px 65px rgba(44, 24, 79, .15); }
.gallery-album-collage { position: relative; display: grid; grid-template-columns: 1.65fr 1fr; grid-template-rows: repeat(2, 125px); gap: 4px; min-width: 0; overflow: hidden; background: var(--gallery-lilac); }
.gallery-album-collage img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-album-cover { grid-row: 1 / 3; }
.gallery-album-collage.gallery-preview-1 .gallery-album-cover { grid-column: 1 / -1; }
.gallery-album-collage.gallery-preview-2 { grid-template-columns: 1fr 1fr; }
.gallery-album-collage.gallery-preview-2 .gallery-album-cover,
.gallery-album-collage.gallery-preview-2 img:not(.gallery-album-cover) { grid-row: 1 / 3; }
.gallery-album-card:hover img { transform: scale(1.035); }

.gallery-photo-count {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 40, 84, .9);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.gallery-album-body { display: flex; min-height: 290px; flex-direction: column; justify-content: space-between; gap: 28px; padding: 28px; }
.gallery-album-label { color: var(--gallery-purple-dark); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.gallery-album-body h3 { margin: 12px 0; font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.gallery-album-body p { margin: 0; color: #687386; font-size: 14px; line-height: 1.7; }
.gallery-open-album { display: inline-flex; align-items: center; gap: 10px; color: var(--gallery-purple-dark); font-size: 13px; font-weight: 800; }
.gallery-open-album i { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--gallery-lilac); transition: transform .25s ease, background .25s ease, color .25s ease; }
.gallery-album-card:hover .gallery-open-album i { background: var(--gallery-purple); color: #fff; transform: translate(3px, -3px); }

.gallery-detail-hero { padding-bottom: 50px; }
.gallery-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.gallery-detail-heading > div:first-child { max-width: 850px; }
.gallery-detail-count { position: relative; z-index: 1; display: flex; width: 116px; height: 116px; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; border-radius: 34px; background: var(--gallery-purple); box-shadow: 0 18px 40px rgba(116, 66, 190, .25); color: #fff; }
.gallery-detail-count strong { font-size: 37px; font-weight: 800; line-height: 1; }
.gallery-detail-count span { margin-top: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; }

.gallery-grid-section { background: var(--gallery-surface); }
.gallery-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; color: #748096; font-size: 12px; }
.gallery-detail-toolbar a { display: inline-flex; align-items: center; gap: 9px; color: var(--gallery-purple-dark); font-weight: 800; text-decoration: none; }
.gallery-detail-toolbar span { display: inline-flex; align-items: center; gap: 8px; }

.gallery-photo-grid {
  column-count: 3;
  column-gap: 18px;
}
.gallery-photo {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 260px;
  margin: 0 0 18px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #e9e2f5;
  box-shadow: 0 12px 30px rgba(22, 34, 58, .08);
  break-inside: avoid;
  cursor: zoom-in;
  vertical-align: top;
}
.gallery-photo:nth-child(5n + 1) { height: 350px; }
.gallery-photo:nth-child(5n + 2) { height: 230px; }
.gallery-photo:nth-child(5n + 3) { height: 300px; }
.gallery-photo:nth-child(5n + 4) { height: 250px; }
.gallery-photo:nth-child(5n) { height: 320px; }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.gallery-photo > span { position: absolute; right: 16px; bottom: 16px; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 8px 20px rgba(0, 0, 0, .17); color: var(--gallery-purple-dark); font-size: 18px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.gallery-photo:hover img, .gallery-photo:focus-visible img { filter: brightness(.87); transform: scale(1.045); }
.gallery-photo:hover > span, .gallery-photo:focus-visible > span { opacity: 1; transform: none; }
.gallery-photo:focus-visible { outline: 3px solid var(--gallery-purple); outline-offset: 3px; }

.gallery-lightbox .modal-content { overflow: hidden; border: 0; border-radius: 24px; background: #041b3a; box-shadow: 0 30px 90px rgba(0, 0, 0, .45); }
.gallery-lightbox .modal-header { border: 0; padding: 18px 22px; color: #fff; }
.gallery-lightbox .modal-header span { color: #c8abea; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gallery-lightbox .modal-title { margin-top: 2px; font-size: 16px; font-weight: 800; }
.gallery-lightbox .modal-body { position: relative; display: grid; min-height: 340px; padding: 0; place-items: center; background: #020d1d; }
.gallery-lightbox .modal-body > img { display: block; width: 100%; max-height: calc(100vh - 180px); object-fit: contain; }
.gallery-lightbox-nav { position: absolute; z-index: 2; top: 50%; display: grid; width: 48px; height: 48px; padding: 0; place-items: center; border: 1px solid rgba(255, 255, 255, .38); border-radius: 50%; background: rgba(4, 27, 58, .72); color: #fff; font-size: 21px; transform: translateY(-50%); backdrop-filter: blur(8px); }
.gallery-lightbox-nav:hover { background: var(--gallery-purple); }
.gallery-lightbox-prev { left: 18px; }
.gallery-lightbox-next { right: 18px; }
.gallery-empty { padding: 70px 24px; border: 1px solid #e8e3ef; border-radius: 24px; background: #faf8fe; text-align: center; }
.gallery-empty i { display: block; margin-bottom: 15px; color: var(--gallery-purple); font-size: 42px; }
.gallery-empty h2 { margin-bottom: 8px; font-size: 24px; font-weight: 800; }
.gallery-empty p { margin: 0; color: #6d788a; font-size: 14px; }

@media (max-width: 991.98px) {
  .gallery-albums-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .gallery-album-collage { grid-template-rows: repeat(2, 135px); }
  .gallery-photo-grid { column-count: 2; }
}

@media (max-width: 575.98px) {
  .gallery-hero { padding: 24px 0 46px; }
  .gallery-breadcrumb { margin-bottom: 30px; }
  .gallery-hero h1 { font-size: 39px; }
  .gallery-hero p { font-size: 15px; line-height: 1.65; }
  .gallery-list-section, .gallery-grid-section { padding: 52px 0 62px; }
  .gallery-section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .gallery-album-collage { grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, 115px); }
  .gallery-albums-grid { grid-template-columns: 1fr; gap: 26px; }
  .gallery-album-body { padding: 26px 22px; }
  .gallery-detail-heading { align-items: start; flex-direction: column; }
  .gallery-detail-count { width: auto; height: auto; flex-direction: row; gap: 7px; padding: 11px 16px; border-radius: 999px; }
  .gallery-detail-count strong { font-size: 18px; }
  .gallery-detail-count span { margin: 0; }
  .gallery-detail-toolbar { align-items: start; flex-direction: column; }
  .gallery-photo-grid { column-gap: 12px; }
  .gallery-photo { height: 190px; margin-bottom: 12px; border-radius: 16px; }
  .gallery-photo:nth-child(4n + 1) { height: 250px; }
  .gallery-photo:nth-child(4n + 2) { height: 170px; }
  .gallery-photo:nth-child(4n + 3) { height: 220px; }
  .gallery-photo:nth-child(4n) { height: 185px; }
  .gallery-photo > span { width: 38px; height: 38px; opacity: 1; transform: none; }
  .gallery-lightbox .modal-dialog { margin: 10px; }
  .gallery-lightbox-nav { width: 40px; height: 40px; }
  .gallery-lightbox-prev { left: 10px; }
  .gallery-lightbox-next { right: 10px; }
}
