/*
Theme Name: Bowerbird
Theme URI: https://example.com/bowerbird
Author: Andrea Ricciotti
Author URI: http://www.andrearicciotti.it/chi-sono/
Site: http://www.andrearicciotti.it
Description: Bowerbird è un tema WordPress per la presentazione di progetti, progettato come uno spazio di esposizione curato e intenzionale. Basato su un framework proprietario, integra animazioni, video background e un sistema di relazioni tra contenuti per costruire un portfolio editoriale coerente.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bowerbird
Tags: portfolio, custom-theme, editorial, minimal, animation, video
*/



/* -------------------------------------------------------------------------------- */
/* ! BASE */
/* -------------------------------------------------------------------------------- */
html, body {
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

/* html {scroll-behavior: smooth!important;} */
body.admin-bar .navbar-fixed-top { position: fixed; top: 32px; z-index: 1000;}

body {
  color: var(--over-bg);
  background-color: var(--light);
  max-width: 100%;
  max-width: -webkit-fill-available;
  width: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  transition: 
    background-color 2s cubic-bezier(.215, .61, .355, 1),
    color 2s cubic-bezier(.215, .61, .355, 1);
}

body.noscroll { overflow: hidden!important; }
section {position: relative;}

.changing-bg.bg-dark {color: var(--light);}

.changing-bg.bg-dark .icon {filter:invert(1);}

.wp-block-media-text.img-filter .wp-block-media-text__media {position:relative;}
.wp-block-media-text.img-filter .wp-block-media-text__media:after{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.bg-sea {position: relative;}
.bg-sea::after,
.bg-sea::before {
  content: '';
  position: absolute;
  height: 10vh;
  left: 0;
  width: 100%;
}
.bg-sea::after {
  top: -5vh;
  background-image: url('img/bg-sea-bottom.svg');
  background-size: cover;
  background-repeat: no-repeat
}
.bg-sea::before {
  bottom: -5vh;
  background-image: url('img/bg-sea-top.svg');
  background-size: cover;
  background-repeat: no-repeat
}

.container {min-height: var(--hmax);}

@media (max-width: 767px) {
  .home .container {padding-top: 0;}
}
/* img {width: auto; height: auto;} */

/* hide scrollbar */
*::-webkit-scrollbar{
  display: none;
}
* {-ms-overflow-style: none; scrollbar-width: none; overflow: -moz-scrollbars-none;}

/* ! - Typography */
p+p {margin-block-start: 0;}

/* a:not(.button, .wp-block-button__link) {color:var(--accent);} */

.download a {position: relative; padding-left: 25px;}
.download a::before {position: absolute; top: 0;left: 0; font-family: 'icomoon'; content: '\e926';}

.fw-lighter {font-weight: 300;}
.text-lighter {color: #717184;}
.gigantic {font-size:clamp(50px, 8vmax, 10vw); line-height: 1.1; letter-spacing: -3px; margin-block-start: 0;margin-block-end: 0;}
.home-section-title__bottom,
.home-section-title__top {mix-blend-mode: screen;}
.home-section-title__bottom {margin-bottom: min(-5%, -25px); position: relative; z-index: 10;}
.home-section-title__top {margin-top: min(-4%, -25px); position: relative; z-index: 10;}

strong {font-weight: 700;}

.button {border-radius: 10px;}

.is-style-project-section {
    color: var(--primary);
    font-weight: bold;
    font-size: var(--body-font-size);
    margin-bottom: var(--gutter);
}

.wp-gutenberg-container>.is-style-project-section {
    margin-top: calc(var(--gutter) * 5);
}

/* -------------------------------------------------------------------------------- */
/* ! HEADER */
/* -------------------------------------------------------------------------------- */

.header {position: fixed; top: 0; left: 0; width: 100%; background-color: var(--dark); box-shadow: 0px 0px 4px rgba(19, 63, 144, .3); transition: background-color .5s cubic-bezier(.215, .61, .355, 1); z-index: 998;}
.header .wp-container {height: var(--h-header);}

/* ! - Logo */
.header .header__logo {height: 50px; max-width: 15vmax;}

body.home:not(.on-scroll) .header {background-color: transparent;}
body.home:not(.on-scroll) .header .header__logo {opacity: 0;}

/* ! - Menu Primary */
.menu-primary {flex:1;height: 100%;}
.menu-primary__items {margin: 0; display: inline-flex; height: 100%; gap: 2vmin;}
.menu-primary__items>li a {height: 100%;display:flex; align-items:center; color: var(--light); font-family: 'Comfortaa'; white-space: nowrap; text-transform: uppercase; font-size: 16px; transition: color .3s ease-in;}
.menu-primary__items>li:hover a {color: #000;}

.menu-primary__addons {height: 100%;}
.menu-primary__addons .header__cta {height: 100%; border-radius: 0; display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter)!important;}

@media (min-width: 1024px) {
  .menu-primary__items li {position:relative; margin: 0; padding-right: 10px;}
  .menu-primary__items li.dropdown::after {content:"\2038"; font-size: 20px; position:absolute; right: 0; width: 6px; height: 20px;top: calc(50% - 25px);transform: rotate(-180deg) translateY(-30px); transition: all .2s cubic-bezier(.215, .61, .355, 1);}
  .menu-primary__items li.dropdown:hover::after {transform: none;}

  .menu-primary__items li.dropdown>ul.dropdown-menu {display: block; position: absolute; left: -50%;top: 100%;height: 0;overflow: hidden;background-color: #fff;box-shadow: 0px 4px 10px -6px rgba(0, 0, 0, 0.25);}
  .menu-primary__items li.dropdown>ul.dropdown-menu>li>a {padding: 10px 15px;}
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu {height:fit-content;}
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li::before,
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li::after {content:' '; position:absolute; left: 0;top: 50%;width: 2px;height: 0;background-color: #000; transition: all .2s cubic-bezier(.215, .61, .355, 1);}
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li::after {bottom: 50%;top: auto;}
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li:hover::before,
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li:hover::after {height: 50%;}
  .menu-primary__items li.dropdown:hover>ul.dropdown-menu>li:hover {background-color: var(--accent);}
}

/* @media (max-width: 1300px) and (min-width: 1024px) {
  .header .wp-container {margin: 0 0 0 20px;}
} */

@media (max-width: 1023px) {
  .header {padding-top: 0;}
  .menu-primary {position: absolute; top: 100%; left: 0; height: calc(100vh - var(--h-header)); overflow-y: scroll; background-color: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; padding-left: 0; padding-bottom: calc(var(--h-header) * 2); transform: translateX(100%);}
  .menu-primary, .menu-primary ul li {width: 100%;}
  .menu-primary .menu-primary__items a {font-size: 5vw; font-weight: 300; color:var(--dark); display: block;}
  .menu-primary.show {opacity: 1; transform: none;}
  .menu-primary__items {height: fit-content;min-height: 60vh;justify-content: space-around; width: 100%;}
  .menu-primary__items li.dropdown>ul.dropdown-menu>li {padding-left: 20px; margin-top: 10px;}
}

@media (max-width: 767px) {
  .header .header__logo {max-width: 150px;}
  body.home:not(.on-scroll, .menu-open) .header .header__logo {opacity: 0;}
  body.home:not(.on-scroll, .menu-open) .header.bg-white {background: transparent; box-shadow: none;}
}

/* ! - Hamburger */
.hamburger {width: var(--h-header); height: var(--h-header); z-index: 999; }

.icon-hamburger{ width: 20px;height: 20px;position: absolute;right:0;top: 20px;}
.icon-hamburger span {height: 2px;width: 100%; position: absolute; background: var(--light); top: 11px; transition: all 0.2s ease-in-out;}
.icon-hamburger span:before,
.icon-hamburger span:after{height: 2px;width: 80%; position: absolute; left: 0;background: var(--light); content: ' '; margin-top: -8px; transition: all 0.3s cubic-bezier(.215, .61, .355, 1);}
.icon-hamburger span:after{margin-top: 8px;}

body.menu-open .icon-hamburger span{background: transparent!important;}
body.menu-open .icon-hamburger span:before{transform:rotate(45deg);margin-top: 0!important;}
body.menu-open .icon-hamburger span:after{transform:rotate(-45deg);margin-top: 0!important;}

@media (max-width: 991px) {
  .icon-hamburger {top: calc((var(--h-header) - 26px) / 2);}
  .icon-hamburger span:before,
  .icon-hamburger span:after {width: 100%;}
  .icon-hamburger span:before {margin-top: -6px;}
  .icon-hamburger span:after {margin-top: 6px;}

  body.home:not(.on-scroll, .menu-open) .icon-hamburger span,
  body.home:not(.on-scroll, .menu-open) .icon-hamburger span:before,
  body.home:not(.on-scroll, .menu-open) .icon-hamburger span:after {background-color: #fff;}
}


/* ----------------------------------------------------------------------- */
/* ! PAGE TEMPLATES */
/* ----------------------------------------------------------------------- */
/* ! - Home */
.hero__logo {width: 12vmin; max-width: 300px; min-width: 80px; height: auto;}
#intro {z-index: 1;}

#wawes__container {width: 100%; position: absolute; overflow-x:hidden; left:0; bottom:-1px; transform: translateY(60vh); transition: all 4s cubic-bezier(.215, .61, .355, 1); z-index: -1;}
body.on-scroll #wawes__container {transform: none;}

@media (min-width: 992px) {
  .hero-title {
    text-indent: -6vw;
    margin-bottom: 0;
  }
}

/* ! -- Waves */
.waves {
  position:relative;
  width: 100%;
  height:15vh;
  margin-bottom:-10px; /*Fix for safari gap*/
  min-height:100px;
  max-height:150px;
}

.parallax > use {
  animation: move-forever 25s cubic-bezier(.55,.5,.45,.5)     infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}
@keyframes move-forever {
  0% {
   transform: translate3d(-90px,0,0);
  }
  100% { 
    transform: translate3d(85px,0,0);
  }
}
/*Shrinking for mobile*/
@media (max-width: 768px) {
  .waves {
    height:40px;
    min-height:40px;
  }
  .content {
    height:30vh;
  }
  h1 {
    font-size:24px;
  }
}

/* ! -- Primary Gradient Background */

.bg-primary-gradient {
  background: #162E5A;
  background: linear-gradient(0deg, rgba(22, 46, 90, 1) 0%, rgba(22, 46, 90, 1) 70%, rgba(22, 46, 90, 0) 90%);
}


/* ! - Page */
.block-number {position: relative; width: 80%;}
.block-number::after {content: "01"; position: absolute; top: 0; font-size: 7em; font-weight: bold; color:var(--accent);}
.block-number:nth-of-type(2n+1) {margin-left: 20%;}
.block-number:nth-of-type(2n+1)::after {left:  calc(-20% - 30px);}
.block-number:nth-of-type(2n) {margin-right: 20%;}
.block-number:nth-of-type(2n)::after {right: calc(-20% - 30px);}

.block-number:nth-of-type(2)::after {content: "02";}
.block-number:nth-of-type(3)::after {content: "03";}
.block-number:nth-of-type(4)::after {content: "04";}
.block-number:nth-of-type(5)::after {content: '05';}
.block-number:nth-of-type(6)::after {content: '06';}

@media (max-width: 767px) {
  .block-number {width: 100%;margin-left: 0!important;margin-right: 0!important;}
  .block-number::after {font-size: 80px; top: -50px; left:auto!important;right: 20px!important;}
}

/* ! - Category News */
.category-news .grid-auto {row-gap: calc(var(--gutter) * 3);}

/* ! - Single */
/* ! -- Related Posts */
.posts-grid__item {position:relative; min-height: 200px; display:flex; flex-direction: column;}
.posts-grid__item.is-hidden {display: none;}
/* .posts-grid__link {position: absolute; top: 0; left: 0; width: 100%; height: 100%;} */
.posts-grid__thumb {position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 10/5;}
.posts-grid__thumb img {width: 100%; height: 100%; object-fit: cover; filter: brightness(.9); transition: all .8s cubic-bezier(.215, .61, .355, 1);}
.posts-grid__item .posts-grid__link:hover img {filter: brightness(1.1); transform: scale(1.1);}
.posts-grid__meta > .date {flex-basis: 6em; flex-shrink: 0;}
.posts-grid__meta {padding-top: calc(var(--gutter) / 2); padding-bottom: var(--gutter);}

@media (min-width: 768px) {
  .related-posts {display:grid; gap:var(--gutter); grid-template-columns: repeat(2,1fr);}
}
@media (min-width: 992px) {
  .related-posts {display:grid; gap:var(--gutter); grid-template-columns: repeat(3,1fr);}
}

/* ! -- Single - Progetti */
.single-project-sidebar {position: absolute; top: 0; right: 0;}
hr.hr-gradient {
  border: 0;
  height: 3px;
  background: var(--primary);
  background-image: linear-gradient(to right, var(--primary), var(--light), var(--primary));
}
hr.hr-gradient:before {
  content: '•••';
  font-size: 1.5rem;
  color: var(--primary);
  display: block;
  text-align: center;
}

hr.hr-dotted {
  border: none;
  border-top: 2px dotted var(--primary);
  height: 0;
  margin: 20px 0;
}

.wp-singular.single .wp-block-group.has-background a {
  color: var(--secondary-darker);
  text-decoration: underline;
  font-weight: bold;
}

/* ! - Single - Attachment */
body.single.single-attachment.attachment-pdf p.attachment a img {position: relative;}
body.single.single-attachment.attachment-pdf p.attachment a img::after {font-family:'icomoon'; content: "\e90d"; position: absolute; top: calc(50% - 40px); left: calc(50% - 40px); width: 80px; height: 80px;}

/* ! - Contacts */
.contacts_image {width: 50px;height: 50px;border-radius: 100%;}
.contacts_text {max-width: calc(100% - 50px - var(--gutter));}
.contacts_email {
  display:inline-block; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
  overflow: hidden; 
  max-width: 100%;
}

div.wpforms-container-full, div.wpforms-container-full * {width: 100%;}

/* ! - 404 */
.page-404-content {width: 600px; min-width:40vw; padding-left: 5vw; color: #444;}
.page-404-content a{color: #333;text-decoration: underline; font-weight: bold;}
.page-404-content a:hover{color: #000;}
.error404 footer {background: #192527;}

/* ----------------------------------------------------------------------- */
/* ! COMPONENTS */
/* ----------------------------------------------------------------------- */
.cover__container {position: absolute; top: -5vh; left: 0; bottom: -5vh; right: 0; overflow: hidden;}
.cover {position:relative; width: 100%; height: 100%; background-size:cover; background-position:center; background-repeat: no-repeat;}
.cover.overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}
.cover.overlay.overlay--60::after {
  background-color: rgba(0,0,0,0.65);
}
.cover.overlay.overlay--gradient::after {
  background: linear-gradient(to top,  rgba(9, 28, 46, 0.9) 40%, rgba(9, 28, 46, 0) 100%);
    /* background: linear-gradient(to top,  rgba(239, 243, 251, 1) 20%, rgba(239, 243, 253, 0) 70%); */

}

article header .social-share {position: absolute; bottom: 10%; z-index: 10;}
@media (min-width: 768px) {
  article header .social-share {right: var(--grid-margin);}
}

.media-credits {
  color: #999;
  font-size: .7rem;
  padding: 5px 10px;
  font-style: italic;
}

.media-credits.media-credits--overlay {
  opacity: .6;
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 30;
}

.media-credits.media-credits--overlay:hover {
  opacity: 1;
}

.wp-block-image figcaption {
  color: var(--secondary);
}

/* ! - Post Tags */
.post-tags,
.posts-grid .post-categories {display: inline-flex; flex-wrap: wrap; font-size: .8rem;}
.post-categories {list-style-type: none; padding-left: 0;}
.posts-grid .post-categories {position: absolute; top: 0; right: 20px;}
.post-tags__item,
.posts-grid .post-categories a {padding: 4px 8px; border-radius: 10px; margin-bottom: 5px; margin-right: min(.5vw, 10px); color:#fff!important; opacity: .9;}
.posts-grid .post-categories a {background-color: var(--primary);}
.post-tags__item a {color: #fff!important;;}
.posts-grid .post-categories a,
.post-tags__item:hover {opacity: 1;}

/* ! - Category hero */
@media (max-width: 767px) {
    .cover__content__title.h2 {
        font-size: 34px;
    }
}

/* ! - Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
}

address.address {font-style: normal;}
address.address a {
  word-break: break-word;
  overflow-wrap: break-word;
}

address.address.address__footer p {font-size: calc(var(--body-font-size) * 0.875); line-height: 1.2;}

.offices-contact-list>figcaption {color: var(--primary-dark); font-weight: bold;}
.offices-contact-list>figcaption + ul.no-list {margin-top: 0;}


/* Search widget */
/* .wp-block-search__inside-wrapper {
  display: flex;
  gap: 5px;
} */

.wp-block-search__inside-wrapper .wp-block-search__input {
  border-radius: var(--btn-border-radius);
}

.wp-block-search__button.has-icon {
  border-radius: var(--btn-border-radius);
  background: transparent!important;
}

.wp-block-search__button.has-icon svg {width: 30px; height: 30px;}



/* .wp-block-search__button-inside .wp-block-search__inside-wrapper {
  position: relative;
} */

/* .wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input {
  padding-right: 40px;
} */

/* .wp-block-search__button-inside .wp-block-search__button.has-icon {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
} */

/* ---------------------------
   ! MASONRY GRID CUSTOM
---------------------------- */
/* ---------------------------
   ! MASONRY GRID CUSTOM CON TRANSITIONS
---------------------------- */
.masonry-grid {
    position: relative; 
    width: 100%;
    /* padding laterale preso in considerazione da JS */
}

.masonry-item {
    position: absolute; 
    display: block;
    width: 100%; 
    border-radius: var(--btn-border-radius);
    background-color: var(--dark);
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(0,0,0,0.08);
    /* transizioni smooth */
    transition: transform 1s ease, opacity 1s ease;
    opacity: 1;
}

.masonry-item__container {
    position: relative;
    width: 100%;
    height: 100%;
}

.masonry-item__link {
  position: absolute;
  inset: 0;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: all 1s cubic-bezier(.215, .61, .355, 1);
    z-index: 0;
}

.masonry-item.sticky img {
    aspect-ratio: 4/3;
}

.masonry-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.5);
}

.masonry-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.masonry-item__header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 100%;
}

.masonry-item__excerpt {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    transition: all 1s cubic-bezier(.215, .61, .355, 1);
}

/* FILTRI */
.masonry-item.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50px); /* effetto smooth */
}


/* ---------------------------
   FILTRI TAG
---------------------------- */
.filters {position: sticky; top: 150px;}
.filter--tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 auto;
    max-width: 100%;
    overflow: scroll;
}

.filter--tags__button {
    padding: 8px 24px;
    background-color: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 40px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all .25s ease;
}

.filter--tags__button.bg-secondary {
  border-color: var(--secondary);
}

.filter--tags__button.active,
.filter--tags__button:hover {
    background-color: var(--primary);
    color: white;
}

.filter--tags__button.bg-secondary.active,
.filter--tags__button.bg-secondary:hover {
    background-color: var(--secondary);
}

/* ! - Breadcrumbs */
.breadcrumbs__container {position:sticky; top:var(--h-header); background-color: transparent; transition: background-color .3s cubic-bezier(.215, .61, .355, 1);z-index: 10;}
.breadcrumbs {padding: 10px 0; opacity: 0.9; transition: opacity .3s cubic-bezier(.215, .61, .355, 1), transform .3s cubic-bezier(.215, .61, .355, 1);}
.breadcrumbs__container.breadcrumbs--hide .breadcrumbs{opacity: 0; transform: translateY(-30px);}
.breadcrumbs__container.breadcrumbs--hide {background-color: var(--light)}

/* ! - Sidebar */
@media (min-width: 768px) {
  .sidebar {position: sticky; top: calc(var(--h-header) + var(--gutter) * 2 + 50px); height: max-content; overflow-x: hidden; overflow-y: scroll;}
}

/* ! - Accordion */
.c-accordion__title {padding: 20px 60px 20px 20px;line-height: 1;background-color: hsl(226, 20%, 80%);font-size: var(--body-font-size); color:var(--dark)!important;}
.c-accordion__title:after {color: #fff; background-color: var(--dark); height: 100%;font-size: 24px;padding: 16px;}
.c-accordion__content {background-color: hsl(226, 20%, 90%); padding:var(--body-font-size);padding-bottom: 1px;}
.c-accordion__content p {margin-top:0; color:var(--dark);}
.c-accordion__content a {text-decoration: underline;}

/* ! - Timeline */
.timeline {position: relative; --line-height: 0%;}
.timeline h3 {margin-top: 10px;}
.timeline>.wp-block-group__inner-container>.wp-block-group {display: -webkit-flex; display: -ms-flex; display: flex;flex-wrap: wrap;width: 100%;transition: all .5s cubic-bezier(.215, .61, .355, 1);}

.timeline::before {content: ' '; display: block;width: 4px; height: var(--line-height); max-height: var(--line-stop); background-color: var(--accent);position: absolute;top: 40px;left: calc(50% - 2px);transition: all 1s cubic-bezier(.215, .61, .355, 1); z-index: 2;}
.timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container {position: relative; width: calc(50% - 10px); line-height: 1.2;padding: 20px 30px;background-color: #fff; border-top-left-radius: 10px; border-bottom-left-radius: 10px; box-shadow: 0px 4px 14px #ddd;}
.timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container::before {content: ' '; display: block;width: 40px; height: 40px; border-radius: 100%;background-color: var(--light);position: absolute;top: 30px;right: -26px;z-index: 0;}
.timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container::after {content: ' '; display: block;width: 30px; height: 30px; border-radius: 100%;background-color: var(--accent);position: absolute;top: 35px;right: -26px;z-index: 1;}

.timeline>.wp-block-group__inner-container>.wp-block-group:nth-of-type(2n+1) {justify-content: flex-end;}
.timeline>.wp-block-group__inner-container>.wp-block-group:nth-of-type(2n+1)>.wp-block-group__inner-container {padding-left: 50px; border-bottom-right-radius: 10px; border-top-right-radius: 10px; border-top-left-radius: 0; border-bottom-left-radius: 0;}
.timeline>.wp-block-group__inner-container>.wp-block-group:nth-of-type(2n+1)>.wp-block-group__inner-container::before {left: -25px;right: auto;}
.timeline>.wp-block-group__inner-container>.wp-block-group:nth-of-type(2n+1)>.wp-block-group__inner-container::after {left: -25px;right: auto;}

.timeline .show-notes.show-modal a::after {
  font-family: 'icomoon';
  content:'\e90d';
  margin-left: 6px;
  font-size: 1.5em;
  vertical-align: middle;
}

.timeline .timeline__notes {
  position: absolute;
  background: var(--primary);
  color: #fff;
  font-size: .9em;
  border-radius: 10px;
  max-width: 80%;
  right: 20px;
  height: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-20px);
  transition: transform 1s cubic-bezier(.215, .61, .355, 1);
  z-index: 10;
}

.timeline .timeline__notes p {margin-inline-start: 1em; margin-inline-end: 1em;}

.timeline .timeline__notes::before {
  content: '';
  position: absolute;
  top: -9px;
  right: 20px;
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent var(--primary) transparent;
}

.timeline .timeline__notes.show {
  height: fit-content;
  opacity: 1;
  visibility: visible;
  transform: translateY(0px);
}

.timeline .show-notes:not(.show-modal) a {text-decoration: var(--primary-lighter) dashed underline; text-underline-offset: 4px}

@media (max-width: 991px) {
  .timeline>.wp-block-group__inner-container>.wp-block-group:nth-of-type(2n+1)>.wp-block-group__inner-container {padding-left: 30px;}
}

@media (max-width: 767px) {
  .timeline::before {left: -2px;}
  .timeline>.wp-block-group__inner-container>.wp-block-group {justify-content: flex-end; margin-bottom: 20px;}
  .timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container {width: 100%; border-bottom-right-radius: 10px!important; border-top-right-radius: 10px!important; border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;}
  .timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container::before,
  .timeline>.wp-block-group__inner-container>.wp-block-group>.wp-block-group__inner-container::after {left: -15px!important;}
  .timeline .timeline__notes {bottom: 80px;}
  .timeline .timeline__notes::before {top: 100%; border-width: 10px 10px 0 10px; border-color: var(--primary) transparent transparent transparent;}
}

/* ! - Parallax Images */
/* .parallax-container {overflow: hidden;}
.parallax {width: 120%; height: 100%; margin-left: -10%; position: relative; overflow: hidden;}
.parallax img {width: 100%;height: 100%;object-fit: cover; object-position: center center;} */

/* ! - Cursor plus animate */
.selectable {cursor: none!important;}
.cursorPlus {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 50px;
  height: 50px;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.9) rotate(135deg);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
  transition: opacity .2s ease-in;
}
.cursorPlus:before, .cursorPlus:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background-color: white;
  transition: width 0.5s;
}
.cursorPlus:before {
  transform: translate3d(-50%, -50%, 0);
}
.cursorPlus:after {
  transform: translate3d(-50%, -50%, 0) rotate(90deg);
  transform-origin: center;
}
.cursorPlus svg {
  fill: transparent;
  stroke: white;
  stroke-width: 3;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  overflow: visible;
  transition: stroke-dashoffset 0.5s;
  cursor: none!important;
}
.cursorPlus--is-visible {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1) rotate(0deg);
  cursor: none!important;
}
.cursorPlus--is-visible:before, .cursorPlus--is-visible:after {
  width: 22px;
}
.cursorPlus--is-visible svg {
  stroke-dashoffset: 0;
}

/* ! - Modal */
#modal-bg {
  display: none; 
  position: fixed; 
  z-index: 999; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgb(0,0,0); 
  background-color: rgba(0,0,0,0.6); 
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal {
  width: 90%;
  max-width: 1100px;
  height: fit-content;
  max-height:95%;
  position: fixed; 
  z-index: 1000;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  padding: var(--gutter);
  overflow: scroll;
  color: var(--dark);
  background-color: rgba(255,255,255,.8);
  border-radius: 20px;
  opacity: 0;
  transform: translateY(50px);
  transition-duration: 1s;
  transition-timing-function: ease-in-out;
  transition-property: all;
  display: none;
}

.modal::after {
  content: "\00d7";
  font-size: 32px;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.modal.modal--show {transform: none; opacity: 1; box-shadow: 0px 8px 30px 10px #666;}

.close-modal {position: absolute; top: 0px; right: 25px; color: rgba(255,255,255,.6);font-family: system-ui, sans-serif; font-weight: 100; font-size: 3em; cursor: pointer;}
.close-modal:hover {color: rgba(255,255,255,1);}

/* ! - Pagination */
.pagination{margin-bottom:40px;padding-top: 20px;text-align: center;}
.page-numbers{display: inline-block;padding: 10px 15px;margin-right:4px;}
.page-numbers:not(.current):hover {text-decoration: underline;}
.page-numbers.current {color: var(--primary-lighter);}
.pagination__img {max-width: 80px; border-radius: 8%;}

/* ! - Cards */
.card {border-radius: 10px; overflow: hidden;display:flex; flex-wrap: wrap; line-height: 1.2;min-height: 380px;}
.card:hover a.card-img {overflow: hidden;}

.card>.card__header {width: 100%; aspect-ratio: 16/9; overflow: hidden;background-color: var(--secondary);}
.card__header a.card-img img {filter: brightness(.8); opacity: .8; height: 100%; object-fit: cover; transition: all 1s cubic-bezier(.215, .61, .355, 1);}
.card__header:hover a.card-img img {opacity: 1; filter: none;}

.card__title {width: 100%; font-size: clamp(1.1rem, 1.7vw, 2rem);transition: all 1s cubic-bezier(.215, .61, .355, 1);margin-top: 1rem;margin-bottom: 0;}
.card__title:hover {color: var(--primary);}
.card__meta ~ a .card__title {margin-top: .5rem;}
.card__meta {width: 100%; font-size: 0.75rem; display: block; text-transform: uppercase;}

.card__footer {width: 100%;display:block;align-self: flex-end; padding-bottom: 10px;}

[class*='card-deck-'] {display: grid;}

.card-deck-2 {grid-template-columns: repeat(2, 1fr); gap: calc(var(--gutter) * 2);}
.card-deck-3 {grid-template-columns: repeat(3, 1fr); gap: calc(var(--gutter) * 1);}
.card-deck-4 {grid-template-columns: repeat(4, 1fr); gap: calc(var(--gutter) * 1);}

.card.news .card__header {background-image: url('img/ea_logo_mobile.png'); background-position: center; background-size: 40%; background-repeat: no-repeat;}
.card.news .card__body {max-width: 100%; z-index: 2;}
.card.news .news__cat{
  float: right;
  margin-top: calc(-1 * var(--gutter) - 2px);
  color: #fff;
  padding: 4px 8px;
  font-size: .8rem;
  border: 2px solid #fff;
  border-radius: 0;
}

.archive.category .card.news .news__cat {visibility: hidden;}
.card.news .news__cat:hover {transform: translateY(-2px);}
.card.news .news__cat span {font-size: .8em;}
.card.news time {float: left;font-size: 0.8rem}

@media (max-width: 991px) {
  [class*='card-deck-'] {grid-template-columns: repeat(2, 1fr); gap: calc(var(--gutter) * 1);}
}

@media (max-width: 767px) {
  [class*='card-deck-'] {grid-template-columns: repeat(1, 1fr); gap: calc(var(--gutter) * 2);}
}

/* --------------------------------------------------------------------------------------------------------------------------- */
/* ! FOOTER */
/* --------------------------------------------------------------------------------------------------------------------------- */
.footer {width: 100%; position: relative;}
.footer__container {overflow: hidden;}
.footer__logo {max-width: 80px; height: auto;}
.footer::before {
  content:'';
  position: absolute;
  top: -9.5vh;
  left: 0;
  width: 100%;
  height: 10vh;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='250' height='21.875' viewBox='0 0 250 21.875'><path d='M0,0.78l2.78,0.18c2.75,0.15 8.33,0.52 13.89,1.03c5.56,0.55 11.11,1.31 16.67,1.73c5.56,0.4 11.11,0.5 16.67-0.25c5.56-0.75 11.11-2.36 16.67-3c5.56-0.64 11.11-0.28 16.67,0.48c5.56,0.75 11.11,1.9 16.67,2.5c5.56,0.58 11.11,0.58 16.67-0.3c5.56-0.88 11.11-2.64 16.67-2.97c5.56-0.35 11.11,0.75 16.67,0.95c5.56,0.2 11.11-0.45 16.67-0.5c5.56-0.05 11.11,0.55 16.67,0.8c5.56,0.25 11.11,0.15 16.67,0.58c5.56,0.43 11.11,1.33 16.67,1.43c5.56,0.08 11.11-0.68 16.67-1.25c5.56-0.6 11.11-1 13.89-1.23l2.78-0.2v21.1H0V0.78Z' fill='%23091c2e'/></svg>");
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: calc(80vmin - 3px) auto;
}

.footer__bottom {position: absolute;bottom: 0; background-color: #a8a89e; transform: translateY(90%); transition: all 2s cubic-bezier(.215, .61, .355, 1);}
.footer__bottom--visible {transform: none;}
.footer__bottom>.bg-seafloor::before {
  content:'';
  width: 100%;
  height: 8vmax;
  position: absolute;
  bottom: 99%;
  left: 0;
  background-image: url(img/seafloor.svg); 
  background-position: bottom; 
  background-repeat: no-repeat; 
  background-size: 100%; 
}

@media (max-width: 767px) {
  .footer__content {padding-bottom: 210px;}
  .footer__bottom>.bg-seafloor::before {
    background-size: cover; 
  }
}

.iubenda-embed {min-width: 200px;}

/* ! - Scroll to top */
.on-scroll .scroll-to-top {visibility: visible; opacity: 1;}

.rw-footer__scrolling {position: absolute; bottom: 50px; right: 50px; z-index: 20;}

/* ! - Scroll Buttons */

/* Classe base condivisa */
.scroll-button {
  position: fixed;
  bottom: 2vmax; 
  right: 2vmax;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: rgba(168, 168, 158, 0.2);
  overflow: hidden;
  transition: background-color 0.4s ease, opacity 0.4s ease;
}

.scroll-button:hover {
  background-color: var(--primary);
}

.scroll-button::before,
.scroll-button::after {
  content: '';
  position: absolute;
  width: 1.8rem;
  height: 2.1rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="19" viewBox="0 0 16 19" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.58491 15.8117V0.593735H7.38491V15.7817L1.04164 9.43848L0.193115 10.287L7.99986 18.0938L7.9999 18.0937L7.99993 18.0938L15.8067 10.287L14.9581 9.43848L8.58491 15.8117Z" fill="%23a8a89e"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: transform 0.4s ease;
}

.scroll-button::before {
  transform: translateY(0);
}

.scroll-button::after {
  transform: translateY(-200%);
}

.scroll-button:hover::before {
  transform: translateY(200%);
}

.scroll-button:hover::after {
  transform: translateY(0);
}

/* Varianti direzionali */
.scroll-down { 
  z-index:1000;
}

.scroll-up {
  display: none;
  opacity: 0;
  transform: rotate(180deg);
  z-index: 999;
}

/* Media queries */
@media (max-width: 768px) {
  .scroll-button {
    width: 3.2rem;
    height: 3.2rem;
  }
  .scroll-button::before,
  .scroll-button::after {
    width: 1.5rem;
    height: 1.8rem;
  }
}

@media (max-width: 480px) {
  .scroll-button {
    width: 2.8rem;
    height: 2.8rem;
  }
  .scroll-button::before,
  .scroll-button::after {
    width: 1.3rem;
    height: 1.5rem;
  }
}

body.on-scroll .scroll-down {opacity: 0;}
body.on-scroll .scroll-up {display: flex;}

/* ! - Social-icons */
.social-links {display: grid; grid-auto-flow: column; justify-items: center; width: fit-content; gap:10px;}

@media (max-width: 767px) {
  .social-links {margin: 0 auto;}
}

/* --------------------------------------------------------------------------------------------------------------------------- */
/* ! HELPERS */
/* --------------------------------------------------------------------------------------------------------------------------- */
.pullquote-image {position:relative; padding-left: 2vw;}
.pullquote-image::before {
  content: "";
  display: inline-block;
  position: absolute; 
  left: 0;
  top: min(-20px, -2vw);
  width: max(80px, 6vw);
  aspect-ratio: 22 / 16; /* leggermente più largo per non tagliare */
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16' preserveAspectRatio='xMidYMid meet'><path fill='black' d='M2.691,2.292 C4.094,0.771 6.217,0 9,0 L10,0 L10,2.819 L9.196,2.98 C7.826,3.254 6.873,3.793 6.363,4.584 C6.09689245,5.01012958 5.94596979,5.49804391 5.925,6 L9,6 C9.55228475,6 10,6.44771525 10,7 L10,14 C10,15.103 9.103,16 8,16 L2,16 C1.44771525,16 1,15.5522847 1,15 L1,10 L1.003,7.081 C0.994,6.97 0.804,4.34 2.691,2.292 Z M19,16 L13,16 C12.4477153,16 12,15.5522847 12,15 L12,10 L12.003,7.081 C11.994,6.97 11.804,4.34 13.691,2.292 C15.094,0.771 17.217,0 20,0 L21,0 L21,2.819 L20.196,2.98 C18.826,3.254 17.873,3.793 17.363,4.584 C17.0968924,5.01012958 16.9459698,5.49804391 16.925,6 L20,6 C20.5522847,6 21,6.44771525 21,7 L21,14 C21,15.103 20.103,16 19,16 Z'/></svg>") no-repeat center;
  -webkit-mask-size: contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16' preserveAspectRatio='xMidYMid meet'><path fill='black' d='M2.691,2.292 C4.094,0.771 6.217,0 9,0 L10,0 L10,2.819 L9.196,2.98 C7.826,3.254 6.873,3.793 6.363,4.584 C6.09689245,5.01012958 5.94596979,5.49804391 5.925,6 L9,6 C9.55228475,6 10,6.44771525 10,7 L10,14 C10,15.103 9.103,16 8,16 L2,16 C1.44771525,16 1,15.5522847 1,15 L1,10 L1.003,7.081 C0.994,6.97 0.804,4.34 2.691,2.292 Z M19,16 L13,16 C12.4477153,16 12,15.5522847 12,15 L12,10 L12.003,7.081 C11.994,6.97 11.804,4.34 13.691,2.292 C15.094,0.771 17.217,0 20,0 L21,0 L21,2.819 L20.196,2.98 C18.826,3.254 17.873,3.793 17.363,4.584 C17.0968924,5.01012958 16.9459698,5.49804391 16.925,6 L20,6 C20.5522847,6 21,6.44771525 21,7 L21,14 C21,15.103 20.103,16 19,16 Z'/></svg>") no-repeat center;
  mask-size: contain;
  opacity: .2;
}
.pullquote-image cite {font-size: smaller;}

.rounded {border-radius: var(--btn-border-radius);}

.list ul {list-style-type:"-   ";}
.icons-list {list-style-type: none; padding-left: 1.5rem;}
.icons-list li {text-indent: -1.5rem;}

.bg-secondary-darker {background-color: var(--secondary-darker);}
.box-shadow {box-shadow: 0px 4px 14px #ddd;}
.rounded {border-radius: 20px;}
.mt-push {margin-bottom: calc(-2 * var(--gutter)*2); z-index: 1;}


.pull-up {margin-top: 100px;}
.pull-up .wp-block-group__inner-container .wp-block-group .wp-block-group:nth-of-type(1) {margin-top: calc(-1 * var(--gutter) * 4);}

@media (min-width: 992px) {
  .wp-block-media-text__img-scale .wp-block-media-text__media {height: 70%!important; width: 80%; margin: 0 auto;}
}
@media (min-width: 768px) {
  .wp-block-media-text__img-scale .wp-block-media-text__media {height: 50%!important; width: 100%; margin: 0 auto;}
  .pull-up .wp-block-group__inner-container .wp-block-group .wp-block-group {margin-top: calc(-1 * var(--gutter) * 4);}
}

.page-navigation {display: inline-block; padding: 0 10px;margin:4em 10px; line-height: 1.2; font-style: 14px; color:var(--dark);}
.page-navigation a {position: relative; font-weight: bold;}
.page-navigation a::after {font-family: 'icomoon' !important; content:"\e90f"; font-size: 24px; display: block; position: absolute; bottom: -4px; right: -25px; transition: all .5s cubic-bezier(.215, .61, .355, 1);}
.page-navigation a:hover::after {transform: translateX(10px);}
.page-navigation.page-navigation--next {border-left: 4px solid var(--dark); float: right;}
.page-navigation.page-navigation--prev {border-right: 4px solid var(--dark); float: left; text-align: right;}
.page-navigation.page-navigation--prev a::after {left: -25px; bottom: -4px; transform: rotate(-180deg);}
.page-navigation.page-navigation--prev a:hover::after {transform: rotate(-180deg) translateX(10px);}

/* ! - Highlight */

.icon-white {filter:brightness(10);}
.invert {filter:invert(1);}

.marker{
  position:relative;
  z-index: 0;
}

.marker:before{
  content:"";
  background-color:var(--accent);
  width:100%;
  height:1em;
  position:absolute;
  z-index:-1;
  filter:url(#marker-shape);
  left:-0.15em;
  top:0.1em;
  padding:0 0.25em;
}

mark.highlight {
  content: '';
  display: inline;
  margin: 0 -0.2em;
  padding: 0em 0.2em;
  /* border-radius: 0.8em 0.3em; */
  border-radius: 0.5em 1em;
  background: transparent;
  background-image: 
  linear-gradient(
    to right,
    rgb(254 189 92 / 30%),
    rgb(254 189 92 / 100%) 18%,
    rgb(254 189 92 / 60%)
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-size: 100% 40%;
  background-position: 0% 75%;
  background-repeat: no-repeat;
}

mark.highlight.highlight--primary {
  background-image: linear-gradient(
    to right,
    rgba(46, 49, 146, 0.1),
    rgba(46, 49, 146, 0.9) 4%,
    rgba(46, 49, 146, 0.6)
  );
}

mark.highlight.highlight--secondary {
  background-image: linear-gradient(
    to right,
    rgba(30, 186, 212, 0.1),
    rgba(30, 186, 212, 0.7) 4%,
    rgba(30, 186, 212, 0.3)
  );
}

/* Iubenda */
.iub__us-widget {display: none!important;}
.iubenda-tp-btn {left: 0!important; right: auto!important;}

/* Poseidon */
.custom-video-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9; 
  overflow: hidden;
}

@media (min-width: 768px) {
  .custom-video-wrapper {
      max-width: calc(var(--grid-width, 1200px) * 0.7);
  }
}

.custom-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* Pulsante play centrale */
#play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

#play-button::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 22px;
  border-style: solid;
  border-width: 18px 0 18px 28px;
  border-color: transparent transparent transparent white;
}

/* Controlli nascosti di default */
.custom-video-wrapper video::-webkit-media-controls {
  opacity: 0;
  transition: opacity 0.3s;
}

/* Mostra controlli solo in hover quando il video è attivo */
.custom-video-wrapper.playing:hover video::-webkit-media-controls {
  opacity: 1;
}
