/* ==========================================================================
   TA Google Follow Banner — banner.css
   3 varianti grafiche, zero dipendenze esterne, nessun font fetch
   v1.1 — bottoni più grandi, contrasto migliorato, responsive raffinato
   ========================================================================== */

.ta-gfb,
.ta-gfb *,
.ta-gfb *::before,
.ta-gfb *::after {
	box-sizing: border-box;
}

.ta-gfb {
	--ta-radius: 18px;
	--ta-pad: clamp(1.15rem, 2.4vw, 1.85rem);
	--ta-google-blue: #4285F4;
	--ta-google-red: #EA4335;
	--ta-google-yellow: #FBBC05;
	--ta-google-green: #34A853;

	display: block;
	margin: 2.2rem 0;
	border-radius: var(--ta-radius);
	overflow: hidden;
	position: relative;
	isolation: isolate;
	contain: layout style;

	/* Lazy load: il banner parte nascosto e appare allo scroll */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .5s cubic-bezier(.2,.7,.2,1), transform .5s cubic-bezier(.2,.7,.2,1);
	will-change: opacity, transform;
}

/* Stato visibile - attivato dal JS IntersectionObserver */
.ta-gfb--visible {
	opacity: 1;
	transform: translateY(0);
}

.ta-gfb[hidden] { display: none !important; }

.ta-gfb__inner {
	position: relative;
	padding: var(--ta-pad);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(.95rem, 2.2vw, 1.5rem);
	align-items: center;
}

.ta-gfb__deco {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.ta-gfb__mark,
.ta-gfb__body { position: relative; z-index: 1; }

.ta-gfb__mark {
	width: clamp(52px, 9vw, 70px);
	height: clamp(52px, 9vw, 70px);
	border-radius: 18px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.ta-gfb__glyph {
	width: 70%;
	height: 70%;
	display: block;
}

.ta-gfb__body { min-width: 0; }

.ta-gfb__eyebrow {
	margin: 0 0 .4rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	line-height: 1;
}

.ta-gfb__title {
	margin: 0 0 .45rem;
	font-size: clamp(1.22rem, 2.4vw, 1.55rem);
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.011em;
}

.ta-gfb__sub {
	margin: 0 0 1.05rem;
	font-size: clamp(.94rem, 1.1vw, 1rem);
	line-height: 1.5;
	max-width: 60ch;
}

.ta-gfb__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin-top: .25rem;
	align-items: center;
}

.ta-gfb__actions-label {
	font-size: clamp(.82rem, 1vw, .92rem);
	font-weight: 700;
	letter-spacing: .02em;
	margin-right: .15rem;
	white-space: nowrap;
	line-height: 1;
}

/* --------------------------------------------------------------------------
   Bottoni — compatti, pill-shape
   -------------------------------------------------------------------------- */

.ta-gfb__btn {
	--btn-bg: transparent;
	--btn-color: inherit;
	--btn-border: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	padding: .5rem .95rem;
	min-height: 36px;
	border-radius: 999px;
	font-size: clamp(.82rem, 1vw, .9rem);
	font-weight: 700;
	letter-spacing: -.005em;
	text-decoration: none !important;
	border: 1.5px solid var(--btn-border);
	background: var(--btn-bg);
	color: var(--btn-color);
	cursor: pointer;
	line-height: 1;
	transition: transform .22s cubic-bezier(.2,.7,.2,1), background-color .2s, color .2s, border-color .2s, box-shadow .25s;
	white-space: nowrap;
}

.ta-gfb__btn:hover,
.ta-gfb__btn:focus-visible {
	transform: translateY(-1px);
	text-decoration: none !important;
}

.ta-gfb__btn:focus-visible {
	outline: 3px solid rgba(66, 133, 244, .55);
	outline-offset: 2px;
}

.ta-gfb__btn:active { transform: translateY(0); }

.ta-gfb__btn-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	display: block;
}

/* --------------------------------------------------------------------------
   1) AURORA — gradiente vibrante, testo bianco
   -------------------------------------------------------------------------- */

.ta-gfb--aurora {
	color: #fff;
	background: #0b1020;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-shadow:
		0 10px 30px -12px rgba(0, 0, 0, .35),
		0 2px 8px -2px rgba(0, 0, 0, .15);
}

.ta-gfb--aurora .ta-gfb__deco {
	background:
		radial-gradient(60% 70% at 18% 22%, rgba(66,133,244,.95), transparent 60%),
		radial-gradient(60% 65% at 82% 28%, rgba(234,67,53,.85), transparent 62%),
		radial-gradient(70% 80% at 22% 88%, rgba(52,168,83,.8), transparent 60%),
		radial-gradient(70% 70% at 88% 80%, rgba(251,188,5,.75), transparent 60%),
		linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #0b1020 100%);
	background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
	animation: ta-gfb-aurora 14s ease-in-out infinite alternate;
	filter: saturate(115%);
}

.ta-gfb--aurora .ta-gfb__deco::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
	background-size: 3px 3px;
	mix-blend-mode: overlay;
	opacity: .35;
	pointer-events: none;
}

@keyframes ta-gfb-aurora {
	0%   { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0 0; }
	100% { background-position: 40% 60%, 60% 40%, 60% 40%, 40% 60%, 0 0; }
}

.ta-gfb--aurora .ta-gfb__mark {
	background: rgba(255,255,255,.16);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.28);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

.ta-gfb--aurora .ta-gfb__eyebrow { color: rgba(255,255,255,.82); }
.ta-gfb--aurora .ta-gfb__title   { color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,.25); }
.ta-gfb--aurora .ta-gfb__sub     { color: rgba(255,255,255,.9); }
.ta-gfb--aurora .ta-gfb__actions-label { color: rgba(255,255,255,.75); }

/* Tutti i bottoni: sfondo bianco, testo scuro — uniforme */
.ta-gfb--aurora .ta-gfb__btn {
	--btn-bg: #fff;
	--btn-color: #0b1020;
	--btn-border: rgba(255,255,255,.9);
	box-shadow: 0 2px 8px -3px rgba(0,0,0,.35);
}
.ta-gfb--aurora .ta-gfb__btn:hover {
	--btn-bg: #f0f3ff;
	--btn-border: #fff;
	box-shadow: 0 6px 16px -6px rgba(0,0,0,.45);
}

/* --------------------------------------------------------------------------
   2) EDITORIAL — scheda chiara, accenti Google
   -------------------------------------------------------------------------- */

.ta-gfb--editorial {
	background: #fdfcfa;
	color: #16181d;
	border: 1px solid #ececec;
	box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 28px -22px rgba(0,0,0,.18);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.ta-gfb--editorial::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--ta-google-blue) 0%, var(--ta-google-red) 33%, var(--ta-google-yellow) 66%, var(--ta-google-green) 100%);
	z-index: 1;
}

.ta-gfb--editorial .ta-gfb__deco {
	background:
		radial-gradient(40% 55% at 100% 0%, rgba(66,133,244,.06), transparent 70%),
		radial-gradient(50% 60% at 0% 100%, rgba(234,67,53,.045), transparent 70%);
}

.ta-gfb--editorial .ta-gfb__deco::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px);
	background-size: 14px 14px;
	opacity: .6;
}

.ta-gfb--editorial .ta-gfb__inner { padding-top: calc(var(--ta-pad) + 2px); }

.ta-gfb--editorial .ta-gfb__mark {
	background: #fff;
	border: 1px solid #ececec;
	box-shadow: 0 6px 18px -10px rgba(0,0,0,.18);
}

.ta-gfb--editorial .ta-gfb__eyebrow {
	color: var(--ta-google-blue);
}

.ta-gfb--editorial .ta-gfb__title {
	font-family: "Iowan Old Style", "Palatino Linotype", "URW Palladio L", P052, Palatino, "Book Antiqua", Georgia, "Source Serif Pro", serif;
	font-weight: 700;
	letter-spacing: -0.012em;
	color: #0e1117;
}

.ta-gfb--editorial .ta-gfb__sub { color: #3f444c; }
.ta-gfb--editorial .ta-gfb__actions-label { color: #6b7280; }

/* Tutti i bottoni: sfondo bianco, bordo grigio, testo scuro */
.ta-gfb--editorial .ta-gfb__btn {
	--btn-bg: #fff;
	--btn-color: #0e1117;
	--btn-border: #d8dadd;
	box-shadow: 0 1px 3px -1px rgba(0,0,0,.1);
}
.ta-gfb--editorial .ta-gfb__btn:hover {
	--btn-bg: #f0f3ff;
	--btn-border: var(--ta-google-blue);
	box-shadow: 0 4px 12px -4px rgba(66,133,244,.3);
}

/* --------------------------------------------------------------------------
   3) MIDNIGHT — scheda scura premium con luci diffuse
   -------------------------------------------------------------------------- */

.ta-gfb--midnight {
	color: #ecedf2;
	background: #0d0f17;
	border: 1px solid rgba(255,255,255,.06);
	box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 38px -22px rgba(0,0,0,.6);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.ta-gfb--midnight .ta-gfb__deco {
	background:
		radial-gradient(38% 52% at 88% 18%, rgba(66,133,244,.24), transparent 72%),
		radial-gradient(34% 48% at 14% 92%, rgba(234,67,53,.2), transparent 72%),
		radial-gradient(28% 38% at 78% 95%, rgba(52,168,83,.18), transparent 72%);
}

.ta-gfb--midnight .ta-gfb__deco::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 30%);
	pointer-events: none;
}

.ta-gfb--midnight::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(66,133,244,.7), rgba(234,67,53,.7), rgba(251,188,5,.7), rgba(52,168,83,.7), transparent);
	z-index: 2;
}

.ta-gfb--midnight .ta-gfb__mark {
	background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
	border: 1px solid rgba(255,255,255,.12);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.ta-gfb--midnight .ta-gfb__eyebrow { color: rgba(236,237,242,.7); }

.ta-gfb--midnight .ta-gfb__title {
	color: #ffffff;
}

.ta-gfb--midnight .ta-gfb__sub { color: rgba(236,237,242,.82); }
.ta-gfb--midnight .ta-gfb__actions-label { color: rgba(236,237,242,.6); }

/* Tutti i bottoni: sfondo bianco, testo scuro — uniforme */
.ta-gfb--midnight .ta-gfb__btn {
	--btn-bg: #fff;
	--btn-color: #0d0f17;
	--btn-border: #fff;
	box-shadow: 0 2px 8px -3px rgba(0,0,0,.25);
}
.ta-gfb--midnight .ta-gfb__btn:hover {
	--btn-bg: #f0f3ff;
	box-shadow: 0 6px 16px -6px rgba(255,255,255,.35);
}

/* --------------------------------------------------------------------------
   Responsive — 3 breakpoint per transizioni morbide
   -------------------------------------------------------------------------- */

/* Tablet medio */
@media (max-width: 900px) {
	.ta-gfb {
		--ta-radius: 16px;
	}
	.ta-gfb__btn {
		padding: .45rem .8rem;
	}
}

/* Mobile: layout impilato, bottoni wrap compatti */
@media (max-width: 640px) {
	.ta-gfb__inner {
		grid-template-columns: 1fr;
		gap: .85rem;
		padding: 1.15rem;
	}
	.ta-gfb__mark {
		width: 54px;
		height: 54px;
	}
	.ta-gfb__title {
		font-size: 1.15rem;
	}
	.ta-gfb__sub {
		font-size: .92rem;
		margin-bottom: .75rem;
	}
	.ta-gfb__actions-label {
		width: 100%;
		margin-bottom: .15rem;
	}
	.ta-gfb__btn {
		padding: .45rem .75rem;
		font-size: .82rem;
		min-height: 34px;
	}
}

/* Mobile stretto */
@media (max-width: 380px) {
	.ta-gfb { --ta-pad: 1rem; }
	.ta-gfb__title { font-size: 1.08rem; }
	.ta-gfb__btn { font-size: .78rem; padding: .4rem .65rem; }
}

/* --------------------------------------------------------------------------
   Riduzione movimento
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.ta-gfb--aurora .ta-gfb__deco { animation: none; }
	.ta-gfb__btn, .ta-gfb__btn .ta-gfb__arrow { transition: none; }
	.ta-gfb__btn:hover { transform: none; }
	.ta-gfb__btn:hover .ta-gfb__arrow { transform: none; }
	/* Lazy load: nessuna animazione, visibile subito */
	.ta-gfb {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Dark mode globale: Editorial leggermente più caldo su OS scuro
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
	.ta-gfb--editorial {
		background: #f7f5f1;
	}
}

/* --------------------------------------------------------------------------
   Print: nascondi il banner in stampa
   -------------------------------------------------------------------------- */

@media print {
	.ta-gfb { display: none !important; }
}
