/* Homepage hero: split panel + drifting photo columns (inc/home-hero.php) */

.tgi-hero {
	--hero-navy: #13283e;
	--hero-red: #e51836;
	--hero-red-dark: #c4122c;
	--hero-yellow: #00a94e; /* club green (was yellow) */
	--hero-sand: #f6f4ef;
	--hero-h: clamp(560px, calc(100vh - 110px), 700px);

	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	height: var(--hero-h);
	background: var(--hero-navy);
	color: #fff;
	overflow: hidden;
}

/* Text panel */
.tgi-hero__panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 18px;
	padding: 60px 48px 60px clamp(24px, 5vw, 80px);
	position: relative;
	z-index: 2;
}
.tgi-hero__eyebrow {
	display: flex; align-items: center; gap: 12px;
	font-family: Poppins, sans-serif; font-size: 13px; font-weight: 500;
	letter-spacing: .14em; text-transform: uppercase; color: var(--hero-yellow);
}
.tgi-hero__eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--hero-yellow); flex-shrink: 0; }
.tgi-hero__title {
	margin: 0;
	font-family: Raleway, sans-serif; font-weight: 800;
	font-size: clamp(2.4rem, 4.2vw, 3.9rem); line-height: 1.05; letter-spacing: -.01em;
	color: #fff;
}
.tgi-hero__lead { margin: 0; max-width: 440px; font-size: 1.05rem; line-height: 1.6; opacity: .85; }

/* Rotating messages (all stacked in one grid cell) */
.tgi-hero__msgs { display: grid; overflow: hidden; padding: 6px; margin: -6px; }
.tgi-hero__msg {
	grid-area: 1 / 1;
	display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
	opacity: 0; visibility: hidden; transform: translateY(40px);
	transition: opacity .6s ease, transform .7s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .7s;
}
.tgi-hero__msg.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.tgi-hero__msg.is-leaving { opacity: 0; visibility: visible; transform: translateY(-40px); transition-delay: 0s; }
.tgi-hero__btn {
	margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 24px; border-radius: 8px; background: var(--hero-red); color: #fff;
	font: 600 15px Poppins, sans-serif; text-decoration: none;
	transition: background-color .2s, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.tgi-hero__btn:hover, .tgi-hero__btn:focus { background: var(--hero-red-dark); color: #fff; text-decoration: none; transform: translateY(-2px); }
.tgi-hero__dots { display: flex; gap: 10px; margin-top: 18px; }
.tgi-hero__dot {
	width: 34px; height: 4px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
	background: rgba(255, 255, 255, .3); transition: background-color .3s, width .3s;
	position: relative;
}
.tgi-hero__dot::before { content: ""; position: absolute; inset: -12px -2px; } /* bigger tap target */
.tgi-hero__dot:hover { background: rgba(255, 255, 255, .6); }
.tgi-hero__dot[aria-current="true"] { background: var(--hero-yellow); width: 52px; }
.tgi-hero :focus-visible { outline: 3px solid var(--hero-yellow); outline-offset: 2px; }

/* Photo columns */
.tgi-hero__photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	padding-right: 14px;
	min-width: 0;
	overflow: hidden;
}
.tgi-hero__col { display: flex; flex-direction: column; gap: 14px; align-self: start; will-change: transform; }
.tgi-hero__col--up { animation: tgiHeroUp 60s linear infinite; }
.tgi-hero__col--down { animation: tgiHeroDown 60s linear infinite; }
.tgi-hero__col:nth-child(3) { animation-duration: 70s; }
/* The set is duplicated, so the column (plus one gap) moves by exactly half. */
@keyframes tgiHeroUp { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 7px)); } }
@keyframes tgiHeroDown { from { transform: translateY(calc(-50% - 7px)); } to { transform: translateY(0); } }

.tgi-hero__tile { overflow: hidden; border-radius: 6px; background: #1d3650; flex-shrink: 0; }
.tgi-hero__tile:nth-child(4n+1) { height: 320px; }
.tgi-hero__tile:nth-child(4n+2) { height: 260px; }
.tgi-hero__tile:nth-child(4n+3) { height: 300px; }
.tgi-hero__tile:nth-child(4n+4) { height: 280px; }
.tgi-hero__col:nth-child(2) .tgi-hero__tile:nth-child(4n+1) { height: 280px; }
.tgi-hero__col:nth-child(2) .tgi-hero__tile:nth-child(4n+2) { height: 340px; }
.tgi-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tgi-hero__tile--logo { display: flex; align-items: center; justify-content: center; background: var(--hero-sand); }
.tgi-hero__tile--logo img { width: 55%; max-width: 150px; height: auto; }

/* Pause control */
.tgi-hero__pause {
	position: absolute; right: 26px; bottom: 18px; z-index: 3;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 12px; border: 0; border-radius: 999px;
	background: rgba(19, 40, 62, .78); color: #fff; font: 500 12px Poppins, sans-serif; cursor: pointer;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tgi-hero__pause:hover { background: var(--hero-navy); }
.tgi-hero__pause-icon { width: 10px; height: 11px; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.tgi-hero.is-paused .tgi-hero__pause-icon { border: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; width: 0; height: 0; }
.tgi-hero.is-paused .tgi-hero__col,
.tgi-hero__photos:hover .tgi-hero__col { animation-play-state: paused; }

/* Tablet and phone: text first, photos below */
@media (max-width: 991.98px) {
	.tgi-hero { grid-template-columns: minmax(0, 1fr); height: auto; }
	.tgi-hero__panel { min-width: 0; }
	.tgi-hero__panel { padding: 44px 24px 36px; gap: 14px; }
	.tgi-hero__msg { gap: 14px; }
	.tgi-hero__photos { height: 360px; padding: 0 14px; }
	.tgi-hero__pause { right: 22px; bottom: 14px; }
}
@media (max-width: 575.98px) {
	.tgi-hero__panel { padding: 36px 16px 30px; }
	.tgi-hero__title { font-size: 2.3rem; }
	.tgi-hero__photos { grid-template-columns: repeat(2, minmax(0, 1fr)); height: 300px; gap: 10px; padding: 0 10px; }
	.tgi-hero__col { gap: 10px; }
	.tgi-hero__col:nth-child(3) { display: none; }
	.tgi-hero .tgi-hero__col .tgi-hero__tile:nth-child(n) { height: 200px; }
	@keyframes tgiHeroUp { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 5px)); } }
	@keyframes tgiHeroDown { from { transform: translateY(calc(-50% - 5px)); } to { transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
	.tgi-hero__col { animation: none !important; }
	.tgi-hero__msg, .tgi-hero__msg.is-leaving { transform: none; }
	.tgi-hero__pause { display: none; }
}
