/* ==========================================================================
   OSSD Starter: the few styles theme.json can't express.
   Brand colors and fonts come from theme.json presets, so this file
   rarely needs to change per client.
   ========================================================================== */

/* ---- Global polish ---------------------------------------------------- */
html { scroll-behavior: smooth; }
img { height: auto; }
.wp-element-button,
.wp-block-button__link { transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), border-color var(--wp--custom--transition); }

/* Outline buttons on dark backgrounds pick up the text color set on them. */
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ---- Header ----------------------------------------------------------- */
.ossd-topbar { font-size: var(--wp--preset--font-size--x-small); }
.ossd-topbar p { margin: 0; }
.ossd-topbar a { color: inherit; }

.ossd-header .wp-block-site-logo img { max-height: 64px; width: auto; }
.ossd-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); text-decoration: none; }
:where(.ossd-header .wp-block-navigation) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 1px solid var(--wp--preset--color--border) !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	min-width: 220px;
	padding: 0.5rem 0;
}
/* Defaults only (:where keeps them easy to override in Styles / Additional CSS). */
:where(.ossd-header .wp-block-navigation__submenu-container) a { padding: 0.5rem 1.25rem; color: inherit; }
:where(.ossd-header .wp-block-navigation__submenu-container) a:hover { color: var(--wp--preset--color--primary); }
:where(.ossd-header .wp-block-navigation__responsive-container.is-menu-open) a { color: inherit; }
:where(.ossd-header .wp-block-navigation__responsive-container.is-menu-open) {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}
.ossd-header .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem; }
:where(.ossd-header .wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; background: transparent !important; }

/* Keep the header on one line: no wrapping, CTA drops out on narrower screens. */
.ossd-header .wp-block-navigation__container { flex-wrap: nowrap; }
.ossd-header .wp-block-navigation-item__content,
.ossd-header .wp-block-button__link,
.ossd-logo-fallback { white-space: nowrap; }

@media (max-width: 1100px) {
	.ossd-header .ossd-header-cta { display: none; }
}
@media (max-width: 781px) {
	.ossd-topbar .ossd-hide-mobile { display: none; }
}

/* ---- Block styles (registered in functions.php) ----------------------- */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--accent);
}

.wp-block-group.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	transition: transform var(--wp--custom--transition), box-shadow var(--wp--custom--transition);
}
.wp-block-group.is-style-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.wp-block-list.is-style-checks,
.wp-block-list.is-style-plain { list-style: none; padding-left: 0; }
.wp-block-list.is-style-checks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem; }
.wp-block-list.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.9rem;
	height: 0.5rem;
	border-left: 2px solid var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}
.wp-block-list.is-style-plain li { margin-bottom: 0.35rem; }

/* ---- Section helpers ---------------------------------------------------- */
.ossd-card-link a { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.ossd-stars { color: var(--wp--preset--color--gold); letter-spacing: 2px; margin-bottom: 0.5rem; }
.ossd-quote { font-style: italic; }

/* Fluent Forms: inherit theme fonts and button style. */
.fluentform .ff-btn-submit {
	background-color: var(--wp--preset--color--primary) !important;
	border-radius: var(--wp--custom--radius) !important;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	padding: 1rem 2rem !important;
}
.fluentform .ff-el-form-control { border-radius: var(--wp--custom--radius); }

/* ---- Footer ----------------------------------------------------------- */
.ossd-footer a { color: inherit; }
.ossd-footer a:hover { color: var(--wp--preset--color--accent); }
.ossd-footer h4 { color: var(--wp--preset--color--base); }
.ossd-footer .wp-block-site-logo img { max-height: 90px; width: auto; }

/* Site name shown until a logo is uploaded. */
.ossd-logo-fallback { margin: 0; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--x-large); font-weight: 600; line-height: 1.2; }
.ossd-logo-fallback a { color: inherit; text-decoration: none; }

/* Full-width sections sit flush against each other (no white gaps). */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block: 0; }
/* Full-width covers line their text up with the rest of the page. */
.wp-block-cover.alignfull { padding-left: var(--wp--style--root--padding-left); padding-right: var(--wp--style--root--padding-right); }

/* ---- Header options ---------------------------------------------------- */
.wp-site-blocks { position: relative; }

/* Sticky: stays at the top while scrolling. */
header.wp-block-template-part:has(.ossd-header--sticky) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
.ossd-header--sticky { box-shadow: 0 1px 0 var(--wp--preset--color--border); }

/* Transparent: floats over the first section (use with a hero). */
header.wp-block-template-part:has(.ossd-header--transparent) {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
}
.ossd-header--transparent { background: transparent; }
.ossd-header--transparent .wp-block-navigation a:hover { color: var(--wp--preset--color--base); opacity: 0.75; }
.ossd-header--transparent .ossd-logo-fallback a { color: var(--wp--preset--color--base); }
.ossd-header--transparent .wp-block-navigation__submenu-container a { color: var(--wp--preset--color--contrast); }

/* Centered: logo above the menu. */
.ossd-header--centered .wp-block-site-logo,
.ossd-header--centered .ossd-logo-fallback { margin-inline: auto; text-align: center; }

/* ---- Footer options ---------------------------------------------------- */
.ossd-footer--simple a { color: inherit; }
.ossd-footer--simple a:hover { color: var(--wp--preset--color--primary); }
.ossd-footer--simple .wp-block-site-logo img { max-height: 60px; }

/* SVG logos have no built-in size: give them one (child themes can override). */
.wp-block-site-logo img[src$=".svg"] { width: 150px; height: auto; }
.ossd-footer .wp-block-site-logo img[src$=".svg"] { width: 130px; }
