/*
----------------------------
# TIPOGRAFIA
# BODY RULES
# TRANSITION OVERLAY
# HEADER
# MENU CATEGORIE
# FOOTER
# LENIS SCROLL
# ARTICOLI
# QUERY PRODOTTI
# PULSANTI
# NATIVE BLOCKS OVERRIDES
# PARVUS LIGHTBOX
# STILI SPECIFICI AVIATORE
# FORMIDABLE
----------------------------
*/

/*
---------------------------------------------------------------------------------------
# TIPOGRAFIA 
---------------------------------------------------------------------------------------
*/

body {
  letter-spacing: 0.04em;
}

.has-m-font-size {
  line-height: 1.3;
}

.has-l-font-size,
.has-xl-font-size {
  line-height: 1em;
  letter-spacing: 0.01em;
}

.has-l-font-size,
.has-xl-font-size,
.has-xxl-font-size {
  font-family: "Bodoni";
}

.has-xxl-font-size {
  line-height: 0.94em;
  letter-spacing: -0.01em;
}

.text-uppercase {
  text-transform: uppercase !important;
}

/*
---------------------------------------------------------------------------------------
# BODY RULES 
---------------------------------------------------------------------------------------
*/

body.lock {
  overflow: hidden !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

:root {
  --wp--preset--spacing--60: max(3rem, 4vh);
  --wp--preset--spacing--70: max(5rem, 7vh);
  --wp--preset--spacing--80: max(6rem, 10vh);
}

body.wp-admin .hide_in_fronted {
  opacity: 0.4;
  background: #d4d4d4;
}

body:not(.wp-admin) .hide_in_fronted {
  display: none !important;
}

/*
---------------------------------------------------------------------------------------
# TRANSITION OVERLAY 
---------------------------------------------------------------------------------------
*/

body:not(.wp-admin) #transition_overlay {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--wp--preset--color--primary);
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 60px;
  height: 60px;
  position: relative;
  pointer-events: none;
}

.spinner .dot {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
}

.spinner .dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--wp--preset--color--white);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner .dot {
  animation: spin 2s infinite;
}

.spinner .dot:nth-child(2) {
  animation-delay: 100ms;
}

.spinner .dot:nth-child(3) {
  animation-delay: 200ms;
}

.spinner .dot:nth-child(4) {
  animation-delay: 300ms;
}

.spinner .dot:nth-child(5) {
  animation-delay: 400ms;
}

/*
---------------------------------------------------------------------------------------
# HEADER 
---------------------------------------------------------------------------------------
*/
:root {
  --header-height: 125px;
  --primary-categories-menu-height: 45px;
}

header {
  border-bottom: 1px solid var(--wp--preset--color--black);
  position: fixed;
  width: 100%;
  z-index: 99;
  background-color: var(--wp--preset--color--white);
  top: 0px;
  transition: top 1s ease 0s;
}

header.hidden {
  top: calc(var(--header-height) * -1);
}

#header_content {
  padding-block: 20px;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  height: var(--header-height);
}

#left_menu,
#right_menu {
  width: 40%;
}

header #site_logo {
  width: 180px;
  height: 85px;
}

#header_content ul.menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  column-gap: 2vw;
  margin-block: 0;
  padding-inline: 0;
  margin-inline: 0;
}

#left_menu ul.menu {
  justify-content: flex-start;
}

#mobile_menu,
#hamburger_icon {
  display: none;
}

#mobile_menu ul li {
  font-size: var(--wp--preset--font-size--l);
  font-family: var(--wp--preset--font-family--primary);
  margin-block: 4vh;
  padding: 0;
  text-align: center;
  line-height: 1;
}

#header_content li a {
  color: var(--wp--preset--color--black);
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 300;
  padding: 5px 10px;
}

#header_content li.current-menu-item a,
body.post-type-archive-prodotto
  #header_content
  li.menu-item-type-post_type_archive.menu-item-object-prodotto
  a,
body.tax-categoria-prodotto
  #header_content
  li.menu-item-type-post_type_archive.menu-item-object-prodotto
  a,
body.single-prodotto
  #header_content
  li.menu-item-type-post_type_archive.menu-item-object-prodotto
  a {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}

#catalog_and_search {
  position: absolute;
  top: 20px;
  right: 40px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
}

#search_icon {
  width: 3rem;
  text-align: center;
  background-color: var(--wp--preset--color--light-gray);
  display: flex;
  justify-content: center;
}

#search_icon svg {
  width: 25px;
}

#catalog_and_search .wp-block-buttons a {
  display: inline-block;
  color: var(--wp--preset--color--primary) !important;
  border: 1px solid currentColor !important;
  padding: 0.8em 0.5em !important;
  letter-spacing: 0.05em;
}

#mobile_menu {
  position: fixed;
  top: 0px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--wp--preset--color--primary);
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#mobile_menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile_menu li {
  overflow-y: hidden;
}

#mobile_menu li a {
  color: var(--wp--preset--color--white);
  display: block;
}

#mobile_menu ul.menu {
  list-style: none;
}

#hamburger_icon {
  width: 35px;
  height: 25px;
  position: relative;
  margin: 0;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.5s ease-in-out;
  -moz-transition: 0.5s ease-in-out;
  -o-transition: 0.5s ease-in-out;
  transition: 0.5s ease-in-out;
  cursor: pointer;
  z-index: 21;
}

#hamburger_icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--wp--preset--color--primary);
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.25s ease-in-out;
  -moz-transition: 0.25s ease-in-out;
  -o-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}

#hamburger_icon span:nth-child(1) {
  top: 0px;
}

#hamburger_icon span:nth-child(2),
#hamburger_icon span:nth-child(3) {
  top: 10px;
}

#hamburger_icon span:nth-child(4) {
  top: 20px;
}

#hamburger_icon.open span {
  background: var(--wp--preset--color--white) !important;
}

#hamburger_icon.open span:nth-child(1) {
  top: 10px;
  width: 0%;
  left: 50%;
}

#hamburger_icon.open span:nth-child(2) {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

#hamburger_icon.open span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#hamburger_icon.open span:nth-child(4) {
  top: 10px;
  width: 0%;
  left: 50%;
}

body.menu_open {
  overflow: hidden;
}

@media (max-width: 1280px) {
  :root {
    --header-height: 80px;
    --primary-categories-menu-height: 45px;
    --mobile-cat-menu-toggle-height: 40px;
    --mobile-cat-sub-menu-height: 340px;
  }

  #mobile_menu {
    display: flex;
  }

  #hamburger_icon {
    display: block;
  }

  #left_menu,
  #right_menu {
    display: none;
  }

  header #site_logo {
    width: 140px;
    height: auto;
  }

  #header_content {
    align-items: center;
    padding-block: 10px;
  }

  #catalog_and_search {
    right: 90px;
    top: 16px;
  }
}

@media (max-width: 580px) {
  header #site_logo {
    width: 100px;
  }

  #hamburger_icon {
    width: 32px;
  }

  #catalog_and_search {
    right: 72px;
    top: 26px;
    gap: 0.5rem;
  }

  #catalog_and_search .wp-block-buttons a {
    padding: 0.4em 0.3em !important;
    font-size: 10px;
  }

  #search_icon {
    width: 1.6rem;
  }

  #search_icon svg {
    width: 18px;
  }
}
@media (max-width: 420px) {
  header #site_logo {
    width: 90px;
  }
}

/*
---------------------------------------------------------------------------------------
# MENU CATEGORIE
---------------------------------------------------------------------------------------
*/
.category_menu {
  background-color: var(--wp--preset--color--white);
  border-top: 1px solid var(--wp--preset--color--black);
  padding-block: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 1vw;
  position: relative;
}
.category_menu.hidden {
  display: none;
}

.category_menu a {
  font-weight: 300;
  text-transform: uppercase;
  padding: 5px 10px;
  line-height: 1.2;
  height: 28px;
}

.category_menu a.current {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}

.lv1_cat_menu a,
.lv2_cat_menu a {
  text-transform: capitalize;
}

.category_menu.hover_menu {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
  border-top: 1px solid var(--wp--preset--color--black);
  background-color: var(--wp--preset--color--white);
  padding: 10px;
  position: absolute;
  top: 0px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 14px;
  z-index: 2;
  transition: opacity 0.3s ease;
}
.category_menu.hover_menu.opened {
  opacity: 1;
  pointer-events: all;
}

#mobile_cat_filters_toggle {
  display: none;
}

/* mobile */
@media (max-width: 1080px) {
  .category_menu {
    flex-direction: column;
    align-items: flex-start;
    border: none;
    column-gap: 0;
    padding-block: 0;
  }

  .category_menu a {
    height: unset;
    font-size: 1.25em;
    height: 8vh;
    font-size: 1.25em;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ececec;
  }
  /* .category_menu a span {
    vertical-align: middle;
  } */
  .category_menu a span svg {
    padding: 0px 0px 0px 2em;
    box-sizing: content-box;
    width: 1.3em;
  }

  .category_menu > span {
    display: block;
    width: 100%;
    margin-top: 4vh;
    padding: 10px;
    text-align: center;
  }

  #mobile_cat_filters_toggle {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4em;
    line-height: 0;
    padding-block: 0.5em;
  }
  #mobile_cat_filters_toggle .open_filters {
    padding-block: 0.5em;
  }

  #mobile_cat_filters_toggle .close_filters {
    pointer-events: none;
    opacity: 0;
    line-height: 0;
    padding: 5px;
  }
  #mobile_cat_filters_toggle .close_filters.visible {
    pointer-events: all;
    opacity: 1;
  }

  #categories_menu_container {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
  }

  #categories_menu_container:has(.category_menu.opened) {
    height: 100vh;
  }

  /* OPEN / CLOSED  menu styles */
  .category_menu {
    display: flex !important;
    opacity: 0;
    height: 0;

    position: relative;
    left: 100%;
    transition: left 0.4s ease;
  }

  .category_menu.opened {
    padding-top: 25px;
    opacity: 1;
    height: auto;
    left: 0%;
  }
}

/*
---------------------------------------------------------------------------------------
# FOOTER 
---------------------------------------------------------------------------------------
*/
footer {
  position: relative;
  --catalog-height: 180px;
}

footer ul.menu li {
  list-style: none;
}

footer ul.menu li.current-menu-item {
  font-weight: bold;
  text-decoration: underline;
}

footer .richiedi_catalogo_col {
  height: 100%;
  position: fixed;
  height: var(--catalog-height);
  transition: bottom 1s ease;
  right: 5%;
  bottom: calc(var(--catalog-height) * -1);
}

@media (max-width: 781px) {
  footer {
    --catalog-height: 150px;
    margin-bottom: var(--catalog-height) !important;
  }

  footer .richiedi_catalogo_col .has-xl-font-size {
    padding-bottom: 20px !important;
  }

  footer .richiedi_catalogo_col .has-xl-font-size strong {
    font-size: 0.8em;
  }
}

footer #close_catalog_col {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 22px;
  height: 22px;
  line-height: 0;
  display: flex;
  font-size: 26px;
  background-color: #fff;
  color: #000;
  border-radius: 100%;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

footer .richiedi_catalogo_col.visible {
  bottom: 0;
}

footer .richiedi_catalogo_col.bottom {
  bottom: 0;
}

footer .richiedi_catalogo_col.hidden #close_catalog_col,
footer .richiedi_catalogo_col.bottom #close_catalog_col {
  display: none;
}

footer .dati_societari {
  margin-top: 5em;
  margin-bottom: 5em;
}

footer .credits {
  padding-bottom: 2em;
}

footer li.menu-item {
  padding-bottom: 0.4em;
}

@media (max-width: 781px) {
  footer .legal_social_community {
    flex-direction: column;
    gap: 40px !important;
  }

  footer .dati_societari {
    margin-block-start: 2em !important;
    margin-bottom: 3em;
    text-align: center;
  }

  footer .credits {
    padding-bottom: 0;
    text-align: center;
  }
}

body:not(.home) footer .richiedi_catalogo_col {
  display: none;
}

/*
---------------------------------------------------------------------------------------
# LENIS SCROLL 
---------------------------------------------------------------------------------------
*/

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/*
---------------------------------------------------------------------------------------
# ARTICOLI
---------------------------------------------------------------------------------------
*/

/* 
.article_back_button a:before {
    content: url(/wp-content/themes/doteco-theme/assets/svg/arrow_right.svg);
    display: inline-block;
    padding-left: 5px;
    vertical-align: bottom;
    width: 0.8em;
    transition: var(--link-transition);
    transform: rotate(180deg);
}

.article_main_content {
    max-width: 900px !important;
    margin: 0 auto !important;
}

.article_main_content>* {
    padding-left: 0px !important;
    padding-right: 0px !important;
}

.articolo_hero {
    height: 40vh;
    height: 40dvh;
}

.articolo_hero img {
    height: 100%
} */

/*
---------------------------------------------------------------------------------------
# QUERY PRODOTTI
---------------------------------------------------------------------------------------
*/
#container__prodotti {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 120px;
  /* load more button space */
}

#container__prodotti .prodotto {
  padding: 30px;
  border: 1px solid #aaaaaa;
  background: var(--wp--preset--color--light-gray);
  width: 25%;
  /* opacity: 0;
  transform: translateY(40px); */
}

#container__prodotti .wp-block-post-featured-image {
  overflow: hidden;
}

#container__prodotti .wp-block-post-featured-image img {
  aspect-ratio: 1 / 1;
  transition: transform 1s ease;
  transform: scale(1.5);
  width: 100%;
  height: auto;
}

#container__prodotti .wp-block-post:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
  transform: scale(1.55);
}

#container__prodotti .prodotto .wp-block-post-title {
  transition: color 0.4s ease;
}

#container__prodotti .wp-block-post:hover .wp-block-post-title {
  color: var(--wp--preset--color--primary);
}

@media (max-width: 920px) {
  #container__prodotti .prodotto {
    padding: 20px;
    width: 50%;
  }

  #container__prodotti .prodotto .wp-block-post-excerpt,
  #container__prodotti .prodotto .wp-block-post-title {
    text-align: center;
  }
}

body.search-results .wp-block-post.prodotto {
  text-align: center;
}

#load__more {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  border: 1px solid var(--wp--preset--color--primary);
  padding: 0.2rem 1.5rem;
  font-size: 1.2rem;
  transition: background-color 0.4s ease, color 0.4s ease;
}

#load__more:hover {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}

#load__more.loading {
  pointer-events: none;
  background-color: var(--wp--preset--color--primary);
}

#load__more .spinner {
  opacity: 0;
  width: 1.2rem;
  height: 1.2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

#load__more .spinner .dot::after {
  width: 3px;
  height: 3px;
}

#load__more.loading span {
  opacity: 0;
}

#load__more.loading .spinner {
  opacity: 1;
}

/*
---------------------------------------------------------------------------------------
# PULSANTI
---------------------------------------------------------------------------------------
*/

/*
---------------------------------------------------------------------------------------
# NATIVE BLOCKS OVERRIDES
---------------------------------------------------------------------------------------
*/

.wp-block-separator {
  border-bottom: 1px solid !important;
}

/*
---------------------------------------------------------------------------------------
# PARVUS LIGHTBOX
---------------------------------------------------------------------------------------
*/
.parvus__counter {
  font-size: var(--wp--preset--font-size--m);
}

/*
---------------------------------------------------------------------------------------
# STILI SPECIFICI AVIATORE
---------------------------------------------------------------------------------------
*/

.gruppo_contatti {
  margin-top: var(--header-height) !important;
}

.gruppo_contatti .wp-block-columns {
  position: relative;
}

.tazza_contatti {
  position: absolute;
  top: 10vh;
}

.img_absolute_right {
  position: absolute;
  right: 0px;
  z-index: 9;
  margin-top: var(--wp--preset--spacing--60);
}

.img_absolute_right img {
  height: clamp(100px, 15vw, 250px) !important;
}

@media (max-width: 781px) {
  .column_reverse_mobile .wp-block-column:first-child {
    order: 2;
  }

  .img_absolute_right {
    display: none !important;
  }

  .contact_form_column {
    padding-right: var(--wp--style--root--padding-right);
    padding-left: var(--wp--style--root--padding-left);
  }
}

.wp-block-button a {
  transition: transform 0.8s ease;
}

.wp-block-button:hover a {
  transform: scale(0.97) !important;
}

li.menu-item a {
  position: relative;
}

li.menu-item a::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background: currentcolor;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

li.menu-item a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/*
---------------------------------------------------------------------------------------
# FORMIDABLE
---------------------------------------------------------------------------------------
*/
.frm_forms .frm_submit {
  justify-content: flex-end;
}

.frm_forms textarea {
  resize: none;
}

@media (min-width: 782px) {
  .modal.wp-block-frm-modal-content.show {
    display: flex !important;
    align-items: center;
  }
}
