/* TopSmash — home con foto: apertura a tutto schermo, striscia, riquadri, mosaico, invito
   ------------------------------------------------------------------ */

/* Le zone su foto restano sempre chiare, anche con il tema chiaro. */
.ts-hero--photo,
.ts-ctaphoto,
.ts-exp__card,
.ts-has-photohero .ts-header:not(.is-stuck) {
	--ts-text: #fff;
	--ts-muted: rgba(255, 255, 255, .78);
	--ts-line: rgba(255, 255, 255, .2);
	--ts-line-strong: rgba(255, 255, 255, .34);
	--ts-elev: rgba(255, 255, 255, .1);
	--ts-accent-ink: var(--ts-lime);
	color: #fff;
}

/* ── Header trasparente sopra la foto ─────────────────────────────── */
.ts-has-photohero .ts-header:not(.is-stuck) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ts-has-photohero .ts-header:not(.is-stuck) .ts-nav a { color: rgba(255, 255, 255, .86); }
.ts-has-photohero .ts-header:not(.is-stuck) .ts-nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.ts-has-photohero .ts-header:not(.is-stuck) .ts-nav .sub-menu a { color: var(--ts-muted); }

/* ── Apertura ─────────────────────────────────────────────────────── */
.ts-hero--photo {
	min-height: min(100svh, 940px);
	margin-top: calc(-1 * var(--ts-header-h));
	padding: calc(var(--ts-header-h) + clamp(1.5rem, 6vh, 5rem)) 0 0;
	display: flex; flex-direction: column; justify-content: flex-end;
}
/* Foto e ombre sfumano verso il basso fino a sparire: sotto si vedono le luci della pagina, senza riga. */
.ts-hero__backdrop {
	position: absolute; inset: 0; z-index: -1; overflow: hidden;
	-webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 180px), transparent 100%);
	mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 180px), transparent 100%);
}
.ts-hero__media { position: absolute; inset: 0; z-index: -2; }
.ts-hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease-in-out; overflow: hidden; }
.ts-hero__slide.is-active { opacity: 1; }
.ts-hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 38%; transform: scale(1.07); transition: transform 9s cubic-bezier(.25, .1, .25, 1); }
/* Zoom lento e continuo con una transizione (non un'animazione che riparte): niente scatti al cambio foto. */
.ts-hero__slide.is-active img { transform: scale(1); }
@keyframes ts-kenburns { from { transform: scale(1.12); } to { transform: scale(1.01); } }
@keyframes ts-dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.ts-hero__shade {
	position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(90deg, rgba(5, 10, 30, .9) 0%, rgba(5, 10, 30, .64) 36%, rgba(5, 10, 30, .12) 68%, rgba(5, 10, 30, 0) 100%),
		linear-gradient(0deg, rgba(5, 10, 30, .96) 0%, rgba(5, 10, 30, 0) 40%),
		linear-gradient(180deg, rgba(5, 10, 30, .6) 0%, rgba(5, 10, 30, 0) 24%);
}

.ts-hero--photo .ts-hero__inner { grid-template-columns: minmax(0, 1fr); align-items: end; gap: 2rem; }
.ts-hero--photo .ts-hero__copy { max-width: 1120px; }
.ts-hero--photo .ts-kicker { color: var(--ts-lime); }
.ts-hero--photo .ts-hero__title {
	font-size: clamp(2.3rem, min(3.9vw, 9vh), 5.2rem);
	line-height: .94; letter-spacing: -.045em; text-transform: uppercase; font-weight: 800;
	margin-bottom: .35em; text-shadow: 0 6px 40px rgba(0, 0, 0, .35);
}
.ts-hero__accent { color: var(--ts-lime); }
@media (min-width: 861px) { .ts-hero--photo .ts-hero__title .ts-line { white-space: nowrap; } }
.ts-hero--photo .ts-hero__text { color: rgba(255, 255, 255, .84); max-width: 44ch; }

.ts-btn--lime { --ts-btn-bg: var(--ts-lime); --ts-btn-fg: #0a1845; min-height: 56px; padding: 0 1.8rem; font-size: 1rem; }
.ts-btn--glass {
	--ts-btn-bg: rgba(255, 255, 255, .1); --ts-btn-fg: #fff;
	min-height: 56px; padding: 0 1.6rem; font-size: 1rem;
	border: 1px solid rgba(255, 255, 255, .36); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ts-btn--glass:hover { border-color: #fff; box-shadow: none; background: rgba(255, 255, 255, .18); }

.ts-hero__tie {
	display: grid; gap: .55rem; justify-self: end; max-width: 300px;
	padding: 1rem 1.15rem; border-radius: 20px; color: #fff;
	background: rgba(8, 20, 16, .55); border: 1px solid rgba(255, 255, 255, .16);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	transition: border-color .25s var(--ts-ease), transform .25s var(--ts-ease);
}
.ts-hero__tie:hover { border-color: var(--ts-lime); transform: translateY(-3px); }
.ts-hero__tie .ts-pill { justify-self: start; background: rgba(0, 0, 0, .25); }
.ts-hero__tienames { font-weight: 650; font-size: .88rem; line-height: 1.35; }

.ts-hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding-block: clamp(1.8rem, 4.5vw, 3rem) clamp(4rem, 8vw, 5.5rem); }
.ts-hero--photo .ts-hero__stats { margin: 0; flex: 1; max-width: 780px; gap: 0; border-top: 1px solid rgba(255, 255, 255, .24); padding-top: 1.2rem; }
.ts-hero--photo .ts-stat { background: none; border: 0; border-radius: 0; padding: 0 1.3rem 0 0; }
.ts-hero--photo .ts-stat + .ts-stat { border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 1.3rem; }
.ts-hero--photo .ts-stat__value { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.ts-hero--photo .ts-stat__suffix { color: var(--ts-lime); }
.ts-hero--photo .ts-stat__label { color: rgba(255, 255, 255, .7); }

.ts-hero__dots { display: flex; gap: .5rem; padding-bottom: .4rem; }
.ts-hero__dots button { position: relative; width: 38px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); cursor: pointer; overflow: hidden; }
.ts-hero__dots button::after { content: ""; position: absolute; inset: 0; background: var(--ts-lime); transform: scaleX(0); transform-origin: left; }
.ts-hero__dots button.is-active::after { animation: ts-dotfill var(--ts-slide-ms, 6500ms) linear forwards; }

/* ── Striscia scorrevole ──────────────────────────────────────────── */
.ts-marquee-wrap { position: relative; z-index: 3; overflow: hidden; padding-block: 2.2rem; margin-block: -3.4rem -2.2rem; pointer-events: none; }
.ts-marquee-wrap .ts-marquee { pointer-events: auto; }
.ts-marquee {
	position: relative; z-index: 3; border: 0;
	background: var(--ts-lime); padding-block: 1rem;
	transform: rotate(-1.4deg) scale(1.04);
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7);
}
.ts-marquee__track { gap: 0; animation-duration: 36s; }
.ts-marquee__run { display: flex; align-items: center; gap: 1.6rem; padding-right: 1.6rem; }
.ts-marquee span { color: #0a1845; font-size: clamp(1.1rem, .85rem + 1.1vw, 1.8rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; }
.ts-marquee span::after { display: none; }
.ts-marquee .ts-marquee__ball { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #0a1845; }

/* ── Campionato in corso sotto l'apertura ──────────────────────────── */
.ts-cup { padding-top: clamp(2.6rem, 6vw, 4.6rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.ts-cup__head { display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; margin-bottom: clamp(1.6rem, 3.4vw, 2.4rem); }
.ts-cup__head .ts-kicker { margin: 0; }
.ts-cup__head .ts-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .5; }
.ts-cup__title { margin: 0; font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.4rem); line-height: 1; letter-spacing: -.04em; text-transform: uppercase; font-weight: 800; }
.ts-cup__title a { color: var(--ts-text); transition: color .2s var(--ts-ease); }
.ts-cup__title a:hover { color: var(--ts-accent-ink); }
.ts-cup__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.3rem; margin: 0; color: var(--ts-muted); font-size: .92rem; }
.ts-cup__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.ts-cup__meta .ts-icon { color: var(--ts-accent-ink); }

/* ── Riquadri con foto ────────────────────────────────────────────── */
.ts-exp { padding-top: clamp(3.6rem, 8vw, 6.4rem); }
.ts-exp__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.4rem); align-items: start; }
.ts-exp__card {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; align-items: flex-end;
	min-height: clamp(400px, 46vw, 580px); border-radius: var(--ts-radius-lg);
	background: var(--ts-grad); box-shadow: var(--ts-shadow-lg);
}
.ts-exp__card:nth-child(2) { margin-top: 3rem; }
.ts-exp__card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ts-ease); }
.ts-exp__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 10, 30, .1) 0%, rgba(5, 10, 30, 0) 35%, rgba(5, 10, 30, .92) 100%); }
.ts-exp__card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--ts-lime); opacity: 0; transition: opacity .3s var(--ts-ease); pointer-events: none; }
.ts-exp__card:hover img { transform: scale(1.07); }
.ts-exp__card:hover::after { opacity: 1; }
.ts-exp__num { position: absolute; top: 1.1rem; left: 1.3rem; font-family: var(--ts-font-display); font-weight: 800; font-size: .95rem; letter-spacing: .12em; color: var(--ts-lime); }
.ts-exp__body { display: grid; gap: .45rem; width: 100%; padding: clamp(1.2rem, 2.4vw, 1.8rem); }
.ts-exp__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: .35rem; border-radius: 50%; background: var(--ts-lime); color: #0a1845; }
.ts-exp__title { font-family: var(--ts-font-display); font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.15rem); line-height: 1.02; letter-spacing: -.03em; text-transform: uppercase; }
.ts-exp__text { color: rgba(255, 255, 255, .82); font-size: .95rem; max-width: 32ch; }
.ts-exp__go { display: inline-flex; align-items: center; gap: .4rem; margin-top: .3rem; font-weight: 700; color: var(--ts-lime); }
.ts-exp__go .ts-icon { transition: transform .25s var(--ts-ease); }
.ts-exp__card:hover .ts-exp__go .ts-icon { transform: translateX(4px); }

/* ── Mosaico del circolo ──────────────────────────────────────────── */
.ts-club__mosaic { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: .9rem; height: clamp(440px, 46vw, 620px); }
.ts-club__mosaic--2 { grid-template-rows: 1fr; }
.ts-club__tile { position: relative; margin: 0; overflow: hidden; border-radius: var(--ts-radius-lg); box-shadow: var(--ts-shadow-lg); }
.ts-club__tile:first-child { grid-row: 1 / -1; }
.ts-club__tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ts-ease); }
.ts-club__tile:hover img { transform: scale(1.05); }

/* Titoli di sezione più sportivi in home */
.home .ts-sechead__title { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.3rem); line-height: 1; letter-spacing: -.04em; text-transform: uppercase; font-weight: 800; }

/* ── Invito finale su foto ────────────────────────────────────────── */
.ts-ctaphoto { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: clamp(460px, 64vh, 660px); margin-top: clamp(2rem, 5vw, 4rem); }
.ts-ctaphoto__img, .ts-ctaphoto::before { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 160px); mask-image: linear-gradient(180deg, transparent 0, #000 160px); }
.ts-ctaphoto__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.ts-ctaphoto::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 10, 30, .92) 0%, rgba(5, 10, 30, .6) 50%, rgba(5, 10, 30, .15) 100%); }
.ts-ctaphoto__inner { padding-block: clamp(3rem, 8vw, 5rem); }
.ts-ctaphoto .ts-kicker { color: var(--ts-lime); }
.ts-ctaphoto__title { max-width: 14ch; margin-bottom: .4em; font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.6rem); line-height: .96; letter-spacing: -.045em; text-transform: uppercase; font-weight: 800; }
.ts-ctaphoto__text { max-width: 46ch; color: rgba(255, 255, 255, .84); font-size: var(--ts-step-1); }
.ts-ctaphoto + .ts-footer, .home .ts-footer { margin-top: 0; }

@media (max-width: 1024px) {
	.ts-hero--photo .ts-hero__inner { grid-template-columns: 1fr; }
	.ts-hero__tie { justify-self: start; }
}

@media (max-width: 860px) {
	.ts-exp__grid { grid-template-columns: 1fr; }
	.ts-exp__card { min-height: 360px; }
	.ts-exp__card:nth-child(2) { margin-top: 0; }
	.ts-hero__foot { flex-direction: column; align-items: stretch; }
	.ts-hero__dots { justify-content: flex-start; }
}

@media (max-width: 640px) {
	.ts-hero--photo { min-height: 100svh; padding-top: calc(var(--ts-header-h) + 2rem); }
	.ts-hero__slide img { object-position: 72% 40%; }
	.ts-hero__shade { background: linear-gradient(0deg, rgba(5, 10, 30, .97) 0%, rgba(5, 10, 30, .6) 52%, rgba(5, 10, 30, .35) 100%); }
	.ts-hero__tie { display: none; }
	.ts-hero--photo .ts-hero__stats { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
	.ts-hero--photo .ts-stat:nth-child(3) { border-left: 0; padding-left: 0; }
	.ts-club__mosaic { height: 420px; }
	.ts-ctaphoto::before { background: linear-gradient(0deg, rgba(5, 10, 30, .95) 0%, rgba(5, 10, 30, .55) 100%); }
	.ts-btn--lime, .ts-btn--glass { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
	.ts-hero__slide img, .ts-hero__slide.is-active img { transition: none; transform: none; }
	.ts-marquee { transform: none; }
}

/* Home: stesso spazio tra tutte le sezioni (più compatto). */
.home { --ts-home-gap: clamp(1.75rem, 3.6vw, 3rem); }
.home main > .ts-section,
.home main > .ts-cup,
.home main > .ts-exp { padding-block: var(--ts-home-gap); }
.home main > .ts-section .ts-sechead { margin-bottom: clamp(1.2rem, 2.6vw, 2rem); }
.home main > .ts-ctaphoto { margin-top: 0; }
.home main > .ts-section > .ts-wrap > :last-child, .home main > .ts-section > .ts-wrap > :last-child > :last-child { margin-bottom: 0; }
/* Dopo la foto della hero e prima della foto finale: stesso stacco delle altre sezioni. */
.home main > .ts-hero + .ts-section { padding-top: calc(var(--ts-home-gap) * 2); }
.home main > .ts-ctaphoto { margin-top: var(--ts-home-gap); }
