/* ==========================================================================
   Star of Hope winter appeal page
   Hand-coded (no Fusion Builder) so it survives the eventual Avada migration.
   Styled on the campaign's Mailchimp email: deep navy, Cosmic pink, a light
   pink accent, star-shaped badges and pill buttons.
   The lightbox reuses by-their-side/lightbox.js (hence the .bts-lightbox
   class in the markup); its overlay styles are repeated at the bottom.
   ========================================================================== */

/* Avada caps #main .fusion-row at the site width and pads #main. The
   sos-template body class is added in functions.php, so this applies
   whether or not the template is picked in Page Attributes. */
body.sos-template #main .fusion-row {
	max-width: 100% !important;
}

body.sos-template #main {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.sos-page {
	--sos-navy: #0b0d38;
	--sos-navy-text: #141a52;
	--sos-pink: #d51568;
	--sos-pink-dark: #b31058;
	--sos-pink-light: #e58cb5;
	--sos-pink-pale: #fdf0f6;
	--sos-text: #4a4e57;
	--sos-hover-scale: 1.025;
	font-family: Arial, Helvetica, sans-serif;
	color: var(--sos-text);
}

.sos-page h1,
.sos-page h2,
.sos-page h3 {
	font-family: "Jost", Arial, Helvetica, sans-serif;
	line-height: 1.2;
	text-wrap: balance;
}

.sos-page h1 {
	font-size: 3.5rem;
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 24px;
	text-align: center;
	color: var(--sos-navy-text);
}

/* Section headings: pink, as in the email (sentence case, as in the doc). */
.sos-page h2 {
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--sos-pink);
	margin: 0 0 24px;
	text-align: center;
}

.sos-page p {
	font-size: 1.125rem;
	line-height: 1.6;
	margin: 0 0 22px;
}

.sos-pink {
	color: var(--sos-pink);
}

.sos-pink-light {
	color: var(--sos-pink-light);
}

.sos-nowrap {
	white-space: nowrap;
}

.sos-section {
	padding: 70px 20px;
}

.sos-inner {
	max-width: 1200px;
	margin: 0 auto;
}

.sos-copy {
	max-width: 760px;
	margin: 0 auto;
}

.sos-copy p:last-child {
	margin-bottom: 0;
}

.sos-centre {
	text-align: center;
}

/* ---------- Starfield (navy) sections ---------- */
/* style.css gives .starfield its own navy with !important. */
.sos-page .starfield {
	background: var(--sos-navy) !important;
	color: #fff;
}

.sos-page .starfield h1 {
	color: #fff;
}

.sos-page .starfield p {
	color: rgba(255, 255, 255, 0.92);
}

/* ---------- Hero ---------- */
.sos-hero {
	/* Same top and bottom spacing as .sos-section. */
	padding: 70px 20px;
}

/* Only when the header is set to a see-through colour (Avada adds
   .avada-header-color-not-opaque) does it sit over the top of the page,
   above the mobile-header breakpoint (side_header_break_point, 1290px).
   Then clear the 122px header as well. On the live site it is solid. */
@media only screen and (min-width: 1291px) {
	.avada-header-color-not-opaque .sos-hero {
		padding-top: calc(122px + 70px);
	}
}

.sos-hero-top {
	display: grid;
	/* Photo column matches the 48% image in the next section. */
	grid-template-columns: minmax(0, 1fr) 48%;
	align-items: center;
	gap: 50px;
	max-width: 1200px;
	margin: 0 auto;
}

/* As in the email: title left-aligned, logo pushed to the right edge of
   the text column with the star's base level with the title's last line,
   so its string rises above the title. */
.sos-hero-heading {
	display: flex;
	align-items: flex-end;
	gap: 24px;
}

.sos-page .sos-hero h1 {
	flex: 0 1 auto;
	margin: 0;
	text-align: left;
	font-size: 3.6rem;
}

/* Transparent logo, cropped tight to the ornament. */
.sos-hero-logo {
	flex: 0 0 auto;
	display: block;
	width: 150px;
	height: auto;
	margin: 0 0 4px auto;
}

/* Too narrow for title, logo and photo side by side: stack them. */
@media only screen and (max-width: 1100px) {
	.sos-hero-top {
		grid-template-columns: minmax(0, 1fr);
		max-width: 760px;
		gap: 36px;
	}
}

.sos-hero-photo {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.sos-hero-photo img {
	display: block;
	width: 100%;
	height: auto;
	/* Same shape as the other photos (the full, uncropped image). */
	aspect-ratio: 1600 / 1137;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.sos-hero-photo:hover img {
	transform: scale(var(--sos-hover-scale));
}

/* CTA under the pink statement, in a slightly lighter navy box. */
.sos-cta-box {
	margin: 36px 0 0;
	padding: 30px 32px 34px;
	background: #171b51;
	border-radius: 16px;
	text-align: center;
}

.sos-cta-box .sos-btn-wrap {
	margin: 0;
}

.sos-page .sos-hero .sos-lead {
	margin: 24px 0 0;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-size: 1.4rem;
	font-weight: 500;
	color: var(--sos-pink-light);
	text-wrap: balance;
}

.sos-page .sos-hero .sos-lead strong {
	font-weight: 600;
	color: #fff;
}

/* Side by side, the title column spans the photo's full height: logo top
   level with the photo top, lead bottom level with the photo bottom. The
   title shrinks a little below 1240px so it stays on three lines beside
   the logo. */
@media only screen and (min-width: 1101px) {
	.sos-hero-top {
		align-items: stretch;
	}

	.sos-hero-text {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.sos-hero-photo {
		align-self: center;
	}

	.sos-page .sos-hero h1 {
		font-size: clamp(2.6rem, 7.4vw - 36px, 3.6rem);
	}

	.sos-page .sos-hero .sos-lead {
		margin-top: 28px;
		font-size: 1.7rem;
		line-height: 1.5;
	}

	.sos-page .sos-hero .sos-lead strong {
		white-space: nowrap;
	}
}

/* ---------- Hero price line (bold, prices in pink, as in the email) ---------- */
.sos-page .sos-price-line {
	margin: 0 0 22px;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.35;
	color: #fff;
	text-wrap: balance;
}

/* ---------- Star price badges ---------- */
.sos-price-stars {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin: 0 auto 24px;
	padding-bottom: 40px;
}

.sos-price-star {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 240px;
	height: 240px;
	text-decoration: none;
	transform: rotate(-12deg);
	transition: transform 0.2s ease;
}

.sos-price-star-alt {
	width: 205px;
	height: 205px;
	margin: 56px 0 0 -34px;
	transform: rotate(8deg);
}

/* Hover: lift slightly, like the buttons. translateY comes first so the
   star moves straight up rather than along its tilt. */
.sos-price-star:hover,
.sos-price-star:focus {
	transform: translateY(-2px) rotate(-12deg);
}

.sos-price-star-alt:hover,
.sos-price-star-alt:focus {
	transform: translateY(-2px) rotate(8deg);
}

/* The star's colour is set on the svg, not the link, so Avada's link
   hover colour can't recolour it. */
.sos-price-star svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	color: var(--sos-pink);
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.sos-price-star-alt svg {
	color: var(--sos-pink-light);
}

.sos-price-star > span {
	position: relative;
	top: 6%;
	max-width: 62%;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.1;
	text-align: center;
	color: var(--sos-navy-text);
}

.sos-price-star-alt > span {
	font-size: 1.55rem;
}

/* ---------- Buttons ---------- */
.sos-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	background: var(--sos-pink);
	color: #fff;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-weight: 600;
	font-size: 1.2rem;
	line-height: 1.2;
	text-decoration: none;
	padding: 16px 40px;
	border-radius: 999px;
	border: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sos-btn:hover,
.sos-btn:focus {
	background: var(--sos-pink-dark);
	color: #fff;
	transform: translateY(-2px);
}

.sos-btn-white {
	background: #fff;
	color: var(--sos-pink);
}

.sos-btn-white:hover,
.sos-btn-white:focus {
	background: #fff;
	color: var(--sos-pink-dark);
}

.sos-btn-wrap {
	text-align: center;
	margin: 0 0 10px;
}

/* ---------- Intro (pale pink) + statement ---------- */
.sos-intro {
	background: var(--sos-pink-pale);
	text-align: center;
}

/* Opening paragraphs on the left, the pink statement on the right.
   Same columns as the header (and the 48% photo sections) so edges line up. */
.sos-intro-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 48%;
	align-items: center;
	gap: 50px;
	max-width: 1200px;
	margin: 0 auto;
	text-align: left;
}

.sos-intro-grid .sos-copy {
	max-width: none;
	margin: 0;
}

.sos-page .sos-intro .sos-copy p {
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
	line-height: 1.7;
	color: var(--sos-navy-text);
}

.sos-page .sos-statement {
	margin: 0;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 2rem;
	line-height: 1.4;
	color: var(--sos-pink);
	text-align: left;
	text-wrap: balance;
}

/* ---------- Text + image blocks ---------- */
.sos-flex {
	display: flex;
	align-items: center;
	gap: 50px;
	max-width: 1200px;
	margin: 0 auto;
}

.sos-flex-reverse {
	flex-direction: row-reverse;
}

.sos-flex-img {
	flex: 0 0 48%;
}

.sos-flex-text {
	flex: 1 1 0%;
}

.sos-flex-text h2 {
	text-align: left;
}

.sos-flex-text p:last-child {
	margin-bottom: 0;
}

.sos-flex-img a,
.sos-gallery-grid a {
	display: block;
	overflow: hidden;
	border-radius: 10px;
}

.sos-flex-img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1600 / 1137;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.sos-flex-img a:hover img,
.sos-gallery-grid a:hover img {
	transform: scale(var(--sos-hover-scale));
}

/* ---------- Light a star (navy) ---------- */
.sos-light .sos-copy {
	text-align: center;
	margin-bottom: 30px;
}

.sos-light .sos-flex {
	margin-top: 10px;
}

.sos-page .sos-light .sos-dedication {
	color: var(--sos-pink-light);
}

.sos-page .sos-light .sos-dedication .sos-white {
	color: #fff;
}

/* ---------- Impact list ---------- */
.sos-impact {
	background: var(--sos-pink-pale);
}

.sos-impact-list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 20px;
	max-width: 1200px;
	margin: 30px auto 40px;
	padding: 0;
}

.sos-impact-list li {
	position: relative;
	margin: 0;
	padding: 64px 22px 26px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(11, 13, 56, 0.08);
	border-top: 4px solid var(--sos-pink);
	font-size: 1rem;
	line-height: 1.5;
}

.sos-impact-list li::before {
	content: "";
	position: absolute;
	top: 22px;
	left: 22px;
	width: 30px;
	height: 30px;
	background: var(--sos-pink);
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ---------- Finale (navy closing CTA) ---------- */
.sos-cta {
	padding-top: 60px;
	text-align: center;
}

/* Named stars floating above the dome, as in the email. */
.sos-named-stars {
	position: relative;
	max-width: 640px;
	height: 190px;
	margin: 0 auto 14px;
}

.sos-named-star {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	color: var(--sos-pink-light);
}

.sos-named-star svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.sos-named-star span {
	position: relative;
	/* Near the star's widest part (its arms), clear of the edges. */
	top: 0;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--sos-pink);
}

.sos-named-star:nth-child(1) { left: 14%; top: 0; }
.sos-named-star:nth-child(2) { left: 0; top: 80px; }
.sos-named-star:nth-child(3) { left: calc(50% - 52px); top: 40px; }
.sos-named-star:nth-child(4) { right: 14%; top: 0; }
.sos-named-star:nth-child(5) { right: 0; top: 90px; }

/* The email's panel: a shallow circular arc that meets the straight sides
   at an angle (not a rounded corner). The cap is a slice off the top of a
   circle. In the email the arc rises 75px over a 612px width, which is a
   circle about 2.16 times the panel's width. */
.sos-dome-cap {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	aspect-ratio: 612 / 75;
	overflow: hidden;
}

.sos-dome-cap::before {
	content: "";
	position: absolute;
	top: 0;
	left: -58.1%;
	width: 216.2%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--sos-pink);
}

.sos-dome {
	max-width: 900px;
	margin: -1px auto 50px;
	padding: 0 50px 50px;
	background: var(--sos-pink);
}

.sos-page .sos-dome h2 {
	max-width: 680px;
	margin: 0 auto 30px;
	font-size: 1.9rem;
	color: #fff;
}

.sos-page .sos-note {
	margin-top: 30px;
	font-family: "Jost", Arial, Helvetica, sans-serif;
	font-size: 1.2rem;
	color: #fff;
}

.sos-gallery-section {
	background: #fff;
}

.sos-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-top: 40px;
}

.sos-gallery-grid img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.3s ease;
}

/* ---------- Trust logos ---------- */
.sos-trust-logos {
	padding: 30px 20px 100px;
	background: #fff;
}

.sos-trust-logos-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 96px;
	max-width: 1200px;
	margin: 0 auto;
}

.sos-trust-logos-row a {
	display: block;
}

.sos-trust-logos-row img {
	display: block;
	height: 80px;
	width: auto;
	max-width: 100%;
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 782px) {
	.sos-page h1 {
		font-size: 2.2rem;
	}

	.sos-page h2 {
		font-size: 1.5rem;
	}

	.sos-section {
		padding: 50px 20px;
	}

	.sos-hero {
		padding: 50px 20px;
	}

	/* Stacked on mobile: title and logo, then the photo (so the logo sits
	   above the photograph, as the brief asks). */
	.sos-hero-top {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.sos-hero-heading {
		gap: 12px;
	}

	.sos-page .sos-hero h1 {
		font-size: 2.3rem;
	}

	.sos-hero-logo {
		width: 92px;
	}

	.sos-cta-box {
		margin-top: 28px;
		padding: 26px 20px 30px;
	}

	.sos-page .sos-hero .sos-lead {
		margin-top: 18px;
		font-size: 1.15rem;
	}

	.sos-price-star {
		width: 160px;
		height: 160px;
	}

	.sos-price-star-alt {
		width: 140px;
		height: 140px;
		margin: 40px 0 0 -24px;
	}

	.sos-price-star > span {
		font-size: 1.2rem;
	}

	.sos-page .sos-price-line {
		font-size: 1.25rem;
		margin-bottom: 24px;
	}

	.sos-price-star-alt > span {
		font-size: 1.05rem;
	}

	.sos-intro-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.sos-page .sos-intro .sos-copy p {
		font-size: 1.1rem;
	}

	.sos-page .sos-statement {
		font-size: 1.3rem;
	}

	.sos-flex,
	.sos-flex-reverse {
		flex-direction: column;
		gap: 30px;
	}

	.sos-flex-img {
		flex: none;
		width: 100%;
	}

	.sos-flex-text h2 {
		text-align: center;
	}

	.sos-impact-list li {
		padding: 22px 20px 22px 64px;
	}

	.sos-impact-list li::before {
		top: 22px;
		left: 20px;
		width: 28px;
		height: 28px;
	}

	.sos-named-stars {
		height: 150px;
		margin-bottom: 10px;
	}

	.sos-named-star {
		width: 76px;
		height: 76px;
	}

	.sos-named-star span {
		font-size: 0.62rem;
	}

	.sos-named-star:nth-child(2) { top: 64px; }
	.sos-named-star:nth-child(3) { left: calc(50% - 38px); top: 30px; }
	.sos-named-star:nth-child(5) { top: 70px; }

	.sos-dome-cap {
		margin: 0 -20px;
	}

	.sos-dome {
		margin: -1px -20px 40px;
		padding: 0 24px 40px;
	}

	.sos-page .sos-dome h2 {
		font-size: 1.35rem;
	}

	.sos-page .sos-note {
		font-size: 1.05rem;
	}

	.sos-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.sos-trust-logos {
		padding: 40px 20px 70px;
	}

	.sos-trust-logos-row {
		gap: 48px;
	}

	.sos-trust-logos-row img {
		height: 64px;
	}
}

/* ---------- Lightbox (shared script: by-their-side/lightbox.js) ---------- */
.bts-lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
	padding: 60px;
	z-index: 100000;
}

.bts-lightbox-overlay.is-active {
	display: flex;
}

.bts-lightbox-image {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 4px;
}

.bts-lightbox-close,
.bts-lightbox-prev,
.bts-lightbox-next {
	position: fixed;
	background: none;
	border: none;
	color: #fff;
	line-height: 1;
	cursor: pointer;
	padding: 10px;
}

.bts-lightbox-close {
	top: 20px;
	right: 20px;
	font-size: 2.5rem;
}

.bts-lightbox-prev,
.bts-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 3rem;
}

.bts-lightbox-prev {
	left: 20px;
}

.bts-lightbox-next {
	right: 20px;
}

body.bts-lightbox-open {
	overflow: hidden;
}

@media only screen and (max-width: 600px) {
	.bts-lightbox-overlay {
		padding: 20px;
	}

	.bts-lightbox-prev,
	.bts-lightbox-next {
		font-size: 2rem;
	}
}
