/* Componenti rifiniti a partire dai layout Tecnoclima. */
:root {
  --tc-blue: #003399;
  --tc-blue-dark: #061e4d;
  --tc-blue-light: #447be0;
  --tc-surface: #f4f8ff;
  --tc-ink: #26354a;
  --tc-display: Oswald, 'Arial Narrow', sans-serif;
  --tc-body: Montserrat, Arial, sans-serif;
}
.tc-hero :focus-visible, .tc-hero:focus-visible, .tc-showcase :focus-visible,
.tc-showcase:focus-visible, .tc-consent :focus-visible {
  outline: 2px solid #70dfff;
  outline-offset: 3px;
}
#content section[id] { scroll-margin-top: 76px; }

/* Le due righe di contatto attraversano anche le parti azzurre della trama della testata. */
:is(#masthead, .tc-sticky-header) .elementor-icon-list-item a:is([href^="mailto:"], [href^="tel:"]) {
  --tc-contact-ink: #12365d;
  --tc-contact-paper: #f6faff;
}
:is(#masthead, .tc-sticky-header) .elementor-icon-list-item a:is([href^="mailto:"], [href^="tel:"]) > span {
  color: var(--tc-contact-ink);
  background-color: var(--tc-contact-paper);
  box-shadow: 0 0 0 2px var(--tc-contact-paper);
}
:is(#masthead, .tc-sticky-header) .elementor-icon-list-item a:is([href^="mailto:"], [href^="tel:"]) svg {
  fill: var(--tc-contact-ink);
}
:is(#masthead, .tc-sticky-header) .elementor-icon-list-item a:is([href^="mailto:"], [href^="tel:"]):is(:hover, :focus-visible) .elementor-icon-list-text {
  text-decoration: underline;
  text-underline-offset: .14em;
}

#masthead:has(.tc-hero) { background: #f8f8f8 var(--tc-header-image, none) center top / cover no-repeat; }
#masthead:has(.tc-hero) > .elementor { min-height: 100svh; display: flex; flex-direction: column; }
#masthead:has(.tc-hero) .elementor-element-0293e89 {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  min-height: 0;
  margin: 0;
  background: transparent;
}
#masthead:has(.tc-hero) .elementor-element-0293e89 > .elementor-background-overlay { display: none; }
#masthead:has(.tc-hero) .elementor-element-0293e89 > .elementor-container { width: 100%; max-width: none; min-height: 0; }
#masthead:has(.tc-hero) .elementor-element.elementor-element-f63f049 > .elementor-element-populated {
  /* Il vecchio slider Jet alzava il widget mobile sopra i recapiti. */
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tc-hero {
  --tc-photo-width: min(100%, 1310px, max(740px, 138svh));
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 12px clamp(96px, 7.4vw, 132px) 30px;
}
.tc-hero > .tc-hero__stage {
  position: relative;
  display: grid;
  width: var(--tc-photo-width);
  min-width: 0;
  margin: 0;
}
.tc-hero .tc-hero__slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 3px 8px #13284335;
}
.tc-hero .tc-hero__slide > a { display: block; width: 100%; height: 100%; }
.tc-hero .tc-hero__slide .tc-hero__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  object-fit: cover;
  box-shadow: none;
}
.tc-hero__title {
  top: 4.4%;
  right: 3.3%;
  max-width: 79%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4.4vw, 5rem);
  letter-spacing: .045em;
  line-height: .97;
  text-wrap: balance;
}
.tc-hero__arrows {
  right: max(2px, calc(50% - min(655px, max(370px, 69svh)) - 100px));
  top: calc(50% - 38px);
  align-items: center;
  gap: 10px;
}
.tc-hero__arrows button[data-slide] { width: 42px; height: 44px; }
.tc-hero__arrows button[data-slide] span {
  width: 14px;
  height: 14px;
  display: block;
  border-right: 5px solid currentColor;
  border-top: 5px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.tc-hero__arrows button[data-slide="-1"] span { transform: rotate(-135deg); }
.tc-carousel-pause[hidden] { display: none !important; }
.tc-hero__arrows .tc-carousel-pause {
  position: absolute; top: 45px; left: calc(50% - 22px);
  width: 44px; height: 44px; font: 700 14px var(--tc-body); color: var(--tc-blue);
}
.tc-hero__slide:not([hidden]) { animation: tc-photo-reveal .52s ease-out both; }
@keyframes tc-photo-reveal { from { opacity: .36; } to { opacity: 1; } }

.tc-showcase--clients {
  min-width: 0;
  padding: 8px 10px 2px;
  background: transparent; box-shadow: none;
}
.tc-showcase--clients .tc-hero__slide:not([hidden]) { min-height: clamp(138px, 15vw, 186px); }
.tc-showcase--clients .tc-showcase__title {
  margin: 0; max-width: 100%;
  font-size: clamp(1.65rem,4.1vw,3.5rem); font-weight: 500; letter-spacing: .015em;
  text-wrap: balance; overflow-wrap: anywhere;
  text-shadow: 0 0 18px #63e7ff26, 0 8px 24px #0004;
}
.tc-showcase--brands {
  padding: clamp(14px,2vw,26px);
  color: var(--tc-ink);
  background:
    linear-gradient(#447be00a 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, #447be00a 1px, transparent 1px) 0 0 / 26px 26px,
    var(--tc-surface);
  border: 1px solid #0033991a;
  box-shadow: 0 18px 44px #001a4f15, 0 28px 70px #001a4f18;
}
.tc-showcase__tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-bottom: 14px; }
.tc-showcase__tags span {
  display: inline-block; padding: 7px 10px; border: 1px solid #0033992c;
  background: #fff; color: var(--tc-blue); font: 700 11px var(--tc-body);
  text-transform: uppercase; letter-spacing: .06em;
}
.tc-showcase--brands .tc-hero__slide { width: 100%; }
.tc-showcase--brands .tc-hero__slide:not([hidden]) { display: block; min-height: 0; background: #fff; border: 1px solid #00339916; }
.tc-showcase__media { display: grid; place-items: center; min-height: clamp(105px,15vw,178px); padding: 15px; }
.tc-showcase__image { max-width: min(100%,480px); max-height: 146px; filter: drop-shadow(0 5px 10px #00339918); }
.tc-showcase__copy { padding: 14px 19px; text-align: left; border-top: 1px solid #00339916; }
.tc-showcase--brands .tc-showcase__title { margin: 0 0 6px; color: var(--tc-blue); font-size: clamp(1.55rem,3vw,2.15rem); }
.tc-showcase__description { margin: 0; color: #49566b; font: 500 13px/1.6 var(--tc-body); }
.tc-showcase__controls { justify-content: flex-start; gap: 7px; }
.tc-showcase--brands .tc-showcase__controls { margin-top: 11px; }
.tc-showcase--brands .tc-showcase__controls > button { color: var(--tc-blue); background: #fff; border: 1px solid #0033992c; flex: 0 0 44px; }
.tc-showcase__count { white-space: nowrap; color: var(--tc-blue); }
.tc-showcase__timeline { min-width: 0; display: flex; flex: 1 1 100%; gap: 4px; }
.tc-showcase__timeline button {
  min-width: 0; width: auto; height: 36px; flex: 1; padding: 0;
  display: grid; align-items: center; background: transparent; border: 0;
}
.tc-showcase__timeline button span {
  position: relative; display: block; width: 100%; height: 9px; overflow: hidden;
  background: #3975d237; border: 1px solid #adc0e55c;
}
.tc-showcase--clients .tc-showcase__timeline button span { background: #e2f3ff30; }
.tc-showcase__timeline button[aria-current] { flex-grow: 1.65; }
.tc-showcase__timeline button[aria-current] span { border-color: #70dfff; background: #3871be7a; }
.tc-showcase__timeline button[aria-current] span::after {
  content: ''; position: absolute; inset: 0; transform-origin: left; background: #70dfff;
}
.tc-carousel-running .tc-showcase__timeline button[aria-current] span::after {
  animation: tc-carousel-progress var(--tc-carousel-duration, 5200ms) linear both;
}
@keyframes tc-carousel-progress { from { transform: scaleX(0); } }
.tc-showcase__controls .tc-carousel-pause { width: 44px; height: 44px; flex: 0 0 44px; font: 700 14px var(--tc-body); }

.tc-consent { right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); color: var(--tc-ink); }
.tc-consent__reopen {
  display: inline-flex; gap: 16px; align-items: center; min-height: 60px; padding: 9px 14px;
  border: 1px solid #84acff44; border-radius: 0; background: linear-gradient(110deg,#003399,#396fd0);
  font: 700 .92rem var(--tc-display); letter-spacing: .06em;
}
.tc-consent img { display: block; background: #fff; object-fit: contain; padding: 4px; }
.tc-consent__panel {
  bottom: max(22px, env(safe-area-inset-bottom));
  width: min(calc(100vw - 32px), 1120px); max-height: calc(100dvh - 36px);
  border-radius: 0; background: linear-gradient(130deg,#fbfdff,#edf4fe);
}
.tc-consent__panel header, .tc-consent__settings header {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  min-height: 112px; padding: 22px 66px 22px 24px;
  color: white; background: linear-gradient(112deg,#03318f,#3d73d7);
  font: 700 1.48rem var(--tc-display); text-transform: uppercase; letter-spacing: .055em;
}
.tc-consent__panel header button, .tc-consent__settings header button {
  position: absolute; top: 17px; right: 17px; min-width: 44px; min-height: 44px;
  padding: 4px; border: 1px solid #e2edff55; border-radius: 0;
  background: #ecf4ff17; color: #fff; font-size: 25px; line-height: 1;
}
.tc-consent__body { padding: 25px 27px 28px; font-size: .9rem; line-height: 1.65; }
.tc-consent__body > p { margin: 0 0 14px; }
.tc-consent__policies { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tc-consent__policies a::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 8px 2px 1px; background: var(--tc-blue); transform: rotate(45deg); }
.tc-consent__policies a:hover { text-decoration: underline; }
.tc-consent__actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; width: 71%; margin: 19px 0 0 auto; }
.tc-consent__actions button, .tc-consent__settings-actions button {
  min-height: 82px; border: 1px solid #acc0de; border-radius: 0; padding: 9px;
  color: #123776; background: #fff; font: 700 .8rem var(--tc-body); letter-spacing: .06em; text-transform: uppercase;
}
.tc-consent__actions [data-consent-allow], .tc-consent__settings-actions button { color: white; background: #06338f; }
.tc-consent__actions [data-consent-custom] { grid-column: 2; }
.tc-consent__actions button:hover, .tc-consent__settings-actions button:hover { box-shadow: inset 0 0 0 2px #85abeb; }
.tc-consent__settings {
  width: min(640px, calc(100vw - 24px)); max-height: 90dvh; padding: 0;
  border: 1px solid #c1d2eb; color: var(--tc-ink); background: var(--tc-surface);
  box-shadow: 0 20px 64px #03245467;
}
.tc-consent__settings::backdrop { background: #081c497d; }
.tc-consent__settings header { min-height: 88px; }
.tc-consent__choice {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 13px 15px; margin-bottom: 10px; border: 1px solid #c6d5ec; background: white; cursor: pointer;
}
.tc-consent__choice small { display: block; color: #435675; font-size: .8rem; }
.tc-consent__choice input {
  appearance: none; flex: 0 0 45px; height: 25px; margin: 0; border: 1px solid #687d9c;
  border-radius: 22px; background: #e8eef7; cursor: pointer;
}
.tc-consent__choice input::before {
  content: ''; display: block; width: 17px; height: 17px; margin: 3px;
  border-radius: 50%; background: #38557b;
}
.tc-consent__choice input:checked { background: var(--tc-blue); }
.tc-consent__choice input:checked::before { transform: translateX(20px); background: white; }
.tc-consent__settings-actions { text-align: right; margin-top: 16px; }
.tc-consent__settings-actions button { min-height: 46px; padding-inline: 16px; }

.tc-assistance__confirmation {
  width: min(500px, calc(100vw - 24px)); padding: clamp(20px, 4vw, 34px);
  color: var(--tc-ink); background: var(--tc-surface); border: 1px solid #c1d2eb;
  border-top: 6px solid var(--tc-blue); box-shadow: 0 20px 64px #03245467;
}
.tc-assistance__confirmation::backdrop { background: #081c497d; }
.tc-assistance__confirmation strong { color: var(--tc-blue); font: 700 1.5rem var(--tc-display); text-transform: uppercase; }
.tc-assistance__confirmation p { margin: 12px 0 20px; }
.tc-assistance__confirmation button { min-height: 44px; }
.tc-external:has(.tc-external__contact) { padding-bottom: 76px; }
.tc-external__contact { position: absolute; z-index: 2; bottom: 16px; left: 0; right: 0; text-align: center; }

@media (min-width: 768px) and (max-width: 1366px) {
  .tc-hero__title { top: 50%; transform: translateY(-50%); font-size: clamp(1.85rem,4.2vw,3.6rem); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .tc-hero { padding: 12px 24px 24px; }
}
@media (max-width: 1024px) {
  .tc-hero .tc-hero__arrows { position: relative; inset: auto; transform: none; margin-top: 8px; }
  .tc-hero .tc-carousel-pause { position: static; }
}
@media (max-width: 767px) {
  #masthead:has(.tc-hero) .elementor-element.elementor-element-0293e89 {
    flex: 0 0 auto;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  #masthead:has(.tc-hero) > .elementor { min-height: auto !important; }
  .tc-hero { padding: 10px 14px 18px; }
  .tc-hero .tc-hero__slide { aspect-ratio: 4 / 3; }
  .tc-hero__title { top: 5%; right: 4%; font-size: clamp(1rem,5.4vw,2rem); }
  .tc-consent { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .tc-consent__panel { bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .tc-consent__panel header, .tc-consent__settings header { min-height: 73px; padding: 12px 60px 12px 14px; font-size: 1.2rem; }
  .tc-consent__panel header img, .tc-consent__settings header img { width: 40px; height: 40px; }
  .tc-consent__panel header button, .tc-consent__settings header button { top: 13px; right: 12px; }
  .tc-consent__body { padding: 16px 14px; font-size: .8rem; }
  .tc-consent__actions { width: 100%; grid-template-columns: 1fr; margin-top: 14px; gap: 8px; }
  .tc-consent__actions button { min-height: 48px; }
  .tc-consent__actions [data-consent-custom] { grid-column: auto; }
  .tc-consent__panel .tc-consent__policies { display: grid; }
  .tc-consent__reopen { min-height: 49px; padding: 6px 10px; gap: 10px; }
  .tc-consent__reopen img { width: 32px; height: 32px; }
  .tc-showcase--brands .tc-showcase__controls { flex-wrap: wrap; }
  .tc-showcase--brands .tc-showcase__timeline { flex-basis: 100%; order: 1; }
  .tc-showcase--brands .tc-showcase__count { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-hero__slide:not([hidden]),
  .tc-carousel-running .tc-showcase__timeline button[aria-current] span::after { animation: none; }
}
