/*
----------------------------
# TIPOGRAFIA
# SPAZI
# HEADER
# HOVERS
# FS MENU
# BUTTONS
# FORMIDABLE
# FOOTER
# PARVUS
----------------------------
*/

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


.has-s-font-size {
  letter-spacing: 0.04em;
  line-height: 1.2em;
}


.has-m-font-size {
  font-family: var(--wp--preset--font-family--source-serif);
  letter-spacing: 0em;
  line-height: 1.15em;
}

.has-l-font-size,
.has-xl-font-size {
  font-family: var(--wp--preset--font-family--source-serif);
  letter-spacing: 0em;
  line-height: 1.1em;
}



.wp-site-blocks a {
  text-decoration: none;
  color: unset
}



/*
---------------------------------------------------------------------------------------
# SPAZI 
---------------------------------------------------------------------------------------
*/

@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;
}

header.site-header>.wp-block-group {
  margin: 0 auto;
  max-width: var(--wp--style--global--content-size);
  background: var(--wp--preset--color--white);
  padding: .5rem 1rem;
  border-color: var(--wp--preset--color--gray)
}



header.site-header a {
  text-decoration: none;
}

header.site-header .custom-logo {
  width: 200px;
}


@media (min-width: 1280px) and (max-width: 1440px) {
  header.site-header ul.t99-menu {
    gap: 10px
  }
}




/*
---------------------------------------------------------------------------------------
# FS MENU
---------------------------------------------------------------------------------------
*/

@media (max-width: 1280px) {
  header.site-header .t99-menu {
    background-image: url("/wp-content/themes/t99-mega-tema/assets/imgs/menu_bg.jpg");
    background-size: cover;
    background-position: center;
  }

  body header.site-header .t99-menu::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--wp--preset--color--white);
    opacity: 0.8;
  }
}

body.fs_menu_open header.site-header .t99-menu {
  padding: 0;
  justify-content: center;
}

body.fs_menu_open header.site-header ul.t99-menu>li {
  width: auto
}





/*
---------------------------------------------------------------------------------------
# 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 {
  --plus-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolygon points='16 7 16 9 9 9 9 16 7 16 7 9 0 9 0 7 7 7 7 0 9 0 9 7 16 7' fill='%23FFFFFF'/%3E%3C/svg%3E");
  --arrow-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolygon points='12.5 8 11.13 9.38 4.87 15.63 3.5 14.26 9.76 8.01 3.5 1.75 4.87 .37 11.13 6.63 12.5 8' fill='%23CA1C2F'/%3E%3C/svg%3E");
  --button-padding: 0.5em;
}

.wp-block-button .wp-block-button__link {
  padding: var(--button-padding);
  border-radius: 0px;
  text-decoration: none;
  text-transform: none;
  font-weight: 500;
  color: var(--wp--preset--color--white);
  background: var(--wp--preset--color--primary);
  display: flex;
  align-items: center;
}

.wp-block-button .wp-block-button__link::after {
  content: var(--plus-white);
  width: 1em;
  display: inline-block;
  position: relative;
  margin-left: .5em;
  line-height: 0;
  transition: margin 0.5s ease, transform 0.25s ease;
}

.wp-block-button:hover .wp-block-button__link::after {
  margin-left: .75em;
  transform: rotate(90deg);
}


/*
---------------------------------------------------------------------------------------
# CR MIRANDOLA
---------------------------------------------------------------------------------------
*/

.underlined {
  text-decoration: underline;
}

.svg_before {
  position: relative;
}

.svg_before::before {
  content: var(--arrow-red);
  width: .7em;
  display: inline-block;
  position: relative;
  margin-right: .5em;
  line-height: 0;
}

.left_border {
  border-left: 1px solid var(--wp--preset--color--primary);
  padding-left: var(--wp--preset--spacing--10);
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post-navigation a {
  flex-basis: 50%;
  position: relative;
  text-decoration: underline;
}

.post-navigation .post-navigation__previous {
  text-align: left;
  padding-left: 1.5em;
}

.post-navigation .post-navigation__next {
  text-align: right;
  padding-right: 1.5em;
}

.post-navigation .post-navigation__previous[href]::before {
  content: var(--arrow-red);
  position: absolute;
  width: .7em;
  top: 0;
  left: 0;
  transform: rotateZ(180deg);
}

.post-navigation .post-navigation__next[href]::after {
  content: var(--arrow-red);
  position: absolute;
  width: .7em;
  top: 0;
  right: 0
}

.breadcrumbs {
  color: var(--wp--preset--color--primary) !important;
  text-decoration: underline;
  margin-bottom: var(--wp--preset--spacing--10);
}

.breadcrumbs a:last-child::before {
  content: var(--arrow-red);
  display: inline-block;
  width: .7em;
  margin-inline: .5em;
}


.t99-file-downloader {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t99-file-downloader-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t99-file-downloader-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: #CA1C2F;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


@media (max-width: 781px) {
  body.single-post .wp-site-blocks>.wp-block-group {
    margin-top: 140px !important;
  }

  /* carosello aree in home aperto a dx */
  body.home .carosello_aree {
    overflow: visible;
  }

  .img_mobile_h_auto,
  .img_mobile_h_auto img {
    height: auto !important;
  }
}

/*
---------------------------------------------------------------------------------------
# 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: #FBFAFA;
  box-shadow: none !important;
  outline: none !important;

}

.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;
  transition: background .5s ease;
}

.frm_submit button.frm_button_submit.frm_final_submit:hover {
  background: var(--wp--preset--color--primary);

}

.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 .logo_footer g:not(:last-child)>path {
  fill: var(--wp--preset--color--white);
}

footer ul.wp-block-page-list {
  display: flex;
  list-style: none;
  padding: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  max-height: 7em;
  font-weight: 500;
  font-weight: 500;
  column-gap: 4em;
  row-gap: 1em;
}


#footer_search {
  padding: 4px 8px;
  cursor: pointer;
}

#footer_search p {
  padding: 0
}

@media (max-width: 781px) {
  footer .wp-block-navigation__container {
    justify-content: center;
  }
}

/*
---------------------------------------------------------------------------------------
# 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 {
  padding: .25rem !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 */








/*
---------------------------------------------------------------------------------------
# HERO SECTION + SCROLL ANIMATION
---------------------------------------------------------------------------------------
*/
.hero_cover {
  overflow: hidden;
  padding: 0
}

.hero_cover .wp-block-cover__inner-container {
  padding-right: var(--wp--style--root--padding-right);
  padding-left: var(--wp--style--root--padding-left);
}


.hero_cover .wp-block-cover__image-background {
  will-change: filter;
}

.hero_cover .wp-block-cover__background {
  will-change: opacity;
}

@media (max-width: 781px) {
  .hero_cover {
    min-height: 85vh !important;
  }
}


/*
---------------------------------------------------------------------------------------
# LOOP ITEMS
---------------------------------------------------------------------------------------
*/
.area_loop_item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article_loop_item {
  position: relative;
  height: 100%;
  border: 1px solid #9b9b9b;
  padding: clamp(20px, 3vw, 50px);
}

.wp-block-template-part:has(.article_loop_item) {
  height: 100%;
}

.area_loop_item_image_container {
  position: relative;
  overflow: hidden;
}

.area_loop_item_image_container img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.area_loop_item .has-m-font-size {
  font-weight: 600;
}

.article_loop_item .has-m-font-size {
  color: var(--wp--preset--color--primary);
  font-weight: 600;
  padding-top: var(--wp--preset--spacing--20);
  padding-bottom: var(--wp--preset--spacing--10);
}

.article_loop_item_excerpt {
  padding-bottom: var(--wp--preset--spacing--40);
}

.area_loop_item_image_container svg,
.article_loop_item svg {
  fill: var(--wp--preset--color--white);
  background: var(--wp--preset--color--primary);
  width: 3.5rem;
  height: 2.5rem;
  position: absolute;
  right: 5%;
  bottom: 5%;
  pointer-events: none;
}

.area_loop_item_image_container svg>polygon,
.article_loop_item svg>polygon {
  transform-origin: center;
  transition: transform 0.6s ease;
}

.area_loop_item_image_container:hover svg>polygon,
.article_loop_item:hover svg>polygon {
  transform: rotate(90deg);
}

.area_loop_item_image_container:hover img {
  transform: scale(1.05);
}


.block-editor-block-list__block.area_loop_item iframe,
.block-editor-block-list__block.article_loop_item iframe {
  display: none !important;
}



/*
---------------------------------------------------------------------------------------
# ACCORDION
---------------------------------------------------------------------------------------
*/

.accordion_t99 {
  position: relative;
  margin-bottom: var(--wp--preset--spacing--20);
}

body:not(.block-editor-iframe__body) .accordion_t99_content {
  display: none;
}

.accordion_t99_content {
  padding-bottom: var(--wp--preset--spacing--10);
}

.accordion_t99 .wp-block-heading {
  cursor: pointer;
  /* space for after element */
  max-width: 95%;
  transition: color 0.4s ease;
}

.accordion_t99 .wp-block-heading::after {
  content: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgaWQ9InBsdXMiPjxsaW5lIHN0cm9rZT0iI0NBMUMyRiIgc3Ryb2tlLXdpZHRoPSIyIiB4MT0iMTYiIHgyPSIxNiIgeTE9IjciIHkyPSIyNSIvPjxsaW5lIHN0cm9rZT0iI0NBMUMyRiIgc3Ryb2tlLXdpZHRoPSIyIiB4MT0iNyIgeDI9IjI1IiB5MT0iMTYiIHkyPSIxNiIvPjwvZz48L3N2Zz4=");
  position: absolute;
  right: 5px;
  transition: transform 0.4s ease;
  width: 32px;
  height: 32px;
}

.accordion_t99.open .wp-block-heading::after {
  transform: rotateZ(135deg);
}


.accordion_t99 .wp-block-heading {
  color: var(--wp--preset--color--primary);
}


@media(max-width: 781px) {
  .t99-accordion:last-of-type hr {
    display: none;
  }
}







/*
---------------------------------------------------------------------------------------
# SEARCH MODAL WINDOW
---------------------------------------------------------------------------------------
*/

#header_search {
  cursor: pointer;
  fill: var(--wp--preset--color--primary);
  width: 1em
}

/* Hide modal by default */
#cassaSearchModalOverlay {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

/* Modal box */
#cassaSearchModal {
  width: 80%;
  padding: 4vh 2vw;
}

/* Close button */
#cassaSearchClose {
  position: absolute;
  color: var(--wp--preset--color--white);
  top: 8%;
  right: 5%;
  background: transparent;
  border: none;
  font-size: 42px;
  cursor: pointer;
}

#cassaSearchModal form {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  width: 80%;
  max-width: 700px;
  margin: 0 auto;
  gap: 16px;
}


/* Input + search button */
#cassaSearchModal input[type="text"] {
  background: transparent;
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-bottom: 2px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  outline: none;
}

#cassaSearchModal .cassa_search_button {
  cursor: pointer;
  border: none;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  text-transform: uppercase;
  padding: 8px 16px;
}

@media (max-width: 480px) {
  #cassaSearchModal {
    width: 100%;
  }

  #cassaSearchModal form {
    width: 100%
  }

  #cassaSearchModal .cassa_search_button {
    padding: 5px;
  }
}


p:has(#header_search) {
  line-height: 0;
}




.wp-block-query-pagination {
  margin-top: var(--wp--preset--spacing--30);
}

.wp-block-query-pagination a,
.wp-block-query-pagination span.current {
  margin-left: .8rem;
  padding: .5rem;
  border: 1px solid var(--wp--preset--color--black);
  height: 26px;
  width: 26px;
  display: inline-flex;
  align-items: center;
}

.wp-block-query-pagination span.current {
  background: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}


.wp-block-query-pagination-numbers {}






/*
---------------------------------------------------------------------------------------
# MOBILE
---------------------------------------------------------------------------------------
*/

@media (max-width: 781px) {
  footer .wp-block-group:has(#footer_search) {
    width: 100%;
    align-items: center;
  }

  .no_border_on_mobile {
    border: none !important
  }

  .no_border_bottom_on_mobile {
    border-bottom: none !important
  }

  .no_border_top_on_mobile {
    border-top: none !important
  }


  header.site-header {
    transition: padding .4s ease;
  }

  header.site-header .custom-logo {
    width: 180px;
  }

  header.site-header>.wp-block-group {
    transition: padding .4s ease;
  }

  header.site-header.scrolled {
    padding: 0;
  }

  header.site-header.scrolled>.wp-block-group {
    border-color: var(--wp--preset--color--gray);
    padding: .2rem 1rem;
  }

  header.site-header p:has(#header_search) {
    order: -1
  }

  header.site-header .wp-block-group.is-content-justification-right {
    gap: 10px
  }

  #header_search {
    width: 26px;
  }


  .area_loop_item {
    gap: 8px;
  }


  .area_loop_item_image_container svg,
  .article_loop_item svg {
    width: 2.5rem;
    height: 2rem;
    right: 4%;
    bottom: 4%;
  }

  .wp-block-columns.is-not-stacked-on-mobile.mobile_2_col {
    flex-wrap: wrap !important;
  }

  .mobile_2_col>* {
    flex-basis: 45% !important;

  }
}