/* =========================================================
   Jolie Village - Gallery Page
   assets/css/gallery.css
   ========================================================= */

:root {
  --arqa-indigo: #4D418A;
  --arqa-lavender: #9696DE;
  --arqa-peach: #C48B63;
  --arqa-surface: #F7F6FF;
  --arqa-surface-soft: #FBFAFF;
  --arqa-border: rgba(77, 65, 138, 0.14);
  --arqa-shadow: rgba(77, 65, 138, 0.10);
}


/* =========================================================
   0. Overflow guard / base fixes
   ========================================================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.gallery-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #ffffff;
}

.gallery-page *,
.gallery-page *::before,
.gallery-page *::after {
  box-sizing: border-box;
}

.gallery-page img,
.gallery-page video,
.gallery-page iframe {
  max-width: 100%;
}

.gallery-hero,
.gallery-section,
.gallery-contact-section {
  position: relative;
  max-width: 100%;
  overflow-x: clip;
}

.section {
  padding-block: var(--section-padding-y);
}


/* =========================================================
   1. Shared elements
   ========================================================= */

.section-kicker {
  margin: 0 0 12px;
  color: var(--color-primary, var(--arqa-indigo));
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--color-primary-dark, #3D3470);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: var(--font-body);
  line-height: 1.7;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--color-primary, var(--arqa-indigo));
  box-shadow: 0 16px 34px rgba(77, 65, 138, 0.22);
}

.btn-primary:hover {
  color: #ffffff;
  background: var(--color-primary-dark, #3D3470);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--color-primary, var(--arqa-indigo));
  background: transparent;
  border-color: rgba(77, 65, 138, 0.42);
}

.btn-outline:hover {
  color: var(--color-primary-dark, #3D3470);
  background: var(--arqa-peach);
  border-color: var(--arqa-peach);
  transform: translateY(-1px);
}


/* =========================================================
   2. Breadcrumbs
   ========================================================= */

.gallery-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--color-muted);
  font-size: 13px;
}

.gallery-breadcrumbs a {
  color: var(--color-primary, var(--arqa-indigo));
  text-decoration: none;
}

.gallery-breadcrumbs a:hover {
  text-decoration: underline;
}

.gallery-breadcrumbs span::before {
  content: "/";
  margin-right: 8px;
  color: rgba(23, 23, 33, 0.32);
}


/* =========================================================
   3. Hero
   ========================================================= */

.gallery-hero {
  padding-block: 48px 56px;
  background:
    radial-gradient(circle at 90% 18%, rgba(150, 150, 222, 0.20), transparent 34%),
    radial-gradient(circle at 10% 92%, rgba(196, 139, 99, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--arqa-surface-soft) 100%);
  border-bottom: 1px solid var(--arqa-border);
}

.gallery-hero__grid {
  display: grid;
  gap: 34px;
  align-items: center;
}

.gallery-hero__content {
  max-width: 700px;
}

.gallery-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--color-primary-dark, #3D3470);
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.gallery-hero h1 span {
  display: block;
  color: #A87552;
}

.gallery-hero__lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--color-muted);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.6;
}

.gallery-hero__text {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--color-muted);
  font-size: var(--font-body);
  line-height: 1.7;
}

.gallery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.gallery-hero__media {
  min-height: 280px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(77, 65, 138, 0.10), rgba(77, 65, 138, 0.02)),
    var(--arqa-surface);
  border: 1px solid var(--arqa-border);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(23, 23, 33, 0.08);
}

.gallery-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}


/* =========================================================
   4. Gallery sections
   ========================================================= */

.gallery-section--project {
  background: #ffffff;
}

.gallery-section--showroom {
  background:
    radial-gradient(circle at 0% 0%, rgba(150, 150, 222, 0.14), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(196, 139, 99, 0.10), transparent 32%),
    var(--arqa-surface-soft);
  border-block: 1px solid var(--arqa-border);
}

.gallery-section--apartment {
  background: #ffffff;
}


/* =========================================================
   5. Featured project gallery
   ========================================================= */

.gallery-featured-layout {
  display: grid;
  gap: 18px;
}

.gallery-featured-layout__main,
.gallery-featured-layout__thumb,
.gallery-card {
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--arqa-border);
  box-shadow: 0 18px 44px rgba(77, 65, 138, 0.06);
}

.gallery-featured-layout__main {
  border-radius: 28px;
}

.gallery-featured-layout__thumb,
.gallery-card {
  border-radius: 22px;
}

.gallery-featured-layout__main a,
.gallery-featured-layout__thumb a,
.gallery-card a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-featured-layout__main img,
.gallery-featured-layout__thumb img,
.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.28s ease,
    filter 0.28s ease;
}

.gallery-featured-layout__main img {
  aspect-ratio: 16 / 10;
}

.gallery-featured-layout__thumb img {
  aspect-ratio: 4 / 3;
}

.gallery-featured-layout__main:hover img,
.gallery-featured-layout__thumb:hover img,
.gallery-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.04);
}

.gallery-featured-layout__side {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}


/* =========================================================
   6. Standard grids
   ========================================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.gallery-grid--extra {
  margin-top: 18px;
}

.gallery-card img {
  aspect-ratio: 4 / 3;
}

.gallery-card--detail img {
  aspect-ratio: 1 / 1;
}


/* =========================================================
   7. Section actions
   ========================================================= */

.gallery-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  text-align: center;
}


/* =========================================================
   8. Contact form spacing
   ========================================================= */

.gallery-contact-section {
  margin-block: 0;
}

.gallery-page > .site-contact-section,
.gallery-page > .site-contact,
.gallery-page > .project-contact,
.gallery-page > .contact-section,
.gallery-page > .global-contact,
.gallery-page > .contact-form-section {
  margin-block: 0;
}


/* =========================================================
   9. Mobile fine tuning
   ========================================================= */

@media (max-width: 767px) {
  .gallery-hero {
    padding-top: 34px;
  }

  .gallery-breadcrumbs {
    margin-bottom: 20px;
    font-size: 12px;
  }

  .gallery-hero h1 {
    font-size: clamp(38px, 10vw, 48px);
    line-height: 0.98;
  }

  .gallery-hero__actions,
  .gallery-section-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin-top: 28px;
    justify-items: stretch;
  }

  .gallery-hero__actions .btn,
  .gallery-section-actions .btn {
    width: 100%;
    min-height: 46px;
    padding-inline: 18px;
    text-align: center;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .gallery-featured-layout {
    gap: 14px;
  }

  .gallery-featured-layout__side,
  .gallery-grid {
    gap: 14px;
  }

  .gallery-featured-layout__main,
  .gallery-featured-layout__thumb,
  .gallery-card {
    border-radius: 22px;
  }
}


/* =========================================================
   10. 480px+
   ========================================================= */

@media (min-width: 480px) {
  .gallery-featured-layout__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   11. 768px+
   ========================================================= */

@media (min-width: 768px) {
  .gallery-hero {
    padding-block: 72px 82px;
  }

  .gallery-hero__grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 56px;
  }

  .gallery-hero__media,
  .gallery-hero__media img {
    min-height: 390px;
  }

  .gallery-featured-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    align-items: stretch;
  }

  .gallery-featured-layout__main img {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .gallery-featured-layout__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-featured-layout__thumb img {
    height: 100%;
    min-height: 190px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid--details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* =========================================================
   12. 1024px+
   ========================================================= */

@media (min-width: 1024px) {
  .gallery-hero {
    padding-block: 86px 96px;
  }

  .gallery-hero__grid {
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
    gap: 72px;
  }

  .gallery-hero__media,
  .gallery-hero__media img {
    min-height: 460px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid--details {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* =========================================================
   13. 1280px+
   ========================================================= */

@media (min-width: 1280px) {
  .gallery-hero__media,
  .gallery-hero__media img {
    min-height: 500px;
  }

  .gallery-featured-layout {
    gap: 22px;
  }

  .gallery-featured-layout__side,
  .gallery-grid {
    gap: 22px;
  }
}


/* =========================================================
   14. 1440px+
   ========================================================= */

@media (min-width: 1440px) {
  .gallery-hero {
    padding-block: 100px 110px;
  }

  .gallery-hero__grid {
    gap: 86px;
  }

  .gallery-hero__media,
  .gallery-hero__media img {
    min-height: 540px;
  }
}


/* =========================================================
   15. Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .btn,
  .gallery-featured-layout__main img,
  .gallery-featured-layout__thumb img,
  .gallery-card img {
    transition: none;
  }

  .btn-primary:hover,
  .btn-outline:hover {
    transform: none;
  }

  .gallery-featured-layout__main:hover img,
  .gallery-featured-layout__thumb:hover img,
  .gallery-card:hover img {
    transform: none;
  }
}

/* =========================================================
   16. Gallery lightbox
   ========================================================= */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  width: 100%;
  height: 100%;
  color: #ffffff;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 38, 0.88);
  backdrop-filter: blur(10px);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 72px 88px 86px;
}

.gallery-lightbox__figure {
  width: min(100%, 1180px);
  max-height: 100%;
  display: grid;
  gap: 14px;
  margin: 0;
  justify-items: center;
}

.gallery-lightbox__image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  background: rgba(255, 255, 255, 0.06);
}

.gallery-lightbox__caption {
  max-width: 900px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: fixed;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.gallery-lightbox__close {
  right: 24px;
  top: 24px;
  width: 46px;
  height: 46px;
  font-size: 34px;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  width: 54px;
  height: 54px;
  font-size: 44px;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-lightbox__nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.gallery-lightbox__nav--prev {
  left: 24px;
}

.gallery-lightbox__nav--next {
  right: 24px;
}

body.gallery-lightbox-open {
  overflow: hidden;
}


/* Mobile lightbox */
@media (max-width: 767px) {
  .gallery-lightbox__dialog {
    padding: 54px 16px 96px;
  }

  .gallery-lightbox__image {
    max-height: calc(100vh - 180px);
    border-radius: 14px;
  }

  .gallery-lightbox__caption {
    padding-inline: 10px;
    font-size: 12px;
  }

  .gallery-lightbox__close {
    top: auto;
    right: 50%;
    bottom: 24px;
    width: 52px;
    height: 52px;
    font-size: 34px;
    transform: translateX(50%);
    background: rgba(255, 255, 255, 0.20);
  }

  .gallery-lightbox__close:hover {
    transform: translateX(50%);
  }

  .gallery-lightbox__nav {
    top: auto;
    bottom: 24px;
    width: 52px;
    height: 52px;
    font-size: 40px;
    transform: none;
  }

  .gallery-lightbox__nav:hover {
    transform: none;
  }

  .gallery-lightbox__nav--prev {
    left: 20px;
  }

  .gallery-lightbox__nav--next {
    right: 20px;
  }
}


/* Very small screens */
@media (max-width: 390px) {
  .gallery-lightbox__dialog {
    padding-inline: 12px;
  }

  .gallery-lightbox__nav--prev {
    left: 12px;
  }

  .gallery-lightbox__nav--next {
    right: 12px;
  }

  .gallery-lightbox__close {
    bottom: 22px;
  }
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-lightbox__close,
  .gallery-lightbox__nav {
    transition: none;
  }

  .gallery-lightbox__close:hover,
  .gallery-lightbox__nav:hover {
    transform: none;
  }

  .gallery-lightbox__nav:hover {
    transform: translateY(-50%);
  }

  @media (max-width: 767px) {
    .gallery-lightbox__nav:hover,
    .gallery-lightbox__close:hover {
      transform: none;
    }
  }
}