/* Single post / project pages — modern editorial gallery */

:root {
  --vesta-gold: #fec503;
  --vesta-gold-deep: #c89441;
  --vesta-ink: #272626;
  --vesta-muted: #777;
  --vesta-line: #e4e4e4;
  --vesta-bg: #fafafa;
}

body.single-post,
body.page-post {
  background: var(--vesta-bg);
  color: var(--vesta-ink);
  font-family: "Open Sans", sans-serif;
}

body.single-post .site-chrome-header,
body.page-post .site-chrome-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.single-post-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 6.5rem;
}

.nv-single-post-wrap .nv-title-meta-wrap {
  text-align: center;
  margin: 0 auto 2.75rem;
  max-width: 42rem;
}

.nv-single-post-wrap .entry-title,
.nv-single-post-wrap .title.entry-title {
  font-family: Barlow, "Open Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 3.5vw, 2.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  color: var(--vesta-ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nv-single-post-wrap .nv-meta-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--vesta-muted);
  font-size: 0.9rem;
}

.nv-single-post-wrap .nv-meta-list a {
  color: var(--vesta-gold-deep);
  text-decoration: none;
}

.nv-single-post-wrap .nv-meta-list a:hover {
  color: var(--vesta-ink);
}

.nv-single-post-wrap .nv-meta-list .meta:not(:last-child)::after {
  content: "/";
  margin-left: 0.6rem;
  color: #bbb;
}

.nv-content-wrap.entry-content {
  max-width: 100%;
}

.entry-content > p {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  text-align: center;
  color: #555;
  line-height: 1.7;
}

/* Editorial intro + project credits (magazine style) */
.post-intro {
  max-width: 42rem;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.post-intro p {
  margin: 0 0 1.1rem;
  color: #444;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.post-credits {
  list-style: none;
  margin: 0 auto 2.75rem;
  padding: 1.15rem 1.25rem;
  max-width: 36rem;
  border-top: 1px solid var(--vesta-line);
  border-bottom: 1px solid var(--vesta-line);
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
}

.post-credits li {
  margin: 0;
  font-size: 0.92rem;
  color: #555;
  letter-spacing: 0.02em;
  text-align: center;
  width: 100%;
}

.post-credits__label {
  font-family: Barlow, "Open Sans", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--vesta-ink);
  margin-right: 0.35rem;
}

.post-credits a {
  color: var(--vesta-gold-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.post-credits a:hover {
  border-bottom-color: var(--vesta-gold);
  color: var(--vesta-ink);
}

.post-closing {
  max-width: 36rem;
  margin: 2.5rem auto 0;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vesta-line);
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
}

.post-closing strong {
  color: var(--vesta-ink);
  letter-spacing: 0.04em;
}

/* Closing press / magazine feature */
.post-press {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--vesta-line);
  text-align: center;
}

.post-press__title {
  margin: 0 0 1.25rem;
  font-family: Barlow, "Open Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}

.post-press__title a {
  color: var(--vesta-ink);
  text-decoration: none;
}

.post-press__title a:hover {
  color: var(--vesta-gold-deep);
}

.post-press__figure {
  margin: 0 auto;
  max-width: 560px;
}

.post-press__figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.post-press__link {
  display: block;
}

.post-press__cta {
  margin: 1rem 0 0;
}

.post-press__cta a {
  color: var(--vesta-gold-deep);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: Barlow, "Open Sans", sans-serif;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.post-press__cta a:hover {
  border-bottom-color: var(--vesta-gold);
  color: var(--vesta-ink);
}

/* ---- Modern project gallery ---- */
.vesta-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.45rem, 1vw, 0.85rem);
  margin: 0 auto;
  max-width: 1120px;
}

.vesta-gallery__item {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #e8e8e8;
  border-radius: 0;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  cursor: zoom-in;
}

.vesta-gallery__item.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.vesta-gallery__item.is-full {
  grid-column: 1 / -1;
}

.vesta-gallery__item.is-half {
  grid-column: span 1;
}

.vesta-gallery__item a {
  display: block;
  height: 100%;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.vesta-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  will-change: transform;
  filter: saturate(1.03) contrast(1.03);
  animation: vesta-kenburns 16s ease-in-out infinite alternate;
  transition: filter 0.45s ease;
}

.vesta-gallery__item.ratio-portrait img {
  aspect-ratio: 3 / 4;
}

.vesta-gallery__item.ratio-portrait-alt img {
  aspect-ratio: 4 / 5;
}

.vesta-gallery__item.ratio-wide img {
  aspect-ratio: 16 / 9;
}

.vesta-gallery__item.ratio-landscape img {
  aspect-ratio: 3 / 2;
}

/* Soft continuous motion only — no hover snap */
@keyframes vesta-kenburns {
  0% {
    transform: scale(1.06) translate3d(-1%, 0.5%, 0);
  }
  50% {
    transform: scale(1.1) translate3d(0.6%, -0.7%, 0);
  }
  100% {
    transform: scale(1.07) translate3d(1%, 0.4%, 0);
  }
}

/* Keep WP galleries (legacy HTML content) looking cleaner too */
.wp-block-gallery,
.blocks-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.4vw, 1.15rem);
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.wp-block-gallery.columns-3 .blocks-gallery-item,
.wp-block-gallery.columns-3 .blocks-gallery-grid > .blocks-gallery-item {
  flex: none;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}

.wp-block-gallery.is-cropped .blocks-gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  animation: vesta-kenburns 18s ease-in-out infinite alternate;
}

/* no hover snap on legacy galleries either */

/* Last orphan in a WP 2-col grid fills the row */
.wp-block-gallery .blocks-gallery-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.wp-block-gallery .blocks-gallery-item:last-child:nth-child(odd) img {
  aspect-ratio: 16 / 10;
}

/* ---- Scroll to top ---- */
.post-back-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1200;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 32, 37, 0.9);
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1;
  border: 1px solid rgba(254, 197, 3, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.post-back-top[hidden] {
  display: none !important;
}

.post-back-top:hover {
  border-color: #fec503;
  color: #fec503;
  transform: translateY(-2px);
}

/* Soft progress line while scrolling */
.post-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--vesta-gold-deep), var(--vesta-gold));
  z-index: 1300;
  pointer-events: none;
}

.site-logo img,
.neve-site-logo {
  max-height: 50px !important;
  width: auto !important;
}

.header a {
  text-decoration: none;
  color: #272626;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.header a:hover {
  color: #fec503;
}

@media (max-width: 860px) {
  .single-post-container {
    padding: 1.5rem 0.85rem 6.5rem;
  }

  .nv-single-post-wrap .nv-title-meta-wrap {
    margin-bottom: 1.5rem;
  }

  .post-intro {
    margin-bottom: 1.25rem;
    padding: 0 0.15rem;
  }

  .post-intro p {
    font-size: 0.95rem;
    line-height: 1.75;
    text-align: left;
  }

  .post-credits {
    margin-bottom: 1.75rem;
    padding: 1rem 0.75rem;
    text-align: center;
    justify-items: center;
  }

  .vesta-gallery {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    max-width: 100%;
  }

  .vesta-gallery__item.is-full,
  .vesta-gallery__item.is-half {
    grid-column: 1 / -1;
  }

  .vesta-gallery__item.ratio-portrait img,
  .vesta-gallery__item.ratio-portrait-alt img,
  .vesta-gallery__item.ratio-wide img,
  .vesta-gallery__item.ratio-landscape img {
    aspect-ratio: 4 / 5;
  }

  .wp-block-gallery,
  .blocks-gallery-grid {
    grid-template-columns: 1fr;
  }

  .wp-block-gallery .blocks-gallery-item:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .post-back-top {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.05rem;
  }

  .lightbox {
    padding: 0;
    align-items: stretch;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .site-footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem 1rem;
  }

  .brand-logo--footer {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .lightbox__caption .lightbox__alt {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vesta-gallery__item,
  .vesta-gallery__item img,
  .wp-block-gallery.is-cropped .blocks-gallery-item img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
}

body.single-post .ekit-template-content-footer .elementor-top-section:first-child,
body.page-post .ekit-template-content-footer .elementor-top-section:first-child {
  /* Reduce visual noise on project pages: keep footer bar, hide IG grid */
  display: none;
}

body.single-post .site-footer-columns,
body.page-post .site-footer-columns {
  padding-top: 1.5rem;
}
/* Magazine lightbox viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 15, 16, 0.94);
  display: grid;
  place-items: center;
  padding: 3.5rem 4.5rem;
  backdrop-filter: blur(6px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__stage {
  margin: auto;
  max-width: min(92vw, 1280px);
  width: 100%;
  min-height: min(70vh, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 1rem 1.5rem;
  box-sizing: border-box;
}

.lightbox__img {
  max-width: min(92vw, 1280px);
  max-height: min(78vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.lightbox__img.is-shown {
  opacity: 1;
  transform: scale(1);
}

.lightbox__caption {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: Barlow, "Open Sans", sans-serif;
}

.lightbox__counter {
  color: #fec503;
  font-weight: 600;
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2001;
}

.lightbox__close {
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(254, 197, 3, 0.18);
  color: #fec503;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3.5rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__prev {
  left: max(0.5rem, env(safe-area-inset-left));
}

.lightbox__next {
  right: max(0.5rem, env(safe-area-inset-right));
}

@media (max-width: 700px) {
  .lightbox {
    padding: 0;
  }

  .lightbox__nav {
    width: 2.6rem;
    height: 2.8rem;
    background: rgba(0, 0, 0, 0.35);
  }

  .lightbox__stage {
    padding: 4rem 0.5rem 2rem;
  }

  .lightbox__img {
    max-height: none;
    width: min(100%, 92vw);
  }
}
