/* =========================================================
   T10 Site UI: header + footer
   Palette comes from Astra's global colours.
   ========================================================= */
:root {
	--t10ui-green: var(--ast-global-color-0, #156f4b);
	--t10ui-gold: var(--ast-global-color-1, #f5af39);
	--t10ui-navy: var(--ast-global-color-2, #1e293b);
	--t10ui-red: #dc2626;
	--t10ui-head: "Barlow Condensed", "Arial Narrow", sans-serif;
}

/* ---------------- Header ---------------- */
#masthead.site-header {
	position: sticky; top: 0; z-index: 999;
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	transition: box-shadow .2s ease;
}
.admin-bar #masthead.site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead.site-header { top: 0; } }
#masthead.t10-scrolled { box-shadow: 0 6px 20px rgba(15, 23, 42, .1); }

/* Desktop bar: slimmer, logo scaled down, menu on one line. */
#ast-desktop-header .ast-primary-header-bar,
#ast-desktop-header .main-header-bar { padding: 0 !important; min-height: 0 !important; }
#ast-desktop-header .ast-builder-grid-row { min-height: 78px; gap: 24px; }
#ast-desktop-header .custom-logo-link img,
#ast-desktop-header .custom-logo { max-height: 62px !important; width: auto !important; transition: max-height .2s ease; }
#masthead.t10-scrolled #ast-desktop-header .custom-logo { max-height: 50px !important; }
#masthead.t10-scrolled #ast-desktop-header .ast-builder-grid-row { min-height: 64px; }
#ast-desktop-header .site-header-primary-section-right { justify-content: flex-end; }

#ast-desktop-header .main-header-menu { flex-wrap: nowrap; gap: 2px; }
#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
	position: relative;
	padding: 0 13px !important;
	line-height: 78px;
	font-size: 15px; font-weight: 500;
	color: var(--t10ui-navy);
	white-space: nowrap;
}
#masthead.t10-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link { line-height: 64px; }
#ast-desktop-header .main-header-menu > .menu-item > .menu-link::after {
	content: ""; position: absolute; left: 13px; right: 13px; bottom: 18px; height: 2px;
	background: var(--t10ui-gold); border-radius: 2px;
	transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
#ast-desktop-header .main-header-menu > .menu-item > .menu-link:hover::after,
#ast-desktop-header .main-header-menu > .current-menu-item > .menu-link::after { transform: scaleX(1); }
#ast-desktop-header .main-header-menu > .current-menu-item > .menu-link { color: var(--t10ui-green); font-weight: 600; }
#masthead.t10-scrolled #ast-desktop-header .main-header-menu > .menu-item > .menu-link::after { bottom: 12px; }

/* "Live Score" menu item gets a pulsing red dot. */
#masthead .menu-item > a[href$="/live-score/"]::before {
	content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px;
	border-radius: 50%; background: var(--t10ui-red); vertical-align: 1px;
	animation: t10ui-pulse 1.4s ease-in-out infinite;
}
@keyframes t10ui-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Narrow desktops: keep everything on one line. */
@media (min-width: 922px) and (max-width: 1180px) {
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link { padding: 0 8px !important; font-size: 14px; }
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link::after { left: 8px; right: 8px; }
	#ast-desktop-header .custom-logo { max-height: 54px !important; }
}

/* Mobile / tablet bar. */
#ast-mobile-header .ast-primary-header-bar,
#ast-mobile-header .main-header-bar { padding: 0 !important; }
#ast-mobile-header .ast-builder-grid-row { min-height: 64px; padding: 0 16px; }
#ast-mobile-header .custom-logo { max-height: 48px !important; width: auto !important; }
#ast-mobile-header .menu-toggle {
	width: 44px; height: 44px; padding: 0 !important; border-radius: 10px !important;
	display: inline-flex; align-items: center; justify-content: center;
	background: #f7f4ea !important; border: 0 !important;
}
#ast-mobile-header .menu-toggle:focus-visible { outline: 2px solid var(--t10ui-gold); outline-offset: 2px; }
#ast-mobile-header .menu-toggle .ast-mobile-svg { fill: var(--t10ui-navy) !important; width: 22px; height: 22px; }

/* Mobile dropdown menu. */
#ast-mobile-header .ast-mobile-header-content {
	border-top: 1px solid #e5e7eb;
	box-shadow: 0 16px 30px rgba(15, 23, 42, .12);
	max-height: calc(100vh - 64px); overflow-y: auto;
}
#ast-mobile-header .ast-mobile-header-content .main-header-menu { padding: 8px 12px 14px; background: #fff; }
#ast-mobile-header .ast-mobile-header-content .menu-item { border: 0 !important; }
#ast-mobile-header .ast-mobile-header-content .menu-link {
	display: flex !important; align-items: center;
	min-height: 48px; padding: 0 14px !important; margin: 2px 0;
	border-radius: 10px; border: 0 !important;
	font-size: 16px; font-weight: 500; color: var(--t10ui-navy) !important;
}
#ast-mobile-header .ast-mobile-header-content .menu-link:hover,
#ast-mobile-header .ast-mobile-header-content .current-menu-item > .menu-link { background: #f7f4ea; }
#ast-mobile-header .ast-mobile-header-content .current-menu-item > .menu-link { color: var(--t10ui-green) !important; font-weight: 600; }

/* ---------------- Footer ---------------- */
.ast-custom-footer { background: var(--t10ui-navy); color: #cbd5e1; border-top: 4px solid var(--t10ui-gold); }
.ast-custom-footer .uagb-is-root-container {
	background: transparent !important;
	padding: 56px 16px 28px !important;
}
.ast-custom-footer .uagb-is-root-container > .uagb-container-inner-blocks-wrap {
	max-width: 1240px !important; margin: 0 auto; width: 100%;
}

/* Column grid: brand | quick links | tournament + legal. */
.ast-custom-footer .uagb-block-4c46880e {
	display: grid !important;
	grid-template-columns: 1.4fr 1fr 2fr;
	gap: 32px 40px; padding: 0 !important; margin: 0 !important; width: 100% !important;
}
.ast-custom-footer .uagb-block-4c46880e > .wp-block-uagb-container { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
.ast-custom-footer .uagb-block-5349157d { display: grid !important; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.ast-custom-footer .uagb-block-5349157d > .wp-block-uagb-container { width: auto !important; padding: 0 !important; margin: 0 !important; }

/* Brand block: logo on a light badge so it reads on navy. */
.ast-custom-footer .uagb-block-a4b6a91f { text-align: left !important; }
.ast-custom-footer .uagb-block-a4b6a91f .uagb-ifb-image-content { display: inline-block; background: #fff; border-radius: 14px; padding: 8px 10px; margin-bottom: 14px !important; }
.ast-custom-footer .uagb-block-a4b6a91f img { width: 78px !important; height: auto !important; display: block; }
.ast-custom-footer .uagb-ifb-desc { color: #cbd5e1 !important; font-size: 14.5px !important; line-height: 1.65 !important; max-width: 320px; margin: 0 !important; }

/* Spectra puts a 20px row gap between each heading and its link list. */
.ast-custom-footer .wp-block-uagb-container:has(> .wp-block-uagb-advanced-heading) { row-gap: 4px !important; gap: 4px !important; }

/* Headings and links. */
.ast-custom-footer .uagb-heading-text {
	font-family: var(--t10ui-head) !important; font-size: 19px !important; font-weight: 700 !important;
	letter-spacing: .06em; text-transform: uppercase; color: var(--t10ui-gold) !important;
	margin: 0 0 14px !important;
}
.ast-custom-footer .uagb-icon-list__wrap { display: flex !important; flex-direction: column !important; gap: 2px !important; }
.ast-custom-footer .wp-block-uagb-icon-list-child { position: relative; padding: 0 !important; margin: 0 !important; }
/* Spectra sets a colour per link with !important, so match its specificity and add the footer scope. */
.ast-custom-footer .wp-block-uagb-icon-list .wp-block-uagb-icon-list-child .uagb-icon-list__label {
	color: #e2e8f0 !important; font-size: 15px !important; line-height: 1.4 !important;
	padding: 7px 0; display: inline-block; transition: color .15s ease, transform .15s ease;
}
.ast-custom-footer .wp-block-uagb-icon-list .wp-block-uagb-icon-list-child:hover .uagb-icon-list__label { color: var(--t10ui-gold) !important; transform: translateX(3px); }
.ast-custom-footer .wp-block-uagb-icon-list-child > a:focus-visible { outline: 2px solid var(--t10ui-gold); outline-offset: 2px; }

/* Copyright row. */
.ast-custom-footer .uagb-block-db517182 {
	border-top: 1px solid rgba(255,255,255,.12) !important; border-bottom: 0 !important;
	margin-top: 40px !important; padding: 20px 0 0 !important; width: 100% !important;
}
.ast-custom-footer .uagb-block-db517182 .uagb-heading-text {
	font-family: inherit !important; font-size: 13.5px !important; font-weight: 400 !important;
	letter-spacing: 0; text-transform: none; color: #94a3b8 !important; margin: 0 !important; text-align: center;
}
.ast-custom-footer hr, .ast-custom-footer .wp-block-separator { border-color: rgba(255,255,255,.12) !important; background: rgba(255,255,255,.12) !important; }

/* Disclaimer paragraph. */
.ast-custom-footer .uagb-is-root-container p.has-text-color {
	color: #94a3b8 !important; font-size: 12.5px !important; line-height: 1.6 !important;
	max-width: 900px; margin: 16px auto 0 !important; text-align: center;
}
.ast-custom-footer .uagb-is-root-container p.has-text-color strong { color: #e2e8f0; }

/* Tablet: brand on its own row, links in three columns. */
@media (max-width: 1024px) {
	.ast-custom-footer .uagb-block-4c46880e { grid-template-columns: 1fr 2fr; }
	.ast-custom-footer .uagb-block-538d4ba8 { grid-column: 1 / -1; }
	.ast-custom-footer .uagb-ifb-desc { max-width: 520px; }
}

/* Phone: centred brand, links two per row. */
@media (max-width: 600px) {
	.ast-custom-footer .uagb-is-root-container { padding: 40px 16px 24px !important; }
	.ast-custom-footer .uagb-block-4c46880e { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
	.ast-custom-footer .uagb-block-5349157d { display: contents !important; }
	.ast-custom-footer .uagb-block-a4b6a91f, .ast-custom-footer .uagb-block-a4b6a91f .uagb-ifb-content { text-align: center !important; }
	.ast-custom-footer .uagb-ifb-desc { margin: 0 auto !important; }
	.ast-custom-footer .uagb-heading-text { font-size: 17px !important; margin-bottom: 8px !important; }
	.ast-custom-footer .wp-block-uagb-icon-list .wp-block-uagb-icon-list-child .uagb-icon-list__label { font-size: 14.5px !important; padding: 8px 0; }
	.ast-custom-footer .uagb-block-db517182 { margin-top: 28px !important; }
}
