/*
 * Santa Barbara Volleyball Club: site styles, loaded after Astra and tokens.css.
 *
 * Ticket 2026-10-30-astra-demo-theme. Look and feel from design/sbvc (navy,
 * ivory and teal; flat color fields; small-to-moderate radii; soft shadows;
 * tracked-out all-caps eyebrows), with Montserrat and Gabarito.
 *
 *   1  Base and Astra's globals
 *   2  Buttons
 *   3  Header
 *   4  Footer
 *   5  Sections and page hero          sbvc/hero, sbvc/text
 *   6  Cards and people                sbvc/cards, sbvc/people
 *   7  Table that stacks on mobile     sbvc/table
 *   8  CTA band                        sbvc/cta, sbvc/cta-form
 *   9  Latest news                     sbvc/posts
 *  10  Embed                           sbvc/embed
 *  11  Gravity Forms
 *  12  Posts and archives
 */

/* 1  Base and Astra's globals ------------------------------------------ */

/* Astra colors its links, buttons and headings from these. */
:root {
	--ast-global-color-0: var(--teal-dark);
	--ast-global-color-1: var(--navy);
	--ast-global-color-2: var(--navy);
	--ast-global-color-3: var(--navy);
	--ast-global-color-4: var(--ivory);
	--ast-global-color-5: var(--white);
	--ast-global-color-6: var(--sand);
	--ast-global-color-7: var(--navy-2);
	--ast-global-color-8: var(--navy);
}

body,
body.ast-separate-container,
body .site-content {
	background: var(--surface-page);
}

body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
	font-family: var(--font-body);
	font-size: var(--text-body-md);
	line-height: var(--leading-normal);
	color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.entry-title {
	font-family: var(--font-display);
	color: var(--text-primary);
	font-weight: 700;
	line-height: var(--leading-snug);
	letter-spacing: -0.01em;
}

h1, .entry-content h1, .entry-title { font-size: var(--text-display-xl); line-height: var(--leading-tight); font-weight: 800; }
h2, .entry-content h2 { font-size: var(--text-display-lg); }
h3, .entry-content h3 { font-size: var(--text-display-sm); }
h4, .entry-content h4 { font-size: var(--text-body-lg); }

a,
.entry-content a {
	color: var(--text-link);
	text-decoration: underline;
	text-decoration-color: var(--text-link-underline);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: color var(--duration-fast) var(--ease-standard);
}

a:hover,
.entry-content a:hover {
	color: var(--teal-dark);
}

/*
 * The focus ring needs 3:1 against what it sits on: teal is 2.70:1 on ivory,
 * so light areas use teal-dark (4.13:1) and the navy ones keep teal (5.50:1).
 */
:root {
	--focus-ring: var(--teal-dark);
}

.sbvc-hero,
.sbvc-cta,
.sbvc-footer,
.sbvc-card:has(> h3:only-child) {
	--focus-ring: var(--teal);
}

.sbvc-cta__form {
	--focus-ring: var(--teal-dark);
}

/* :is() lifts this over Astra's inline a:focus-visible, a 1px dotted outline. */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
:focus-visible {
	outline: 3px solid var(--focus-ring);
	outline-offset: 2px;
}

.entry-content > * + *,
.entry-content .wp-block-group > * + * {
	margin-block-start: var(--space-5);
}

.entry-content ul,
.entry-content ol {
	margin-inline-start: 1.25em;
}

.entry-content li + li {
	margin-block-start: var(--space-2);
}

.sbvc-eyebrow,
.entry-content .sbvc-eyebrow {
	font-family: var(--font-body);
	font-size: var(--text-caption);
	font-weight: 700;
	letter-spacing: var(--tracking-badge);
	text-transform: uppercase;
	color: var(--text-secondary);
	margin: 0;
}

.sbvc-lead,
.entry-content .sbvc-lead {
	font-size: var(--text-body-lg);
	color: var(--text-secondary);
}

/* Pages: Astra's full-width layout, with the sections setting their own width. */
.ast-page-builder-template .site-content > .ast-container {
	max-width: none;
	padding: 0;
}

/* Astra pads the article with .ast-single-post.ast-page-builder-template .site-main > article. */
.ast-single-post.ast-page-builder-template .site-main > article,
.ast-page-builder-template .site-main > article,
.ast-page-builder-template .entry-content {
	margin: 0;
	padding: 0;
}

.ast-page-builder-template .entry-content > .alignfull {
	margin-block: 0;
}

/* 2  Buttons --------------------------------------------------------------- */

.sbvc-btn,
.wp-block-button__link,
.wp-element-button,
.ast-button,
.entry-content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	background: var(--button-bg);
	color: var(--button-text);
	font-family: var(--font-body);
	font-size: var(--text-body-md);
	font-weight: 600;
	letter-spacing: var(--tracking-wide);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.sbvc-btn:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
.entry-content .wp-block-button__link:hover {
	filter: brightness(1.08);
	color: var(--button-text);
	background: var(--button-bg);
}

.sbvc-btn:active,
.wp-block-button__link:active {
	transform: scale(0.97);
}

/*
 * Secondary: the block editor's Outline style. Astra colors it with
 * .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link
 * :not(.has-text-color), so these selectors carry .entry-content to outrank it
 * (and .is-root-container, the editor canvas, which has no .entry-content).
 */
.entry-content .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
.is-root-container .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--navy);
	border-color: var(--border-strong);
}

.entry-content .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--navy-10);
	color: var(--navy);
	filter: none;
}

.wp-block-buttons {
	gap: var(--space-3);
}

/* 3  Header ---------------------------------------------------------------- */

.sbvc-header {
	position: relative;
	z-index: 50;
	background: var(--ivory);
	border-bottom: 1px solid var(--border-default);
}

.sbvc-header__bar {
	display: flex;
	align-items: center;
	gap: var(--space-5);
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: var(--space-3) var(--gutter);
}

.sbvc-header__brand {
	display: block;
	flex: none;
	text-decoration: none;
}

.sbvc-header__brand img {
	display: block;
	width: auto;
	height: 44px;
}

.sbvc-nav {
	display: flex;
	align-items: center;
	gap: var(--space-5);
	margin-inline-start: auto;
}

.sbvc-nav__menu,
.sbvc-nav__menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sbvc-nav__menu {
	display: flex;
	align-items: center;
	gap: var(--space-1);
}

.sbvc-nav__menu > li {
	position: relative;
}

.sbvc-nav__menu a {
	display: block;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-sm);
	color: var(--navy);
	font-weight: 600;
	text-decoration: none;
}

.sbvc-nav__menu a:hover,
.sbvc-nav__menu .current-menu-item > a,
.sbvc-nav__menu .current-menu-ancestor > a {
	background: var(--navy-10);
	color: var(--navy);
}

.sbvc-nav__menu .current-menu-item > a {
	box-shadow: inset 0 -2px 0 var(--teal-dark);
}

/* A decorative arrow on items with a submenu (wide screens; phones list submenus open). */
@media (min-width: 960px) {
	.sbvc-nav__menu > .menu-item-has-children > a {
		display: flex;
		align-items: center;
		gap: 6px;
	}

	.sbvc-nav__menu > .menu-item-has-children > a::after {
		content: "";
		width: 6px;
		height: 6px;
		margin-top: -3px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: 0.7;
	}
}

.sbvc-nav__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: var(--space-2);
	background: var(--white);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	visibility: hidden;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard), visibility 0s linear var(--duration-base);
}

.sbvc-nav__menu li:hover > .sub-menu,
.sbvc-nav__menu li:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

.sbvc-nav__menu .sub-menu a {
	font-weight: 500;
}

.sbvc-header__cta {
	flex: none;
}

.sbvc-header__toggle {
	display: none;
	align-items: center;
	gap: var(--space-2);
	margin-inline-start: auto;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--navy);
	font-weight: 600;
	letter-spacing: var(--tracking-wide);
	cursor: pointer;
}

.sbvc-header__toggle:hover,
.sbvc-header__toggle:focus {
	background: var(--navy-10);
	color: var(--navy);
}

.sbvc-header__toggle-icon,
.sbvc-header__toggle-icon::before,
.sbvc-header__toggle-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-fast);
}

.sbvc-header__toggle-icon {
	position: relative;
}

.sbvc-header__toggle-icon::before,
.sbvc-header__toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.sbvc-header__toggle-icon::before { top: -6px; }
.sbvc-header__toggle-icon::after { top: 6px; }

.sbvc-header.is-open .sbvc-header__toggle-icon { background: transparent; }
.sbvc-header.is-open .sbvc-header__toggle-icon::before { transform: translateY(6px) rotate(45deg); }
.sbvc-header.is-open .sbvc-header__toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959px) {
	.sbvc-header__bar {
		flex-wrap: wrap;
	}

	.sbvc-header.has-toggle .sbvc-header__toggle {
		display: inline-flex;
	}

	.sbvc-nav {
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-4);
		margin: 0;
		padding-block: var(--space-3) var(--space-4);
		border-top: 1px solid var(--border-default);
	}

	.sbvc-header.has-toggle:not(.is-open) .sbvc-nav {
		display: none;
	}

	.sbvc-nav__menu {
		flex-direction: column;
		align-items: stretch;
	}

	.sbvc-nav__menu a {
		padding: var(--space-3);
	}

	.sbvc-nav__menu .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0 var(--space-4);
		background: none;
		border: 0;
		box-shadow: none;
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.sbvc-header__cta {
		justify-content: center;
	}
}

/* 4  Footer ---------------------------------------------------------------- */

.sbvc-footer {
	background: var(--navy);
	color: var(--text-inverse);
}

.sbvc-footer a {
	color: var(--text-inverse);
	text-decoration-color: var(--teal);
}

.sbvc-footer a:hover {
	color: var(--white);
}

.sbvc-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: var(--space-7);
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: var(--space-8) var(--gutter) var(--space-7);
}

.sbvc-footer__brand img {
	display: block;
	width: auto;
	height: 60px;
}

.sbvc-footer__brand p {
	margin: var(--space-4) 0 var(--space-5);
	max-width: 32ch;
	color: var(--text-inverse-secondary);
}

.sbvc-footer__brand .sbvc-btn {
	color: var(--button-text);
}

.sbvc-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2 12rem;
	column-gap: var(--space-6);
}

.sbvc-footer__menu li {
	break-inside: avoid;
	margin-bottom: var(--space-3);
}

.sbvc-footer__menu a {
	text-decoration: none;
	font-weight: 500;
}

.sbvc-footer__menu a:hover {
	text-decoration: underline;
	text-decoration-color: var(--teal);
}

.sbvc-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-3) var(--space-5);
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: var(--space-5) var(--gutter);
	border-top: 1px solid var(--border-inverse);
	font-size: var(--text-body-sm);
	color: var(--text-inverse-secondary);
}

.sbvc-footer__legal p {
	margin: 0;
}

.sbvc-footer__legal ul {
	display: flex;
	gap: var(--space-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* When a page ends on a navy band, a rule marks where the footer starts. */
body:has(.entry-content > :is(.sbvc-cta, .sbvc-hero):last-child) .sbvc-footer {
	border-top: 1px solid var(--border-inverse);
}

@media (max-width: 767px) {
	.sbvc-footer__inner {
		grid-template-columns: 1fr;
		gap: var(--space-6);
	}
}

/* 5  Sections and page hero ------------------------------------------------- */

/*
 * Every section pattern is a full-width group (.sbvc-section, or .sbvc-hero /
 * .sbvc-cta) holding one .sbvc-inner group. The theme sets the widths rather
 * than the block editor's "constrained" layout, which centers each child: the
 * inner group spans the 1200px container, so every section's left edge lines
 * up with the hero and header, and running text inside it stops at 760px.
 */
/*
 * Section padding: 3em above and below (51px at 17px body text), the gutter at
 * the sides so every section's text lines up with the header. Astra pads
 * .entry-content > .wp-block-group with its own block padding (3em, and 2em or
 * 1.5em at the sides on tablets and phones), which outranks a single class, so
 * these carry .entry-content > .wp-block-group too.
 */
.sbvc-section,
.entry-content > .wp-block-group.sbvc-section {
	padding: 3em var(--gutter);
}

.sbvc-inner,
.entry-content .sbvc-inner {
	max-width: var(--container-max);
	margin-inline: auto;
}

.sbvc-text .sbvc-inner > *,
.sbvc-hero .sbvc-inner > p,
.sbvc-cta:not(.sbvc-cta--form) .sbvc-inner > p {
	max-width: var(--container-text);
}

/* Two plain sections in a row share one gap rather than two. */
.sbvc-section:not(.sbvc-section--sand) + .sbvc-section:not(.sbvc-section--sand) {
	padding-top: 0;
}

.sbvc-section--sand {
	background: var(--surface-sunken);
}

.entry-content .sbvc-inner > :first-child {
	margin-top: 0;
}

.entry-content .sbvc-inner > h2 + * {
	margin-block-start: var(--space-4);
}

.entry-content .sbvc-inner > h2 + .sbvc-cards,
.entry-content .sbvc-inner > h2 + .sbvc-posts,
.entry-content .sbvc-inner > h2 + .sbvc-table {
	margin-block-start: var(--space-6);
}

.sbvc-hero,
.entry-content > .wp-block-group.sbvc-hero {
	padding: 3em var(--gutter);
}

.sbvc-hero {
	background: var(--navy);
	color: var(--text-inverse);
}

.entry-content .sbvc-hero .sbvc-eyebrow,
.sbvc-hero .sbvc-eyebrow {
	color: var(--teal);
}

.entry-content .sbvc-hero h1,
.sbvc-hero h1 {
	margin: var(--space-3) 0 0;
	max-width: 22ch;
	color: var(--ivory);
}

.entry-content .sbvc-hero .sbvc-lead,
.sbvc-hero .sbvc-lead {
	max-width: 60ch;
	margin-top: var(--space-5);
	color: var(--text-inverse-secondary);
}

.sbvc-hero .wp-block-buttons {
	margin-top: var(--space-6);
}

.sbvc-hero a:not(.wp-block-button__link) {
	color: var(--ivory);
	text-decoration-color: var(--teal);
}

/* On navy, the outline button is ivory. */
.entry-content .sbvc-hero .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
.entry-content .sbvc-cta .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
.is-root-container .sbvc-hero .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
.is-root-container .sbvc-cta .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--ivory);
	border-color: var(--border-inverse);
}

.entry-content .sbvc-hero .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.entry-content .sbvc-cta .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgba(246, 243, 237, 0.10);
	color: var(--ivory);
}

/*
 * Image hero (patterns/hero-image.php, and single posts with a featured
 * image): the hero group's first child is an image block, .sbvc-hero__media.
 * Without one, the hero is the plain navy hero above.
 *
 * Wide screens: the text column (34rem) stays on the hero's solid navy, and
 * the image fills the hero from where that column ends to the right edge,
 * fading in from navy. The text never sits on the photo, so its contrast is
 * the plain hero's whatever the photo. Under 960px the text needs the whole
 * width, so the image becomes a 16:9 band above the text instead.
 */
.sbvc-hero:has(> .sbvc-hero__media) {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.sbvc-hero > .sbvc-hero__media,
.entry-content .sbvc-hero > .sbvc-hero__media {
	margin: 0;
}

.sbvc-hero > .sbvc-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--sbvc-hero-focus, 50% 50%);
	border-radius: 0;
}

/*
 * Focal point, for a photo whose subject isn't central. On a page, a class on
 * the image block; on a post, the custom field sbvc_hero_focus
 * (template-parts/archive-hero.php).
 */
.sbvc-hero__media.is-focus-left { --sbvc-hero-focus: 20% 50%; }
.sbvc-hero__media.is-focus-right { --sbvc-hero-focus: 80% 50%; }
.sbvc-hero__media.is-focus-top { --sbvc-hero-focus: 50% 25%; }

@media (min-width: 960px) {
	.sbvc-hero:has(> .sbvc-hero__media) {
		display: flex;
		align-items: center;
		min-height: 440px;
	}

	.sbvc-hero:has(> .sbvc-hero__media) > .sbvc-inner {
		flex: 1;
	}

	.sbvc-hero:has(> .sbvc-hero__media) .sbvc-inner > * {
		max-width: 34rem;
	}

	/* From the end of the text column (the inner group's left edge + 34rem + a gap) to the right edge. */
	.sbvc-hero > .sbvc-hero__media,
	.entry-content .sbvc-hero > .sbvc-hero__media {
		position: absolute;
		inset: 0 0 0 calc(max(var(--gutter), (100% - var(--container-max)) / 2) + 34rem + var(--space-6));
		z-index: -1;
	}

	.sbvc-hero > .sbvc-hero__media::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(90deg, var(--navy) 0%, rgba(13, 31, 58, 0.6) 14%, rgba(13, 31, 58, 0) 36%);
	}
}

@media (max-width: 959px) {
	/* .wp-block-group outranks the hero padding rule above. */
	.wp-block-group.sbvc-hero:has(> .sbvc-hero__media) {
		padding-top: 0;
	}

	.sbvc-hero > .sbvc-hero__media,
	.entry-content .sbvc-hero > .sbvc-hero__media {
		aspect-ratio: 16 / 9;
		margin: 0 calc(-1 * var(--gutter)) var(--space-6);
	}
}

/* Text section: readable measure. */
.sbvc-text {
	font-size: var(--text-body-md);
}

.sbvc-text table {
	width: 100%;
}

/* 6  Cards and people ------------------------------------------------------- */

.sbvc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: var(--space-5);
}

.entry-content .sbvc-cards > * + * {
	margin-block-start: 0;
}

/*
 * People grids keep each card a third of the row at most, so one or two
 * staff cards (and their square photos) stay the size they have in a row of
 * three, from the left, rather than stretching across the row.
 */
.sbvc-cards:has(> .sbvc-person) {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(260px, (100% - 2 * var(--space-5)) / 3)), 1fr));
}

.sbvc-card {
	display: flex;
	flex-direction: column;
	padding: var(--space-5);
	background: var(--surface-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}

.entry-content .sbvc-card > * {
	margin: 0;
}

.entry-content .sbvc-card > * + * {
	margin-block-start: var(--space-3);
}

.sbvc-card h3 {
	font-size: var(--text-display-sm);
}

.sbvc-card p {
	color: var(--text-secondary);
}

/*
 * An image at the top of a card runs to the card's edges in a fixed frame,
 * 3:2 (square for a person), so a row of cards keeps its titles level
 * whatever the photos' shapes.
 */
.entry-content .sbvc-card > .wp-block-image:first-child {
	margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.entry-content .sbvc-person > .wp-block-image:first-child {
	aspect-ratio: 1 / 1;
}

.entry-content .sbvc-card > .wp-block-image:first-child img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.entry-content .sbvc-card > .wp-block-image:first-child + * {
	margin-block-start: var(--space-4);
}

/*
 * An image in a section's running text keeps to the text measure, in the
 * cards' 3:2 frame and corners, so a portrait photo can't take over a page.
 */
.entry-content .sbvc-inner > .wp-block-image {
	max-width: var(--container-text);
}

.entry-content .sbvc-inner > .wp-block-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--radius-lg);
}

/* The button sits at the foot of the card, so a row of cards lines up. */
.entry-content .sbvc-card > .wp-block-buttons {
	margin-block-start: auto;
	padding-top: var(--space-4);
}

/* A card that is only a heading (the four pillars) reads as a badge tile. */
.sbvc-card:has(> h3:only-child) {
	justify-content: center;
	min-height: 120px;
	background: var(--navy);
	border-color: var(--navy);
}

.entry-content .sbvc-card:has(> h3:only-child) h3 {
	color: var(--ivory);
	text-transform: uppercase;
	letter-spacing: var(--tracking-badge);
	font-size: clamp(14px, 3.6vw, var(--text-body-lg));
	text-align: center;
}

/* Badge tiles are short, so they sit two to a row on a phone rather than one. */
@media (max-width: 480px) {
	.sbvc-cards:has(> .sbvc-card > h3:only-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sbvc-card:has(> h3:only-child) {
		min-height: 88px;
		padding-inline: var(--space-3);
	}
}

.sbvc-person .sbvc-eyebrow {
	color: var(--teal-dark);
	font-size: var(--text-caption);
}

.sbvc-person h3 {
	font-size: var(--text-body-lg);
}

.sbvc-person a[href^="mailto:"] {
	overflow-wrap: anywhere;
	font-size: var(--text-body-sm);
}

/* 7  Table that stacks on mobile --------------------------------------------- */

.sbvc-table {
	margin: 0;
	overflow-x: auto;
}

.sbvc-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--surface-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	overflow: hidden;
	font-size: var(--text-body-sm);
}

.sbvc-table th,
.sbvc-table td {
	padding: var(--space-3) var(--space-4);
	border: 0;
	border-bottom: 1px solid var(--border-default);
	text-align: left;
	vertical-align: top;
}

.sbvc-table thead th {
	background: var(--navy);
	color: var(--ivory);
	font-size: var(--text-caption);
	font-weight: 700;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	border-bottom: 0;
}

.sbvc-table tbody tr:last-child > * {
	border-bottom: 0;
}

.sbvc-table tbody tr:nth-child(even) {
	background: var(--surface-sunken);
}

.sbvc-table figcaption {
	margin-top: var(--space-2);
	font-size: var(--text-body-sm);
	color: var(--text-muted);
}

@media (max-width: 680px) {
	.sbvc-table.is-stackable {
		overflow: visible;
	}

	.sbvc-table.is-stackable table,
	.sbvc-table.is-stackable tbody,
	.sbvc-table.is-stackable tr,
	.sbvc-table.is-stackable td {
		display: block;
	}

	.sbvc-table.is-stackable table {
		background: none;
		border: 0;
	}

	.sbvc-table.is-stackable thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.sbvc-table.is-stackable tr {
		margin-bottom: var(--space-4);
		background: var(--surface-card);
		border: 1px solid var(--border-default);
		border-radius: var(--radius-lg);
		overflow: hidden;
	}

	.sbvc-table.is-stackable tbody tr:nth-child(even) {
		background: var(--surface-card);
	}

	.sbvc-table.is-stackable td {
		display: grid;
		grid-template-columns: minmax(7rem, 40%) 1fr;
		gap: var(--space-3);
	}

	.sbvc-table.is-stackable td:first-child {
		background: var(--navy);
		color: var(--ivory);
		font-weight: 700;
	}

	.sbvc-table.is-stackable td:first-child a {
		color: var(--ivory);
	}

	.sbvc-table.is-stackable td::before {
		content: attr(data-label);
		font-size: var(--text-caption);
		font-weight: 700;
		letter-spacing: var(--tracking-wide);
		text-transform: uppercase;
		color: var(--text-muted);
	}

	.sbvc-table.is-stackable td:first-child::before {
		color: var(--teal);
	}

	.sbvc-table.is-stackable tr > td:last-child {
		border-bottom: 0;
	}
}

/* 8  CTA band ------------------------------------------------------------- */

.sbvc-cta,
.entry-content > .wp-block-group.sbvc-cta {
	padding: 3em var(--gutter);
}

.sbvc-cta {
	background: var(--navy);
	color: var(--text-inverse);
}

.entry-content .sbvc-cta h2,
.sbvc-cta h2 {
	color: var(--ivory);
	margin-top: 0;
}

.entry-content .sbvc-cta p,
.sbvc-cta p {
	color: var(--text-inverse-secondary);
}

.sbvc-cta a:not(.wp-block-button__link) {
	color: var(--ivory);
	text-decoration-color: var(--teal);
}

/* Two navy bands in a row: a rule between them, so they read as two. */
.sbvc-cta + .sbvc-cta {
	border-top: 1px solid var(--border-inverse);
}

/* The CTA band that holds a form: heading on the left, form card on the right. */
.sbvc-cta--form .sbvc-inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: var(--space-7);
	align-items: start;
}

.entry-content .sbvc-cta--form .sbvc-inner > * {
	margin-block-start: 0;
}

.sbvc-cta__form {
	padding: var(--space-6);
	background: var(--ivory);
	color: var(--navy);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.entry-content .sbvc-cta .sbvc-cta__form p {
	color: var(--text-secondary);
}

/* Undo the band's ivory links on the ivory card (the form's consent link). */
.sbvc-cta .sbvc-cta__form a:not(.wp-block-button__link) {
	color: var(--navy);
	text-decoration-color: var(--text-link-underline);
}

@media (max-width: 900px) {
	.sbvc-cta--form .sbvc-inner {
		grid-template-columns: 1fr;
		gap: var(--space-5);
	}

	.sbvc-cta__form {
		padding: var(--space-5);
	}
}

/* 9  Latest news ------------------------------------------------------------ */

.sbvc-posts .wp-block-post-template {
	gap: var(--space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sbvc-posts .wp-block-post-template > li {
	margin: 0;
}

.sbvc-posts .sbvc-card {
	height: 100%;
}

.entry-content .sbvc-posts .sbvc-card > .sbvc-card__media + * {
	margin-block-start: 0;
}

.sbvc-posts .wp-block-post-title {
	font-size: var(--text-display-sm);
}

.sbvc-posts .wp-block-post-title a {
	color: var(--navy);
	text-decoration: none;
}

.sbvc-posts .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--teal-dark);
}

.sbvc-posts .wp-block-post-date {
	font-size: var(--text-caption);
	font-weight: 700;
	letter-spacing: var(--tracking-badge);
	text-transform: uppercase;
	color: var(--text-secondary);
}

.sbvc-posts .wp-block-post-excerpt__excerpt {
	margin: 0;
	color: var(--text-secondary);
}

.sbvc-posts .wp-block-post-excerpt__more-text {
	margin-top: var(--space-3);
}

/* 10  Embed ----------------------------------------------------------------- */

.sbvc-embed iframe {
	width: 100%;
	min-height: 600px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	background: var(--white);
}

/* 11  Gravity Forms -----------------------------------------------------------
 *
 * Gravity Forms 2.9's Orbital theme reads its colors and shapes from these
 * custom properties, so the form matches the design system's Input, Select
 * and Checkbox (design/sbvc/project/components/forms). Rules below them only
 * cover what the properties don't reach.
 *
 * Gravity Forms 3.2 prints a <style> beside each form that resets these
 * properties to its blue defaults under the selector
 * #gform_wrapper_N[data-form-index].gform-theme (specificity 1,2,0), after
 * this file. The :is(#sbvc-gf, *) matches every
 * form but counts as an ID, lifting this selector to (1,3,0) so it wins
 * without !important. No element has the id sbvc-gf.
 */

.gform-theme.gform-theme--framework.gform_wrapper:is(#sbvc-gf, *) {
	--gf-color-primary: var(--teal-dark);
	--gf-color-primary-rgb: 0, 132, 124;
	--gf-color-primary-contrast: var(--white);
	--gf-color-primary-darker: #006f68;
	--gf-color-primary-lighter: var(--teal);
	--gf-color-in-ctrl: var(--white);
	--gf-color-in-ctrl-contrast: var(--navy);
	--gf-color-in-ctrl-primary: var(--teal-dark);
	--gf-color-in-ctrl-dark: var(--navy);
	--gf-color-in-ctrl-light: var(--border-default);
	--gf-color-out-ctrl-dark: var(--navy);
	--gf-color-out-ctrl-dark-darker: var(--navy);
	--gf-color-out-ctrl-light: var(--border-default);
	--gf-color-danger: var(--danger);
	--gf-ctrl-border-color: var(--border-strong);
	--gf-ctrl-label-color-primary: var(--navy);
	--gf-ctrl-label-color-secondary: var(--text-secondary);
	--gf-ctrl-desc-color: var(--text-secondary);
	--gf-radius: var(--radius-md);
	--gf-ctrl-btn-radius: var(--radius-md);
	--gf-ctrl-btn-font-family: var(--font-body);
	--gf-ctrl-btn-font-size: var(--text-body-md);
	--gf-ctrl-btn-font-weight: 600;
	--gf-ctrl-btn-letter-spacing: var(--tracking-wide);
	--gf-ctrl-btn-line-height: 1.2;
	--gf-ctrl-btn-padding-x: 22px;
	--gf-ctrl-btn-padding-y: 12px;
	--gf-ctrl-btn-size: 0;
	--gf-font-family-base: var(--font-body);
	--gf-font-family-primary: var(--font-body);
	--gf-font-family-secondary: var(--font-body);
	--gf-ctrl-font-size: 16px;
	--gf-ctrl-label-font-weight-primary: 600;
	--gf-ctrl-outline-color-focus: var(--teal);
	--gf-ctrl-shadow: none;
	color: var(--navy);
	font-family: var(--font-body);
}

.gform_wrapper input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.gform_wrapper select,
.gform_wrapper textarea {
	padding: 10px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--white);
	color: var(--navy);
	font-family: var(--font-body);
	font-size: 16px;
}

.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
	border-color: var(--focus-ring);
	box-shadow: 0 0 0 3px var(--teal-10);
	outline: none;
}

.gform_wrapper input[type="checkbox"],
.gform_wrapper input[type="radio"] {
	accent-color: var(--teal-dark);
}

.gform_wrapper .gfield_label,
.gform_wrapper .gform-field-label {
	font-size: var(--text-body-sm);
	font-weight: 600;
	color: var(--navy);
}

.gform_wrapper .gfield_required {
	color: var(--danger);
}

/* The Send button takes its look from the --gf-ctrl-btn-* properties above. */
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_button:hover {
	filter: brightness(1.08);
}

.gform_wrapper .gform_validation_errors,
.gform_wrapper .validation_message {
	border-radius: var(--radius-md);
}

.gform_confirmation_message {
	padding: var(--space-5);
	background: var(--teal-10);
	border-left: 4px solid var(--teal-dark);
	border-radius: var(--radius-md);
	color: var(--navy);
}

/* 12  Posts and archives -------------------------------------------------- */

/*
 * A post's text starts on the hero's left edge and stops at 760px, like a
 * page's text section. #content outranks Astra's mobile container padding.
 */
.single-post #content > .ast-container {
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	padding-inline: var(--gutter);
}

.single-post #primary {
	max-width: var(--container-text);
	margin: 0;
	padding: 0;
}

.single-post .entry-content > * {
	margin-inline: 0;
}

/*
 * Post lists: the full container, as a grid of cards under the archive hero.
 * #content outranks Astra's mobile padding on .ast-separate-container .ast-container.
 */
.blog #content > .ast-container,
.archive #content > .ast-container,
.search #content > .ast-container {
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	padding: var(--space-8) var(--gutter);
}

/* Astra sets #primary's margin and padding and the row's -17px gutters with ID selectors. */
.blog #primary,
.archive #primary,
.search #primary {
	margin: 0;
	padding: 0;
}

.blog #primary .site-main > .ast-row,
.archive #primary .site-main > .ast-row,
.search #primary .site-main > .ast-row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: var(--space-5);
	margin: 0;
}

.blog .site-main > .ast-row > .ast-article-post,
.archive .site-main > .ast-row > .ast-article-post,
.search .site-main > .ast-row > .ast-article-post {
	width: auto;
	margin: 0;
	padding: 0;
}

.ast-article-post .ast-article-inner {
	height: 100%;
	padding: var(--space-5);
	background: var(--surface-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}

.ast-article-post .post-content > .ast-blog-single-element {
	margin: 0;
}

.ast-article-post .post-content > .ast-blog-single-element + .ast-blog-single-element {
	margin-top: var(--space-3);
}

/* Astra prints this empty: there is no full text on a card. */
.ast-article-post .post-content > .entry-content:empty {
	display: none;
}

/*
 * The featured image runs to the card's edges in a fixed 3:2 frame. A post
 * without one gets the same frame in navy with the wordmark (Astra prints the
 * section empty; the query block gets an empty figure from inc/astra-config.php),
 * so the titles in a row of cards line up.
 */
.ast-article-post .post-content > .ast-blog-featured-section,
.sbvc-posts .sbvc-card > .sbvc-card__media {
	margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-4);
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--navy);
}

.ast-article-post .post-content > .ast-blog-featured-section + .ast-blog-single-element {
	margin-top: 0;
}

.ast-article-post .ast-blog-featured-section :is(.post-thumb-img-content, a),
.sbvc-posts .sbvc-card__media a {
	display: block;
	height: 100%;
}

/* Astra bleeds the image itself with -1.5em margins under this selector; the frame above does that instead. */
.ast-article-post.remove-featured-img-padding .blog-layout-4 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content {
	margin: 0;
}

.ast-article-post .ast-blog-featured-section img,
.sbvc-posts .sbvc-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	border-radius: 0;
	transition: transform var(--duration-base) var(--ease-standard);
}

.ast-article-post .ast-blog-featured-section a:hover img,
.sbvc-posts .sbvc-card__media a:hover img {
	transform: scale(1.03);
}

.ast-article-post .post-content > .ast-blog-featured-section:empty,
.sbvc-posts .sbvc-card > .sbvc-card__media--empty {
	background: var(--navy) url("../img/SBVC-Wordmark-White.svg") center / 32% auto no-repeat;
}

.blog .ast-article-post .entry-title,
.archive .ast-article-post .entry-title,
.search .ast-article-post .entry-title {
	font-size: var(--text-display-sm);
	line-height: var(--leading-snug);
	font-weight: 700;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: manual;
}

.ast-article-post .entry-title a {
	color: var(--navy);
	text-decoration: none;
}

.ast-article-post .entry-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--teal-dark);
}

.ast-article-post .ast-excerpt-container p {
	margin: 0;
	color: var(--text-secondary);
}



.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
	background: transparent;
	padding: var(--space-8) 0;
}

/* A post's body headings sit under the hero's H1, a step down from a page's. */
.single-post .entry-content h2 {
	font-size: var(--text-display-md);
}

.single-post .entry-content h3 {
	font-size: var(--text-display-sm);
}

.blog .entry-meta,
.archive .entry-meta,
.search .entry-meta {
	font-size: var(--text-caption);
	font-weight: 700;
	letter-spacing: var(--tracking-badge);
	text-transform: uppercase;
	color: var(--text-secondary);
}

/* 404: the hero holds the H1; the body is a sentence, search and two links. */
.error404 #content > .ast-container {
	max-width: calc(var(--container-max) + 2 * var(--gutter));
	padding: var(--space-8) var(--gutter);
}

.error404 #primary {
	max-width: var(--container-text);
	margin: 0;
	padding: 0;
}

.sbvc-404 .search-form {
	display: flex;
	gap: var(--space-3);
	margin: var(--space-5) 0;
}

.sbvc-404 .search-field {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--white);
	color: var(--navy);
}

.sbvc-404__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-5);
}
