/* Presentazione video Tecnoclima. */
.tc-film {
  --tc-film-overview: 1;
  --tc-film-exit: 0;
  --tc-film-offset: 0px;
  --tc-film-scroll: 0;
  --tc-film-stretch: 0;
  --tc-film-tension: 0;
  --tc-film-signal: #a3dbff;
  --tc-film-zoom: .44;
  --tc-film-elasticity: .094;
  --tc-camera-tilt: 6deg;
  --tc-aperture: 0;
  position: relative;
  width: 100%;
  min-width: 0;
  margin: clamp(12px, 2vw, 30px) auto;
  scroll-margin-top: clamp(120px, 29svh, 260px);
  color: #eaf5ff;
}
.home .elementor-section.elementor-element-7f03159:has(.tc-film) > .elementor-container {
  max-width: none;
}
.tc-film__stage { margin: 0; }
.tc-film__frame {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  background: var(--tc-blue-dark, #061e4d);
  border: 1px solid #6480a8;
  border-radius: 0;
}
.tc-film.has-youtube .tc-film__frame { min-height: 202px; }
.tc-film__video, .tc-film__frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: #081c3f;
}
.tc-film__video[hidden] { display: none; }
.tc-film__video { object-fit: contain; }
.tc-film__hint, .tc-film__louvers { display: none; }
.tc-film__time {
  align-self: center;
  color: #c4d8e6;
  font: 500 11px/1.3 var(--tc-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-inline-end: 3px;
}
.tc-film__time:empty, .tc-film.has-youtube .tc-film__time,
.tc-film.has-youtube .tc-film__playhead { display: none; }
.tc-film__playhead {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: #34566a;
  pointer-events: none;
}
.tc-film__playhead::after {
  content: '';
  display: block;
  height: 100%;
  background: #a2dded;
  transform-origin: left;
  transform: scaleX(var(--tc-film-played, 0));
}

@media (prefers-reduced-motion: no-preference) and (min-height: 500px) {
  .tc-film[data-motion-ready] { padding-bottom: clamp(72px, 14svh, 120px); }
  .tc-film[data-motion-ready] .tc-film__stage { transform: translateY(var(--tc-film-offset)); }
  .tc-film[data-motion-ready] .tc-film__frame:not(:has(:focus-visible)):not(:fullscreen) {
    opacity: calc(1 - var(--tc-film-exit));
    transform: perspective(1600px) translateY(calc(-12px * var(--tc-film-exit) - 12px * var(--tc-film-stretch)))
      rotateX(calc(var(--tc-camera-tilt) * (1 - var(--tc-film-overview)) + 1.7deg * var(--tc-film-stretch)))
      scale(calc(1 - var(--tc-film-zoom) * (1 - var(--tc-film-overview))))
      scale(calc(1 - .043 * var(--tc-film-tension)), calc(1 + var(--tc-film-elasticity) * var(--tc-film-stretch)));
    transform-origin: center 18%;
    clip-path: inset(calc(9% * var(--tc-film-exit)) calc(4% * var(--tc-film-exit)) calc(18% * var(--tc-film-exit)));
  }
  .tc-film[data-motion-ready]:not(.has-youtube):not(.is-revealed) .tc-film__louvers {
    display: grid;
    position: absolute;
    inset: 0;
    pointer-events: none;
    grid-template-rows: repeat(6, 1fr);
  }
  .tc-film__louvers span {
    --opening: clamp(0, calc(var(--tc-aperture) * 1.65 - var(--blade) * .13), 1);
    transform-origin: center top;
    transform: perspective(860px) rotateX(calc(-90deg * var(--opening)));
    background-color: #0c2439;
    background-image: url('disegno-condensatore.webp');
    background-size: 100% 600%;
    background-position: center calc(var(--blade) * 20%);
    box-shadow: inset 0 -1px #a2dded4d;
  }
  .tc-film__louvers span::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(180deg, #ceefff44, #061628e0);
    opacity: var(--opening);
  }
  .tc-film[data-motion-ready] .tc-film__frame:not(:has(:focus-visible)) [data-film-preview] {
    transform: scale(calc(1 + .15 * (1 - var(--tc-film-overview))));
  }
  .tc-film[data-motion-ready] .tc-film__hint {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    padding-top: 7px;
    border-top: 1px solid #c2d9f443;
    color: #dcecff;
    font: 600 .73rem/1.25 var(--tc-body);
  }
  .tc-film__hint span {
    color: var(--tc-film-signal);
    transform: translateY(calc(3px * var(--tc-film-scroll)));
  }
  .tc-film[data-film-view="out"] .tc-film__frame:not(:has(:focus-visible)):not(:fullscreen) { pointer-events: none; }
}
@media (min-width: 768px), (orientation: landscape) {
  .tc-film {
    /* A riposo il fotogramma 16:9 occupa lo spazio utilizzabile, compresa la barra di WordPress. */
    max-width: calc((100svh - 32px - var(--wp-admin--admin-bar--height, 0px)) * 16 / 9);
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 768px) and (min-height: 500px) {
  .tc-film[data-motion-ready]:not(.has-youtube) .tc-film__hint {
    position: absolute;
    inset-inline-end: 0;
    bottom: 100%;
    padding: 6px 12px;
    border: 0;
    background: #091c32d9;
    pointer-events: none;
  }
}
.tc-film__rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  min-height: 70px;
  margin-top: 0;
  padding: 12px clamp(13px, 2.4vw, 26px);
  border: 1px solid #6480a8;
  border-radius: 0;
  background: linear-gradient(105deg, #102e47, #091c32 68%);
}
.tc-film__caption { display: grid; gap: 4px; min-width: 0; }
.tc-film__title {
  color: #f1f7ff;
  font: 700 clamp(1.13rem, 2.45vw, 1.9rem)/1.13 var(--tc-display);
  letter-spacing: .055em;
  text-transform: uppercase;
  text-wrap: balance;
}
.tc-film__status { font: 500 .75rem/1.35 var(--tc-body); color: #c2ddf5; }
.tc-film__status:empty { display: none; }
.tc-film__controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tc-film__controls button, .tc-film__contact {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 13px;
  min-height: 44px;
  border: 1px solid #b4ddfb65;
  border-radius: 0;
  background: #b0d6ff16;
  color: #f1f7ff;
  font: 700 .76rem/1.2 var(--tc-body);
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
}
.tc-film__controls button[hidden] { display: none; }
.tc-film__controls button:hover { color: #fff; background: #93c6ff3b; }
.tc-film__controls :focus-visible { outline: 2px solid var(--tc-film-signal); outline-offset: 2px; }
.tc-film__contact { background: #d7edff; border-color: #d7edff; color: #092859; }
.tc-film__contact:hover { background: #fff; color: #092859; }

@media (max-width: 767px) {
  .home .elementor-element-7f03159:has(.tc-film) > .elementor-container > .elementor-column > .elementor-widget-wrap {
    padding-inline: 4px;
  }
  .tc-film { --tc-film-zoom: .27; --tc-film-elasticity: .072; --tc-camera-tilt: 3deg; }
  .tc-film[data-motion-ready] { padding-bottom: clamp(60px, 11svh, 88px); }
  .tc-film__rail { grid-template-columns: minmax(0, 1fr); }
  .tc-film__controls { justify-content: flex-start; }
}
@media (min-width: 768px) {
  .tc-film__controls { padding-inline-end: clamp(0px, calc(165px - (100vw - 1180px) / 2), 72px); }
}
