/* Services (includes/services.php): the card grid on /services/ and the service pages.
   Colours, type sizes, motion and corners come from the theme's tokens (square corners). */

/* Services page (wide layout): the intro and button line up with the title and the cards
   instead of sitting centred at reading width. This file loads only on Services pages. */
.bp-page--wide .wp-block-post-content > :not(.alignwide):not(.alignfull) { margin-left: 0 !important; }

/* Cards */
.bp-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem); margin-block: 2.5rem; }
.bp-service-card { height: 100%; }
.bp-service-card__link { display: flex; flex-direction: column; height: 100%; color: var(--bp-ink); text-decoration: none; }
.bp-service-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bp-paper); }
.bp-service-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--bp-dur-panel) var(--bp-ease); }
.bp-service-card__body { display: flex; flex: 1; flex-direction: column; gap: 0.5rem; padding-top: 1.25rem; border-top: 3px solid var(--bp-graphite); margin-top: -3px; position: relative; }
.bp-service-card__title { font-size: 1.375rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.bp-service-card__text { color: var(--bp-muted); line-height: 1.55; }
.bp-service-card__more { margin-top: auto; padding-top: 0.75rem; font-weight: 600; color: var(--bp-ink); }
.bp-service-card__link:hover .bp-service-card__title,
.bp-service-card__link:focus-visible .bp-service-card__title { text-decoration: underline; text-underline-offset: 0.2em; }
.bp-service-card__link:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 4px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.bp-service-card__link:hover .bp-service-card__media img { transform: scale(1.03); }
}

/* Service page (main is .bp-service-page: the theme's .bp-service styles the old text blocks) */
.bp-service-page { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
/* Short enough that the service name and buttons show on the first screen of a laptop. */
.bp-service__photo { margin: 1.5rem 0 0; height: clamp(220px, 34vh, 400px); overflow: hidden; background: var(--bp-paper); }
.bp-service__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-service__columns { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(2rem, 4vw, 3rem); align-items: start; }
.bp-service__title { margin: 0; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.1; }
.bp-service__lead { margin: 1rem 0 0; font-size: 1.1875rem; line-height: 1.55; color: var(--bp-muted); }
.bp-service__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }
.bp-service__details { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--bp-hairline); }
.bp-service__details > :first-child { margin-top: 0; }
.bp-service__details h2 { font-size: 1.375rem; margin: 2rem 0 0.75rem; }
.bp-service__details ul { padding-left: 1.25rem; }
.bp-service__details li + li { margin-top: 0.375rem; }
.bp-service__video { margin-top: 2.5rem; }
.bp-service__video h2 { font-size: 1.375rem; margin: 0 0 1rem; }
.bp-service__aside { position: sticky; top: 1.5rem; }
.bp-service__other { margin-top: var(--wp--preset--spacing--90); padding-top: 3rem; border-top: 1px solid var(--bp-hairline); }
.bp-service__other h2 { margin: 0; }
@media (max-width: 899px) {
	.bp-service__columns { grid-template-columns: minmax(0, 1fr); }
	.bp-service__aside { position: static; }
	.bp-service__photo { height: auto; aspect-ratio: 16 / 9; margin-inline: calc(-1 * var(--bp-gutter)); }
}
@media (max-width: 479px) {
	.bp-service__actions .bp-button { flex: 1 1 100%; justify-content: center; }
}

/* Video: a play button over the YouTube thumbnail until pressed. */
.bp-video { position: relative; aspect-ratio: 16 / 9; background: var(--bp-charcoal); }
.bp-video__link { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; overflow: hidden; }
.bp-video__link img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85; transition: opacity var(--bp-dur) var(--bp-ease); }
.bp-video__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: grid; place-items: center; background: var(--bp-action); color: #fff; transition: background-color var(--bp-dur-feedback) var(--bp-ease); }
.bp-video__label { position: absolute; left: 0; bottom: 0; padding: 0.5rem 0.875rem; background: var(--bp-charcoal); font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.bp-video__link:hover img { opacity: 1; }
.bp-video__link:hover .bp-video__play { background: var(--bp-action-hover); }
.bp-video__link:focus-visible { outline: 3px solid var(--bp-blue); outline-offset: 3px; }
.bp-video__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
