/* ==========================================================================
   SEO Content (template-parts/seo-content.php)
   Shown after Gaming Providers, above the footer; managed in
   Theme Settings → SEO Content.
   ========================================================================== */

.reelzappy-seo-content {
	margin-block: var(--seo-content-mt-d, 0) var(--seo-content-mb-d, 0);
	padding-block: 40px;
	font-family: var(--font-family-subheading, 'Archivo', sans-serif);
	color: var(--color-text, #F5F5FA);
}

/*
 * Width + side padding, same as the Game List (Theme Settings → SEO Content → Settings):
 *   --seo-content-max                    desktop content width inside the side
 *                                        padding (unset = full width; mobile = full)
 *   --seo-content-side-d / -side-m       left / right padding. Desktop only applies
 *                                        while the container is narrower than max
 *                                        width + both sides
 */
.reelzappy-seo-content__inner {
	--seo-side: var(--seo-content-side-d, 16px);
	--seo-maxw: var(--seo-content-max, 100%);
	--seo-side-eff: clamp(0px, (var(--seo-maxw) + var(--seo-side) * 2 - 100%) * 1000, var(--seo-side));

	box-sizing: border-box;
	max-width: calc(var(--seo-maxw) + var(--seo-side-eff) * 2);
	margin: 0 auto;
	padding-inline: var(--seo-side-eff);
}

.reelzappy-seo-content__heading {
	margin: 0 0 12px;
	font-family: var(--font-family-subheading, 'Archivo', sans-serif);
	font-size: var(--seo-content-heading-fs-d, clamp(22px, 2.6vw, 30px));
	font-weight: 800;
	line-height: 1.15;
	color: #FFFFFF;
}

/* ---- Rich text (intro + section content) ----------------------------- */

.reelzappy-seo-content__text {
	font-size: 13px;
	line-height: 1.3;
}

.reelzappy-seo-content__intro {
	font-size: var(--seo-content-intro-fs-d, 13px);
}

.reelzappy-seo-content__section .reelzappy-seo-content__text {
	font-size: var(--seo-content-content-fs-d, 13px);
}

.reelzappy-seo-content__text > * {
	margin: 0;
}

.reelzappy-seo-content__text ul,
.reelzappy-seo-content__text ol {
	padding-left: 1.1em;
}

.reelzappy-seo-content__text ul {
	list-style: none;
}

.reelzappy-seo-content__text ul li::before {
	content: "\2022";
	margin-right: 2px;
}

.reelzappy-seo-content__text a {
	color: var(--color-link, #F8F503);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.reelzappy-seo-content__text a:hover {
	color: var(--color-link-hover, #F8F503);
	text-decoration: none;
}

.reelzappy-seo-content__text strong,
.reelzappy-seo-content__text b {
	font-weight: 700;
}

/* ---- Expandable area -------------------------------------------------- */

/* 0fr -> 1fr lets the height animate without measuring it in JS. */
.reelzappy-seo-content__more {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 0.4s ease, opacity 0.3s ease;
}

.reelzappy-seo-content.is-expanded .reelzappy-seo-content__more {
	grid-template-rows: 1fr;
	opacity: 1;
}

.reelzappy-seo-content__more-inner {
	min-height: 0;
	overflow: hidden;
}

.reelzappy-seo-content__grid {
	display: grid;
	grid-template-columns: repeat(var(--seo-content-columns, 2), minmax(0, 1fr));
	gap: var(--seo-content-row-gap-d, 40px) var(--seo-content-column-gap-d, 36px);
	margin-top: var(--seo-content-main-gap-d, 48px);
}

.reelzappy-seo-content__section-title {
	margin: 0 0 14px;
	font-family: var(--font-family-subheading, 'Archivo', sans-serif);
	font-size: var(--seo-content-title-fs-d, clamp(17px, 1.6vw, 19px));
	font-weight: 500;
	line-height: 1.3;
	color: #FFFFFF;
}

/* ---- Optional background image -------------------------------------- */

/*
 * Values come from inline CSS vars set in seo-content.php.
 *
 * The image only shows while the content is expanded. "Whole block": it sits
 * on a ::before layer behind the content that fades in / out with the expand
 * animation. "Sections": it's on the grid, which is inside the collapsing
 * area, so it is hidden with it.
 */
.reelzappy-seo-content--bg-block {
	position: relative;
	isolation: isolate;
}

.reelzappy-seo-content--bg-block::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.reelzappy-seo-content--bg-block.is-expanded::before {
	opacity: 1;
}

.reelzappy-seo-content--bg-block::before,
.reelzappy-seo-content--bg-sections .reelzappy-seo-content__grid {
	background-image: var(--seo-content-bg-d, none);
	background-size: var(--seo-content-bg-size-d, cover);
	background-position: var(--seo-content-bg-pos-d, center);
	background-repeat: var(--seo-content-bg-repeat-d, no-repeat);
}

/* ---- Chevron toggle --------------------------------------------------- */

.reelzappy-seo-content__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 24px auto 0;
	padding: 0;
	color: #FFFFFF;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.2s ease;
}

.reelzappy-seo-content__toggle:hover {
	color: var(--color-link, #F8F503);
}

.reelzappy-seo-content__toggle:focus-visible {
	outline: 2px solid var(--color-link, #F8F503);
	outline-offset: 2px;
}

.reelzappy-seo-content__chevron {
	transition: transform 0.3s ease;
}

.reelzappy-seo-content.is-expanded .reelzappy-seo-content__chevron {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.reelzappy-seo-content__more,
	.reelzappy-seo-content__chevron,
	.reelzappy-seo-content--bg-block::before {
		transition: none;
	}
}

@media (max-width: 767px) {
	.reelzappy-seo-content {
		margin-block: var(--seo-content-mt-m, 0) var(--seo-content-mb-m, 0);
	}

	.reelzappy-seo-content__inner {
		max-width: 100%; /* Full width on mobile. */
		padding-inline: var(--seo-content-side-m, 16px); /* Mobile side padding always applies. */
	}

	/* Mobile background: own value, else the desktop value. */
	.reelzappy-seo-content--bg-block::before,
	.reelzappy-seo-content--bg-sections .reelzappy-seo-content__grid {
		background-image: var(--seo-content-bg-m, var(--seo-content-bg-d, none));
		background-size: var(--seo-content-bg-size-m, var(--seo-content-bg-size-d, cover));
		background-position: var(--seo-content-bg-pos-m, var(--seo-content-bg-pos-d, center));
		background-repeat: var(--seo-content-bg-repeat-m, var(--seo-content-bg-repeat-d, no-repeat));
	}

	/* Mobile font sizes: own field, else the mobile default (not the desktop value). */
	.reelzappy-seo-content__heading {
		font-size: var(--seo-content-heading-fs-m, 22px);
	}

	.reelzappy-seo-content__intro {
		font-size: var(--seo-content-intro-fs-m, 13px);
	}

	.reelzappy-seo-content__section-title {
		font-size: var(--seo-content-title-fs-m, 17px);
	}

	.reelzappy-seo-content__section .reelzappy-seo-content__text {
		font-size: var(--seo-content-content-fs-m, 13px);
	}

	.reelzappy-seo-content__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--seo-content-row-gap-m, 32px);
		margin-top: var(--seo-content-main-gap-m, 32px);
	}
}
