/* ============================================================
   VISUALY — HOME PAGE CUSTOM STYLES
   Da includere nel child theme: /divi-child/css/visualy-home.css
   ============================================================ */

/* ---------- RESET DIVI per full-width ---------- */
#vly-home,
#vly-home .et_pb_section,
#vly-home .et_pb_row {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

#page-container,
.et_full_width_page #main-content .container {
  max-width: 100% !important;
  padding: 0 !important;
}

/* ---------- GOOGLE FONTS (stesse della pagina Visualy) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Open+Sans:wght@300;400;600;700&display=swap');

/* ---------- VARIABILI ---------- */
:root {
  --vly-black: #0a0a0a;
  --vly-white: #ffffff;
  --vly-accent: #c8a96e;       /* oro caldo, evoca lusso fotografico */
  --vly-gray-light: #f7f7f5;
  --vly-gray-mid: #e0ddd8;
  --vly-text: #2a2a2a;
  --vly-font: 'Playfair Display', Georgia, serif;   /* titoli eleganti */
  --vly-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif; /* corpo testo */
  --vly-transition: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- BASE ---------- */
#vly-home {
  font-family: var(--vly-sans);
  color: var(--vly-text);
  overflow-x: hidden;
}

#vly-home * {
  box-sizing: border-box;
}

#vly-home h1, #vly-home h2, #vly-home h3 {
  font-family: var(--vly-font);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 1rem;
}

#vly-home p {
  line-height: 1.75;
  margin: 0 0 1.5rem;
}

#vly-home a {
  text-decoration: none;
}

/* ---------- LABEL ---------- */
.vly-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vly-accent);
  margin-bottom: 0.75rem;
  font-family: var(--vly-sans);
  font-weight: 600;
}

.vly-label--light {
  color: rgba(255,255,255,0.7);
}

/* ---------- BOTTONI ---------- */
.vly-btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border: 2px solid var(--vly-accent);
  color: var(--vly-white);
  background: var(--vly-accent);
  transition: background 0.3s, color 0.3s, transform 0.3s;
  border-radius: 2px;
}

.vly-btn:hover {
  background: transparent;
  color: var(--vly-accent);
  transform: translateY(-2px);
}

.vly-btn--dark {
  background: var(--vly-black);
  border-color: var(--vly-black);
  color: var(--vly-white);
}

.vly-btn--dark:hover {
  background: transparent;
  color: var(--vly-black);
}

.vly-btn--white {
  background: var(--vly-white);
  border-color: var(--vly-white);
  color: var(--vly-black);
}

.vly-btn--white:hover {
  background: transparent;
  color: var(--vly-white);
}

.vly-btn--outline {
  background: transparent;
  border-color: var(--vly-black);
  color: var(--vly-black);
}

.vly-btn--outline:hover {
  background: var(--vly-black);
  color: var(--vly-white);
}

.vly-btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.vly-link {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--vly-accent);
  text-transform: uppercase;
  transition: letter-spacing 0.3s;
}

.vly-link:hover {
  letter-spacing: 0.18em;
}

/* ============================================================
   HERO
   ============================================================ */
.vly-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vly-hero__bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0.1s linear;
}

.vly-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.35) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

.vly-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--vly-white);
  padding: 2rem;
  max-width: 700px;
}

.vly-hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--vly-accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.vly-hero__title {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-family: var(--vly-font);
  font-weight: 400;
  color: var(--vly-white);
  margin: 0 0 0.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.vly-hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* Scroll hint */
.vly-hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.vly-hero__scroll-hint span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--vly-accent));
  margin: 0 auto;
  animation: scrollHint 1.8s ease-in-out infinite;
}

@keyframes scrollHint {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ============================================================
   SPLIT SECTIONS
   ============================================================ */
.vly-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  width: 100%;
}

.vly-split--reverse {
  direction: rtl;
}

.vly-split--reverse > * {
  direction: ltr;
}

.vly-split__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 6vw, 5rem);
  background: var(--vly-gray-light);
}

.vly-split__text h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--vly-black);
  margin-bottom: 1.25rem;
}

.vly-split__media {
  overflow: hidden;
  position: relative;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.vly-split__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* immagine sempre visibile per intero */
  object-position: center;
  display: block;
  transition: transform 8s ease;
  max-width: 100%;
  max-height: 100%;
}

.vly-split__media:hover img {
  transform: scale(1.04);
}

.vly-parallax-img img {
  will-change: transform;
}

/* ============================================================
   VIDEO FULL WIDTH
   ============================================================ */
.vly-video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.vly-video-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vly-video-section__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.3) 60%,
    rgba(0,0,0,0.1) 100%
  );
  display: flex;
  align-items: center;
}

.vly-video-section__content {
  position: relative;
  z-index: 2;
  color: var(--vly-white);
  max-width: 560px;
  padding: clamp(2rem, 6vw, 5rem);
}

.vly-video-section__content h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--vly-white);
  margin-bottom: 1rem;
}

.vly-video-section__content p {
  color: rgba(255,255,255,0.85);
}

/* ============================================================
   ECOSISTEMA VISIVO
   ============================================================ */
.vly-ecosystem {
  background: var(--vly-white);
  padding: clamp(4rem, 8vw, 7rem) clamp(2rem, 5vw, 5rem);
}

.vly-ecosystem__steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.vly-eco-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vly-gray-mid);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.vly-eco-step:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

.vly-eco-step__img {
  height: 260px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.vly-eco-step__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.6s ease;
}

.vly-eco-step:hover .vly-eco-step__img img {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .vly-eco-step__img {
    height: auto;
    min-height: 200px;
    padding: 1.25rem;
  }
}

.vly-eco-step__body {
  padding: 1.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vly-eco-step__num {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--vly-accent);
  margin-bottom: 0.5rem;
  font-family: var(--vly-sans);
}

.vly-eco-step__body h3 {
  font-size: 1.25rem;
  color: var(--vly-black);
  margin-bottom: 0.6rem;
}

.vly-eco-step__body p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

/* Connettore "+" tra gli step */
.vly-eco-step__connector {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 300;
  color: var(--vly-accent);
  padding: 0 1rem;
  flex-shrink: 0;
  align-self: center;
}

.vly-ecosystem__cta {
  text-align: center;
  margin-top: 0.5rem;
}

/* Mobile: step in verticale */
@media (max-width: 768px) {
  .vly-ecosystem__steps {
    flex-direction: column;
    gap: 0;
  }

  .vly-eco-step__connector {
    padding: 0.5rem 0;
    font-size: 1.6rem;
    transform: rotate(90deg);
  }

  .vly-eco-step__img {
    height: 55vw;
    min-height: 200px;
  }
}


.vly-services {
  background: var(--vly-white);
  padding: clamp(4rem, 8vw, 7rem) clamp(2rem, 5vw, 5rem);
}

.vly-section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.vly-section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--vly-black);
}

.vly-section-header__sub {
  margin: 0.75rem auto 0;
  color: #666;
  font-size: 1rem;
}

.vly-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.vly-service-card {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid var(--vly-gray-mid);
  transition: box-shadow 0.3s, transform 0.3s;
}

.vly-service-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: translateY(-6px);
}

.vly-service-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.vly-service-card h3 {
  font-size: 1.3rem;
  color: var(--vly-black);
  margin-bottom: 0.75rem;
}

.vly-service-card p {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 1.25rem;
}

/* ============================================================
   SETTORI
   ============================================================ */
.vly-sectors {
  background: var(--vly-gray-light);
  padding: clamp(4rem, 8vw, 7rem) clamp(2rem, 5vw, 5rem);
}

.vly-sectors__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.vly-sector-card {
  display: flex;
  flex-direction: column;
  background: var(--vly-white);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  color: var(--vly-text);
}

.vly-sector-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  transform: translateY(-6px);
}

.vly-sector-card__img {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  min-height: 200px;
  overflow: hidden;
}

.vly-sector-card__img img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.vly-sector-card:hover .vly-sector-card__img img {
  transform: scale(1.06);
}

.vly-sector-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vly-sector-card__body h3 {
  font-size: 1.2rem;
  color: var(--vly-black);
  margin-bottom: 0.5rem;
}

.vly-sector-card__body p {
  font-size: 0.88rem;
  color: #666;
  flex: 1;
  margin-bottom: 1rem;
}

/* ============================================================
   CTA FINALE
   ============================================================ */
.vly-cta {
  position: relative;
  width: 100%;
  padding: clamp(5rem, 10vw, 9rem) 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vly-cta__bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.vly-cta__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.vly-cta__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--vly-white);
  max-width: 680px;
}

.vly-cta__content h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--vly-white);
  margin-bottom: 1rem;
}

.vly-cta__content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ============================================================
   ANIMAZIONI SCROLL (IntersectionObserver via JS)
   ============================================================ */
.vly-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.vly-fade-in.is-visible,
.vly-fade-in-delay.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vly-fade-in-delay {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}

.vly-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.vly-reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Fallback: se JS non gira, tutto resta visibile */
.no-js .vly-reveal,
.no-js .vly-fade-in,
.no-js .vly-fade-in-delay,
.no-js .vly-stagger {
  opacity: 1 !important;
  transform: none !important;
}

.vly-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.vly-stagger.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.vly-stagger:nth-child(1) { transition-delay: 0s; }
.vly-stagger:nth-child(2) { transition-delay: 0.15s; }
.vly-stagger:nth-child(3) { transition-delay: 0.30s; }
.vly-stagger:nth-child(4) { transition-delay: 0.45s; }
.vly-stagger:nth-child(5) { transition-delay: 0.60s; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .vly-sectors__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vly-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Split sections: verticale */
  .vly-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vly-split--reverse {
    direction: ltr;
  }

  .vly-split__media {
    height: auto;
    min-height: 280px;
    padding: 1.5rem;
    background: #ffffff;
  }

  .vly-split__text {
    padding: 3rem 1.5rem;
  }

  /* Hero */
  .vly-hero {
    height: 100svh;
  }

  /* Video */
  .vly-video-section {
    height: 80vw;
    min-height: 360px;
  }

  .vly-video-section__overlay {
    background: rgba(0,0,0,0.6);
    justify-content: center;
  }

  .vly-video-section__content {
    text-align: center;
    padding: 2rem 1.5rem;
  }

  /* Grids */
  .vly-services__grid {
    grid-template-columns: 1fr;
  }

  .vly-sectors__grid {
    grid-template-columns: 1fr;
  }

  /* Bottoni */
  .vly-btn-group {
    justify-content: center;
  }

  .vly-section-header {
    text-align: center;
  }
}
