/* 38th Phoenix Company gallery — shared responsive styles */
.gallery-hero {
  background: radial-gradient(ellipse at 80% 20%, #8a66553b, transparent 62%), linear-gradient(145deg, #1b181b, #111112);
  padding: 88px 8% 48px;
  border-bottom: 1px solid var(--line);
}
.gallery-hero .eyebrow { margin-bottom: 16px; }
.gallery-hero h1 { font-size: clamp(45px, 6.8vw, 84px); max-width: 870px; }
.gallery-hero .intro { max-width: 700px; }
.gallery-hero .gallery-breadcrumb { font-size: 11px; display: inline-flex; align-items: center; gap: 10px; color: var(--accent); margin-bottom: 40px; }
.gallery-breadcrumb:hover { color: white; }
.gallery-nav-link { color: var(--accent); }
.gallery-panel { padding: 70px 8%; }
.gallery-panel--dark { background: #171617; }
.gallery-section-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.gallery-section-header h2 { margin: 0; }
.gallery-section-header > p { color: var(--muted); font-size: 12px; max-width: 320px; margin: 0; }
.featured-viewer { border: 1px solid var(--line); background: #242023; }
.feature-stage { position: relative; width: 100%; aspect-ratio: 16 / 8.4; min-height: 300px; display: block; overflow: hidden; padding: 0; background: radial-gradient(circle at 50% 40%, #43342f, #121112 80%); border: 0; color: inherit; cursor: zoom-in; }
.feature-stage:before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#c1a99e10 1px, transparent 1px), linear-gradient(90deg,#c1a99e10 1px, transparent 1px); background-size: 58px 58px; z-index: 0; pointer-events: none; }
.feature-stage img { display: block; position: relative; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.feature-stage.is-insignia img { width: min(38%, 330px); height: min(80%, 330px); margin: 0 auto; object-fit: contain; }
.feature-stage.is-insignia { display: flex; align-items: center; justify-content: center; }
.feature-overlay { position: absolute; bottom: 18px; left: 22px; z-index: 2; color: #e7ddd8; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 1px 9px #000; }
.feature-info { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 22px 26px; }
.feature-info h3 { margin-bottom: 6px; font-size: 23px; font-weight: 500; }
.feature-info p { margin: 0; font-size: 12px; color: var(--muted); }
.feature-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gallery-icon-btn { border: 1px solid #665b58; background: #1b191b; color: var(--text); cursor: pointer; padding: 10px 15px; min-width: 42px; font: inherit; font-size: 12px; }
.gallery-icon-btn:hover, .gallery-icon-btn:focus-visible { background: #3d3331; border-color: var(--accent); }
.gallery-counter { font-size: 11px; color: var(--muted); min-width: 50px; text-align: center; }
.gallery-note { margin: 15px 0 0; font-size: 12px; color: var(--muted); }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 29px; }
.gallery-filter { padding: 9px 15px; background: transparent; border: 1px solid #625652; color: #d0c6c2; font: inherit; font-size: 11px; cursor: pointer; }
.gallery-filter[aria-pressed="true"], .gallery-filter:hover { background: var(--accent); color: #191617; border-color: var(--accent); }
.gallery-result-count { margin: 0 0 22px; color: var(--muted); font-size: 11px; letter-spacing: .6px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.gallery-card { border: 1px solid var(--line); background: #242123; color: var(--text); text-align: left; padding: 0; cursor: zoom-in; display: flex; flex-direction: column; min-width: 0; }
.gallery-card:hover, .gallery-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.media-frame { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle, #4f3a34, #141316 72%); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.media-frame:before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#d5bbb00f 1px, transparent 1px), linear-gradient(90deg,#d5bbb00f 1px, transparent 1px); background-size: 40px 40px; }
.media-frame img { display: block; width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.media-frame.is-insignia img { width: 68%; height: 80%; object-fit: contain; }
.gallery-card-copy { padding: 19px; min-height: 115px; }
.gallery-card-copy .eyebrow { font-size: 8px; margin: 0 0 8px; }
.gallery-card-copy h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; font-weight: 500; }
.gallery-card-copy p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.gallery-empty { border: 1px dashed #71615d; padding: 45px 30px; text-align: center; color: var(--muted); }
.gallery-empty h3 { color: var(--text); font-weight: 500; font-size: 24px; }
.gallery-empty p { margin: 0 auto; max-width: 480px; }
.gallery-outro { padding: 65px 8%; background: radial-gradient(ellipse at 50% 85%, #9a72662a, transparent 75%); border-top: 1px solid var(--line); text-align: center; }
.gallery-outro p { color: var(--muted); max-width: 580px; margin: 10px auto 24px; }
.gallery-outro .button { margin: 0 auto; }
.home-gallery { background: #191719; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-gallery .section-head { gap: 30px; }
.home-gallery .section-head > p { max-width: 370px; }
.gallery-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.gallery-preview-tile { min-width: 0; background: #252123; border: 1px solid var(--line); }
.gallery-preview-tile .media-frame { aspect-ratio: 4 / 3; }
.gallery-preview-tile h3 { padding: 15px 17px; margin: 0; font-size: 15px; font-weight: 500; }
.home-gallery .preview-action { display: inline-flex; margin-top: 28px; }
.lightbox { width: min(96vw, 1200px); max-width: none; max-height: 94vh; overflow: auto; padding: 0; border: 1px solid #806a62; background: #181617; color: var(--text); }
.lightbox::backdrop { background: #000e; }
.lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; }
.lightbox-top > span { font-size: 10px; letter-spacing: 1.7px; color: var(--accent); }
.lightbox-media { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #3a2e2a, #0d0c0e 75%); max-height: min(67vh, 780px); min-height: 220px; }
.lightbox-media img { display: block; width: 100%; height: auto; max-height: min(67vh, 780px); object-fit: contain; }
.lightbox-media.is-insignia img { width: min(70%, 520px); max-height: 58vh; aspect-ratio: 1; object-fit: contain; }
.lightbox-footer { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 20px; }
.lightbox-footer h3 { font-weight: 500; margin: 0 0 5px; font-size: 23px; }
.lightbox-footer p { font-size: 12px; color: var(--muted); margin: 0; }
.lightbox-controls { display: flex; align-items: center; gap: 9px; }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-preview-grid { gap: 12px; }
}
@media (max-width: 650px) {
  .gallery-hero { padding: 45px 6% 40px; }
  .gallery-panel { padding: 55px 6%; }
  .gallery-section-header { display: block; }
  .gallery-section-header > p { margin-top: 18px; }
  .feature-stage { min-height: 220px; aspect-ratio: 4 / 3; }
  .feature-stage.is-insignia img { width: min(60%, 230px); height: auto; }
  .feature-info { display: block; padding: 18px; }
  .feature-actions { margin-top: 16px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-preview-grid { grid-template-columns: 1fr; }
  .home-gallery .section-head { display: block; }
  .lightbox-footer { display: block; }
  .lightbox-controls { margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card:hover { transform: none; }
}


/* Portrait propaganda posters: preserve complete artwork and all lettering. */
.gallery-card .media-frame.is-poster {
  aspect-ratio: 4 / 5;
  background: #171617;
}
.gallery-card .media-frame.is-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lightbox-media.is-poster {
  max-height: 80vh;
  min-height: 240px;
}
.lightbox-media.is-poster img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}
/* Keep gallery navigation discoverable on small devices. */
@media (max-width: 650px) {
  nav > a.gallery-nav-link {
    display: inline-flex !important;
  }
  nav {
    gap: 8px;
  }
  .brand {
    letter-spacing: .5px;
  }
}
@media (max-width: 380px) {
  .gallery-nav-link {
    font-size: 10px;
  }
  header {
    padding-left: 3%;
    padding-right: 3%;
  }
}
