/* Trascriviamo – Home page (stessa struttura della home Magento: slider con pannello obliquo, "Cosa facciamo",
 * formule, "Come funziona" con schede che si girano, ricerca, recensioni, servizi più richiesti, clienti, blog, garanzia) */
.tr-page--home .entry-content { max-width: none; }
.tr-page--home .content-area, .tr-page--home .site-main { padding-top: 0; }
.tr-home { padding: 56px 0; }
.tr-home__inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.tr-page--home .entry-content .tr-home__h2 { text-align: center; color: #0d7d88; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; margin: 0 0 8px; }
.tr-home__lead { text-align: center; font-size: 1.1rem; color: #1b2430; margin: 0 0 30px; }
.tr-page--home .entry-content .tr-home__deco { display: flex; align-items: center; gap: 22px; margin: 0 0 30px; font-size: 1.15rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.tr-home__deco::before, .tr-home__deco::after { content: ""; flex: 1; height: 1px; background: #3fbfcb; }
.tr-home .tr-btn { display: inline-block; background: #c4621a; color: #fff !important; border: 1px solid #c4621a; border-radius: 28px; padding: 0 24px; line-height: 41px; font-size: 14px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-decoration: none !important; box-shadow: 1px 10px 20px rgba(0, 0, 0, .145); transition: background .2s; }
.tr-home .tr-btn:hover { background: #a9521a; border-color: #a9521a; }
.tr-home .tr-btn--ghost { background: #fff; color: #1b2430 !important; box-shadow: none; }
.tr-home .tr-btn--ghost:hover { background: #fff5ee; }

/* --- Slider (dissolvenza automatica ogni 6 s, frecce e puntini) --- */
.tr-hero { position: relative; height: 570px; max-height: 80vh; min-height: 420px; overflow: hidden; background: #0c151f; }
.tr-hero__track, .tr-hero__slide { position: absolute; inset: 0; }
.tr-hero__slide { opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.tr-hero__slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.tr-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; margin: 0; }
.tr-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35, 63, 90, .92) 0%, rgba(12, 21, 31, .98) 100%); clip-path: polygon(0 0, 66% 0, 54% 100%, 0 100%); }
.tr-hero__content { position: relative; z-index: 2; max-width: 1140px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.tr-hero__claim, .tr-hero__sub, .tr-hero__btn { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.tr-hero__slide.is-active .tr-hero__claim { opacity: 1; transform: none; transition-delay: .25s; }
.tr-hero__slide.is-active .tr-hero__sub { opacity: 1; transform: none; transition-delay: .5s; }
.tr-hero__slide.is-active .tr-hero__btn { opacity: 1; transform: none; transition-delay: .75s; }
.tr-page--home .entry-content .tr-hero__claim { color: #fff; font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.05; font-weight: 400; letter-spacing: -.02em; max-width: 52%; margin: 0 0 18px; }
.tr-hero__sub { color: #fff; font-size: clamp(1.15rem, 2.2vw, 2rem); line-height: 1.25; letter-spacing: -.02em; max-width: 50%; margin: 0 0 22px; }
.tr-hero__btn { display: inline-block; background: rgba(174, 151, 100, .46); border: 1px solid #ae9764; color: #fff !important; border-radius: 2em; padding: 0 28px; line-height: 40px; min-width: 200px; text-align: center; font-size: 1rem; font-weight: 600; text-decoration: none !important; }
.tr-hero__btn:hover { background: #ae9764; }
.tr-hero__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .3s, background .2s; padding: 0 0 4px; }
.tr-hero:hover .tr-hero__nav, .tr-hero__nav:focus-visible { opacity: 1; }
.tr-hero__nav:hover { background: rgba(255, 255, 255, .4); }
.tr-hero__nav--prev { left: 18px; }
.tr-hero__nav--next { right: 18px; }
.tr-hero__dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.tr-hero__dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; opacity: .8; }
.tr-hero__dots button[aria-selected="true"] { background: #3fbfcb; border-color: #3fbfcb; opacity: 1; }
@media (max-width: 782px) {
	.tr-hero { height: 480px; }
	.tr-hero__shade { clip-path: none; background: linear-gradient(180deg, rgba(35, 63, 90, .85) 0%, rgba(12, 21, 31, .9) 100%); }
	.tr-hero__claim, .tr-hero__sub { max-width: 100%; }
	.tr-hero__nav { display: none; }
}

/* --- Cosa facciamo: tre righe testo + foto tonda --- */
.tr-home--intro { padding-bottom: 20px; }
.tr-media { display: grid; grid-template-columns: 1fr 300px; gap: 40px 60px; align-items: center; margin: 0 0 56px; }
.tr-media--img-left { grid-template-columns: 300px 1fr; }
.tr-media--img-right .tr-media__fig { order: 2; }
.tr-media__fig { margin: 0; text-align: center; }
.tr-media__fig img { width: 240px; height: 240px; object-fit: cover; border-radius: 50%; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.tr-page--home .entry-content .tr-media__title { color: #0d7d88; text-transform: uppercase; font-size: 1.5rem; font-weight: 500; line-height: 1.25; margin: 0 0 12px; }
.tr-media__body p { margin: 0 0 10px; }
@media (max-width: 782px) {
	.tr-media, .tr-media--img-left { grid-template-columns: 1fr; gap: 18px; text-align: center; }
	.tr-media--img-right .tr-media__fig { order: 0; }
	.tr-media__fig img { width: 180px; height: 180px; }
}

/* --- Formule (zoomIn all'apparire, come nel vecchio sito) --- */
.tr-home--formule { background: #f0f0f0; margin: 0 0 20px; }
.tr-formule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto; padding: 0 0 10px; }
.tr-formula { background: #fcfcfc; border: 1px solid #ededed; border-bottom: 3px solid #0d7d88; text-align: center; display: flex; flex-direction: column; }
.tr-formula__head { background: #0d7d88; color: #fff; padding: 16px 12px 12px; }
.tr-page--home .entry-content .tr-formula__head h3 { color: #fff; font-size: 1.5rem; font-weight: 600; margin: 0; }
.tr-formula__head em { display: block; font-size: .95rem; font-weight: 600; }
.tr-formula__row { padding: 14px 16px; border-bottom: 1px solid #ededed; font-size: 1rem; font-weight: 500; line-height: 1.4; }
.tr-formula__ico { color: #0d7d88; margin-right: 4px; vertical-align: -3px; }
.tr-formula__cta { padding: 18px 16px 22px; margin-top: auto; }
.tr-tip { position: relative; text-decoration: underline; text-decoration-style: dotted; color: #0d7d88; cursor: help; }
.tr-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 260px; background: #1b2430; color: #fff; font-size: .8rem; font-weight: 400; line-height: 1.35; padding: 8px 10px; border-radius: 6px; opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 5; }
.tr-tip:hover::after, .tr-tip:focus::after { opacity: 1; visibility: visible; }
@media (max-width: 600px) { .tr-formule { grid-template-columns: 1fr; padding: 0 0 10px; } }

/* --- Come funziona: 5 schede che si girano al passaggio del mouse (flip a sinistra, 0,4 s) --- */
.tr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; max-width: 1000px; margin: 0 auto 10px; }
.tr-flip { perspective: 1000px; min-height: 250px; outline: none; }
.tr-flip__inner { position: relative; width: 100%; min-height: 250px; height: 100%; transition: transform .4s; transform-style: preserve-3d; }
.tr-flip:hover .tr-flip__inner, .tr-flip:focus .tr-flip__inner, .tr-flip.is-flipped .tr-flip__inner { transform: rotateY(-180deg); }
.tr-flip__front, .tr-flip__back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #f6f6f6; border: 1px solid #e5e7eb; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px 10px; }
/* fronte omogeneo: numero, titolo su altezza fissa (fino a 3 righe), icona sempre alla stessa altezza */
.tr-flip__front { justify-content: flex-start; padding: 14px 10px 16px; }
.tr-flip__back { transform: rotateY(180deg); font-size: .92rem; line-height: 1.4; color: #1b2430; }
.tr-flip__back p { margin: 0 0 8px; }
.tr-flip__num { font-size: 2.6rem; font-weight: 600; line-height: 1; color: #000; margin: 0 0 6px; flex: 0 0 auto; }
.tr-flip__title { font-size: 1.05rem; line-height: 1.3; margin: 0 0 10px; height: 3.9em; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tr-flip__front img { width: 90px; height: 90px; margin: auto 0 0; flex: 0 0 auto; }
@media (max-width: 600px) { .tr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Ricerca (pulse all'apparire) --- */
.tr-home-search { display: flex; max-width: 500px; margin: 0 auto; border: 1px solid #0d7d88; border-radius: 22px; overflow: hidden; background: #fff; }
.tr-home-search input[type="search"] { flex: 1; border: 0; padding: 10px 18px; font-size: .95rem; outline: none; background: transparent; box-shadow: none; }
.tr-home-search button { border: 0; background: transparent; color: #0d7d88; padding: 0 16px; cursor: pointer; display: flex; align-items: center; }

/* --- Recensioni / Servizi più richiesti --- */
.tr-home--reviews { padding-top: 20px; padding-bottom: 20px; }
.tr-feedaty--carousel { min-height: 120px; overflow: hidden; }
.tr-best { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tr-best__item { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 22px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 170px; }
.tr-best__item.is-ready { border-color: #cfe7ea; }
.tr-page--home .entry-content .tr-best__name { font-size: 1rem; line-height: 1.35; font-weight: 600; color: #0d7d88; margin: 0; flex: 1; }
.tr-best__name a { color: #0d7d88; text-decoration: none; }
.tr-best__name a:hover { text-decoration: underline; }
.tr-best__item.is-soon .tr-best__name { color: #6b7280; font-weight: 500; }
.tr-best__soon { color: #9aa3ad; font-size: .82rem; font-style: italic; }
@media (max-width: 1024px) { .tr-best { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tr-best { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- A chi si rivolgono i nostri servizi --- */
.tr-clienti { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; }
.tr-cliente { text-align: center; }
.tr-cliente figure { margin: 0 auto 14px; width: 100px; height: 100px; border-radius: 50%; background: #eef5fb; display: flex; align-items: center; justify-content: center; }
.tr-cliente figure img { width: 56px; height: 56px; object-fit: contain; }
.tr-page--home .entry-content .tr-cliente h3 { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; margin: 0 0 8px; color: #1b2430; }
.tr-cliente p { color: #4b5563; font-size: .95rem; margin: 0 0 14px; }
@media (max-width: 782px) { .tr-clienti { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .tr-clienti { grid-template-columns: 1fr; } }

/* --- Blog --- */
.tr-blog__grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tr-page--home .entry-content .tr-blog__title { font-size: 1.15rem; margin: 0; }
.tr-home__more { text-align: center; margin: 26px 0 0; }
@media (max-width: 600px) { .tr-blog__grid--home { grid-template-columns: 1fr; } }

/* --- Servizio garantito --- */
.tr-home--garanzia { background: #f6f7f9; padding-bottom: 46px; margin-bottom: -48px; }
.tr-garanzia { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: center; }
.tr-garanzia__item img { width: 48px; height: 48px; margin: 0 0 10px; }
.tr-page--home .entry-content .tr-garanzia__item h3 { font-size: 1rem; font-weight: 700; text-transform: uppercase; margin: 0 0 4px; }
.tr-garanzia__item p { margin: 0; color: #4b5563; }
@media (max-width: 600px) { .tr-garanzia { grid-template-columns: 1fr; } }

/* --- Animazioni all'apparire (IntersectionObserver in home.js) --- */
[data-tr-animate] { opacity: 0; }
[data-tr-animate].is-in { opacity: 1; animation-duration: 1s; animation-fill-mode: both; }
[data-tr-animate="zoomIn"].is-in { animation-name: trZoomIn; }
[data-tr-animate="pulse"].is-in { animation-name: trPulse; animation-duration: 1.2s; }
@keyframes trZoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } to { transform: none; } }
@keyframes trPulse { from { transform: scale3d(1, 1, 1); } 50% { transform: scale3d(1.05, 1.05, 1.05); } to { transform: scale3d(1, 1, 1); } }
@media (prefers-reduced-motion: reduce) {
	[data-tr-animate] { opacity: 1; animation: none !important; }
	.tr-hero__slide, .tr-hero__claim, .tr-hero__sub, .tr-hero__btn, .tr-flip__inner { transition: none; }
}
