/* =========================================
   AYKAS AESTHETICS — PHOTO GALLERY PAGE
   Main navigation, contact, and footer styles
   come directly from styles.css.
========================================= */

.gallery-page {
  min-height: 100vh;
}

.gallery-page.no-scroll {
  overflow: hidden;
}

/* Prevent the fixed home-page navigation from overlapping the gallery hero. */
.gallery-hero {
  position: relative;
  padding: 165px 0 78px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.gallery-hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  top: -310px;
  right: -130px;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(
      circle,
      rgba(154, 88, 225, 0.22),
      rgba(92, 45, 149, 0.08) 42%,
      transparent 72%
    );
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.gallery-hero-inner {
  position: relative;
  z-index: 1;
}

.gallery-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 62px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gallery-breadcrumb a {
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.2s var(--ease);
}

.gallery-breadcrumb a:hover {
  color: var(--white);
}

.gallery-title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: clamp(44px, 8vw, 110px);
}

.gallery-title-copy h1 {
  max-width: 900px;
  margin: 0;
  color: var(--white);
  font-size: clamp(3.7rem, 8.4vw, 8.5rem);
  line-height: 0.87;
  letter-spacing: -0.085em;
}

.gallery-title-copy h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(213, 179, 255, 0.82);
}

.gallery-intro-copy {
  padding-bottom: 10px;
}

.gallery-intro-copy > p {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  line-height: 1.8;
}

.gallery-details {
  display: grid;
  gap: 15px;
}

.gallery-details > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.gallery-details span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gallery-details strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
  font-weight: 650;
}

.gallery-scroll-note {
  margin-top: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =========================================
   GALLERY SECTION
========================================= */

.photography-section {
  padding: 100px 0 116px;
}

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

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

.gallery-section-heading > p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.masonry-gallery {
  columns: 3;
  column-gap: 18px;
}

.gallery-item {
  position: relative;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  transform: translateZ(0);
}

.gallery-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.gallery-image-button img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.78);
  transform: scale(1.001);
  transition:
    filter 0.45s var(--ease),
    transform 0.7s var(--ease);
}

.gallery-image-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 22px;
  color: var(--white);
  background:
    linear-gradient(
      to top,
      rgba(5, 4, 9, 0.82),
      rgba(5, 4, 9, 0.12) 44%,
      transparent 72%
    );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.gallery-image-number {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.gallery-image-info {
  display: grid;
  gap: 4px;
  transform: translateY(9px);
  transition: transform 0.35s var(--ease);
}

.gallery-image-info strong {
  color: var(--white);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.gallery-image-info small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.gallery-expand-icon {
  width: 38px;
  height: 38px;
  margin-left: auto;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #13081c;
  border-radius: 50%;
  background: var(--white);
  transform: translateY(9px);
  transition: transform 0.35s var(--ease);
}

.gallery-item:hover {
  border-color: rgba(197, 158, 255, 0.42);
}

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

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

.gallery-item:hover .gallery-image-info,
.gallery-item:hover .gallery-expand-icon,
.gallery-image-button:focus-visible .gallery-image-info,
.gallery-image-button:focus-visible .gallery-expand-icon {
  transform: translateY(0);
}

.gallery-image-button:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: -4px;
}

/*
  Contact and footer are intentionally not restyled here.
  They inherit the exact same .contact, .contact-panel,
  .contact-content, .contact-links, footer, and .footer-row
  rules from styles.css.
*/

/* =========================================
   LIGHTBOX
========================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.28s var(--ease),
    visibility 0.28s var(--ease);
}

.lightbox.open {
  visibility: visible;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 1, 4, 0.94);
}

.lightbox-content {
  position: relative;
  z-index: 1;

  width: min(100%, 1400px);
  height: min(92vh, 940px);

  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: minmax(0, 1fr) auto;

  align-items: center;
  gap: 18px;
}

.lightbox-image-area {
  grid-column: 2;
  grid-row: 1;

  min-width: 0;
  min-height: 0;

  width: 100%;
  height: 100%;

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

  overflow: hidden;
}


.lightbox-image-area img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
  object-position: center;

  border-radius: 18px;
  opacity: 1;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);

  transition: opacity 0.18s var(--ease);
}

.lightbox-image-area img.is-changing {
  opacity: 0.25;
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  font-size: 1.65rem;
  font-weight: 300;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.lightbox-close:hover {
  color: #120819;
  background: var(--white);
  transform: rotate(5deg);
}

.lightbox-nav {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.055);
  font-size: 1.25rem;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.lightbox-nav:hover {
  color: #120819;
  background: var(--white);
  transform: scale(1.06);
}

.lightbox-previous {
  grid-column: 1;
  grid-row: 1;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 1;
}

.lightbox-caption {
  grid-column: 2;
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 38px;
  padding-top: 6px;
}

.lightbox-caption span {
  color: var(--purple-soft);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.lightbox-caption h3 {
  margin: 6px 0 0;
  color: var(--white);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.lightbox-caption p {
  margin: 0;
  align-self: end;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.84rem;
  line-height: 1.65;
}

.lightbox .lightbox-image-area img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(92vh - 120px) !important;
  object-fit: contain !important;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 980px) {
  .gallery-title-layout {
    grid-template-columns: 1fr;
  }

  .gallery-title-copy h1 {
    max-width: 760px;
  }

  .gallery-intro-copy {
    max-width: 620px;
  }

  .masonry-gallery {
    columns: 2;
  }
}

@media (max-width: 720px) {
  .gallery-hero {
    padding: 140px 0 54px;
  }

  .gallery-breadcrumb {
    margin-bottom: 42px;
  }

  .gallery-title-copy h1 {
    font-size: clamp(3.1rem, 15vw, 5.6rem);
  }

  .gallery-scroll-note {
    margin-top: 48px;
  }

  .photography-section {
    padding: 74px 0 84px;
  }

  .gallery-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-section-heading > p {
    max-width: 100%;
  }

  .masonry-gallery {
    columns: 1;
  }

  .gallery-item {
    margin-bottom: 14px;
    border-radius: 19px;
  }

  .gallery-image-overlay {
    opacity: 1;
    padding: 17px;
    background:
      linear-gradient(
        to top,
        rgba(5, 4, 9, 0.72),
        transparent 48%
      );
  }

  .gallery-image-info,
  .gallery-expand-icon {
    transform: translateY(0);
  }

  .gallery-image-number {
    top: 16px;
    left: 16px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-content {
    height: 94vh;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 7px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
  }

  .lightbox-close {
    top: 4px;
    right: 4px;
  }

  .lightbox-caption {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .gallery-details > div {
    grid-template-columns: 78px 1fr;
  }

  .lightbox-content {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }

  .lightbox-image-area {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox-previous {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .lightbox-next {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .lightbox-caption {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}
