/*
Theme Name: Vickie Comninos
Theme URI: https://vickiecomninos.com
Author: Differend
Author URI: https://differend.gr
Description: Bespoke, dependency-free theme for Vickie Comninos Interiors. Replaces Astra + Elementor with plain PHP templates and native WordPress blocks.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vickie-comninos
Tags: portfolio, custom-menu, featured-images, block-styles, accessibility-ready
*/

/* ============================================================
   1. Design tokens
   Sourced from the previous Elementor global kit + live site.
   ============================================================ */
:root {
  --vc-ink:        #595B61;   /* headings, primary text */
  --vc-ink-soft:   #7A7A7A;   /* body copy */
  --vc-line:       #E2E2E2;   /* hairlines */
  --vc-bg:         #FFFFFF;
  --vc-bg-alt:     #F5F5F5;
  --vc-white:      #FFFFFF;

  --vc-font: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --vc-container:  1140px;
  --vc-gutter:     clamp(1.25rem, 4vw, 2.5rem);
  --vc-section:    clamp(3.5rem, 9vw, 7.5rem);
  --vc-gap:        clamp(1rem, 2.5vw, 2rem);

  /* Signature wide tracking, lifted from the live site */
  --vc-track-hero: 0.128em;
  --vc-track-eyebrow: 0.16em;

  --vc-header-h:   96px;
  --vc-ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   2. Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--vc-bg-alt);
  color: var(--vc-ink-soft);
  font-family: var(--vc-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
  font-variation-settings: 'opsz' 14;
}

img, picture, video, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--vc-ink); }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--vc-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--vc-ink);
  font-weight: 400;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.4em; padding-left: 1.25rem; }

hr { border: 0; border-top: 1px solid var(--vc-line); margin: var(--vc-section) 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 999;
  width: auto; height: auto; clip: auto; clip-path: none;
  background: var(--vc-white); color: var(--vc-ink);
  padding: 0.75rem 1.25rem; box-shadow: 0 4px 24px rgb(0 0 0 / 0.15);
}

/* ============================================================
   3. Layout primitives
   ============================================================ */
.vc-container {
  width: 100%;
  max-width: var(--vc-container);
  margin-inline: auto;
  padding-inline: var(--vc-gutter);
}
.vc-container--wide { max-width: 1440px; }
.vc-container--narrow { max-width: 780px; }

.vc-section { padding-block: var(--vc-section); }
.vc-section--tight { padding-block: calc(var(--vc-section) * 0.55); }
.vc-section--alt { background: var(--vc-bg-alt); }

/* ============================================================
   4. Typography scale
   ============================================================ */
.vc-hero-title,
h1.entry-title {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.5rem);   /* -> 40px */
  font-weight: 400;
  letter-spacing: var(--vc-track-hero);
  line-height: 1.3;
  color: var(--vc-ink);
  text-transform: none;
}

/* Small uppercase label — use the class explicitly */
.vc-eyebrow {
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: var(--vc-track-eyebrow);
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--vc-ink);
  margin-bottom: 1.5rem;
}

/* Inner-page title (the_title() in page.php) */
.vc-page-title {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: none;
  color: var(--vc-ink);
  margin-bottom: 2rem;
}

/* Section headings inside content (h2 blocks) */
.entry-content h2 {
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-transform: none;
  color: var(--vc-ink);
  margin-bottom: 1.5rem;
}

.entry-content h3 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-content p,
.vc-prose p { max-width: 68ch; }

.entry-content > * + * { margin-top: 1.5rem; }
.entry-content > h2 { margin-top: var(--vc-gap); }

/* ============================================================
   5. Header
   ============================================================ */
.vc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--vc-bg-alt);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--vc-ease);
}
.vc-header.is-stuck { border-bottom-color: var(--vc-line); }

/* Full-width header: push the two nav groups out toward the edges,
   keeping just a clean margin. The logo stays centred. */
.vc-header .vc-container {
  max-width: none;
  padding-inline: clamp(1.5rem, 3.5vw, 3.5rem);
}

/* Flex row: nav grows and pushes lists to opposite ends; brand sits centred */
.vc-header__inner {
  min-height: var(--vc-header-h);
  display: flex;
  align-items: center;
  position: relative;        /* anchor for the absolutely-centred brand */
}

/* Brand: taken out of flow and pinned to the exact horizontal centre */
.vc-header__brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;                /* sit above the nav lists if they overlap */
}
.vc-header__brand img { width: 172px; height: auto; }
.vc-header__brand .vc-wordmark {
  font-size: 1.05rem; letter-spacing: var(--vc-track-eyebrow);
  text-transform: uppercase; color: var(--vc-ink); white-space: nowrap;
}

/* Nav: flex row, fills the inner bar, two lists on opposite ends */
.vc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}
.vc-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  margin: 0; padding: 0; list-style: none;
}

.vc-nav__list a {
  position: relative;
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 300;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--vc-ink);
  padding-block: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
}
.vc-nav__list a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--vc-ease);
}
.vc-nav__list a:hover::after,
.vc-nav__list .current-menu-item > a::after,
.vc-nav__list .current_page_item > a::after { transform: scaleX(1); transform-origin: left; }

/* Mobile hamburger toggle */
.vc-nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--vc-ink);
}
.vc-nav-toggle span {
  display: block; width: 24px; height: 2px; margin: 3px 0;
  background: currentColor; border-radius: 1px;
  transition: transform 0.35s var(--vc-ease), opacity 0.2s linear;
}
.vc-nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.vc-nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.vc-nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  /* Brand reverts to normal flow: sits left, toggle pushed right */
  .vc-header__brand { position: static; transform: none; }
  .vc-nav-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; margin-left: auto; }

  /* Nav becomes a full-screen overlay */
  .vc-nav {
    display: block;
    position: fixed;
    inset: var(--vc-header-h) 0 0;
    background: var(--vc-bg);
    padding: var(--vc-gutter);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--vc-ease), transform 0.3s var(--vc-ease), visibility 0.3s;
    overflow-y: auto;
  }
  .vc-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .vc-nav__list { display: block; }
  .vc-nav__list a { font-size: 1.25rem; padding-block: 1rem; display: block; }
  body.vc-nav-open { overflow: hidden; }
}

/* ============================================================
   6. Hero slider (replaces the Elementor "slides" widget)
   ============================================================ */
.vc-hero { background: var(--vc-bg-alt); padding-block: clamp(3rem, 6vw, 5rem); }

/* Left text column: vertically centre the heading + "Know More" pair */
.vc-hero .entry-content .wp-block-column:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hero heading: display scale, normal case (overrides the eyebrow h2 rule) */
.vc-hero .entry-content h1,
.vc-hero .entry-content h2 {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.25rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: none;
  color: var(--vc-ink);
}

.vc-slider { position: relative; }
.vc-slider__viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;      /* square, matching the original Elementor layout */
  background: var(--vc-bg-alt);
}
@media (max-width: 600px) { .vc-slider__viewport { aspect-ratio: 4 / 3; } }

.vc-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s var(--vc-ease);
  pointer-events: none;
}
.vc-slide.is-active { opacity: 1; pointer-events: auto; }
.vc-slide img { width: 100%; height: 100%; object-fit: cover; }

/* No-JS / single slide fallback: stack them */
.no-js .vc-slide { position: relative; opacity: 1; }
.no-js .vc-slider__viewport { aspect-ratio: auto; }

.vc-slider__nav,
.vc-slider__dots { display: none; }

/* ---- Homepage: single-viewport, no scroll ---- */
body.home {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.home .vc-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.home .vc-hero {
  flex: 1;
  min-height: 0;
  padding-block: 0;
  display: flex;
  flex-direction: column;
}
body.home .vc-hero > .vc-container--wide {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-block: clamp(1.25rem, 2vw, 2rem);
}
body.home .vc-hero .entry-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.home .vc-hero .entry-content .wp-block-columns {
  flex: 1;
  min-height: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 0;
}
body.home .vc-hero .entry-content .wp-block-column:last-child {
  display: flex;
  flex-direction: column;
}
body.home .vc-hero .vc-slider {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.home .vc-slider__viewport {
  flex: 1;
  aspect-ratio: unset;
  min-height: 0;
}
body.home .vc-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding-block: 1.25rem;
}

/* ============================================================
   7. Page header + editorial blocks
   ============================================================ */
.vc-page-header { padding-block: var(--vc-section) 0; }
.vc-page-header .vc-eyebrow { margin-bottom: 0; }

/* Alternating text/image rows (Services) */
.vc-split {
  display: grid;
  gap: var(--vc-gap);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .vc-split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
  .vc-split--reverse > :first-child { order: 2; }
}

/* ============================================================
   8. Galleries / project grids
   ============================================================ */
.vc-grid {
  display: grid;
  gap: var(--vc-gap);
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.vc-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .vc-grid--2 { grid-template-columns: repeat(2, 1fr); } }

.vc-figure { margin: 0; position: relative; overflow: hidden; }
.vc-figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--vc-ease), filter 0.5s var(--vc-ease);
}
.vc-figure--ratio img { aspect-ratio: 4 / 3; }
a.vc-figure:hover img,
.vc-figure a:hover img { transform: scale(1.035); }

.vc-figure__caption {
  margin-top: 0.9rem;
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: var(--vc-track-eyebrow);
  text-transform: uppercase;
  color: var(--vc-ink);
}

/* Project card (Gallery index) */
.vc-card { display: block; }
.vc-card:hover .vc-figure__caption { color: var(--vc-ink); }

/* ============================================================
   9. Lightbox (replaces Elementor's)
   ============================================================ */
.vc-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgb(0 0 0 / 0.92);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--vc-ease), visibility 0.3s;
  padding: clamp(1rem, 4vw, 3rem);
}
.vc-lightbox.is-open { opacity: 1; visibility: visible; }
.vc-lightbox img {
  max-width: 100%; max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
}
.vc-lightbox__close,
.vc-lightbox__nav {
  position: absolute;
  border: 0; background: none; color: #fff; cursor: pointer;
  width: 48px; height: 48px; display: none; place-items: center;
  opacity: 0.75; transition: opacity 0.2s var(--vc-ease);
}
.vc-lightbox.is-open .vc-lightbox__close,
.vc-lightbox.is-open .vc-lightbox__nav { display: grid; }
.vc-lightbox__close:hover, .vc-lightbox__nav:hover { opacity: 1; }
.vc-lightbox__close { top: 1rem; right: 1rem; }
.vc-lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.vc-lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.vc-lightbox__counter {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.8125rem; letter-spacing: 0.1em; opacity: 0.7;
}

/* ============================================================
   10. Contact
   ============================================================ */
.vc-contact { display: grid; gap: clamp(2rem, 6vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .vc-contact { grid-template-columns: 1.35fr 1fr; } }

.vc-form { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
.vc-form__field { display: flex; flex-direction: column; gap: 0.4rem; }
.vc-form__field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .vc-form { grid-template-columns: 1fr; } }

.vc-form label {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--vc-ink);
}
.vc-form__req { color: #B3261E; margin-left: 0.15em; }
.vc-form ::placeholder { color: var(--vc-ink-soft); opacity: 0.55; }

/* Phone field: country-code dropdown + number input, sharing the underline */
.vc-form__tel { display: flex; align-items: stretch; gap: 0.75rem; }
.vc-form__tel input { flex: 1 1 auto; min-width: 0; }
.vc-form__cc {
  flex: 0 0 auto;
  font: inherit;
  font-size: 1rem;
  color: var(--vc-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--vc-line);
  border-radius: 0;
  padding: 0.65rem 0.25rem;
  cursor: pointer;
  transition: border-color 0.3s var(--vc-ease);
}
.vc-form__cc:focus { outline: none; border-bottom-color: var(--vc-ink); }
.vc-form input,
.vc-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--vc-ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--vc-line);
  padding: 0.65rem 0;
  border-radius: 0;
  transition: border-color 0.3s var(--vc-ease);
}
.vc-form input:focus,
.vc-form textarea:focus {
  outline: none;
  border-bottom-color: var(--vc-ink);
}
.vc-form textarea { resize: vertical; min-height: 130px; }
.vc-form input[aria-invalid='true'],
.vc-form textarea[aria-invalid='true'] { border-bottom-color: #B3261E; }
.vc-form__error { color: #B3261E; font-size: 0.8125rem; letter-spacing: 0.02em; }

/* Honeypot - visually and programmatically hidden from humans */
.vc-form__hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.vc-btn {
  justify-self: start;
  display: inline-block;
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vc-white);
  background: var(--vc-ink);
  border: 1px solid var(--vc-ink);
  padding: 0.95rem 2.75rem;
  cursor: pointer;
  transition: background 0.3s var(--vc-ease), color 0.3s var(--vc-ease);
}
.vc-btn:hover { background: transparent; color: var(--vc-ink); }
.vc-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.vc-notice {
  grid-column: 1 / -1;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--vc-ink);
  background: var(--vc-bg-alt);
  color: var(--vc-ink);
  font-size: 0.9375rem;
}
.vc-notice--error { border-left-color: #B3261E; color: #B3261E; }

.vc-contact__meta { display: grid; gap: 2rem; align-content: start; }
.vc-contact__label {
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--vc-ink-soft); margin-bottom: 0.35rem;
}
.vc-contact__value {
  font-size: 1.125rem; font-weight: 300; letter-spacing: 0.04em;
  color: var(--vc-ink);
}
.vc-social { display: flex; gap: 1rem; align-items: center; }
.vc-social a { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--vc-ink); }
.vc-social svg { width: 22px; height: 22px; }

/* ============================================================
   11. Footer
   ============================================================ */
.vc-footer {
  background: var(--vc-bg-alt);
  border-top: 1px solid var(--vc-line);
  padding-block: 2.5rem;
  margin-top: var(--vc-section);
}
.vc-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--vc-ink-soft);
}
.vc-footer a { border-bottom: 1px solid transparent; transition: border-color 0.3s var(--vc-ease); }
.vc-footer a:hover { border-bottom-color: currentColor; }

/* ============================================================
   12. Posts / archive / 404 (kept minimal - the site is a portfolio)
   ============================================================ */
.vc-post-list { display: grid; gap: var(--vc-section); }
.vc-post__meta {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--vc-ink-soft); margin-bottom: 0.5rem;
}
.vc-pagination { display: flex; gap: 0.75rem; margin-top: var(--vc-section); }
.vc-pagination .page-numbers {
  padding: 0.5rem 0.9rem; border: 1px solid var(--vc-line); color: var(--vc-ink);
}
.vc-pagination .page-numbers.current { background: var(--vc-ink); color: var(--vc-white); border-color: var(--vc-ink); }

/* ============================================================
   13. Native block adjustments
   The migrated content uses core blocks, so style them here.
   ============================================================ */
.entry-content .wp-block-image { margin-block: var(--vc-gap); }
.entry-content .wp-block-image img { width: 100%; }
.entry-content .wp-block-image figcaption,
.entry-content .wp-block-gallery figcaption {
  font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--vc-ink-soft); text-align: left;
}

.entry-content .wp-block-gallery.has-nested-images { gap: var(--vc-gap); }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  margin: 0;
}

.entry-content .wp-block-columns { gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }

.entry-content .alignwide {
  width: min(100vw - 2 * var(--vc-gutter), 1440px);
  margin-inline: calc(50% - min(50vw - var(--vc-gutter), 720px));
  max-width: none;
}
.entry-content .alignfull {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  max-width: none;
}
.entry-content .alignleft  { float: left;  margin: 0 var(--vc-gap) var(--vc-gap) 0; }
.entry-content .alignright { float: right; margin: 0 0 var(--vc-gap) var(--vc-gap); }
.entry-content .aligncenter { margin-inline: auto; }

.entry-content .wp-block-separator {
  border: 0; border-top: 1px solid var(--vc-line);
  max-width: 100%; margin-block: var(--vc-section);
}

.entry-content .wp-block-quote {
  border-left: 2px solid var(--vc-ink);
  padding-left: 1.5rem; margin-left: 0;
  font-size: 1.125rem; font-weight: 300; color: var(--vc-ink);
}

/* Utility */
.vc-center { text-align: center; }
.vc-mt-0 { margin-top: 0; }

/* ============================================================
   14. Page-specific overrides
   ============================================================ */

/* About page */
body.page-id-76 .vc-page-header {
  padding-block: clamp(2rem, 5vw, 4rem) 0;
}
body.page-id-76 .vc-page-header .vc-page-title {
  margin-bottom: 0;
}
body.page-id-76 .vc-section--tight {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

body.page-id-76 .entry-content > p {
  max-width: none;
  text-align: justify;
}

/* "Design is in the detail" gallery -> 3-up horizontal carousel.
   The gallery is wrapped in .vc-carousel by main.js and scrolls
   through all its images; the arrows sit over the outer edges. */
.vc-carousel { position: relative; }

.vc-carousel .wp-block-gallery.has-nested-images {
  --wp--style--unstable-gallery-gap: var(--vc-gap);
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: var(--vc-gap);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.vc-carousel .wp-block-gallery.has-nested-images::-webkit-scrollbar { display: none; }

.vc-carousel .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  flex: 0 0 calc((100% - 2 * var(--vc-gap)) / 3);
  max-width: calc((100% - 2 * var(--vc-gap)) / 3);
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  scroll-snap-align: start;
}
.vc-carousel .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .vc-carousel .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    flex-basis: calc((100% - var(--vc-gap)) / 2);
    max-width: calc((100% - var(--vc-gap)) / 2);
  }
}
@media (max-width: 560px) {
  .vc-carousel .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    flex-basis: 82%;
    max-width: 82%;
  }
}

.vc-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--vc-white);
  color: var(--vc-ink);
  cursor: pointer;
  box-shadow: 0 2px 14px rgb(0 0 0 / 0.1);
  transition: opacity 0.25s var(--vc-ease), background 0.2s var(--vc-ease);
}
.vc-carousel__nav:hover { background: var(--vc-bg-alt); }
.vc-carousel__nav--prev { left: 0; }
.vc-carousel__nav--next { right: 0; }
.vc-carousel__nav[disabled] { opacity: 0; pointer-events: none; }

@media (max-width: 560px) {
  .vc-carousel__nav { width: 44px; height: 44px; }
}

/* Services page: left-aligned title and section headings (editorial rows) */
body.page-id-101 .vc-page-title {
  text-align: left;
  margin-bottom: 0;
}
body.page-id-101 .vc-section--tight {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}
body.page-id-101 .entry-content .wp-block-columns h2.wp-block-heading {
  text-align: left;
}
/* Zig-zag the rows: even rows put the image on the left. DOM order stays
   text-first, so the rows still stack text-above-image on mobile. */
@media (min-width: 782px) {
  body.page-id-101 .entry-content > .wp-block-columns:nth-of-type(even) {
    flex-direction: row-reverse;
  }
}

/* Gallery page: uniform project thumbnails regardless of source aspect ratio */
body.page-id-118 .entry-content .wp-block-image img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Project (property) pages: editorial gallery.
   The title moves into the layout, so hide the standard page header. */
.vc-project-page .vc-page-header { display: none; }
.vc-project-page .vc-section--tight { padding-top: clamp(1.5rem, 4vw, 3rem); }

.vc-project { display: grid; gap: var(--vc-gap); }

.vc-project__intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vc-gap);
  align-items: center;
}
@media (min-width: 782px) {
  .vc-project__intro { grid-template-columns: 1fr 1.6fr; }
}
.vc-project__title h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--vc-ink);
  text-align: left;
}

.vc-project__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vc-gap);
}
@media (min-width: 782px) {
  .vc-project__row { grid-template-columns: 1fr 1fr; }
}

.vc-project img { display: block; margin: 0; }
.vc-project__lead img,
.vc-project__row img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.vc-project__full img { width: 100%; height: auto; }

/* Contact page: tighten the title-to-form gap (matches About / Services) */
body.page-id-147 .vc-page-title { margin-bottom: 0; }
body.page-id-147 .vc-section--tight { padding-top: clamp(1.25rem, 3vw, 2rem); }
