/* AIN — AI For Good page styles
 * Sized + typed to match the existing "In the News" page.
 */

:root {
	--aifg-bg: #0a0a0f;
	--aifg-card: #15151b;
	--aifg-card-border: rgba(255, 255, 255, 0.06);
	--aifg-card-border-hover: rgba(245, 197, 66, 0.45);
	--aifg-text: #f5f5f7;
	--aifg-text-muted: #9c9ca6;
	--aifg-gold: #e0b042;
	--aifg-radius: 20px;
}

/* Page-wide gradient — gold radial at top fading into dark, covering the upper portion of the page (matches News page). */
body.page-template-page-ai-for-good,
body.page-template-page-ai-for-good-php {
	background:
		radial-gradient(ellipse 90% 60% at 50% 0%, rgba(224, 176, 66, 0.42) 0%, rgba(224, 176, 66, 0.10) 35%, transparent 65%),
		#0a0a0f !important;
	background-attachment: fixed !important;
	color: var(--aifg-text);
}

/* Strip default theme/page chrome so the gradient shows through. */
body.page-template-page-ai-for-good #page,
body.page-template-page-ai-for-good-php #page {
	background: transparent;
}

/* Override AIN Elementor kit's global heading rules (size, weight, text-transform)
 * for our page-specific headings. The kit sets h1/h2/h3 with large clamp() sizes
 * that would otherwise blow out the card titles + section labels. */
.aifg-title,
.aifg-hero__title,
.aifg-section__title,
.aifg-card__title,
.aifg-card__source {
	text-transform: none !important;
	font-family: "Wix Madefor Display", "Syne", sans-serif !important;
}
.aifg-card__title {
	font-size: 1.1rem !important;
	font-weight: 500 !important;
	line-height: 1.32 !important;
}
.aifg-hero__title {
	font-size: clamp(1.4rem, 2vw, 1.8rem) !important;
	font-weight: 500 !important;
	line-height: 1.22 !important;
}
.aifg-section__title {
	font-size: clamp(1.4rem, 2.2vw, 1.8rem) !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
}
.aifg-title {
	font-size: clamp(2.4rem, 4.5vw, 4rem) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
}

/* Header wrap — give the Elementor pill nav breathing room like the homepage hero, then let the body gradient continue. */
.aifg-header-wrap {
	padding: 24px 5% 0;
	background: transparent;
}
.aifg-header-wrap .elementor-105,
.aifg-header-wrap .elementor-element-7fdd01e {
	max-width: 1280px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Main wrapper — transparent so the body gradient shows. */
.aifg-main {
	background: transparent;
	color: var(--aifg-text);
	padding-bottom: 96px;
	font-family: inherit;
}

.aifg-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Intro — large title like "In the News". */
.aifg-intro {
	padding: 80px 0 32px;
	text-align: center;
}
.aifg-eyebrow {
	font-size: 0.78rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--aifg-gold);
	margin: 0 0 16px;
	font-weight: 600;
}
.aifg-title {
	font-size: clamp(2.6rem, 5vw, 4.5rem);
	line-height: 1.1;
	margin: 0 0 18px;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.aifg-title__accent {
	color: var(--aifg-gold);
}
.aifg-lede {
	font-size: 1.05rem;
	color: var(--aifg-text-muted);
	max-width: 640px;
	margin: 0 auto;
	line-height: 1.55;
}

/* Featured hero card. */
.aifg-hero {
	padding: 32px 0 16px;
}
.aifg-hero__card {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	background: var(--aifg-card);
	border: 1px solid var(--aifg-card-border);
	border-radius: var(--aifg-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.aifg-hero__card:hover {
	border-color: var(--aifg-card-border-hover);
	transform: translateY(-2px);
}
.aifg-hero__media {
	position: relative;
	min-height: 320px;
	background: #1a1a22;
	overflow: hidden;
}
.aifg-hero__img,
.aifg-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.aifg-hero__img--placeholder {
	background: linear-gradient(135deg, #1f1f29 0%, #14140f 100%);
}
.aifg-hero__body {
	padding: 32px 36px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	justify-content: center;
}
.aifg-hero__pill {
	display: inline-block;
	align-self: flex-start;
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #0a0a0f;
	background: var(--aifg-gold);
	padding: 6px 12px;
	border-radius: 999px;
	font-weight: 700;
}
.aifg-hero__source {
	color: var(--aifg-gold);
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}
.aifg-hero__title {
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	line-height: 1.2;
	margin: 4px 0 8px;
	font-weight: 500;
}
.aifg-hero__date {
	color: var(--aifg-text-muted);
	font-size: 0.9rem;
}
.aifg-hero__cta {
	margin-top: 10px;
	color: var(--aifg-gold);
	font-weight: 600;
	font-size: 0.95rem;
}
.aifg-hero__card:hover .aifg-hero__cta { color: #fff; }
@media (max-width: 820px) {
	.aifg-hero__card { grid-template-columns: 1fr; }
	.aifg-hero__media { min-height: 240px; aspect-ratio: 16/9; }
	.aifg-hero__body { padding: 24px; }
}

/* Section heads — centered, large, light weight (matches News page section labels). */
.aifg-section {
	padding: 56px 0 8px;
}
.aifg-section__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 32px;
	gap: 4px;
}
.aifg-section__title {
	font-size: clamp(1.5rem, 2.4vw, 1.9rem);
	margin: 0;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--aifg-gold);
	text-align: center;
}
.aifg-section__count {
	font-size: 0.78rem;
	color: var(--aifg-text-muted);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Grid + cards (match News card sizing/typography). */
.aifg-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
@media (max-width: 900px) { .aifg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .aifg-grid { grid-template-columns: 1fr; } }

.aifg-card {
	display: flex;
	flex-direction: column;
	background: var(--aifg-card);
	border: 1px solid var(--aifg-card-border);
	border-radius: var(--aifg-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.aifg-card:hover {
	transform: translateY(-3px);
	border-color: var(--aifg-card-border-hover);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.aifg-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #1a1a22;
	overflow: hidden;
}
.aifg-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.aifg-card:hover .aifg-card__img { transform: scale(1.04); }
.aifg-card__img--placeholder {
	background: linear-gradient(135deg, #1f1f29 0%, #14140f 100%);
	width: 100%;
	height: 100%;
}
.aifg-card__body {
	padding: 24px 28px 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
}
.aifg-card__source {
	color: var(--aifg-gold);
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.3;
}
.aifg-card__title {
	font-size: 1.25rem;
	line-height: 1.3;
	font-weight: 500;
	margin: 0;
	color: var(--aifg-text);
}
.aifg-card__date {
	color: var(--aifg-text-muted);
	font-size: 0.88rem;
	margin-top: auto;
	font-weight: 400;
}

/* AIN Voices carousel. */
.aifg-voices { padding: 72px 0 0; }
.aifg-voices__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	flex-direction: row;
}
.aifg-voices__head .aifg-section__title { text-align: left; }
.aifg-voices__controls { display: flex; gap: 8px; }
.aifg-voices__btn {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid var(--aifg-card-border);
	background: var(--aifg-card);
	color: var(--aifg-text);
	cursor: pointer;
	font-size: 1.1rem;
	transition: border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.aifg-voices__btn:hover {
	border-color: var(--aifg-gold);
	color: var(--aifg-gold);
}
.aifg-voices__btn:active { transform: scale(0.96); }

.aifg-voices__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(224, 176, 66, 0.35) transparent;
}
.aifg-voices__track::-webkit-scrollbar { height: 6px; }
.aifg-voices__track::-webkit-scrollbar-thumb { background: rgba(224, 176, 66, 0.35); border-radius: 999px; }
.aifg-voices__slide {
	flex: 0 0 auto;
	width: min(420px, 80vw);
	scroll-snap-align: start;
	border-radius: var(--aifg-radius);
	overflow: hidden;
	border: 1px solid var(--aifg-card-border);
	background: var(--aifg-card);
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.25s ease, transform 0.25s ease;
}
.aifg-voices__slide:hover {
	border-color: var(--aifg-card-border-hover);
	transform: translateY(-2px);
}
.aifg-voices__slide img {
	width: 100%;
	height: auto;
	display: block;
}
.aifg-voices__caption {
	padding: 12px 16px;
	font-size: 0.84rem;
	color: var(--aifg-text-muted);
}
