/* Franke Program – dark theme for in-theater reading. Uses the child theme's fonts and brand colors. */

.fp-program {
	/* Palette (dark). Sponsor logos stay on white cards so they read correctly. */
	--fp-bg: var(--dark-blue, #0d1126);      /* page background */
	--fp-surface: #181d3a;                   /* cards, inputs */
	--fp-line: rgba(255, 255, 255, .09);     /* dividers, borders */
	--fp-ink: #ece8ea;                       /* body text */
	--fp-heading: #ffffff;
	--fp-muted: #a9a3b5;
	--fp-accent: #ff5c93;                    /* dates */
	--fp-highlight: var(--green, #49b96b);   /* tier + donor group headings */
	--fp-link: #8fdcaa;
	--fp-button: var(--orange, #ff4f00);

	--fp-wrap: 1100px;
	--fp-gap: var(--space-m, 1.75rem);

	background: var(--fp-bg);
	color: var(--fp-ink);
	color-scheme: dark;
}
.fp-program h1,
.fp-program h2,
.fp-program h3,
.fp-program h4,
.fp-program strong,
.fp-program b { color: var(--fp-heading); }
.fp-program .fp-prose a,
.fp-program .fp-credit a { color: var(--fp-link); }

.fp-wrap {
	max-width: var(--fp-wrap);
	margin-inline: auto;
	padding-inline: var(--space-s, 1.25rem);
}

/* Hero */
.fp-program > .fp-hero { margin-bottom: 0; } /* theme adds a gap under the first block */
.fp-hero {
	position: relative;
	display: grid;
	align-items: end;
	min-height: clamp(380px, 62vw, 700px);
	background: var(--fp-bg);
	color: #fff;
	overflow: hidden;
}
.fp-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.fp-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Dark at the top (site logo + menu sit there) and at the bottom (title) */
	background: linear-gradient(rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .9) 100%);
}
.fp-hero__text {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-block: var(--space-l, 2.25rem);
}
.fp-hero__eyebrow {
	margin: 0 0 .25em;
	font-weight: 700;
	letter-spacing: .04em;
}
.fp-program .fp-hero__title {
	margin: 0;
	font-family: Gloock, serif;
	font-weight: 400;
	font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
	line-height: 1.05;
	color: #fff;
}
/* Section nav */
.fp-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--green, #49b96b);
}
.fp-nav ul {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0 clamp(.75rem, 3vw, 2.5rem);
	margin-block: 0;
	list-style: none;
}
.fp-nav a {
	display: block;
	padding: .8rem .25rem;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.fp-nav a:hover,
.fp-nav a:focus-visible { text-decoration: underline; }

/* Sections */
.fp-section {
	padding-block: var(--space-l, 2.25rem);
	scroll-margin-top: 4rem;
}
.fp-section + .fp-section { border-top: 1px solid var(--fp-line); }
.fp-section__title {
	margin: 0 0 var(--space-s, 1.25rem);
	font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem);
}
.fp-eyebrow {
	margin: 0 0 .75rem;
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--fp-muted);
}
.fp-section--sponsor,
.fp-section--sponsors,
.fp-section--grants { text-align: center; }

/* Pasted text (songs, cast, bios, team, thanks) */
.fp-prose > :last-child { margin-bottom: 0; }
.fp-prose--columns,
.fp-prose--bios { column-gap: var(--fp-gap); }
.fp-prose--columns { columns: 2 300px; }
.fp-prose--bios { columns: 2 340px; }
.fp-prose--columns > *,
.fp-prose--bios > * { break-inside: avoid; }
.fp-prose--columns p { margin-bottom: .4em; }
.fp-prose--bios p { margin-bottom: 1em; font-size: .95em; }
.fp-prose--bios p strong:first-child { font-size: 1.05em; }

/* Find a performer */
.fp-search { margin: 0 0 var(--space-s, 1.25rem); }
.fp-program .fp-search__input {
	width: 100%;
	max-width: 420px;
	padding: .7rem 1rem;
	font: inherit;
	color: var(--fp-ink);
	background: var(--fp-surface);
	border: 1px solid var(--fp-line);
	border-radius: 999px;
}
.fp-program .fp-search__input::placeholder { color: var(--fp-muted); }
.fp-program .fp-search__input:focus,
.fp-program .fp-search__input:active {
	color: var(--fp-ink);
	background: var(--fp-surface);
	border-color: var(--fp-highlight);
	outline: 2px solid var(--fp-highlight);
	outline-offset: 2px;
}
.fp-program .fp-search__input::-webkit-search-cancel-button { filter: invert(1); }
.fp-search__empty { margin: .75rem 0 0; color: var(--fp-muted); }

/* Cast photo */
.fp-cast-photo { margin: 0 0 var(--space-s, 1.25rem); }
.fp-cast-photo img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* Photo galleries */
.fp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: .5rem;
	margin: var(--space-s, 1.25rem) 0 0;
	padding: 0;
	list-style: none;
}
.fp-gallery--act { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.fp-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.fp-credit { margin: .75rem 0 0; font-size: .9em; color: var(--fp-muted); }

/* Headliner / openers: first photo featured, uncropped */
.fp-feature { margin: var(--space-s, 1.25rem) 0 0; }
.fp-feature a { display: block; }
.fp-feature__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 80vh;
	margin-inline: auto;
	border-radius: 6px;
}
.fp-feature + .fp-gallery { margin-top: .5rem; }

/* Headliner / openers */
.fp-section--act .fp-section__title {
	font-family: Gloock, serif;
	font-weight: 400;
	font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
}
.fp-opener + .fp-opener { margin-top: var(--space-l, 2.25rem); }
.fp-opener__name { margin: 0 0 .5em; }

/* Upcoming events */
.fp-events {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--fp-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.fp-event a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
	background: var(--fp-surface);
	border-radius: 8px;
	overflow: hidden;
	transition: transform .15s ease;
}
.fp-event a:hover,
.fp-event a:focus-visible { transform: translateY(-2px); }
.fp-event__img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fp-event__body { padding: 1rem 1.1rem 1.2rem; }
.fp-event__date { margin: 0 0 .25em; font-weight: 700; color: var(--fp-accent); }
.fp-event__title { margin: 0 0 .35em; font-size: 1.2rem; }
.fp-event__desc { margin: 0 0 .5em; font-size: .95em; }
.fp-event__type { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fp-muted); }

/* Email list call to action (right below the nav; styled after the old program's bar) */
.fp-program .fp-section--cta { padding-block: .75rem 0; }
.fp-section--cta + .fp-section { border-top: 0; }
.fp-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding: .8rem 1rem;
	color: #fff;
	text-decoration: none;
	background: var(--dark-purple, #4f1e37) url("/wp-content/uploads/stained-glass_1920-10.png") center / 95% auto no-repeat;
	border-radius: 10px;
}
.fp-cta__text { display: grid; line-height: 1.3; }
.fp-cta__title { font-weight: 700; font-size: 1.05rem; color: #fff; }
.fp-cta__sub { font-size: .85em; color: rgba(255, 255, 255, .85); }
.fp-cta__btn {
	flex: 0 0 auto;
	padding: .4rem 1.25rem;
	font-weight: 700;
	color: #fff;
	background: var(--pink, #fc0460);
	border-radius: 8px;
}
.fp-cta:hover .fp-cta__btn,
.fp-cta:focus-visible .fp-cta__btn { filter: brightness(1.1); }

/* Donors */
.fp-donors__group { margin-bottom: var(--space-m, 1.75rem); }
.fp-donors__group:last-child { margin-bottom: 0; }
.fp-program .fp-donors__title { margin: 0 0 .5em; font-size: 1.15rem; color: var(--fp-highlight); }
.fp-donors__names {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 3 220px;
	column-gap: var(--fp-gap);
}
.fp-donors__names li { break-inside: avoid; margin-bottom: .25em; }

/* ---------------------------------------------------------------
 * Logo cards: every sponsor/funder logo sits in a white rounded card.
 * --cols = cards per row (phones first, more on wider screens). Short last rows center.
 * ------------------------------------------------------------ */
.fp-logos {
	margin: 0;
	padding: 0;
	list-style: none;
}
.fp-logo img { display: block; width: 100%; height: auto; margin-inline: auto; }

/* Title sponsor: one white card, centered */
.fp-logos--title .fp-logo {
	max-width: 420px;
	margin-inline: auto;
	padding: clamp(1.75rem, 8vw, 2.75rem);
	background: #fff;
	border-radius: 14px;
}

.fp-logos:not(.fp-logos--title) {
	--cols: 3;
	--g: clamp(.85rem, 3.5vw, 1.25rem);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: var(--g);
	max-width: 900px;
	margin-inline: auto;
}
.fp-logos:not(.fp-logos--title) .fp-logo {
	flex: 0 0 calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols));
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(.4rem, 2vw, .9rem);
	background: #fff;
	border-radius: 10px;
}
.fp-logos:not(.fp-logos--title) .fp-logo a { display: contents; }

/* Cards per row on phones: sponsor tiers full width */
.fp-logos.fp-logos--event  { --cols: 2; }
.fp-logos.fp-logos--tier-1,
.fp-logos.fp-logos--tier-2,
.fp-logos.fp-logos--tier-3,
.fp-logos.fp-logos--tier-4,
.fp-logos.fp-logos--tier-5,
.fp-logos.fp-logos--tier-6,
.fp-logos.fp-logos--tier-7 { --cols: 1; }
.fp-logos.fp-logos--grants { --cols: 3; }

/* Cards per row on tablets and up */
@media (min-width: 768px) {
	.fp-logos.fp-logos--event  { --cols: 4; }
	.fp-logos.fp-logos--tier-1 { --cols: 2; }
	.fp-logos.fp-logos--tier-2 { --cols: 3; }
	.fp-logos.fp-logos--tier-3 { --cols: 3; }
	.fp-logos.fp-logos--tier-4 { --cols: 4; }
	.fp-logos.fp-logos--tier-5 { --cols: 4; }
	.fp-logos.fp-logos--tier-6 { --cols: 3; }
	.fp-logos.fp-logos--tier-7 { --cols: 4; }
	.fp-logos.fp-logos--grants { --cols: 4; }
}

/* Event sponsors: square tiles, logo fit inside */
.fp-logos--event { max-width: 760px; }
.fp-logos--event .fp-logo { aspect-ratio: 1; }
.fp-logos--event .fp-logo img { height: 100%; object-fit: contain; }

/* Tier headings */
.fp-tier + .fp-tier { margin-top: var(--space-l, 2.25rem); }
.fp-program .fp-tier__title {
	margin: 0 0 .75rem;
	font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem);
	color: var(--fp-highlight);
	text-align: center;
}

/* ---------------------------------------------------------------
 * Phones (desktop unchanged)
 * ------------------------------------------------------------ */
@media (max-width: 767px) {
	/* Section nav: one row, centered when it fits, swipeable if it doesn't */
	.fp-nav ul {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 1.25rem;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.fp-nav ul::-webkit-scrollbar { display: none; }
	.fp-nav li { flex: 0 0 auto; }
	.fp-nav li:first-child { margin-left: auto; }
	.fp-nav li:last-child { margin-right: auto; }
	.fp-nav a { padding: .7rem 0; }

	/* Slightly tighter sections and headings */
	.fp-section { padding-block: 1.5rem; }
	.fp-section__title { font-size: 1.6rem; }

	/* Photos: 2 per row */
	.fp-gallery,
	.fp-gallery--act { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }

	/* Donors: 2 columns of names */
	.fp-donors__names { columns: 2; column-gap: 1rem; font-size: .95em; }
	.fp-donors__names li { margin-bottom: .55em; line-height: 1.3; }

	/* Upcoming events: compact horizontal cards */
	.fp-events { gap: .75rem; }
	.fp-event a { flex-direction: row; align-items: stretch; }
	.fp-event__img { flex: 0 0 38%; position: relative; min-height: 110px; }
	.fp-event__img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
	.fp-event__body { padding: .7rem .85rem; }
	.fp-event__title { font-size: 1.05rem; }
	.fp-event__desc { font-size: .9em; }
}

/* Smooth scroll for the section links (program page only; respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
