/* HUSSEIN_GALLERY_V1 */

.hl-gallery {
  background:#eee6e2;
  color:#211d21;
  padding:110px 0 115px;
}

.hl-gallery-heading {
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:50px;
  align-items:end;
  margin-bottom:38px;
}

.hl-gallery-eyebrow {
  color:#8d435a;
  font:600 11px "DM Sans",sans-serif;
  letter-spacing:.2em;
}

.hl-gallery h2 {
  font-size:clamp(46px,5.5vw,82px);
  line-height:1.3;
  letter-spacing:-.065em;
  margin:20px 0 0;
}

.hl-gallery h2 em {
  display:block;
  color:#944b62;
  font-style:normal;
}

.hl-gallery-heading p {
  font-size:14px;
  line-height:2.2;
  color:#73696d;
  max-width:380px;
  margin:0 0 10px;
}

.hl-gallery-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:20px;
}

.hl-gallery-toolbar button {
  min-height:44px;
  border:1px solid #cbbabc;
  padding:10px 22px;
  background:transparent;
  color:#4e4349;
  font-weight:600;
  border-radius:2px;
}

.hl-gallery-toolbar button[aria-pressed="true"] {
  background:#762d3f;
  color:#fff8f3;
  border-color:#762d3f;
}

.hl-gallery-grid {
  display:grid;
  grid-template-columns:1.2fr .8fr;
  grid-template-rows:repeat(2,260px);
  gap:16px;
  min-width:0;
}

.hl-gallery-card {
  appearance:none;
  display:block;
  width:100%;
  height:100%;
  min-width:0;
  position:relative;
  isolation:isolate;
  border:0;
  padding:0;
  overflow:hidden;
  cursor:zoom-in;
  background:#29252a;
  color:white;
  text-align:right;
}

.hl-gallery-grid[data-mode="all"]
.hl-gallery-card:first-child {
  grid-row:span 2;
}

.hl-gallery-card img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease;
}

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

.hl-gallery-card::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    0deg,rgba(17,14,19,.88),
    transparent 70%
  );
  pointer-events:none;
}

.hl-gallery-caption {
  position:absolute;
  bottom:27px;
  right:28px;
  left:28px;
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.hl-gallery-caption small {
  color:#e4bac5;
  font:600 10px "DM Sans",sans-serif;
  letter-spacing:.17em;
}

.hl-gallery-caption strong {
  color:#fff8f3;
  font-size:clamp(21px,2.5vw,34px);
}

.hl-gallery-play {
  position:absolute;
  z-index:2;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border:1px solid #ffffffb8;
  border-radius:50%;
  background:#1c171bbb;
  color:white;
  font-size:22px;
}

.hl-gallery-pending,
.hl-gallery-empty {
  padding:30px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:25px;
  background:linear-gradient(140deg,#6b3044,#262027);
  color:#fff8f3;
}

.hl-gallery-pending small,
.hl-gallery-empty small {
  color:#ddb4c0;
  letter-spacing:.16em;
  font-size:10px;
}

.hl-gallery-pending strong,
.hl-gallery-empty strong {
  display:block;
  font-size:clamp(22px,2.6vw,35px);
  line-height:1.5;
  margin-bottom:10px;
}

.hl-gallery-pending p,
.hl-gallery-empty p {
  color:#e5cbd2;
  font-size:12px;
  line-height:2;
  margin:0;
}

.hl-gallery-grid[data-mode="photo"],
.hl-gallery-grid[data-mode="video"] {
  grid-template-rows:minmax(350px,auto);
}

.hl-gallery-grid[data-mode="photo"]
.hl-gallery-card:first-child,
.hl-gallery-grid[data-mode="video"]
.hl-gallery-card:first-child {
  grid-row:auto;
}

.hl-gallery-empty {
  grid-column:1/-1;
  min-height:280px;
}

.hl-gallery-disclaimer {
  color:#7c6e73;
  font-size:11px;
  line-height:2;
  margin:22px 0 0;
}

.hl-gallery-dialog {
  position:fixed;
  inset:0;
  margin:auto;
  max-width:min(920px,94vw);
  max-height:90dvh;
  width:max-content;
  min-width:min(500px,90vw);
  padding:18px;
  overflow:auto;
  background:#19171c;
  color:#fff8f3;
  border:1px solid #8c6e7b;
}

.hl-gallery-dialog::backdrop {
  background:#08060ad9;
}

#hl-gallery-viewer {
  max-height:75dvh;
  display:grid;
  place-items:center;
}

#hl-gallery-viewer img,
#hl-gallery-viewer video {
  display:block;
  max-width:100%;
  max-height:72dvh;
  width:auto;
  height:auto;
  object-fit:contain;
}

#hl-gallery-caption {
  font-size:13px;
  padding:12px 5px 0;
  margin:0;
}

.hl-dialog-close {
  position:sticky;
  top:0;
  z-index:5;
  display:block;
  margin:0 0 8px auto;
  min-width:44px;
  min-height:44px;
  background:#fff8f3;
  color:#24191e;
  border:0;
  font-size:28px;
  cursor:pointer;
}

@media(max-width:900px) {
  .hl-gallery {padding:75px 0}
  .hl-gallery-heading {
    grid-template-columns:1fr;
    gap:18px;
  }
}

@media(max-width:650px) {
  .hl-gallery h2 {
    font-size:clamp(38px,9vw,56px);
  }

  .hl-gallery-grid,
  .hl-gallery-grid[data-mode="photo"],
  .hl-gallery-grid[data-mode="video"] {
    grid-template-columns:1fr;
    grid-template-rows:auto;
    gap:12px;
  }

  .hl-gallery-card,
  .hl-gallery-grid[data-mode="all"]
  .hl-gallery-card:first-child {
    grid-row:auto;
    min-height:320px;
  }

  .hl-gallery-card:first-child {
    min-height:380px;
  }

  .hl-gallery-pending {
    min-height:200px;
  }

  .hl-gallery-toolbar button {
    flex:1;
    padding:9px 12px;
  }

  .hl-gallery-caption {
    bottom:20px;
    right:20px;
  }
}

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