.gallery-page {
  flex: 1;
  min-height: 100vh;
  padding: 48px;
  box-sizing: border-box;

  color: #eee4d3;

  background:
    radial-gradient(
      circle at 88% 10%,
      rgba(151, 93, 43, 0.2),
      transparent 28%
    ),
    radial-gradient(
      circle at 8% 85%,
      rgba(103, 43, 35, 0.15),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #171310,
      #2a1d17
    );
}

.gallery-header {
  width: min(1180px, 100%);
  margin: 0 auto 32px;
  padding: 38px;
  box-sizing: border-box;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.015)
    );

  border: 1px solid rgba(213, 168, 95, 0.34);
  border-radius: 20px;

  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gallery-eyebrow {
  display: block;
  margin-bottom: 10px;

  color: #bd8d50;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gallery-header h1 {
  margin: 0;

  color: #f1d39a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.gallery-header p {
  max-width: 720px;
  margin: 18px 0 0;

  color: #cdbda7;
  font-size: 1.05rem;
  line-height: 1.7;
}

.gallery-grid {
  width: min(1180px, 100%);
  margin: 0 auto;

  columns: 4;
  column-gap: 14px;
}

.gallery-item {
  position: relative;

  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 0 14px;
  padding: 0;
  overflow: hidden;

  break-inside: avoid;

  background: #100d0b;
  border: 1px solid rgba(213, 168, 95, 0.24);
  border-radius: 12px;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22);

  cursor: zoom-in;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.gallery-item:hover {
  transform: translateY(-3px);

  background: #100d0b;
  border-color: rgba(231, 188, 112, 0.65);

  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item:focus-visible {
  outline: 3px solid rgba(241, 211, 154, 0.55);
  outline-offset: 3px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;

  transition:
    transform 350ms ease,
    filter 350ms ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
  filter: brightness(0.85);
}

.gallery-item-overlay {
  position: absolute;
  inset: auto 0 0;

  display: flex;
  align-items: flex-end;

  min-height: 72px;
  padding: 16px;
  box-sizing: border-box;

  opacity: 0;

  background:
    linear-gradient(
      to top,
      rgba(12, 8, 6, 0.92),
      transparent
    );

  transition: opacity 180ms ease;
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-name {
  overflow: hidden;

  color: #f2d49b;
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-status,
.gallery-error,
.gallery-empty {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 32px;
  box-sizing: border-box;

  color: #cdbda7;
  text-align: center;

  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(213, 168, 95, 0.22);
  border-radius: 14px;
}

.gallery-error {
  color: #ffd0ca;
  background: rgba(137, 38, 31, 0.2);
  border-color: rgba(207, 92, 80, 0.45);
}

.gallery-empty h2 {
  margin: 0 0 10px;
  color: #e6b86d;
}

.gallery-empty p {
  margin: 0;
  line-height: 1.6;
}

/* Full-screen image viewer */

.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 42px;
  box-sizing: border-box;

  background: rgba(8, 6, 5, 0.94);
  backdrop-filter: blur(12px);
}

.gallery-lightbox-content {
  display: flex;
  flex-direction: column;

  max-width: min(1200px, calc(100vw - 140px));
  max-height: calc(100vh - 80px);
}

.gallery-lightbox-content img {
  display: block;

  max-width: 100%;
  max-height: calc(100vh - 140px);

  object-fit: contain;

  border: 1px solid rgba(233, 194, 126, 0.3);
  border-radius: 10px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.65);
}

.gallery-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;

  padding: 14px 4px 0;

  color: #dfc9a4;
  font-size: 0.92rem;
}

.gallery-lightbox-count {
  flex-shrink: 0;
  color: #9f8f7b;
}

.gallery-lightbox-control {
  position: fixed;
  z-index: 1001;

  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;

  color: #f3ddb5;
  background: rgba(27, 18, 13, 0.78);

  border: 1px solid rgba(231, 188, 112, 0.45);
  border-radius: 50%;

  font-size: 2rem;
  line-height: 1;

  backdrop-filter: blur(8px);
}

.gallery-lightbox-control:hover {
  color: #21160f;
  background: #e0b369;
}

.gallery-lightbox-close {
  top: 20px;
  right: 20px;
}

.gallery-lightbox-previous {
  top: 50%;
  left: 20px;

  transform: translateY(-50%);
}

.gallery-lightbox-next {
  top: 50%;
  right: 20px;

  transform: translateY(-50%);
}
.gallery-sections {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.gallery-section {
  margin-bottom: 24px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(213, 168, 95, 0.22);
  border-radius: 16px;

  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.18);
}

.gallery-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  min-height: 0;
  padding: 26px 30px;

  color: inherit;
  text-align: left;

  background:
    linear-gradient(
      135deg,
      rgba(136, 71, 40, 0.18),
      rgba(255, 255, 255, 0.02)
    );

  border: 0;
  border-radius: 0;

  cursor: pointer;
}

.gallery-section-header:hover {
  background:
    linear-gradient(
      135deg,
      rgba(136, 71, 40, 0.28),
      rgba(255, 255, 255, 0.035)
    );
}

.gallery-section-header:focus-visible {
  outline: 3px solid rgba(241, 211, 154, 0.55);
  outline-offset: -3px;
}

.gallery-section-heading {
  min-width: 0;
}

.gallery-section-eyebrow {
  display: block;
  margin-bottom: 7px;

  color: #9f7650;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-section-heading h2 {
  margin: 0;

  color: #e9c486;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
}

.gallery-section-heading p {
  margin: 8px 0 0;

  color: #a99780;
  font-size: 0.92rem;
  line-height: 1.55;
}

.gallery-section-caret {
  flex-shrink: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  color: #d8ad69;
  font-size: 2rem;
  line-height: 1;

  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.gallery-section-caret.open {
  transform: rotate(90deg);
}

.gallery-section .gallery-grid {
  width: auto;
  margin: 0;
  padding: 20px;
}

@media (max-width: 1100px) {
  .gallery-grid {
    columns: 3;
  }
}

@media (max-width: 800px) {
  .gallery-page {
    padding: 28px;
  }

  .gallery-header {
    padding: 30px;
  }

  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 560px) {
  .gallery-page {
    padding: 16px;
  }

  .gallery-header {
    padding: 24px;
    border-radius: 14px;
  }

  .gallery-grid {
    columns: 1;
  }

  .gallery-item-overlay {
    opacity: 1;
  }

  .gallery-lightbox {
    padding: 60px 12px 24px;
  }

  .gallery-lightbox-content {
    max-width: 100%;
  }

  .gallery-lightbox-content img {
    max-height: calc(100vh - 150px);
  }

  .gallery-lightbox-previous {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }

  .gallery-lightbox-control {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }
}