/* Indaweb Project Showcase - styles
   Nota: se il tema/Divi impone stili globali, questi sono volutamente "scoped" sotto .ips
*/

.ips { width: 100%; }
body.ips-lock { overflow: hidden; }
body.ips-info-lock { overflow: hidden; }

.ips-gallery {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.ips-slider {
  position: relative;
  width: 100vw;
  height: 90vh;
  overflow: hidden;
  background: transparent;
}
.ips-slider:after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 3;
}

/* Slides */
.ips-slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.ips-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity .35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  background: #000;
}
.ips-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.ips-slide img {
  width: 100vw !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  min-width: 100%;
  min-height: 100%;
  display: block;
  cursor: zoom-in;
}

/* Nav arrows (Divi icon font) */
.ips-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 4;
  cursor: pointer;
  touch-action: manipulation;
}
.ips-slider:hover .ips-nav { opacity: .5; }
.ips-prev { left: 12px; }
.ips-next { right: 12px; }

.ips-icon {
  font-family: "ETmodules";
  font-style: normal;
  font-weight: 400;
  speak: none;
  display: inline-block;
  line-height: 1;
  font-size: 48px;
  color: #fff;
}

/* Divi icons (ETmodules) */
.ips-icon-prev:before { content: "\23"; } /* left arrow */
.ips-icon-next:before { content: "\24"; } /* right arrow */
.ips-icon-plus:before { content: "\e050"; }

/* Overlay title */
.ips-overlay {
  position: absolute;
  bottom: 26px;
  left: 26px;
  z-index: 4;
  color: #fff;
}
.ips-overlay-left { left: 26px; right: auto; max-width: 70%; }
.ips-overlay-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
  max-width: calc(100% - 170px);
}

.ips-client-label {
	display:none;
  font-size: 18px;
  text-transform: lowercase;
  margin-bottom: 0;
}
.ips-title {
  font-size: 70px;
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Info toggle and panel */
.ips-info-toggle {
  position: absolute;
  bottom: 26px;
  right: 26px;
  margin-right: 2%;
  z-index: 6;
  width: 64px;
  height: 64px;
  border: 0;
  background: transparent;
  opacity: .7;
  cursor: pointer;
  touch-action: manipulation;
}
.ips-info-toggle:hover { opacity: 1; }
.ips-info-toggle .ips-icon { font-size: 70px; }
.ips.ips-info-open .ips-info-toggle { opacity: 1; }
.ips.ips-info-open .ips-info-toggle .ips-icon { color: #111; }
.ips.ips-info-open .ips-icon-plus:before {
  content: "\2212";
  font-family: inherit;
  font-size: 70px;
  font-weight: 500;
}

.ips-info-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 33.333vw;
  max-width: none;
  min-width: 320px;
  background: rgba(255,255,255,.9);
  transform: translateX(110%);
  transition: transform .3s ease;
  z-index: 5;
  overflow: auto;
}
.ips-info-panel.is-open { transform: translateX(0); }

.ips-info-close {
  position: sticky;
  top: 16px;
  left: 20px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: .02em;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}

.ips-info-inner{
  padding: 82px 28px 34px;
  color: #111;
  font-size: 16px;
  line-height: 1.55;
}

/* Separator */
.ips-sep {
  width: 98%;
  height: 0;
  margin: 3% auto 0;
  border-top: 1.5px solid #000;
}

/* Next section */
.ips-next {
  display: grid;
  grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 0 0 0;
  margin-bottom: 3%;
}
.ips-next-left {
  font-size: 20px;
  color: #111;
  margin-left: 5%;
  padding: 10px 0 0 0;
}
.ips-next-right { display: flex; justify-content: flex-end; }

.ips-next-link {
  display: block;
  text-decoration: none;
  width: min(915px, 100%);
  transition: width .95s cubic-bezier(.22, .61, .36, 1);
  will-change: width;
}
.ips-next-media {
  position: relative;
  width: 100%;
  height: 65vh;
  overflow: hidden;
  cursor: none; /* we will show custom circle cursor */
}
.ips-next-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transform: none;
  transition: none;
  display: block;
}

/* Expand to 3/4 of the viewport width on hover */
.ips-next-link:hover { width: 75vw; max-width: 75vw; }

.ips-next-title {
  margin-top: 14px;
  color: #111;
  font-size: 50px;
  line-height: 1.2;
  text-align: left;
}

.ips-next-cursor{
  position: absolute;
  left: 0; top: 0;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  transform: translate(-9999px, -9999px);
  pointer-events: none;
  display: grid;
  place-items: center;
  transition: opacity .15s ease;
  opacity: 0;
}
.ips-next-cursor span{
  color: #111;
  font-size: 14px;
  letter-spacing: .02em;
}

/* Lightbox */
.ips-lightbox{
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important;
  padding: 4vh 4vw;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.ips-lightbox.is-open{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ips-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: 0;
  touch-action: manipulation;
}
.ips-lightbox-prev { left: 12px; }
.ips-lightbox-next { right: 12px; }
.ips-lightbox-img{
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}
.ips-lightbox-title{
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(88vw, 980px);
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
  z-index: 2;
  pointer-events: none;
}
.ips-lightbox-img.is-sliding-next{
  animation: ips-lightbox-slide-next .35s ease;
}
.ips-lightbox-img.is-sliding-prev{
  animation: ips-lightbox-slide-prev .35s ease;
}
.ips-lightbox-close{
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: .8;
  z-index: 2;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ips-lightbox-close svg{
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.ips-lightbox-close:hover{ opacity: 1; }

@keyframes ips-lightbox-slide-next {
  from { opacity: .1; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes ips-lightbox-slide-prev {
  from { opacity: .1; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

.ips-nav,
.ips-lightbox-close,
.ips-info-close,
.ips-info-toggle,
.ips-info-toggle .ips-icon,
.ips-lightbox-nav {
  cursor: pointer !important;
}

.ips-nav *,
.ips-lightbox-close *,
.ips-info-close *,
.ips-info-toggle * {
  cursor: pointer !important;
}

/* Responsive */
@media (max-width: 1280px){
  .ips-slider{ height: 60vh; }
  .ips-slides,
  .ips-slide,
  .ips-slide img{
    height: 100% !important;
  }
  .ips-title{ font-size: 56px; }
  .ips-info-toggle .ips-icon,
  .ips.ips-info-open .ips-icon-plus:before{
    font-size: 40px;
  }
  .ips-info-panel{
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    min-width: 0;
    transform: translateY(105%);
    background: rgba(255,255,255,.98);
    z-index: 2147483647;
  }
  .ips-info-panel.is-open{ transform: translateY(0); }
  .ips-info-panel{
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .ips-info-inner{ padding: 86px 24px 28px; }
  .ips-next-title{
    font-size: 40px;
    margin-left: 5%;
  }
}

@media (max-width: 980px){
  .ips-slider{ height: 60vh; }
  .ips-title{ font-size: 34px; }
  .ips-client-label{ font-size: 15px; }
  .ips-overlay-left{
    max-width: calc(100% - 110px);
    gap: 10px;
  }
  .ips-nav{
    opacity: .85;
    width: 54px;
    height: 54px;
  }
  .ips-icon{ font-size: 38px; }
  .ips-info-toggle{
    width: 56px;
    height: 56px;
    right: 14px;
    margin-right: 0;
  }
  .ips-info-toggle .ips-icon,
  .ips.ips-info-open .ips-icon-plus:before{
    font-size: 40px;
  }
  .ips-info-panel{
    position: fixed;
    inset: 0;
    width: 100vw;
    min-width: 0;
    max-width: none;
    height: 100vh;
    transform: translateY(105%);
    background: rgba(255,255,255,.98);
    z-index: 2147483647;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .ips-info-panel.is-open{ transform: translateY(0); }
  .ips-info-inner{ padding: 78px 20px 24px; }
  .ips-next{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ips-next-left{
    margin-left: 0;
    padding: 0 16px;
  }
  .ips-next-right{ justify-content: flex-start; width: 100%; }
  .ips-next-link,
  .ips-next-link:hover{
    width: 100%;
    max-width: 100%;
    transition: none;
  }
  .ips-next-media{
    cursor: pointer;
    height: 52vh;
  }
  .ips-next-title{
    font-size: 32px;
    margin-left: 5%;
  }
  .ips-next-cursor{ display:none; }
  .ips-lightbox.is-open{
    width: 100vw;
    height: 100vh;
  }
  .ips-lightbox-nav{
    width: 54px;
    height: 54px;
  }
  .ips-lightbox-close{
    top: 8px;
    right: 10px;
    font-size: 28px;
  }
}

@media (max-width: 680px){
  .ips-slider{ height: 60vh; }
  .ips-overlay{
    bottom: 18px;
    left: 14px;
  }
  .ips-overlay-left{
    flex-wrap: wrap;
    white-space: normal;
    row-gap: 4px;
    max-width: calc(100% - 90px);
  }
  .ips-client-label{ font-size: 13px; }
  .ips-title{
    font-size: 26px;
    line-height: 1.12;
  }
  .ips-nav{
    width: 48px;
    height: 48px;
    opacity: .9;
  }
  .ips-next-media{ height: 40vh; }
  .ips-next-title{ font-size: 26px; }
  .ips-sep{ margin-top: 5%; }
  .ips-next{ margin-bottom: 6%; }
}

@media (max-width: 768px){
  .ips-slider{ height: 50vh; }
  .ips-slide img{ height: 50vh !important; }

  .ips-info-panel{
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    min-width: 0;
    transform: translateY(105%);
    background: rgba(255,255,255,.99);
    z-index: 2147483647;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .ips-info-panel.is-open{ transform: translateY(0); }
  .ips-info-close{
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    z-index: 8;
  }
  .ips-info-inner{
    padding-top: 78px;
    padding-bottom: 28px;
  }
}

/* Projects overview shortcode */
.ips-projects-overview {
  width: 100%;
  --ips-overview-title-size: 6em;
  position: relative;
}

.ips-projects-desktop {
  position: relative;
  min-height: 100vh;
}

.ips-projects-col-list {
  position: relative;
  z-index: 3;
  width: 90vw;
  margin: 0 auto;
  padding-top: 2vh;
}

.ips-projects-list {
  margin: 0;
  padding: 0;
  list-style: none !important;
  list-style-type: none !important;
}
.ips-projects-list li { list-style: none !important; }

.ips-projects-item::marker {
  content: '';
}

.ips-projects-item {
  margin: 0;
  padding: 0;
  line-height: 1;
}

.ips-projects-link {
  display: inline-block;
  font-size: var(--ips-overview-title-size);
  line-height: 1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  opacity: .6;
  transition: opacity .25s ease;
  margin: 0 0 .35em;
}
.ips-projects-link:visited { color: #fff; }

.ips-projects-item:hover .ips-projects-link,
.ips-projects-link:hover,
.ips-projects-item.is-active .ips-projects-link {
  color: #fff;
  opacity: 1;
}

.ips-projects-col-media {
  position: fixed;
  top: 50%;
  right: 0;
  left: auto;
  width: 50vw;
  height: 60vh;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}

.ips-projects-col-media.is-visible {
  opacity: 1;
  visibility: visible;
}

.ips-projects-media-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f0f0f;
}

.ips-projects-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity .25s ease;
}

.ips-projects-media-img.is-changing {
  opacity: .2;
}

.ips-projects-mobile {
  display: none;
}

.ips-project-card {
  margin-bottom: 60px;
}

.ips-project-card-link {
  display: block;
  text-decoration: none;
}

.ips-project-card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f0f0f;
}

.ips-project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ips-project-card-title {
  margin: 20px 0 0;
  font-size: 25px;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
}

@media (max-width: 980px) {
  .ips-projects-desktop {
    display: none;
  }

  .ips-projects-col-media {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .ips-projects-mobile {
    display: block;
  }
}
