/*
 * SpoilerTown theme. Light = Elementor "ST …" global colors, dark = overrides below.
 * In Elementor always pick an "ST …" global color, never a hex value.
 * A new global color role needs its dark value added here too.
 */

/* Tokens used by custom CSS, snippets and inline styles */
:root {
	--st-header-bar: rgba(255, 255, 255, .9);
	--st-header-line: #E0DED9;
	--st-link: #A3232A;
	--st-link-hover: #6F0F12;
	--st-page-link: #A3232A;
	--st-page-link-hover: #6F0F12;
	--st-chip: rgba(0, 0, 0, .05);
	--st-hl-bg: #FFF6EE;
	--st-hl-border: #F0D6BF;
	--st-hl-title: #B8540C;
	--st-accent-soft: #B8383D;
	--st-overlay: rgba(0, 0, 0, .45);
	--st-strong: #161616;
	--st-toggle: #161616;
	--st-toggle-hover-bg: #ECEBE8;
	--st-totop-ring: #E0DED9;
	--st-totop-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

html[data-theme="dark"] {
	color-scheme: dark;
	--st-header-bar: rgb(18 18 18 / 50%);
	--st-header-line: transparent;
	--st-link: #EBA2A2;
	--st-link-hover: #F77B7B;
	--st-page-link: #CCCCCC;
	--st-page-link-hover: #CCCCCC;
	--st-chip: rgba(255, 255, 255, .08);
	--st-hl-bg: #1A1008;
	--st-hl-border: #341A04;
	--st-hl-title: #FFA156;
	--st-accent-soft: #D18C8C;
	--st-overlay: rgba(0, 0, 0, .8);
	--st-strong: currentColor;
	--st-toggle: #CCCCCC;
	--st-toggle-hover-bg: #161616;
	--st-totop-ring: #E4E4E4;
	--st-totop-shadow: none;
}

/* Elementor global colors: dark values */
html[data-theme="dark"] body {
	--e-global-color-stbg: #0E0E0E;
	--e-global-color-stband: #0E0E0E;
	--e-global-color-stsurface: #151515;
	--e-global-color-stsurface2: #222222;
	--e-global-color-stsoft: #1B1B1B;
	--e-global-color-stborder: #242424;
	--e-global-color-stborderstrong: #3A3A3A;
	--e-global-color-stheading: #FCFCFC;
	--e-global-color-sttitle: #E2E2E2;
	--e-global-color-sttext: #C2C2C2;
	--e-global-color-sttextsoft: #ADADAD;
	--e-global-color-stmuted: #919191;
	--e-global-color-stsubtle: #6E6E6E;
	--e-global-color-sthover: #FFFFFF;
	--e-global-color-staccent: #D56464;
	--e-global-color-staccenthover: #FF8B8B;
	--e-global-color-stonaccent: #000000;
	--e-global-color-text: #878787;
}

/* Elementor system "Text" color on light (kit value #878787 fails contrast) */
:root body { --e-global-color-text: #5F5F5F; }

/* Home hero SVG: dark values (light values are the SVG's defaults) */
html[data-theme="dark"] .st-hero-svg {
	--hero-star-op: .55;
	--hero-orb: #1b1b1b; --hero-orb-ring: #242424;
	--hero-beam-op: .07;
	--hero-cloud-op: 0; --hero-bird-op: 0;
	--hero-far: #151515; --hero-mid: #1c1c1c; --hero-near: #232323;
	--hero-tank: #3a322b; --hero-tank-line: #2a241f; --hero-tank-text: #efe2c8;
	--hero-steel: #2f2f2f;
	--hero-win: #f3b64e; --hero-win-mid: #f3b64e; --hero-glow-op: .9;
	--hero-accent: #d56464; --hero-marquee-text: #1a1a1a; --hero-bulb: #ffd88a;
}

.elementor-location-header { border-bottom: 1px solid var(--st-header-line); }
.elementor-widget-theme-post-content strong,
.elementor-widget-theme-post-content b { color: var(--st-strong); }
[data-elementor-type="wp-page"] .elementor-widget-text-editor a { color: var(--st-page-link); }
[data-elementor-type="wp-page"] .elementor-widget-text-editor a:hover { color: var(--st-page-link-hover); text-decoration: underline; }
html #elementor-popup-modal-7010 { background-color: var(--st-overlay); }

/* Contrast fixes */
body .elementor-posts .elementor-post__excerpt p { color: var(--e-global-color-stmuted); }
body .elementor-pagination span.page-numbers:not(.current) { color: var(--e-global-color-stmuted); }

/* Posts widget cards with excerpt: whole card clickable (stretched title link, no extra <a> in HTML) */
.elementor-posts .elementor-post:has(.elementor-post__excerpt) { position: relative; }
.elementor-posts .elementor-post:has(.elementor-post__excerpt) .elementor-post__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* pro-elements 4.2.0 bug: its CSS reads a mis-encoded var name, so "Load more → Spacing" never applied */
body .elementor-widget-posts > .elementor-widget-container > .elementor-button-wrapper { margin-top: var(--load-more—spacing, 30px); }

/* Theme toggle [st_theme_toggle] */
.st-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--st-toggle);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
	.st-theme-toggle:hover { background: var(--st-toggle-hover-bg); }
}
.st-theme-toggle:focus-visible { outline: 2px solid var(--e-global-color-staccent); outline-offset: 2px; }
.st-theme-toggle svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.st-theme-toggle .st-tt-sun { display: none; }
html[data-theme="dark"] .st-theme-toggle .st-tt-sun { display: block; }
html[data-theme="dark"] .st-theme-toggle .st-tt-moon { display: none; }

/*
 * Info pages: About Us, Partnerships, Legal Notice, Privacy Policy (classes set by st-info-pages-redesign.php).
 * Shared: .st-info (root container), -eyebrow, -title, -intro, -meta, -doc, -cta. About team cards: .st-team-*.
 */
.st-info .st-info-eyebrow { margin-bottom: -14px; }
.st-info-title .elementor-heading-title::after {
	content: ""; display: block; width: 56px; height: 4px; margin: 18px auto 0;
	border-radius: 4px; background: var(--e-global-color-staccent);
}
.st-info.e-con > .e-con-inner > .elementor-widget.st-info-intro { align-self: center; width: 100%; max-width: 780px; text-align: center; }
.st-info .st-info-meta { margin-top: -6px; }
.st-info .st-info-meta p { margin: 0; }
.st-info .st-info-cta-wrap { margin: 24px 0 0; }
.st-info-doc .st-info-cta-wrap { margin-top: 18px; }
.st-info .elementor-widget-text-editor a.st-info-cta {
	display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px;
	background: var(--e-global-color-staccent); color: var(--e-global-color-stonaccent);
	font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none;
	transition: background-color .2s ease, transform .2s ease;
}
.st-info .elementor-widget-text-editor a.st-info-cta:hover {
	background: var(--e-global-color-staccenthover); color: var(--e-global-color-stonaccent);
	text-decoration: none; transform: translateY(-2px);
}
.st-info .elementor-widget-text-editor a:focus-visible { outline: 2px solid var(--e-global-color-staccent); outline-offset: 2px; }

/* Reading card (Partnerships, Legal Notice, Privacy Policy) */
.st-info.e-con > .e-con-inner > .elementor-widget.st-info-doc { align-self: center; width: 100%; max-width: 860px; margin-top: 10px; }
.st-info-doc > .elementor-widget-container {
	padding: 40px 48px; border: 1px solid var(--e-global-color-stborder); border-radius: 16px;
	background: var(--e-global-color-stsurface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.st-info .st-info-doc p, .st-info .st-info-doc li { line-height: 1.75; }
.st-info .st-info-doc h2 {
	position: relative; margin: 36px 0 14px; padding-left: 16px;
	font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--e-global-color-stheading);
}
.st-info .st-info-doc h2::before {
	content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px;
	border-radius: 4px; background: var(--e-global-color-staccent);
}
.st-info .st-info-doc h3 { margin: 26px 0 10px; font-size: 19px; font-weight: 600; color: var(--e-global-color-sttitle); }
.st-info .st-info-doc > .elementor-widget-container > :first-child { margin-top: 0; }
.st-info .st-info-doc > .elementor-widget-container > :last-child { margin-bottom: 0; }
.st-info .st-info-doc ul { margin: 0 0 18px; padding-left: 1.3em; }
.st-info .st-info-doc li { margin-bottom: 8px; }
.st-info .st-info-doc li::marker { color: var(--e-global-color-staccent); }
@media (max-width: 767px) {
	.st-info-doc > .elementor-widget-container { padding: 24px 20px; }
	.st-info .st-info-doc h2 { font-size: 21px; }
}

/* About: team cards */
.st-team-card.e-con { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.st-team-photo { overflow: hidden; }
.st-team-photo img {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%;
	transition: transform .5s ease;
}
@media (hover: hover) {
	.st-info .st-team-card.e-con:hover {
		transform: translateY(-4px); border-color: var(--e-global-color-staccent);
		box-shadow: 0 14px 32px rgba(0, 0, 0, .10);
	}
	.st-info .st-team-card:hover .st-team-photo img { transform: scale(1.04); }
}
/* Desktop/laptop: photo as a left column (a top banner was too big) */
@media (min-width: 1025px) {
	.st-info .st-team-card.e-con.e-con { --flex-direction: row; }
	.st-info .st-team-card .st-team-photo { flex: 0 0 200px; width: 200px; max-width: 200px; }
	.st-info .st-team-card .st-team-photo > .elementor-widget-container { height: 100%; }
	.st-info .st-team-card.e-con .st-team-photo img { height: 100%; min-height: 240px; aspect-ratio: auto; border-width: 0 1px 0 0; }
	.st-info .st-team-card .st-team-bio { flex: 1 1 0; min-width: 0; }
}
.st-team-bio { flex-grow: 1; }
.st-team-bio > .elementor-widget-container { height: 100%; display: flex; flex-direction: column; }
.st-info .st-team-bio p { margin: 0 0 14px; line-height: 1.65; }
.st-info .st-team-name {
	display: flex; align-items: center; gap: 12px; margin: 0 0 6px;
	font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--e-global-color-stheading);
}
.st-team-emoji {
	display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
	border-radius: 12px; background: var(--st-chip); font-size: 21px; line-height: 1;
}
.st-info .st-team-loc {
	margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--e-global-color-staccent);
}
/* Link chips: no underline on hover */
.st-team-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.st-info .elementor-widget-text-editor a.st-team-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
	border: 1px solid var(--e-global-color-stborder); border-radius: 999px; background: var(--st-chip);
	color: var(--e-global-color-sttext); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.st-info .elementor-widget-text-editor a.st-team-chip:hover {
	border-color: var(--e-global-color-staccent); background: var(--e-global-color-staccent);
	color: var(--e-global-color-stonaccent); text-decoration: none;
}
.st-team-chip-ico { font-size: 17px; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
	.st-team-card.e-con, .st-team-photo img, .st-info .elementor-widget-text-editor a.st-info-cta { transition: none; }
	.st-info .st-team-card.e-con:hover, .st-info .st-team-card:hover .st-team-photo img,
	.st-info .elementor-widget-text-editor a.st-info-cta:hover { transform: none; }
}

/*
 * Post hero: Movie Review, Cinephile Corner, Collection templates (classes set by st-post-hero-redesign.php).
 * .st-post-hero (stacked, inside the content column) > .st-post-hero-head (title / author | date / share … jump) + .st-post-hero-img.
 */
/* Dek: Yoast meta description under the title ([st_dek], mu-plugins/st-dek.php) */
.st-post-hero-head .st-dek {
	margin: -4px 0 2px;
	font-family: var(--e-global-typography-text-font-family), "Source Sans Pro", sans-serif;
	font-size: 18px; line-height: 1.5; font-style: italic; color: var(--e-global-color-sttextsoft);
}
/* A bit more air between the dek and the author | date … share row */
.st-post-hero-head > .st-dek-widget { padding-bottom: 8px; }
@media (max-width: 767px) {
	.st-post-hero-head .st-dek { font-size: 16px; }
}
/* No meta description → empty widget would still take a flex gap */
.st-post-hero-head > .st-dek-widget:not(:has(.st-dek)) { display: none; }
.st-post-hero-head .elementor-widget-post-info {
	padding-left: 16px; border-left: 1px solid var(--e-global-color-stborder);
}
/* Reviews wrap the share widget in a container; flatten both so icons + jump button become items of the head row */
.st-post-hero-head > .e-con,
.st-post-hero-head .elementor-widget-share-buttons,
.st-post-hero-head .elementor-widget-share-buttons > .elementor-widget-container { display: contents; }
.st-post-hero-head .elementor-widget-share-buttons .elementor-grid { width: auto; margin-bottom: 0; --grid-bottom-margin: 0px; }
.st-post-hero-head .st-ending-jump-wrap { flex-basis: 100%; margin-top: 0; display: flex; align-items: center; }   /* flex: no inline line box pushing the link up */
.st-post-hero-head .elementor-author-box__avatar img { display: block; }   /* inline img left a 7px descender gap under the avatar */
@media (min-width: 768px) {
	.st-post-hero-head .elementor-widget-share-buttons .elementor-grid { margin-left: auto; }
}
/* 768–1023px (reviews only): row 1 author | date, row 2 jump link left + share icons right, instead of a
   width-dependent wrap into 3 rows. ::after forces the break; -12px offsets the double row-gap around it. */
@media (min-width: 768px) and (max-width: 1023px) {
	.st-post-hero-head:has(.st-ending-jump-wrap)::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
	.st-post-hero-head .st-ending-jump-wrap { order: 2; flex-basis: auto; margin-top: -12px; }
	.st-post-hero-head:has(.st-ending-jump-wrap) .elementor-widget-share-buttons .elementor-grid { order: 3; margin-top: -12px; }
}
/* ≥1240px: jump link (snippet #80) sits on the meta row after the date; share icons stay at the row's end.
   Must match the breakpoint in snippet #80; below it the row (~741px) doesn't fit and the jump stays a button on its own row. */
@media (min-width: 1240px) {
	.st-post-hero-head .st-ending-jump-wrap { flex-basis: auto; padding-left: 16px; border-left: 1px solid var(--e-global-color-stborder); }
	.st-post-hero-head .elementor-widget-share-buttons .elementor-grid { order: 1; }
}
.st-post-hero-img img { display: block; width: 100%; height: auto; }

/* Tablet + mobile: icon-only header buttons */
@media (max-width: 1024px) {
	.st-theme-toggle { width: 44px; height: 44px; }
	html body .hamb-menu .elementor-button,
	html body .hamb-menu .elementor-button:hover,
	html body .hamb-menu .elementor-button:focus {
		background-color: transparent !important;
		border-color: transparent !important;
		border-radius: 10px !important;
	}
}
