/*
----------------------------
# TIPOGRAFIA
# SPAZI
# HEADER
# HOVERS
# FS MENU
# BUTTONS
# FORMIDABLE
# FOOTER
# MORANDI
# BRAND GRID
# PARVUS
----------------------------
*/

/*
---------------------------------------------------------------------------------------
# TIPOGRAFIA 
---------------------------------------------------------------------------------------
*/

body {
  font-family: "neue-haas-grotesk-display", sans-serif;
  font-weight: 600
}

.has-s-font-size {
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2em;
}


.has-ml-font-size,
.has-mxl-font-size {
  letter-spacing: 0em;
  line-height: 1.2em;
}

.has-l-font-size,
.has-xl-font-size {
  letter-spacing: 0em;
  line-height: 1.15em;
}


.has-xxl-font-size {
  letter-spacing: 0em;
  line-height: 1.1em;
}

.wp-site-blocks a {
  text-decoration: none;
  color: unset
}



/*
---------------------------------------------------------------------------------------
# SPAZI 
---------------------------------------------------------------------------------------
*/

.wp-site-blocks {
  padding-top: max(120px, 15vh);
}

@media (max-width: 781px) {
  :root {
    --wp--preset--spacing--20: min(2.1rem, 5.6vw);
    --wp--preset--spacing--30: min(3.5rem, 8.4vw);
    --wp--preset--spacing--40: min(9.8rem, 14vw);
    --wp--preset--spacing--50: min(14rem, 16.8vw);
    --wp--preset--spacing--60: min(19.6rem, 21vw);
  }
}


/*
---------------------------------------------------------------------------------------
# HEADER
---------------------------------------------------------------------------------------
*/

:root {
  --header-transition-time: 0.7s;
}

/* spazio per admin bar se utente loggato */
body.logged-in header.site-header:not(.hidden) {
  top: 32px;
}

@media (max-width: 781px) {
  body.logged-in header.site-header:not(.hidden) {
    top: 46px;
  }
}

header.site-header {
  padding-right: var(--wp--style--root--padding-right);
  padding-left: var(--wp--style--root--padding-left);
  padding-block: 20px;
  position: fixed;
  width: 100%;
  z-index: 99;
  top: 0;

  transition: padding-block var(--header-transition-time) ease;
  background: var(--wp--preset--color--bg-color);
}

header.site-header>.wp-block-columns {
  margin: 0 auto;
  max-width: var(--wp--style--global--content-size);
}

header.site-header a {
  text-decoration: none;
}

header.site-header .header_contact a {
  color: var(--wp--preset--color--black)
}

/* HEADER ON SCROLL */
header.site-header.scrolled {
  padding-block: 10px;
  box-shadow: 0px 1px 1px 1px #e4e2dc;
}

@media (max-width:781px) {

  header.site-header .header_social,
  header.site-header .header_contact {
    display: none;
  }

  header.site-header .logo {
    position: relative;
    z-index: 12;
  }

  header.site-header .logo svg * {
    transition: fill var(--header-transition-time) ease;
  }

  body.fs_menu_open header.site-header .logo svg rect {
    fill: var(--wp--preset--color--white);
  }


  body.fs_menu_open header.site-header .logo svg path {
    fill: var(--wp--preset--color--dark);
  }

  #fs_menu_widget {
    padding-block: var(--wp--preset--spacing--10) !important;
    gap: var(--wp--preset--spacing--20) !important;
  }

  #fs_menu_widget p.wp-block-paragraph {
    margin-top: 0 !important;
  }
}

.wp-site-blocks>*:not(header.site-header) {
  transition: filter 0.5s ease;
}

body.fs_menu_open .wp-site-blocks>*:not(header.site-header) {
  filter: blur(4px);
  pointer-events: none;
}

/*
---------------------------------------------------------------------------------------
# FS MENU
---------------------------------------------------------------------------------------
*/
ul.t99-menu {
  background-color: var(--wp--preset--color--black);
  align-items: flex-start;
  right: 0;
  left: auto;
  width: 50%;
  min-width: 540px;
  opacity: 1;
  transform: translate(100%, 0);
  transition: transform .5s ease;
}

body.fs_menu_open .t99-menu {
  transform: translate(0, 0);
}

#hamburger_icon {
  width: 32px;
  height: 21px;
}

ul.t99-menu>li a {
  color: var(--wp--preset--color--white);
  font-size: var(--wp--preset--font-size--large);
}

body.fs_menu_open #hamburger_icon span {
  background: var(--wp--preset--color--white)
}

ul.t99-menu>li:last-of-type {
  flex-grow: 1;
}

@media (max-width:781px) {
  ul.t99-menu {
    right: auto;
    left: 0;
    width: 100%;
    min-width: auto;
    transform: translate(0, -100%);
  }
}

ul.t99-menu>* {
  opacity: 0;
  transition: opacity 0.4s ease 0s;
}

body.fs_menu_open ul.t99-menu>* {
  opacity: 1;
  transition: opacity 0.7s ease .1s;

}

/*
---------------------------------------------------------------------------------------
# HOVERS
---------------------------------------------------------------------------------------
*/
:root {
  --hover-tranition-time: 0.7s;
}

.t99-menu li a,
.link_underline a {
  position: relative;
  width: fit-content;
}

.t99-menu li a::after,
.link_underline a::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 0.05em;
  bottom: 0;
  left: 0;
  background: currentcolor;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

@media (min-width: 782px) {

  .t99-menu li a:hover::after,
  .link_underline a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
  }
}

.current-menu-item a::after {
  transform: scaleX(1) !important;
  transform-origin: bottom left !important;
}



/*
---------------------------------------------------------------------------------------
# BUTTONS
---------------------------------------------------------------------------------------
*/
:root {
  --arrow-black: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6.1 1.5v1.4h10L1.5 17.5l1 1L17.1 3.9v10h1.4V1.5H6.1Z' fill='%23000'/></svg>");
}

.wp-block-button .wp-block-button__link {
  padding: 0.5em;
  border-radius: 0px;
  text-decoration: none;
  text-transform: none;
  color: var(--wp--preset--color--black);
  display: flex;
  align-items: center;
}

.wp-block-button .wp-block-button__link::after {
  content: var(--arrow-black);
  width: 1em;
  display: inline-block;
  position: relative;
  margin-left: .5em;
  line-height: 0;
  transition: margin 0.5s ease;
}

.wp-block-button:hover .wp-block-button__link::after {
  margin-left: .75em;
}

/*
---------------------------------------------------------------------------------------
# FORMIDABLE
---------------------------------------------------------------------------------------
*/


.frm_form_fields * {
  letter-spacing: 0.05em;
}

.frm_forms .frm_fields_container {
  grid-gap: 5px;
}

.frm_forms .frm_fields_container input,
.frm_forms .frm_fields_container select,
.frm_forms .frm_fields_container textarea {
  width: 100%;
  font-size: 1rem;
  color: var(--wp--preset--color--dark);
  border: 0px;
  border-radius: 0px;
  border-bottom: 1px solid var(--wp--preset--color--gray);
  padding-block: 1em;
  resize: none;
  padding: 0.25rem;
  background: transparent;

}

.frm_forms .frm_fields_container input:focus-visible,
.frm_forms .frm_fields_container select:focus-visible,
.frm_forms .frm_fields_container textarea:focus-visible {
  outline: 1px solid var(--wp--preset--color--gray);
}

.frm_submit button.frm_button_submit.frm_final_submit {
  all: unset;
  background: var(--wp--preset--color--dark);
  color: var(--wp--preset--color--white);
  font-size: 1rem;
  text-transform: uppercase;
  padding: .7rem 2rem;
  border-radius: 0;
  cursor: pointer;
}

.frm_forms .frm_primary_label {
  color: var(--wp--preset--color--dark);
}

.frm_forms .frm_radio label,
.frm_forms .frm_checkbox label {
  color: var(--wp--preset--color--dark)
}

.frm_forms label a {
  text-decoration: underline;
}

.frm_forms *::placeholder {
  color: var(--wp--preset--color--dark) !important;
  opacity: .8;
}


.frm_forms .frm_required {
  color: inherit;
}


.frm_forms br,
.frm_forms p:empty,
.frm_forms p:has(> input) {
  display: none;
}


.frm_forms .vertical_radio .frm_opt_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25em;
}

.frm_forms .frm_form_field.form-field.frm_top_container.frm_full:not(.vertical_radio) label {
  font-weight: bold;
}

/*
---------------------------------------------------------------------------------------
# FOOTER
---------------------------------------------------------------------------------------
*/
footer a {
  text-decoration: none;
  color: unset;
}

footer .wp-block-button__link {
  padding: 0 !important;
  font-size: .8em;

}


@media (max-width:781px) {

  footer p,
  footer .wp-block-heading {
    text-align: center !important;
  }

  footer .footer_social {
    justify-content: center;
  }

  footer .wp-block-buttons {
    align-items: center;
  }
}


/*
---------------------------------------------------------------------------------------
# MORANDI
---------------------------------------------------------------------------------------
*/

body {
  background-color: var(--wp--preset--color--bg-color);
}

body.has_dark_background {
  background-color: var(--wp--preset--color--dark);
}

.position_relative {
  position: relative;
}


#preloader {
  opacity: 1 !important;
  transition: clip-path 0.45s cubic-bezier(.68, .01, .55, .87);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);

}

#preloader.page_entrance {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}

#preloader.page_show {
  transition: none;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

#preloader.page_next {
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 0);
}

body:has(#preloader.page_next) .wp-site-blocks {
  opacity: 0;
  transform: translateY(-10vh);
  transition: opacity .35s ease, transform .4s ease;
}


/* pagina colori invertiti*/
body.inverted_colors {
  color: #FFF;
  --wp--preset--color--black: #FFF;
  --wp--preset--color--white: #000;
  --wp--preset--color--bg-color: #242424;
  --wp--preset--color--dark: #ECEAE4;
  --submit-hover-bg-color: #ECEAE4;
  --wp--preset--color--gray: #707070;
  --arrow-black: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6.1 1.5v1.4h10L1.5 17.5l1 1L17.1 3.9v10h1.4V1.5H6.1Z' fill='%23FFF'/></svg>");
  opacity: 0;
  transition: opacity 0.5s ease;
}



body.inverted_colors .header_social svg *,
body.inverted_colors .footer_social svg * {
  fill: #FFF;
}

body.inverted_colors .fs_menu_social svg * {
  fill: #000;
}

body.inverted_colors #preloader {
  visibility: hidden;
}

body.inverted_colors:has(#preloader.page_entrance),
body.inverted_colors:has(#preloader.page_show) {
  opacity: 1;
}

body.inverted_colors header.site-header.scrolled {
  box-shadow: 0px 1px 1px 1px #1e1e1e;
}


body.inverted_colors header.site-header .logo__bg {
  fill: #fefefe
}

body.inverted_colors header.site-header .logo__txt {
  fill: var(--wp--preset--color--bg-color)
}

body.inverted_colors .frm_style_stile-formidable.with_frm_style .frm_submit button:hover {
  background: var(--wp--preset--color--dark);
  border-color: var(--wp--preset--color--dark);
  color: var(--wp--preset--color--white)
}

/* LINK CON FRECCIA E BOTTOM BORDER*/
.arrow_link {
  padding-block: var(--wp--preset--spacing--30);
  border-bottom: 1px solid var(--wp--preset--color--gray);
}

.arrow_link a {
  display: block;
  position: relative;
  transition: transform 0.5s ease;
  padding-right: 3em;
  /*spazio per ::after */
}

.arrow_link a::after {
  content: var(--arrow-black);
  position: absolute;
  width: 2em;
  height: 2em;
  line-height: 0;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.arrow_link:hover a {
  transform: scale(0.95);
}


.loop_realizzazioni ul {
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 782px) {

  /* A elements: positions 1, 4, 5, 8, 9, 12... */
  .loop_realizzazioni li:nth-child(4n + 1) figure a,
  .loop_realizzazioni li:nth-child(4n) figure a {
    /* A styles */
    aspect-ratio: 1/1;
  }

  /* B elements: positions 2, 3, 6, 7, 10, 11... */
  .loop_realizzazioni li:nth-child(4n + 2) figure a,
  .loop_realizzazioni li:nth-child(4n + 3) figure a {
    /* B styles */
    aspect-ratio: 11 / 15;
  }

  .loop_realizzazioni img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.split_line {
  overflow: hidden;
}

/* FIXES */

@media (max-width: 781px) {

  /* FIX PER NUMERO IN ALTO A DESTRA SU ALCUNE PAGINE: */
  .page_title_row .wp-block-group.is-content-justification-space-between {
    gap: 8px !important;
  }

  .page_title_row p {
    font-size: 1.25rem !important;
    align-self: end;
  }

  /* fix brand logo mobile header*/
  .brand_title_logo_row figure.wp-block-post-featured-image {
    display: none
  }
}

body.single.single-realizzazione .t99-acf-field.t99-acf-field--wysiwyg {
  font-size: 18px;
}


/*
---------------------------------------------------------------------------------------
# BRAND GRID
---------------------------------------------------------------------------------------
*/
.brand-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-grid__row {
  display: grid;
  gap: 24px;
}

/* Riga 1: 1, 16/9, 1 */
.brand-grid__row--type-1 {
  grid-template-columns: 9fr 16fr 9fr;
}

/* Riga 2: 16/9, 1, 1 */
.brand-grid__row--type-2 {
  grid-template-columns: 16fr 9fr 9fr;
}

a.brand-grid__item {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;

  text-decoration: none;
}

/* Elemento centrale della riga 1 */
.brand-grid__row--type-1 a.brand-grid__item:nth-child(2) {
  aspect-ratio: 16 / 9;
}

/* Primo elemento della riga 2 */
.brand-grid__row--type-2 a.brand-grid__item:nth-child(1) {
  aspect-ratio: 16 / 9;
}

a.brand-grid__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
  transition: background 0.3s ease;
}

a.brand-grid__item:hover::before {
  background: rgba(0, 0, 0, 0.5);
}

.brand-grid__content {
  position: relative;
  z-index: 2;
  width: 60%;
  max-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-grid__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

a.brand-grid__item>svg {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}


@media (min-width: 782px) {
  a:hover>svg {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile: 2 colonne quadrate */
@media (max-width: 781px) {
  .brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .brand-grid__row {
    display: contents;
  }

  .brand-grid__item {
    aspect-ratio: 1 / 1 !important;
    width: 100%;
  }

  .brand-grid__content {
    width: 70%;
  }
}


/*
---------------------------------------------------------------------------------------
# PARVUS
---------------------------------------------------------------------------------------
*/
:root {
  --parvus-btn-background-color: var(--wp--preset--color--dark) !important;
  --parvus-btn-hover-background-color: var(--wp--preset--color--gray) !important;
}

.parvus-zoom__indicator {
  display: none !important;
}


/* hide page scrollbar */
html {
  scrollbar-width: none;
}

/* Firefox */
body {
  -ms-overflow-style: none;
}

/* IE and Edge */
body::-webkit-scrollbar,
body::-webkit-scrollbar-button {
  display: none;
}

/* Chrome */
/* end hide page scrollbar */