/* ==========================================================================
   Scholarship Landing template
   Minimal header: logo + sub head + Apply button.
   ========================================================================== */

.afi-scholarship-landing {
	--afi-red: #CD1732;
	--afi-red-dark: #a8122a;
	--afi-ink: #222;
	--afi-lp-header-h: 64px;
}

/* Skip link (visible on keyboard focus only) */
.afi-lp-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	padding: 10px 16px;
	background: #fff;
	color: var(--afi-ink);
}
.afi-lp-skip:focus {
	left: 10px;
	top: 10px;
}

/* Header bar ------------------------------------------------------------- */
.afi-lp-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid #e6e6e6;
}
.admin-bar .afi-lp-header { top: 32px; }

.afi-lp-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--afi-lp-header-h);
}
/* Bootstrap 3 clearfix pseudo-elements break flex spacing */
.afi-lp-header__inner::before,
.afi-lp-header__inner::after { display: none; }

.afi-lp-header__brand {
	display: flex;
	align-items: center;
	gap: 22px;
	min-width: 0;
}

.afi-lp-header__logo { display: block; flex-shrink: 0; }
.afi-lp-header__logo img {
	display: block;
	height: 30px;
	width: auto;
}

/* Sub head is the page's H1: reset theme heading styles */
.afi-lp-header__subhead {
	margin: 0;
	padding: 0;
	font-family: futura-pt, sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--afi-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.afi-lp-header__button {
	flex-shrink: 0;
	display: inline-block;
	padding: 9px 18px;
	background: var(--afi-red);
	color: #fff !important;
	font-family: futura-pt, sans-serif;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}
.afi-lp-header__button:hover,
.afi-lp-header__button:focus { background: var(--afi-red-dark); }
.afi-lp-header__button:focus-visible {
	outline: 2px solid var(--afi-ink);
	outline-offset: 2px;
}

/* Main ------------------------------------------------------------------- */
.afi-lp-main { display: block; }

/* Responsive ------------------------------------------------------------- */
@media screen and (min-width: 1250px) {
	.afi-scholarship-landing header .container { max-width: 1500px; }
}

/* Laptop: container is narrower, keep everything on one line */
@media (min-width: 992px) and (max-width: 1249px) {
	.afi-lp-header__subhead { font-size: 13px; letter-spacing: 0.15em; }
}

/* Tablet and phone: stack logo, sub head and button, centered.
   Header scrolls away instead of sticking, since it's taller here. */
@media (max-width: 991px) {
	.afi-lp-header { position: relative; top: auto !important; }
	.afi-lp-header .afi-lp-header__inner {
		flex-direction: column;
		justify-content: center;
		gap: 12px;
		padding-top: 16px;
		padding-bottom: 16px;
		text-align: center;
	}
	.afi-lp-header__brand {
		flex-direction: column;
		gap: 10px;
	}
	.afi-lp-header__subhead {
		font-size: 15px;
		letter-spacing: 0.14em;
		white-space: normal;
		overflow: visible;
	}
}

@media (max-width: 782px) {
	.admin-bar .afi-lp-header { top: 46px; }
}

@media (max-width: 767px) {
	.afi-scholarship-landing { --afi-lp-header-h: 56px; }
	.afi-lp-header__subhead { font-size: 14px; letter-spacing: 0.12em; }
	.afi-lp-header__logo img { height: 26px; }
	.afi-lp-header__button { padding: 8px 14px; letter-spacing: 0.14em; }
}

/* WP admin bar goes position:absolute under 600px, so no offset needed */
@media (max-width: 600px) {
	.admin-bar .afi-lp-header { top: 0; }
}

/* ==========================================================================
   Page body building blocks (add via WPBakery "Extra class name")
   ========================================================================== */

/* Cards — add "afi-card" to a Text Block.
   Line 1 (bold) = title, line 2 = subtitle.
   Used in "Your next creative chapter". */
.afi-card {
	background: #f0f0f0;
	padding: 28px 24px;
	min-height: 120px;
	margin-bottom: 0 !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.afi-card p {
	margin: 0;
	font-family: futura-pt, sans-serif;
	font-size: 18px;
	line-height: 1.4;
	color: var(--afi-ink);
}
.afi-card strong,
.afi-card b {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 18px;
}

/* Step card variant — "afi-card afi-card--step afi-numbered".
   Darker gray, taller, content from the top. Used in "Take the next step". */
.afi-card--step {
	background: #bdbdbd;
	min-height: 260px;
	justify-content: flex-start;
	padding: 32px 20px;
}

/* Numbered blocks — add "afi-numbered" to a Text Block.
   Format the number ("01") as Heading 3 in the editor. */
.afi-numbered h3 {
	margin: 0 0 6px;
	font-family: futura-pt, sans-serif;
	font-weight: 500;
	font-size: 40px;
	line-height: 1;
	color: var(--afi-red);
}
.afi-numbered strong,
.afi-numbered b {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}
.afi-numbered p { font-size: 18px; line-height: 1.45; }

/* Red sections — add "afi-red-band" to a Row (or Inner Row).
   Everything inside turns white, numbers included. */
.afi-red-band {
	background-color: var(--afi-red) !important;
	color: #fff;
}
.afi-red-band h1, .afi-red-band h2, .afi-red-band h3,
.afi-red-band h4, .afi-red-band p, .afi-red-band a,
.afi-red-band .afi-numbered h3 { color: #fff; }

/* Blueprint / sketch background — add "afi-blueprint-bg" to a Row,
   then set the image in the row's Design Options > Background.
   This adds the white wash so text stays readable. */
.afi-blueprint-bg {
	position: relative;
	background-size: cover !important;
	background-position: center !important;
}
.afi-blueprint-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.85);
	pointer-events: none;
}
.afi-blueprint-bg > * { position: relative; }

@media (max-width: 767px) {
	.afi-card { min-height: 0; margin-bottom: 12px !important; }
	.afi-card--step { min-height: 0; }
	.afi-numbered h3 { font-size: 32px; }
}

/* ==========================================================================
   Polish pass: section headings, red-box spacing, band headline, FAQ
   ========================================================================== */

/* Section headings (WPBakery text blocks) — AFI red, heavier */
.afi-lp-main .wpb_wrapper > h2 {
	color: var(--afi-red);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.afi-lp-main .afi-red-band .wpb_wrapper > h2 { color: #fff; }

/* Red boxes built from inner rows (e.g. "Why AFI?") — inner padding.
   Stacked red inner rows read as one box. */
.afi-lp-main .vc_row.vc_inner.afi-red-band {
	margin-left: 0;
	margin-right: 0;
	padding: 30px 20px 30px;
}
.afi-lp-main .vc_row.vc_inner.afi-red-band + .vc_row.vc_inner.afi-red-band {
	padding-top: 0;
	padding-bottom: 30px;
}
/* Keep the box spacing exactly 30px: no extra bottom margin from the
   last text block or paragraph inside each column. */
.afi-lp-main .vc_row.vc_inner.afi-red-band .wpb_wrapper > :last-child,
.afi-lp-main .vc_row.vc_inner.afi-red-band .wpb_text_column p:last-child {
	margin-bottom: 0 !important;
}
.afi-lp-main .vc_row.vc_inner.afi-red-band:not(.afi-red-band + .afi-red-band) {
	margin-top: 24px;
}

/* Band title — add "afi-band-title" to a Text Block.
   First paragraph = small spaced eyebrow, last paragraph = big headline.
   Used for "AFI WORLD BUILDER SCHOLARSHIP… / One Fellow. Two years of tuition." */
.afi-band-title p {
	font-family: futura-pt, sans-serif;
	color: #fff;
}
.afi-band-title p:first-child {
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: 8px;
}
.afi-band-title p:last-child {
	font-weight: 600;
	font-size: 34px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin-bottom: 0;
}

/* FAQ accordion — gray bars, centered question, "+" on the right */
.afi-lp-main .vc_tta-accordion .vc_tta-panel {
	margin-bottom: 8px;
}
.afi-lp-main .vc_tta-accordion.vc_tta-style-classic .vc_tta-panel-heading {
	background: #eeeeee;
	border: 0;
}
.afi-lp-main .vc_tta-accordion .vc_tta-panel-heading:hover {
	background: #e3e3e3;
}
.afi-lp-main .vc_tta-accordion .vc_tta-panel-title {
	font-family: futura-pt, sans-serif;
	font-size: 18px;
	font-weight: 400;
}
.afi-lp-main .vc_tta-accordion .vc_tta-panel-title > a {
	position: relative;
	display: block;
	text-align: center;
	padding: 16px 56px !important;
	color: var(--afi-ink);
}
.afi-lp-main .vc_tta-accordion .vc_tta-controls-icon {
	left: auto !important;
	right: 22px !important;
}
.afi-lp-main .vc_tta-accordion .vc_tta-panel-body {
	background: #f7f7f7;
	border: 0;
	padding: 18px 56px;
	text-align: center;
}

@media (max-width: 767px) {
	.afi-band-title p:last-child { font-size: 26px; }
	.afi-band-title p:first-child { font-size: 13px; line-height: 1.6; }
	.afi-lp-main .vc_tta-accordion .vc_tta-panel-title { font-size: 16px; }
	.afi-lp-main .vc_tta-accordion .vc_tta-panel-title > a { padding: 14px 44px !important; }
	.afi-lp-main .vc_tta-accordion .vc_tta-panel-body { padding: 16px 20px; }
}

/* Top red bar ("stretch row and content"): keep the two text boxes
   in line with the page content below. Steps down at the same
   breakpoints as the theme's .container (1500 / 1320 / 1140 / 970px),
   plus 30px for the inner row's column gutters. */
.afi-lp-main .vc_row.afi-red-band[data-vc-stretch-content] > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_row.vc_inner {
	max-width: 1000px;
	margin: 0 auto;
}
@media (min-width: 1200px) {
	.afi-lp-main .vc_row.afi-red-band[data-vc-stretch-content] > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_row.vc_inner { max-width: 1170px; }
}
@media (min-width: 1400px) {
	.afi-lp-main .vc_row.afi-red-band[data-vc-stretch-content] > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_row.vc_inner { max-width: 1350px; }
}
@media (min-width: 1600px) {
	.afi-lp-main .vc_row.afi-red-band[data-vc-stretch-content] > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_row.vc_inner { max-width: 1530px; }
}

/* ==========================================================================
   Spacing system: one value for the space between sections, applied to
   every top-level WPBakery row. Change --afi-section-space to adjust.
   ========================================================================== */

.afi-scholarship-landing {
	--afi-section-space: 60px;
}

/* Every section gets the same top/bottom padding, no outer margins,
   so sections with backgrounds butt together cleanly. */
.afi-lp-main .wpb-content-wrapper > .vc_row {
	padding-top: var(--afi-section-space);
	padding-bottom: var(--afi-section-space);
	margin-bottom: 0;
}

/* Sliders (hero, career carousel) and the closing CTA image are edge to edge. */
.afi-lp-main .wpb-content-wrapper > .vc_row:has(.n2-section-smartslider),
.afi-lp-main .wpb-content-wrapper > .vc_row:last-child {
	padding-top: 0;
	padding-bottom: 0;
}

/* Remove WPBakery's default 35px column top padding and the last element's
   bottom margin, so the row padding is the only space. */
.afi-lp-main .wpb-content-wrapper > .vc_row > .wpb_column > .vc_column-inner {
	padding-top: 0;
}
.afi-lp-main .wpb-content-wrapper > .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > :last-child {
	margin-bottom: 0 !important;
}

/* Divider between two sections that share a row ("Why AFI?") */
.afi-lp-main .wpb-content-wrapper > .vc_row > .wpb_column > .vc_column-inner > .wpb_wrapper > .vc_separator {
	margin: var(--afi-section-space) 0 !important;
}

/* Headings to text: tighter, closer to the design */
.afi-lp-main .wpb_wrapper > h2 {
	line-height: 1.1;
	margin-bottom: 6px;
}
.afi-lp-main .wpb_wrapper > h2 + .vc_row .wpb_text_column p,
.afi-lp-main .wpb_wrapper > h2 ~ p {
	margin-bottom: 8px;
}
.afi-lp-main .wpb_wrapper > h2 + .vc_row .wpb_text_column p:last-child,
.afi-lp-main .wpb_wrapper > h2 ~ p:last-child,
.afi-lp-main .vc_tta-accordion .vc_tta-panel:last-child {
	margin-bottom: 0;
}
/* Space between a section's intro text and its cards / red box */
.afi-lp-main .wpb_wrapper > h2 + .vc_row + .vc_row {
	margin-top: 24px;
}

/* Card / numbered titles: bold title + Shift+Enter + text.
   The title is display:block, so hide the line break after it. */
.afi-card strong + br,
.afi-numbered strong + br {
	display: none;
}

@media (max-width: 767px) {
	.afi-scholarship-landing { --afi-section-space: 40px; }
}

/* "One award" red band: 30px top padding instead of the section spacing.
   (The only full-width red band that isn't "stretch row and content".) */
.afi-lp-main .wpb-content-wrapper > .vc_row.afi-red-band:not([data-vc-stretch-content]) {
	padding-top: 30px;
}

/* "Why AFI?" red box: when the two columns in each inner row stack
   (767px and below), add 30px under the first item so all four items
   are spaced evenly, matching the 30px between the rows. */
@media (max-width: 767px) {
	.afi-lp-main .vc_row.vc_inner.afi-red-band > .wpb_column:first-child {
		padding-bottom: 30px;
	}
}

/* Gray cards: fade in on scroll. "Your next creative chapter" cards
   come down from above; "Take the next step" cards fade in in place.
   js/scholarship-landing.js adds .afi-reveal (hidden) to each card, then
   .afi-reveal--in with a staggered delay as it enters the screen.
   Without JS, or with "reduce motion" on, the cards just show. */
.afi-reveal {
	opacity: 0;
	transform: translateY(-30px);
}
.afi-reveal--in {
	animation: afi-fade-down 0.6s ease-out forwards;
}
@keyframes afi-fade-down {
	from { opacity: 0; transform: translateY(-30px); }
	to   { opacity: 1; transform: translateY(0); }
}
/* "Take the next step" cards: fade in in place, no movement.
   Slower (1.2s each, 500ms apart in the JS) for a more dramatic reveal. */
.afi-card--step.afi-reveal { transform: none; }
.afi-card--step.afi-reveal--in {
	animation-name: afi-fade-in;
	animation-duration: 1.2s;
	animation-timing-function: ease-in-out;
}
@keyframes afi-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.afi-reveal { opacity: 1; transform: none; }
	.afi-reveal--in { animation: none; }
}
