@charset "UTF-8";

.container {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 5rem;
}

.page-node-type-team #main {
  background-color: var(--bs-primary);
}

.header {
  width: 100%;
  text-align: center;
  margin-bottom: 45px;
  overflow: hidden;
  transition: 0.45s ease 0.05s;
  max-height: 70px;
}
.header-title {
  width: 100%;
  font-size: 3.3em;
  color: #fbf9bd;
  margin-bottom: 15px;
}

.team-container {
  padding: 0 30px;
  box-sizing: border-box;
  max-width: 1400px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  height: auto;
}

.person-wrapper {
  width: calc(25% - 30px);
}
.person {
  cursor: pointer;
  overflow: hidden;
  transition: 0.45s;
  position: relative;
}
@supports (-webkit-touch-callout: none) and (not (gap: 1rem)) {
  .person-wrapper {
    padding: 0 15px 30px;
  }
}
.person-details {
  background: #FFF;
  padding: 1rem 1.4rem;
  box-sizing: border-box;
  transition: 0.3s;
  border-left: 0.4rem solid var(--bs-tertiary);
}
.person-img {
  width: 100%;
}
.person-title {
  color: var(--bs-primary);
  font-size: 1.6em;
}
.person-desc {
  color: var(--bs-primary);
  margin-top: 10px;
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 2px;
}
.person-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
  gap: 2.5rem; 
}
.person-list:hover .person {
  opacity: 0.6;
}
.person:hover {
  opacity: 1 !important;
}
.person:before {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  background: var(--bs-tertiary);
  content: "";
  height: 0px;
  transition: 0.45s;
}

.person:after {
  content: "";
  display: inline-block;
  background: center / contain no-repeat
              url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 20.6' fill='%23FFF'><path d='M0.3,9.4L9.5,0.4c0.5,-0.5,1.3,-0.5,1.9,0c0.5,0.5,0.5,1.3,0,1.8l-6.9,6.8H21.7c0.7,0,1.3,0.6,1.3,1.3s-0.6,1.3,-1.3,1.3H4.4l6.9,6.8c0.5,0.5,0.5,1.3,0,1.8c-0.5,0.5,-1.3,0.5,-1.9,0l-9.2,-9c-0.5,-0.5,-0.5,-1.3,0,-1.8Z'/></svg>");
  color: #282828;
  position: absolute;
  width: 50%;
  left: 25%;
  top: 0;
  height: 100%;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  text-align: center;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.container-selected .header {
  max-height: 0px;
}
.container-selected .person {
  opacity: 0 !important;
  pointer-events: none;
}
.container-selected .person-list .person-selected {
  opacity: 1 !important;
}
.container-selected .person-list .person-selected:before {
  height: 100%;
}
.container-selected .person-list .person-selected .person-details {
  margin-top: -40px;
  opacity: 0;
}
.container-selected .person-list .person-selected .person-img {
  opacity: 0;
}

.team-detail {
  position: fixed;
  width: calc(100% - 100px);
  right: 80px;
  top: 0;
  height: 100%;
  color: #fff;
  background: var(--bs-primary);
  transition: 0.15s;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;
  z-index: 100;
  overflow: hidden;
}
.team-detail .person-title {
  color: #FFF;
}
.team-detail .person-desc {
  color: #95bcf1;
  margin-bottom: 0.1rem;
}
.team-detail .person-period {
  margin-bottom: 0;
}
.team-detail-bio-content p {
  margin-bottom: 15px;
  line-height: 25px;
  font-size: 1.05em;
}
.team-detail-header {
  margin-bottom: 30px;
}
.team-detail-inner {
  min-height: 100%;
  display: flex;
  flex-wrap: wrap;
}
.team-detail-left {
  position: relative;
  width: 650px;
  min-height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.team-detail-photo {
  position: relative;
  text-align: center;
  z-index: 999;
  width: 100%;
  font-size: 0px;
}
.team-detail-photo img {
  max-width: 100%;
}
.team-detail-right {
  box-sizing: border-box;
  width: calc(100% - 650px);
  min-height: 100%;
  display: flex;
  align-items: center;
  padding-right: 10%;
  position: relative;
  right: 0;
  flex-wrap: wrap;
}
.team-detail-right .person-title {
  font-size: 2.2em;
}

.container-ready .team-detail {
  transition: 0.30s ease 0.3s;
  opacity: 1;
  right: 0;
  visibility: visible;
}
.container-ready .team-detail img {
  width: 75%;
}
.container-ready .team-container {
  overflow: hidden;
}
.container-ready .person-selected {
  left: 0px !important;
  top: 0px !important;
  z-index: 99;
  height: 100% !important;
  width: 100px !important;
  pointer-events: auto;
}
.container-ready .person-selected:after {
  opacity: 1;
  visibility: visible;
}

.person-back:before {
  height: 0px !important;
}
.person-back .person-details {
  margin-top: -15px !important;
  transition-delay: 0.35s;
  opacity: 1 !important;
}

@media (max-width: 1200px) {
  .team-detail-left {
    width: 400px;
    padding: 0 40px;
    box-sizing: border-box;
  }
  .team-detail-right {
    padding-right: 0;
    width: calc(100% - 440px);
  }
  .person .person-title {
    font-size: 1.7em;
  }

}
@media (max-width: 970px) {
  .team-detail-left {
    width: auto;
    padding: 50px 50px 30px 50px;
    margin: 0 auto;
  }
  .container-ready .team-detail img {
    height: 30vh;
    width: auto;
  }
  .team-detail-right {
    padding: 0 50px;
    width: 100%;
  }
  .team-detail-inner {
    max-height: 100vh;          /* limite: mai più alto della finestra */
    overflow-y: auto;           /* attiva lo scroll solo verticale */
    overflow-x: hidden;         /* nessuno scroll orizzontale */
    display: block;             /* non serve flex qui */
    -webkit-overflow-scrolling: touch; /* inerzia su iOS */
    overscroll-behavior: contain;      /* blocca il "rubber band" */
  }
  .team-detail-header {
    text-align: center;
  }
  .container-ready .person-selected {
    width: 50px !important;
  }
  .team-detail {
    width: calc(100% - 50px);
  }
  .person-wrapper {
    width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .person-wrapper {
    width: 100%;
    margin-bottom: 50px;
  }
  .header {
    margin-top: 50px;
  }
}