/* ============================================================
   GALLERY PAGE STYLES
   Editorial Collage Layout & Gallery Hero
   ============================================================ */

*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
}

a, button, input, textarea, select, [role="button"], [tabindex], label, summary, img, svg {
  -webkit-tap-highlight-color: transparent;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none;
}

.gallery-page-body {
  background-color: #08080a;
  color: #ffffff;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Subtle background grid matching portfolio vibe */
.gallery-bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 50% 15%, rgba(45, 45, 60, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 80% 60%, rgba(30, 30, 45, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 85%, rgba(40, 30, 50, 0.10) 0%, transparent 50%);
}

.gallery-main {
  position: relative;
  z-index: 1;
  padding-top: clamp(100px, 14vh, 140px);
  padding-bottom: clamp(60px, 8vh, 100px);
  width: 92vw;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Gallery Header Section */
.gallery-header {
  margin-top: clamp(52px, 6.5vh, 84px);
  margin-bottom: clamp(32px, 4.5vw, 56px);
  text-align: left;
}

.gallery-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.7px;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.2vw, 16px);
  white-space: nowrap;
}

.gallery-hyphen {
  color: #FFFFFF;
  display: inline-block;
  font-weight: 400;
}

/* ============================================================
   EDITORIAL COLLAGE CONTAINER
   Pixel-perfect recreate of supplied reference screenshot
   ============================================================ */

.gallery-collage {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  width: 100%;
}

/* Base item */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #121216;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.012);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  z-index: 2;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ------------------------------------------------------------
   AREA 1 (TOP): Large landscape on LEFT, 2 stacked on RIGHT
   Reference: Art 1 (300x201) | Art 2 (134x97) & Art 3 (134x96)
   Ratio: 2.25 : 1
   ------------------------------------------------------------ */
.gallery-row-1 {
  display: grid;
  grid-template-columns: 2.24fr 1fr;
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
}

.gallery-row-1 .art-panel-landscape {
  aspect-ratio: 300 / 201;
  width: 100%;
}

.gallery-stack-vertical {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  height: 100%;
}

.gallery-stack-vertical .gallery-item {
  flex: 1;
  width: 100%;
}

/* ------------------------------------------------------------
   AREA 2 (SECOND): Narrow frames on LEFT, Wide floral on RIGHT
   Reference: Art 4 (117x200) | Art 5 (316x200)
   Ratio: 1 : 2.7
   ------------------------------------------------------------ */
.gallery-row-2 {
  display: grid;
  grid-template-columns: 1fr 2.7fr;
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
}

.gallery-row-2 .art-panel-vertical-frames {
  aspect-ratio: 117 / 200;
  width: 100%;
}

.gallery-row-2 .art-panel-floral-wide {
  aspect-ratio: 316 / 200;
  width: 100%;
}

/* ------------------------------------------------------------
   AREA 3 & 4 (LOWER): 
   Left Column: Women Portrait + Folk Mask
   Right Multi: Row A (Fern + Terracotta), 
                Row B (3 squares: Blue, Birds, Pink), 
                Row C (Earrings + Lifestyle Interior)
   ------------------------------------------------------------ */
.gallery-row-lower {
  display: grid;
  grid-template-columns: 1.41fr 3fr;
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
}

/* Left Column: Stack of two portrait artworks */
.gallery-col-portrait-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  height: 100%;
}

.gallery-col-portrait-stack .art-panel-women {
  aspect-ratio: 139 / 187;
  flex: 1.15;
}

.gallery-col-portrait-stack .art-panel-mask {
  aspect-ratio: 139 / 163;
  flex: 1;
}

/* Right Multi Column */
.gallery-col-multi {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vw, 16px);
  height: 100%;
}

/* Sub-row A: Fern (1) + Terracotta Lines (2.08) */
.gallery-subrow-a {
  display: grid;
  grid-template-columns: 1fr 2.08fr;
  gap: clamp(10px, 1.2vw, 16px);
  aspect-ratio: 294 / 116;
}

/* Sub-row B: 3 items (Blue/gold, Bird stamps, Pink splash) */
.gallery-subrow-b {
  display: grid;
  grid-template-columns: 1fr 1.02fr 1fr;
  gap: clamp(10px, 1.2vw, 16px);
  aspect-ratio: 294 / 115;
}

/* Sub-row C: Earrings craft (1) + Lifestyle Interior (2.12) */
.gallery-subrow-c {
  display: grid;
  grid-template-columns: 1fr 2.12fr;
  gap: clamp(10px, 1.2vw, 16px);
  aspect-ratio: 294 / 110;
}

/* ============================================================
   RESPONSIVE DESIGN FOR GALLERY
   Graceful scaling down across tablets and mobile
   ============================================================ */

@media (max-width: 860px) {
  .gallery-main {
    width: 94vw;
    padding-top: 100px;
  }

  .gallery-header {
    margin-top: 24px;
    margin-bottom: 24px;
  }

  .gallery-title {
    white-space: nowrap;
    flex-wrap: nowrap;
    font-size: clamp(24px, 4.8vw, 42px);
    gap: clamp(8px, 1.2vw, 14px);
  }
}

@media (max-width: 680px) {
  .gallery-main {
    width: 95vw;
    padding-top: 84px;
  }

  .gallery-header {
    margin-top: 16px;
    margin-bottom: 20px;
  }

  .gallery-title {
    font-size: clamp(16px, 4.6vw, 24px);
    white-space: nowrap;
    flex-wrap: nowrap;
    gap: clamp(6px, 1.5vw, 10px);
  }

  /* Scale gaps down proportionally so the collage fits neatly on phone screens */
  .gallery-collage,
  .gallery-row-1,
  .gallery-stack-vertical,
  .gallery-row-2,
  .gallery-row-lower,
  .gallery-col-portrait-stack,
  .gallery-col-multi,
  .gallery-subrow-a,
  .gallery-subrow-b,
  .gallery-subrow-c {
    gap: clamp(4px, 1.4vw, 8px);
  }

  .gallery-item {
    border-radius: 3px;
  }
}

/* ============================================================
   GALLERY FOOTER BLEND
   Seamlessly dissolves the grid background into the solid black footer
   without any visible horizontal seam or edge ("imaginary line")
   ============================================================ */
.gallery-main {
  padding-bottom: 0 !important;
}

.gallery-footer-blend {
  width: 100%;
  height: clamp(120px, 16vh, 200px);
  margin-top: clamp(24px, 4vh, 48px);
  margin-bottom: -2px;
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 6, 0) 0%,
    rgba(6, 6, 6, 0.15) 20%,
    rgba(6, 6, 6, 0.45) 45%,
    rgba(2, 2, 3, 0.78) 70%,
    rgba(0, 0, 0, 0.95) 90%,
    #000000 100%
  );
  pointer-events: none;
  position: relative;
  z-index: 2;
}

.gallery-page-body .footer-section {
  background-color: #000000 !important;
  border-top: none !important;
  outline: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

/* ============================================================
   GALLERY BOTTOM SIGNATURE
   Positioned under the gallery grid on the right side
   ============================================================ */
.gallery-signature-section {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: clamp(28px, 4.5vh, 52px);
  margin-bottom: clamp(8px, 1.5vh, 20px);
  position: relative;
  z-index: 3;
}

.gallery-signature-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.gallery-signature-img {
  width: clamp(160px, 16vw, 240px);
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
}

@media (max-width: 680px) {
  .gallery-signature-section {
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 8px;
  }

  .gallery-signature-img {
    width: clamp(135px, 36vw, 185px);
  }
}


