/*
 * Astra's header/footer are classic (Customizer-driven) markup, not
 * theme.json-controlled blocks, so theme.json alone can't re-colour
 * them the way it would on a block theme. This file targets Astra's
 * standard selectors directly to match the Tipped2Win dark "space
 * lottery" palette used in the page content. Astra's own Customizer
 * CSS can be fairly specific, so a few !important overrides are used
 * deliberately here — this is chrome-only, none of it touches the
 * plugin's page content (that's self-contained and unaffected by theme).
 *
 * Reuses the real --t2w-* custom properties already defined by the
 * tipped2win-predictions plugin's own frontend.css (loaded site-wide,
 * not just on pages using its shortcodes — confirmed 2026-07-30) rather
 * than duplicating a second, disconnected variable set here.
 *
 * If a future Astra update changes class names, the visual symptom is
 * "header/footer look like default Astra again" — page content keeps
 * working regardless.
 *
 * Real bug found and fixed 2026-07-30: the plugin's --t2w-* variables are scoped to `.t2w-page`
 * (a wrapper *inside* <body>), so rules on `body` itself (an ancestor, not a descendant) could never
 * actually resolve them — CSS custom properties only inherit downward. `body`'s own background
 * rendered as fully transparent as a result. Redefining the same real values on :root here so both
 * body-level chrome rules and the plugin's own .t2w-page-scoped content rules resolve consistently.
 */
:root {
	--t2w-bg: #08051f;
	--t2w-panel: rgba(18, 12, 55, 0.92);
	--t2w-purple: #7426ff;
	--t2w-pink: #ff168f;
	--t2w-gold: #ffd43b;
	--t2w-green: #52e36d;
	--t2w-blue: #25d7ff;
	--t2w-text: #ffffff;
	--t2w-muted: #cdc8e7;
}

body { background-color: var(--t2w-bg) !important; }

/* Header */
#masthead,
.site-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-above-header,
.ast-below-header-bar {
	background-color: var(--t2w-panel) !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
}

.site-title,
.site-title a,
.ast-site-title-text,
.ast-site-identity .site-title a {
	color: var(--t2w-gold) !important;
}

.site-description { color: var(--t2w-muted) !important; }

.main-navigation,
.main-header-menu,
.ast-primary-menu-first {
	background-color: transparent !important;
}

.main-header-menu li a,
.main-header-menu > li > a,
.ast-primary-menu-first > li > a {
	color: var(--t2w-text) !important;
}

.main-header-menu li a:hover,
.main-header-menu li.current-menu-item > a,
.main-header-menu li.current_page_item > a {
	color: var(--t2w-pink) !important;
}

.main-header-menu .sub-menu,
.main-header-menu ul.sub-menu {
	background-color: var(--t2w-panel) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}

.ast-mobile-menu-buttons svg,
.astra-menu-toggle-svg,
.menu-toggle-close,
button.menu-toggle-open svg {
	fill: var(--t2w-text) !important;
}

/* Mobile menu — same real bug found and fixed on LC Web Design 2026-07-30: the actual hamburger
   toggle button/icon and off-canvas panel use different classes than the ones above, which never
   matched — toggle rendered in Astra's default blue, panel was a plain white box. */
.ast-mobile-header-wrap, .ast-mobile-header-content {
	background-color: var(--t2w-panel) !important;
}
button.main-header-menu-toggle,
.ast-mobile-menu-trigger-minimal,
.mobile-menu-toggle-icon,
.ast-mobile-svg {
	color: var(--t2w-text) !important;
	fill: var(--t2w-text) !important;
}
.ast-mobile-header-content .main-header-menu li a { color: var(--t2w-text) !important; }
.ast-mobile-header-content .main-header-menu li a:hover,
.ast-mobile-header-content .main-header-menu li.current-menu-item > a { color: var(--t2w-pink) !important; }

/* Footer */
#colophon,
.site-footer,
.ast-small-footer,
.footer-widget-area {
	background-color: var(--t2w-panel) !important;
	color: var(--t2w-muted) !important;
}

#colophon a,
.site-footer a,
.ast-small-footer a {
	color: var(--t2w-gold) !important;
}

#colophon h1, #colophon h2, #colophon h3, #colophon h4,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 {
	color: var(--t2w-text) !important;
}

/* New T2W logo (added 2026-07-30) uploaded as a 640x640 square PNG so it stays sharp on retina
   screens, but Astra never had a header "Logo Width" set via the Customizer, so it fell back to its
   own default `max-width:100%` rule and rendered at ~470px tall, filling most of the header. Leon:
   "the logo is way too big." Constrains it to a normal header-logo height instead. */
.site-logo-img img.custom-logo,
.ast-site-identity img.custom-logo {
	height: 80px !important;
	width: auto !important;
	max-height: 80px !important;
}

/* Page content — real classes used across Home/Predictions/Casino/Awin Deals/Money Guides */
.entry-content, .ast-single-post .entry-content, .site-content {
	background-color: var(--t2w-bg) !important;
	color: var(--t2w-text) !important;
}

/* Real bug found and fixed 2026-07-30 (Leon: "the blog pages still dont look right", checked
   again after the em-dash pass): the fix above only ever styled `.entry-content` itself, but that's
   just an inner div. Astra wraps the whole single-post card in `article.ast-article-single`
   (title, date, category meta, then .entry-content), and that outer article element keeps Astra's
   own hardcoded white "post card" background, confirmed live via getComputedStyle, not visible in
   a plain screenshot. Result: a dark .entry-content box floating inside a white card, with the
   title/date/category row above it still on white. Extends the same dark background the rest of
   the site already uses to the whole card, not just the inner text block. */
.single-post .ast-article-single,
article.ast-article-single {
	background-color: var(--t2w-bg) !important;
}

/* Real blog posts (added 2026-07-30, the Guides page conversion) — .entry-content only had the
   background/base-text rule above, nothing for headings/links/lists, so a real post rendered with
   Astra's own default heading weight and default blue link colour, clashing hard against the dark
   background. Same real dark-theme palette every other page already uses. */
.single-post .entry-title,
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3 {
	color: var(--t2w-text) !important;
}
.single-post .entry-content a {
	color: var(--t2w-gold) !important;
}
.single-post .entry-content ul,
.single-post .entry-content ol {
	color: var(--t2w-muted) !important;
}
.single-post .entry-meta,
.single-post .entry-meta a,
.single-post .ast-author-details,
.single-post .cat-links,
.single-post .cat-links a {
	color: var(--t2w-muted) !important;
}

/* Real bug found and fixed 2026-07-30 (desktop layout audit after Leon's "layout is really bad"
   feedback, found first on LC Web Design, same root cause here): Astra's own base CSS sets
   `.ast-container { display: flex }`. front-page.php's top-level sections (hero, the 4 pillar
   cards, offers strip) are all direct children of one `.ast-container.t2w-page`, so they were
   being laid out as side-by-side flex columns instead of stacked vertically on desktop. Scoped to
   inside site-main only, so the header/footer's own `.ast-container` (which legitimately uses flex
   for the logo+menu row) is untouched. */
.site-main .ast-container { display: block !important; }

.t2w-intro { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.t2w-intro h1 { color: var(--t2w-text) !important; font-size: clamp(28px, 4.5vw, 44px); margin: 0 0 16px; }
.t2w-intro h1 em, .t2w-intro h1 span { color: var(--t2w-gold) !important; font-style: normal; }
.t2w-intro p { color: var(--t2w-muted) !important; font-size: 17px; }

/* Real hero redesign, 2026-07-30 — was flat centred text only, now a 2-column layout with a real
   AI-generated hero banner image, per Leon's own "colourful, pictures where needed" feedback. */
.t2w-hero-split {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 40px;
	align-items: center;
	padding: 48px 0 40px;
}
.t2w-hero-kicker {
	display: inline-block; color: var(--t2w-gold) !important; font-weight: 800;
	letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin-bottom: 14px;
}
.t2w-hero-text h1 { color: var(--t2w-text) !important; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; margin: 0 0 16px; }
.t2w-hero-text h1 em { color: var(--t2w-gold) !important; font-style: normal; }
.t2w-hero-text p { color: var(--t2w-muted) !important; font-size: 17px; margin: 0 0 24px; max-width: 480px; }
.t2w-hero-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 30px; border-radius: 10px; font-weight: 800; text-decoration: none;
	background: linear-gradient(135deg, var(--t2w-gold), #ffb400); color: #1a1204 !important;
}
.t2w-hero-btn:hover { filter: brightness(1.08); }
.t2w-hero-image img {
	width: 100%; height: auto; border-radius: 20px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
@media (max-width: 860px) {
	.t2w-hero-split { grid-template-columns: 1fr; text-align: center; padding-top: 30px; }
	.t2w-hero-text p { margin-inline: auto; }
	.t2w-hero-image { order: -1; }
}

.t2w-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 0 0 40px;
}
.t2w-cards .t2w-card {
	background-color: var(--t2w-panel) !important;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	position: relative;
	overflow: hidden;
}
/* Colour-coded top accent bar per pillar, 2026-07-30 — every card was previously visually
   identical, making the 4 pillars hard to tell apart at a glance. */
.t2w-cards .t2w-card::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.t2w-card-purple::before { background: var(--t2w-purple); }
.t2w-card-gold::before { background: var(--t2w-gold); }
.t2w-card-pink::before { background: var(--t2w-pink); }
.t2w-card-green::before { background: var(--t2w-green); }
.t2w-card-icon {
	width: 48px; height: 48px; border-radius: 12px;
	display: grid; place-items: center; margin-bottom: 14px;
}
.t2w-card-icon svg { width: 24px; height: 24px; }
.t2w-card-purple .t2w-card-icon { background: rgba(116, 38, 255, 0.18); color: var(--t2w-purple); }
.t2w-card-gold .t2w-card-icon { background: rgba(255, 212, 59, 0.18); color: var(--t2w-gold); }
.t2w-card-pink .t2w-card-icon { background: rgba(255, 22, 143, 0.18); color: var(--t2w-pink); }
.t2w-card-green .t2w-card-icon { background: rgba(82, 227, 109, 0.18); color: var(--t2w-green); }
.t2w-cards .t2w-card h2 { color: var(--t2w-text) !important; font-size: 20px; margin: 0 0 10px; }
.t2w-cards .t2w-card h2 a { color: var(--t2w-text) !important; text-decoration: none; }
.t2w-cards .t2w-card p { color: var(--t2w-muted) !important; font-size: 15px; margin: 0 0 10px; }
.t2w-cards .t2w-card a { color: var(--t2w-gold) !important; font-weight: 700; }
.t2w-cards .t2w-card ul { color: var(--t2w-muted) !important; padding-left: 20px; }
.t2w-cards .t2w-card ul li { margin-bottom: 8px; }

.t2w-cta-strip {
	text-align: center;
	background-color: var(--t2w-panel) !important;
	border-radius: 16px;
	padding: 28px;
	margin: 0 0 40px;
}
.t2w-cta-strip p { color: var(--t2w-muted) !important; margin: 0 0 16px; }

.t2w-offers-strip {
	background-color: var(--t2w-panel) !important;
	border-radius: 16px;
	padding: 28px;
	margin: 0 0 40px;
}
.t2w-offers-strip h2 { color: var(--t2w-gold) !important; font-size: 22px; margin: 0 0 14px; }
.t2w-offers-strip > p { color: var(--t2w-muted) !important; }
.t2w-offer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin: 18px 0;
}
.t2w-offer-grid a.t2w-offer-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 18px 16px 14px;
	color: var(--t2w-text) !important;
	text-decoration: none;
	font-weight: 700;
	text-align: center;
}
.t2w-offer-grid a.t2w-offer-btn:hover { border-color: var(--t2w-gold); }
.t2w-offer-icon {
	width: 40px; height: 40px; border-radius: 50%;
	display: grid; place-items: center; margin-bottom: 10px;
}
.t2w-offer-icon svg { width: 20px; height: 20px; }
.t2w-offer-grid a.t2w-offer-btn span.t2w-badge {
	display: block;
	color: var(--t2w-gold) !important;
	font-size: 12px;
	font-weight: 400;
	margin-top: 4px;
}
.t2w-offers-strip em { color: var(--t2w-muted) !important; font-size: 13px; }

.t2w-disclaimer {
	max-width: 640px;
	margin: 0 auto 40px;
	padding: 12px 16px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--t2w-muted) !important;
	font-size: 13px;
	text-align: center;
}
