/* =========================================================
   SEPPIA CUSTOMIZATIONS — CRContract
   File: css/seppia-styles.css
========================================================= */


/* =========================================================
   HEADER — bordo allo scroll
========================================================= */
.jes-header {
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}

.jes-header.jes-header--scrolled {
  border-bottom-color: #d2d3d4;
}


/* =========================================================
   SOLO NON-HOME: desaturazione base (anche nel dropdown)
========================================================= */
body:not(.home):not(.front-page) .jes-menu ul li a,
body:not(.home):not(.front-page) .jes-menu ul li ul.sub-menu li a {
  color: #bdbebf !important;
}

/* Attivi sempre scuri (anche per voci nel dropdown) */
body:not(.home):not(.front-page) .jes-menu .current-menu-item > a,
body:not(.home):not(.front-page) .jes-menu .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-menu .current_page_item > a,
body:not(.home):not(.front-page) .jes-menu .current-menu-parent > a {
  color: #333333 !important;
}

/* Se l'item attivo è dentro un submenu */
body:not(.home):not(.front-page) .jes-menu ul.sub-menu .current-menu-item > a,
body:not(.home):not(.front-page) .jes-menu ul.sub-menu .current_page_item > a {
  color: #333333 !important;
}

/* Hover sul menu: tutto chiaro, tranne hover/attivo */
body:not(.home):not(.front-page) .jes-menu ul:hover li a,
body:not(.home):not(.front-page) .jes-menu ul:hover li ul.sub-menu li a {
  color: #bdbebf !important;
}

body:not(.home):not(.front-page) .jes-menu ul:hover li a:hover,
body:not(.home):not(.front-page) .jes-menu ul:hover li ul.sub-menu li a:hover,
body:not(.home):not(.front-page) .jes-menu ul:hover .current-menu-item > a,
body:not(.home):not(.front-page) .jes-menu ul:hover .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-menu ul:hover .current_page_item > a,
body:not(.home):not(.front-page) .jes-menu ul:hover .current-menu-parent > a {
  color: #333333 !important;
}


/* =========================================================
   NON-HOME: sticky-menu (non scrollato) → voce attiva BIANCA
========================================================= */
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu .current-menu-item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu .current_page_item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu .current-menu-parent > a {
  color: #FDFDFD !important;
}

/* Anche in hover-sul-menu quando non scrollato */
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover .current-menu-item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover .current_page_item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover .current-menu-parent > a {
  color: #FDFDFD !important;
}


/* =========================================================
   NUOVO — NON-HOME: sticky-menu (non scrollato)
   Voci attive DENTRO IL SOTTOMENU → SCURE
   (il dropdown ha sfondo bianco: il bianco non si vedrebbe)
   ⚠️ Deve restare DOPO il blocco "voce attiva BIANCA"
========================================================= */
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul.sub-menu .current-menu-item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul.sub-menu .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul.sub-menu .current_page_item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul.sub-menu .current-menu-parent > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover ul.sub-menu .current-menu-item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover ul.sub-menu .current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover ul.sub-menu .current_page_item > a,
body:not(.home):not(.front-page) .jes-header:not(.jes-header--scrolled) .sticky-menu ul:hover ul.sub-menu .current-menu-parent > a {
  color: #333333 !important;
}


/* =========================================================
   NUOVO — NON-HOME: voce attiva nel SOTTOMENU sempre SCURA
   anche quando passi col mouse sul menu (es. header scrollato).
   Senza questa regola vinceva la desaturazione in hover (#bdbebf).
========================================================= */
body:not(.home):not(.front-page) .jes-menu ul.sub-menu li.current-menu-item > a,
body:not(.home):not(.front-page) .jes-menu ul.sub-menu li.current_page_item > a,
body:not(.home):not(.front-page) .jes-menu ul.sub-menu li.current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-menu ul.sub-menu li.current-menu-parent > a,
body:not(.home):not(.front-page) .jes-menu ul:hover ul.sub-menu li.current-menu-item > a,
body:not(.home):not(.front-page) .jes-menu ul:hover ul.sub-menu li.current_page_item > a,
body:not(.home):not(.front-page) .jes-menu ul:hover ul.sub-menu li.current-menu-ancestor > a,
body:not(.home):not(.front-page) .jes-menu ul:hover ul.sub-menu li.current-menu-parent > a {
  color: #333333 !important;
}


/* =========================================================
   HOME: tutte scure, ma in hover desatura (anche dropdown)
========================================================= */
.home .jes-menu ul:hover li a,
.front-page .jes-menu ul:hover li a,
.home .jes-menu ul:hover li ul.sub-menu li a,
.front-page .jes-menu ul:hover li ul.sub-menu li a {
  color: #bdbebf !important;
}

.home .jes-menu ul:hover li a:hover,
.front-page .jes-menu ul:hover li a:hover,
.home .jes-menu ul:hover li ul.sub-menu li a:hover,
.front-page .jes-menu ul:hover li ul.sub-menu li a:hover {
  color: #333333 !important;
}


/* =========================================================
   MENU MOBILE (dropdown a tutto schermo)
========================================================= */
nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
  padding: 130px 58px;
  height: 100vh;
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
    padding: 200px 68px;
  }
}


/* =========================================================
   PULSANTE RIQUADRO IMMAGINE CON FRECCIA
========================================================= */
.jes-btn-arrow .elementor-image-box-wrapper {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
}


/* =========================================================
   HAMBURGER CUSTOM — nascondi icone native Elementor
========================================================= */
.jes-menu .elementor-menu-toggle i,
.jes-menu .elementor-menu-toggle svg {
  display: none !important;
}

.jes-menu .elementor-menu-toggle {
  width: 30px !important;
  height: 30px !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  border: none !important;
}

/* STICKY MENU (prima dello scroll) → icone BIANCHE */
.jes-header .sticky-menu .elementor-menu-toggle[aria-expanded="false"] {
  background-image: url('/wp-content/uploads/2026/05/hamburger-bianco.webp') !important;
}
.jes-header .sticky-menu .elementor-menu-toggle[aria-expanded="true"] {
  background-image: url('/wp-content/uploads/2026/05/close-bianco.webp') !important;
}

/* SCROLLING MENU (dopo lo scroll) → icone COLORATE */
.jes-header .scrolling-menu .elementor-menu-toggle[aria-expanded="false"] {
  background-image: url('/wp-content/uploads/2026/05/hamburger-linee.webp') !important;
}
.jes-header .scrolling-menu .elementor-menu-toggle[aria-expanded="true"] {
  background-image: url('/wp-content/uploads/2026/05/close.webp') !important;
}


/* =========================================================
   SOTTOMENU DESKTOP
========================================================= */
/* Padding nel dropdown principale (sfondo bianco) */
.elementor-nav-menu .sub-menu.elementor-nav-menu--dropdown {
  padding: 6px 10px !important;
}

/* Singole voci del submenu con padding laterale */
.elementor-nav-menu .sub-menu .menu-item a {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Submenu di secondo livello: apri a DESTRA */
.elementor-nav-menu .sub-menu .sub-menu.elementor-nav-menu--dropdown {
  left: 100% !important;
  right: auto !important;
  margin-left: 0 !important;
  top: 0 !important;
  margin-top: 0 !important;
}


/* =========================================================
   GRADIENTE HEADER (solo non scrollato)
========================================================= */
.jes-header:not(.jes-header--scrolled)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 100%);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.jes-header.jes-header--scrolled::before {
  opacity: 0;
}


/* =========================================================
   FORM — Ninja Forms
========================================================= */
.nf-form-content .list-select-wrap .nf-field-element > div,
.nf-form-content input:not([type=button]),
.nf-form-content textarea {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #c4c4c4 !important;
  color: #333333 !important;
}

.nf-field,
.nf-field-label,
.nf-form-layout {
  color: #121212 !important;
}

.nf-form-content input::placeholder,
.nf-form-content textarea::placeholder {
  color: #333333 !important;
  opacity: 1;
}

.list-select-wrap div:after {
  color: #121212 !important;
}

.nf-form-content .list-select-wrap .nf-field-element > div:focus,
.nf-form-content input:not([type=button]):focus,
.nf-form-content textarea:focus {
  color: #121212 !important;
}

.nf-form-content select.ninja-forms-field {
  color: #121212 !important;
  opacity: 0.8 !important;
}

.nf-before-form-content {
  display: none;
}

.nf-form-content .list-select-wrap > div div:after {
  content: "" !important;
  width: 15px;
  height: 15px;
  transform: translateY(8%) rotate(135deg);
  transform-origin: center;
  background: url("/wp-content/uploads/2026/01/icona-pulsanti-freccia-su.webp") no-repeat center / contain;
  transition: transform .25s ease;
  cursor: pointer;
}


/* =========================================================
   FORM — SUBMIT con linee oblique animate (come cr-btn)
   Classe "jes-cta-form" sul campo submit in Ninja Forms
========================================================= */
.nf-form-content input.jes-cta-form[type="submit"] {
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  line-height: 1 !important;
  cursor: pointer;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
  color: var(--e-global-color-text, #1a1a1a);
  position: relative;
  z-index: 1;
}

.nf-field-container.submit-container .nf-field-wrap {
  display: flex;
  justify-content: flex-start;
}

.nf-field-container.submit-container .nf-field-element {
  display: inline-flex !important;
  width: auto !important;
  flex: 0 0 auto !important;
  align-items: center;
}

/* reset file upload button */
.nf-field-container .nf-fu-fileinput-button {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--e-global-color-text, #1a1a1a) !important;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-accent-font-size) !important;
  font-weight: var(--e-global-typography-accent-font-weight) !important;
  line-height: 1 !important;
  cursor: pointer;
}

.nf-field-container .nf-fu-fileinput-button span {
  font-family: var(--e-global-typography-accent-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-accent-font-size) !important;
  font-weight: var(--e-global-typography-accent-font-weight) !important;
  color: var(--e-global-color-text, #1a1a1a) !important;
}

/* wrapper linee oblique (creato da JS) */
.jes-submit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  position: relative;
}

.jes-submit-lines {
  overflow: hidden;
  max-width: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: max-width 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              margin-right 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-right: 0;
  transform: translateZ(0);
}

.jes-submit-wrap:hover .jes-submit-lines {
  max-width: 44px;
  margin-right: 1px;
}

.jes-submit-lines-inner {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 4px;
  padding-right: 6px;
}

.jes-submit-line {
  display: block;
  width: 1.5px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  margin-right: 4px;
  transform: skewX(-18deg) translateX(-8px);
  opacity: 0;
  transition: opacity 0.3s ease,
              transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.jes-submit-line:last-child { margin-right: 0; }

.jes-submit-wrap:hover .jes-submit-line--1 {
  opacity: 1; transform: skewX(-18deg) translateX(0); transition-delay: 0.06s;
}
.jes-submit-wrap:hover .jes-submit-line--2 {
  opacity: 1; transform: skewX(-18deg) translateX(0); transition-delay: 0.13s;
}
.jes-submit-wrap:hover .jes-submit-line--3 {
  opacity: 1; transform: skewX(-18deg) translateX(0); transition-delay: 0.20s;
}

.jes-submit-line--1 { background: #5e8ccb; }
.jes-submit-line--2 { background: #1A3A8F; }
.jes-submit-line--3 { background: #D22B2B; }

.jes-submit-arrow {
  width: 17px;
  height: 17px;
  margin-left: 26px;
  display: inline-block;
  flex-shrink: 0;
  background-image: url('/wp-content/uploads/2026/01/icona-pulsanti-freccia-su.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jes-submit-wrap:hover .jes-submit-arrow {
  transform: rotate(45deg);
}


/* =========================================================
   SEARCH & FILTER
========================================================= */
input#search-filter-input-combobox-0,
input#search-filter-input-combobox-1,
.search-filter-component-combobox__selection.search-filter-component-combobox__selection-placeholder {
  font-family: var(--e-global-typography-abe2d84-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-abe2d84-font-size) !important;
  font-weight: var(--e-global-typography-abe2d84-font-weight) !important;
  text-transform: var(--e-global-typography-abe2d84-text-transform) !important;
  line-height: var(--e-global-typography-abe2d84-line-height) !important;
  color: var(--e-global-color-text) !important;
}

ul.search-filter-component-combobox-base__listbox-list {
  font-family: var(--e-global-typography-42c2ed5-font-family), Sans-serif !important;
  font-size: var(--e-global-typography-42c2ed5-font-size) !important;
  font-weight: var(--e-global-typography-42c2ed5-font-weight) !important;
  line-height: var(--e-global-typography-42c2ed5-line-height) !important;
  color: var(--e-global-color-text) !important;
}

ul.search-filter-component-combobox-base__listbox-list li:hover {
  color: #D2D3D4 !important;
}

div#search-filter-input-combobox-listbox-0,
div#search-filter-input-combobox-listbox-1 {
  width: 28vw !important;
}

svg.search-filter-icon__svg {
  fill: #333333 !important;
}

@media only screen and (max-width: 767px) {
  .search-filter-field {
    width: 85vw !important;
  }
  .search-filter-component-combobox {
    padding: 0px !important;
  }
  div#search-filter-input-combobox-listbox-0,
  div#search-filter-input-combobox-listbox-1 {
    width: 85vw !important;
    height: 20vh;
    padding: 14px;
  }
  div#search-filter-input-combobox-listbox-2 {
    background: #fdfdfb;
    height: 20vh;
    padding: 14px;
  }
  li#search-filter-input-combobox-listbox-0-option--progetto-esecutivo {
    padding-bottom: 4px !important;
  }
  ul.search-filter-component-combobox-base__listbox-list {
    font-size: 3.8vw !important;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .search-filter-component-combobox__selection.search-filter-component-combobox__selection-placeholder {
    font-size: 2.2vw !important;
  }
  .search-filter-component-combobox {
    padding: 0px !important;
  }
  div#search-filter-input-combobox-listbox-0,
  div#search-filter-input-combobox-listbox-1 {
    width: 30vw !important;
    height: 20vh;
    padding: 14px;
  }
  div#search-filter-input-combobox-listbox-2 {
    background: #fdfdfb;
    height: 20vh;
    padding: 14px;
  }
  li#search-filter-input-combobox-listbox-0-option--progetto-esecutivo {
    padding-bottom: 4px !important;
  }
  ul.search-filter-component-combobox-base__listbox-list {
    font-size: 2.5vw !important;
  }
  .elementor-element.elementor-element-51544be.e-con-full.e-flex.e-con.e-child {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
  .elementor-element.elementor-element-bf3295f.e-con-full.e-flex.e-con.e-child {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
  }
}


/* =========================================================
   LIGHTBOX GALLERIA IMMAGINI PROGETTI
========================================================= */
.elementor-slideshow__title {
  display: none;
}


/* =========================================================
   ZOOM IMMAGINE
========================================================= */
.jes-zoom {
  overflow: hidden !important;
  position: relative !important;
  background-color: transparent !important;
}

.jes-zoom::after {
  content: "" !important;
  position: absolute !important;
  top: -5% !important;
  left: -5% !important;
  right: -5% !important;
  bottom: -5% !important;
  width: 110% !important;
  height: 110% !important;
  background-image: var(--jes-bg) !important;
  background-size: cover !important;
  background-position: center !important;
  transform: scale(1) !important;
  transition: transform 0.6s ease !important;
  z-index: -1 !important;
}

.jes-zoom > .elementor-container,
.jes-zoom > .e-con-inner,
.jes-zoom > .elementor-element {
  position: relative !important;
  z-index: 0 !important;
}

.jes-zoom:hover::after,
.jes-div-img:hover .jes-zoom::after,
.jes-div-img.jes-zoom:hover::after {
  transform: scale(1.08) !important;
}


/* =========================================================
   PULSANTE CR-BTN
========================================================= */
.cr-btn {
  display: inline-flex;
  align-items: center;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
  line-height: 1;
  color: var(--e-global-color-text, #1a1a1a);
  text-decoration: none;
  gap: 0;
}

.cr-btn__lines {
  overflow: hidden;
  max-width: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: max-width 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              margin-right 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-right: 0;
  transform: translateZ(0);
}

.cr-btn:hover .cr-btn__lines,
.jes-div-img:hover .cr-btn__lines {
  max-width: 44px;
  margin-right: 1px;
}

.cr-btn__lines-inner {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 4px;
  padding-right: 6px;
}

.cr-btn__line {
  display: block;
  width: 1.5px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  margin-right: 4px;
  transform: skewX(-18deg) translateX(-8px);
  opacity: 0;
  transition: opacity 0.3s ease,
              transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cr-btn__line:last-child { margin-right: 0; }

.cr-btn:hover .cr-btn__line--1,
.jes-div-img:hover .cr-btn__line--1 {
  opacity: 1;
  transform: skewX(-18deg) translateX(0);
  transition-delay: 0.06s;
}
.cr-btn:hover .cr-btn__line--2,
.jes-div-img:hover .cr-btn__line--2 {
  opacity: 1;
  transform: skewX(-18deg) translateX(0);
  transition-delay: 0.13s;
}
.cr-btn:hover .cr-btn__line--3,
.jes-div-img:hover .cr-btn__line--3 {
  opacity: 1;
  transform: skewX(-18deg) translateX(0);
  transition-delay: 0.20s;
}

.cr-btn__line--1 { background: #5e8ccb; }
.cr-btn__line--2 { background: #1A3A8F; }
.cr-btn__line--3 { background: #D22B2B; }

.cr-btn__label {
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1;
  display: inline-block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cr-btn__arrow {
  width: 17px;
  height: 17px;
  margin-left: 26px;
  display: inline-block;
  flex-shrink: 0;
  background-image: url('/wp-content/uploads/2026/01/icona-pulsanti-freccia-su.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cr-btn:hover .cr-btn__arrow,
.jes-div-img:hover .cr-btn__arrow {
  transform: rotate(45deg);
}

/* rimuove bordi visibili sui container figli in hover */
.jes-div-img:hover .elementor-element {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* rimuove background bianco di default sui container figli */
.jes-div-img > .e-con-inner > .elementor-element {
  background-color: transparent !important;
}


/* =========================================================
   REVEAL IMMAGINE — entrata da sinistra verso destra
========================================================= */
.reveal-img {
  clip-path: inset(0 0 0 100%);
  transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: clip-path;
}

.reveal-img.active {
  clip-path: inset(0 0 0 0%);
}


/* =========================================================
   ACCORDION — sfondo con crossfade (vedi seppia-scripts.js)
   (spostato qui dal CSS aggiuntivo del Personalizza)
========================================================= */
#jes-accordion-bg,
#jes-accordion-bg-2 {
  position: relative;
  overflow: hidden;
}