/*
Theme Name: White River Kennel
Theme URI: https://whiteriverkennel.com/
Author: David Martin Design
Author URI: https://davidmartindesign.com/
Description: Standalone block theme for White River Rottweilers and French Bulldogs, built from the White River Kennel design system. Editor choices are limited to brand presets so the site stays on-brand as the owners edit it.
Version: 0.1.0
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
License: Proprietary
Text Domain: whiteriver
*/

/* Values come from theme.json custom properties (--wp--preset--*, --wp--custom--*). */

/* Focus and targets */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--river-900);
	outline-offset: 2px;
}
.has-river-900-background-color :where(a, button):focus-visible,
.has-river-700-background-color :where(a, button):focus-visible {
	outline-color: var(--wp--preset--color--white);
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--wp--preset--spacing--40); top: var(--wp--preset--spacing--40); z-index: 100; background: var(--wp--preset--color--white); padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); }
.wp-block-button__link, .wp-block-navigation-item__content, .wp-block-post-title a { min-height: var(--wp--custom--touch-target); }
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; }

/* Buttons */
.wp-block-button.is-style-secondary .wp-block-button__link { background: var(--wp--preset--color--surface-raised); color: var(--wp--preset--color--river-700); border: 2px solid var(--wp--preset--color--river-700); }
.wp-block-button.is-style-secondary .wp-block-button__link:hover { background: var(--wp--preset--color--river-100); color: var(--wp--preset--color--river-900); }
.wp-block-button.is-style-inverse .wp-block-button__link { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--river-900); }
.wp-block-button.is-style-inverse .wp-block-button__link:hover { background: var(--wp--preset--color--river-100); }

/* Header and navigation */
.wr-header { border-bottom: 1px solid var(--wp--preset--color--border-subtle); }
.wr-header__logo img { display: block; height: 64px; width: auto; }
.wr-header .wp-block-navigation a { text-decoration: none; font-weight: 700; color: var(--wp--preset--color--ink); border-bottom: 3px solid transparent; display: inline-flex; align-items: center; }
.wr-header .wp-block-navigation a:hover { border-bottom-color: var(--wp--preset--color--rust-600); }
.wr-header .wp-block-navigation .current-menu-item > a, .wr-header .wp-block-navigation a[aria-current="page"] { border-bottom-color: var(--wp--preset--color--river-700); }
.wr-header .wp-block-navigation__responsive-container-open { align-items: center; justify-content: center; font-weight: 700; min-height: var(--wp--custom--touch-target); padding: 0 var(--wp--preset--spacing--40); border: 2px solid var(--wp--preset--color--river-700); border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--color--surface-raised); color: var(--wp--preset--color--river-700); }

/* Footer */
.wr-footer a { color: var(--wp--preset--color--surface); }
.wr-footer a:hover { color: var(--wp--preset--color--river-100); }
.wr-footer__logo img { display: block; width: 220px; height: auto; }

/* Cards (Group block style "Card") */
.wp-block-group.is-style-card { background: var(--wp--preset--color--surface-raised); border: 1px solid var(--wp--preset--color--border-subtle); border-radius: var(--wp--custom--radius--md); box-shadow: var(--wp--preset--shadow--card); overflow: hidden; }
.wr-card .wp-block-post-featured-image { margin: 0; }
.wr-card .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; width: 100%; display: block; }
.wr-card__body { padding: var(--wp--preset--spacing--50); }
.wr-photo-placeholder { aspect-ratio: 4 / 5; background: var(--wp--preset--color--river-100); color: var(--wp--preset--color--ink-muted); display: grid; place-items: center; font-size: var(--wp--preset--font-size--small); }

/* Status badge (server-rendered block wr/status-badge) */
.wr-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 8px; border-radius: var(--wp--custom--radius--pill); font-size: 0.875rem; line-height: 1.4; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.wr-badge svg { width: 16px; height: 16px; flex: none; }
.wr-badge--available { background: var(--wp--custom--status--available--bg); color: var(--wp--custom--status--available--fg); }
.wr-badge--reserved { background: var(--wp--custom--status--reserved--bg); color: var(--wp--custom--status--reserved--fg); }
.wr-badge--sold { background: var(--wp--custom--status--sold--bg); color: var(--wp--custom--status--sold--fg); }
/* Picks pending: waitlist families are still choosing (Reserved's calm colours, its own icon and word). */
.wr-badge--picks-pending { background: var(--wp--custom--status--reserved--bg); color: var(--wp--custom--status--reserved--fg); }

/* Notices (Group block style "Notice") */
.wp-block-group.is-style-notice { background: var(--wp--preset--color--river-100); border: 1px solid var(--wp--preset--color--river-600); border-radius: var(--wp--custom--radius--md); padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }
.wp-block-group.is-style-notice-attention { background: var(--wp--preset--color--rust-100); border: 1px solid var(--wp--preset--color--rust-700); border-radius: var(--wp--custom--radius--md); padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }

/* Steps list: ordered list with large numerals */
.wp-block-list.is-style-steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: var(--wp--preset--spacing--50); }
.wp-block-list.is-style-steps > li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: var(--wp--preset--spacing--40); align-items: start; }
.wp-block-list.is-style-steps > li::before { content: counter(step); font: 600 1.625rem/1 var(--wp--preset--font-family--display); width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--river-700); color: var(--wp--preset--color--white); }

/* Placeholder marker: anything in [brackets] that still needs Shane's input */
.wr-needed { background: var(--wp--preset--color--rust-100); color: var(--wp--preset--color--ink); padding: 0 4px; border-radius: 4px; }

/* Images and media */
.wp-block-image img, .wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--sm); }
.wp-block-image figcaption { color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--small); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Page sections (used by seeded pages) */
.wr-section { padding-block: var(--wp--preset--spacing--70); }
.wr-section--hero { padding-block: var(--wp--preset--spacing--80); }
.wr-section--hero h1 { font-size: var(--wp--preset--font-size--display); max-width: 20ch; }
@media (min-width: 700px) { .wr-section { padding-block: var(--wp--preset--spacing--80); } .wr-section--hero { padding-block: var(--wp--preset--spacing--90); } }
.wr-section--hero a:not(.wp-block-button__link) { color: var(--wp--preset--color--surface); }
.wr-card-grid .wp-block-post-title { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.wr-card-grid .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.wr-card-grid .wp-block-post-title a:hover { text-decoration: underline; }
.wr-card-grid .wp-block-post-terms { margin: 0; color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--small); }
.wr-card-grid .wr-badge { margin: 0; }
/* Two plain sections in a row would stack their padding into one very large gap: the second starts at the top. */
.wr-section:not(.has-background) + .wr-section:not(.has-background) { padding-top: 0; }
/* A heading that follows a card grid in the same section (New litters, then Upcoming litters) gets room above it. */
.wr-card-grid + .wp-block-heading { margin-top: var(--wp--preset--spacing--70); }
/* One or two cards in a three-column grid left the rest of the row empty. On wider screens they fill the row instead,
   with the photo beside the text, so the cards don't become very tall. */
@media (min-width: 900px) {
	.wr-card-grid .wp-block-post-template:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wr-card-grid .wp-block-post-template:has(> li:only-child) { grid-template-columns: minmax(0, 40rem); }
	.wr-card-grid .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:only-child)) .wr-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; height: 100%; }
}

/* Sections hold a centered 70rem column. Running text stays at a readable measure, left-aligned with the
   column's left edge (margin-left reproduces the centered column's edge on narrow blocks). */
.wp-block-group.wr-section > :where(p, ul, ol, details, h1, h2, h3, h4, .wp-block-buttons, .wr-price-range, .wp-block-group.is-style-notice, .wp-block-group.is-style-notice-attention) { max-width: 42rem; margin-left: max(0px, calc((100% - 70rem) / 2)) !important; margin-right: auto !important; }
.wp-block-group.wr-section > h2.alignwide { max-width: 70rem; }
.wr-section--hero > h1 { max-width: 20ch; }
.wr-card-grid .wp-block-buttons, .wr-card-grid .is-style-notice, .wr-card-grid .is-style-notice-attention { max-width: 42rem; }
.wr-card-grid .wp-block-buttons { margin-top: var(--wp--preset--spacing--50); }

/* Header, main and footer sit flush; sections handle their own spacing. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Application form (Contact Form 7) */
.wr-form { max-width: 42rem; display: grid; gap: var(--wp--preset--spacing--40); }
.wr-form p { margin: 0; display: grid; gap: var(--wp--preset--spacing--20); }
.wr-form label { font-weight: 700; }
.wr-form__hint { color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--small); }
.wr-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--wp--preset--spacing--40); }
.wr-form input[type="text"], .wr-form input[type="email"], .wr-form input[type="tel"], .wr-form select, .wr-form textarea {
	width: 100%; box-sizing: border-box; min-height: var(--wp--custom--touch-target); padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--surface-raised); color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--sm); font: inherit;
}
.wr-form textarea { min-height: 7.5rem; resize: vertical; }
.wr-form input:focus-visible, .wr-form select:focus-visible, .wr-form textarea:focus-visible { border-color: var(--wp--preset--color--river-900); }
.wr-form .wpcf7-list-item { margin: 0; display: block; }
.wr-form input[type="checkbox"] { width: 1.5rem; height: 1.5rem; margin-right: var(--wp--preset--spacing--30); vertical-align: middle; accent-color: var(--wp--preset--color--river-700); }
.wr-form input[type="submit"] { min-height: var(--wp--custom--touch-target); padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50); background: var(--wp--preset--color--rust-600); color: var(--wp--preset--color--white); border: 0; border-radius: var(--wp--custom--radius--md); font: 700 1.125rem/1.35 var(--wp--preset--font-family--body); cursor: pointer; justify-self: start; }
.wr-form input[type="submit"]:hover { background: var(--wp--preset--color--rust-700); }
.wr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wpcf7-not-valid-tip { color: var(--wp--preset--color--rust-700); font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.wpcf7-not-valid { border-color: var(--wp--preset--color--rust-700) !important; }
.wpcf7 form .wpcf7-response-output { margin: var(--wp--preset--spacing--40) 0 0; padding: var(--wp--preset--spacing--40); border: 2px solid var(--wp--preset--color--river-600); border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--color--river-100); max-width: 42rem; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border-color: var(--wp--preset--color--rust-700); background: var(--wp--preset--color--rust-100); }
/* No empty message box under the Send button before anything is submitted. */
.wpcf7 form.init .wpcf7-response-output, .wpcf7 form.resetting .wpcf7-response-output, .wpcf7 form.submitting .wpcf7-response-output, .wpcf7 form .wpcf7-response-output:empty { display: none; }
.wpcf7-spinner { display: none; }

/* Contact Form 7's hidden-fields container is not a visible fieldset. */
.wpcf7 .hidden-fields-container { display: none; border: 0; margin: 0; padding: 0; }
/* On pages with a title, the first section sits closer to it. */
.wp-block-post-content > .wr-section:first-child:not(.wr-section--hero) { padding-top: var(--wp--preset--spacing--50); }
.wr-form textarea { height: 8rem; }

/* Related items (wr/related block) */
.wr-related { margin-top: var(--wp--preset--spacing--70); }
.wr-related > h2 { margin-bottom: var(--wp--preset--spacing--40); }
.wr-related > p { margin: 0 0 var(--wp--preset--spacing--20); }
.wr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--wp--preset--spacing--50); }
.wr-card__breed { margin: 0; color: var(--wp--preset--color--ink-muted); font-size: var(--wp--preset--font-size--small); }
.wr-card .wp-block-post-title { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.wr-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.wr-card .wp-block-post-title a:hover { text-decoration: underline; }
.wr-card .wr-badge { margin: 0 0 var(--wp--preset--spacing--20); }

/* Footer links: comfortable tap targets (at least 24px, with space between). */
.wr-footer .wp-block-list { list-style: none; padding-left: 0; }
.wr-footer .wp-block-list li { margin: 0; }
.wr-footer .wp-block-list a, .wr-footer p a { display: inline-block; padding-block: var(--wp--preset--spacing--20); }
.wr-footer p { margin-block: 0; line-height: 1.9; }

/* Contact Form 7's screen-reader-only status region (its own stylesheet is off). */
.wpcf7 .screen-reader-response { position: absolute; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; word-wrap: normal !important; }
.wpcf7 .screen-reader-response ul { margin: 0; padding: 0; list-style: none; }

/* Page and detail layouts */
.wr-page-hero { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50); }
.wr-page-hero .wp-block-post-title, .wr-page-hero h1 { margin: var(--wp--preset--spacing--30) 0 0; }
.wr-detail-hero { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--70); }
.wr-detail-hero .wp-block-post-title { margin: var(--wp--preset--spacing--30) 0; font-size: var(--wp--preset--font-size--huge); }
.wr-detail-hero .wp-block-post-featured-image img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; border-radius: var(--wp--custom--radius--md); box-shadow: var(--wp--preset--shadow--card); display: block; }
.wr-detail-hero .wp-block-post-terms { color: var(--wp--preset--color--ink-muted); margin: 0 0 var(--wp--preset--spacing--40); }
.wr-detail-hero .wr-badge { margin: 0; }
.wr-detail-cols { gap: var(--wp--preset--spacing--60); }
.wr-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 var(--wp--preset--spacing--20); list-style: none; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-muted); }
.wr-crumbs li + li::before { content: "\203A"; margin-right: var(--wp--preset--spacing--20); }
.wr-crumbs a { color: var(--wp--preset--color--river-700); }
.wr-facts { padding: var(--wp--preset--spacing--50); }
.wr-facts .wr-related { margin-top: 0; }
.wr-facts .wr-related > h2 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: var(--wp--preset--spacing--30); }
.wr-cta h2 { max-width: 30ch; }
.wr-cta p { max-width: 42rem; }
.wr-cta a:not(.wp-block-button__link) { color: var(--wp--preset--color--surface); }
.wr-cta .wp-block-button__link { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--river-900); }
.wr-cta .wp-block-button__link:hover { background: var(--wp--preset--color--river-100); }

/* No photo yet: the details use the full width instead of leaving an empty column. */
.wr-detail-hero .wr-detail-cols > .wp-block-column:first-child:not(:has(img)) { display: none; }
.wr-detail-hero .wr-detail-cols:has(> .wp-block-column:first-child:not(:has(img))) > .wp-block-column:last-child { flex-basis: 100% !important; }
@media (max-width: 781px) { .wr-detail-cols { gap: var(--wp--preset--spacing--50); } .wr-detail-hero .wp-block-post-title { font-size: var(--wp--preset--font-size--xx-large); } }

.wr-stud-link { margin: var(--wp--preset--spacing--30) 0 0; }

.wr-health { margin-top: var(--wp--preset--spacing--40); padding: var(--wp--preset--spacing--30); background: var(--wp--preset--color--river-100); border-radius: 8px; max-width: 66ch; }
.wr-health h3 { margin-top: 0; }
.wr-health__note { font-size: var(--wp--preset--font-size--small); margin-bottom: 0; }

/* Home hero: a Rottweiler and a French Bulldog side by side, the second set lower for a relaxed look. */
.wr-hero-cols { gap: var(--wp--preset--spacing--60); }
.wr-hero-photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--wp--preset--spacing--30); align-items: start; }
.wr-hero-photos .wp-block-image { margin: 0; }
.wr-hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; border-radius: var(--wp--custom--radius--md, 8px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
@media (min-width: 700px) { .wr-hero-photos .wp-block-image:nth-child(2) { margin-top: var(--wp--preset--spacing--60); } }
/* Home hero banner: Shane's own kennel banner, shown whole (it carries its own lettering, so never cropped). */
.wr-hero-banner { margin: 0; }
.wr-hero-banner img { display: block; width: 100%; height: auto; border-radius: var(--wp--custom--radius--md, 8px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
@media (max-width: 781px) { .wr-hero-cols { gap: var(--wp--preset--spacing--50); } }

/* Home page photos: story and breed photos keep their shape and round corners. */
.wr-story-photo img, .wr-breed-photo img { width: 100%; height: auto; border-radius: var(--wp--custom--radius--md, 8px); }
.wr-breed-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; }
.wp-block-gallery.is-cropped .wp-block-image img { object-position: 50% 30%; }

.wr-price { margin: 0; font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ink); }
.wr-price-range { max-width: 42rem; }
.wr-price-range__note { color: var(--wp--preset--color--ink-muted); }

/* Family stories */
.wr-testimonials__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--wp--preset--spacing--40); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.wr-testimonial { margin: 0; }
.wr-testimonial blockquote { margin: 0; height: 100%; padding: var(--wp--preset--spacing--40); background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border-subtle); border-radius: 8px; box-shadow: var(--wp--custom--shadow--card, 0 1px 2px rgba(18,48,58,.12)); }
.wr-testimonial__text > :first-child { margin-top: 0; }
.wr-testimonial footer { margin-top: var(--wp--preset--spacing--30); color: var(--wp--preset--color--ink-muted); }
.wr-testimonials-band { background: var(--wp--preset--color--surface-raised); padding-block: var(--wp--preset--spacing--70); }
.wr-testimonials-inner { max-width: 70rem; margin-inline: auto; padding-inline: var(--wp--preset--spacing--40); }
.wr-testimonials-inner h2 { margin-top: 0; }
.wr-testimonials-more { margin: var(--wp--preset--spacing--40) 0 0; }

.wr-side-photo img { width: 100%; height: auto; border-radius: var(--wp--custom--radius--md, 8px); aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; }

/* Apply page: the form fills the left column; the photo stays in view beside it on wide screens and sits above the form on phones. */
@media (min-width: 782px) { .wr-apply-layout .wr-apply-photo { position: sticky; top: var(--wp--preset--spacing--50); align-self: flex-start; } }
@media (max-width: 781px) { .wr-apply-layout .wr-apply-photo { order: -1; } }

/* Galleries of four or more photos: the last row keeps the normal size instead of one photo stretching across the page. */
.wp-block-gallery.has-nested-images:has(> figure.wp-block-image:nth-of-type(4)) > figure.wp-block-image { flex-grow: 0; }
