/*
 * Blog: the post list (home.php) and single posts (single.php).
 * Hand-authored. Loaded on blog views only, after shared.css and chrome.css.
 *
 * Colour notes (WCAG 2.1 AA): gold #C9A227 is decoration only on light
 * grounds (card rule, byline bar). Text is navy, deep blue or primary blue on
 * white/off-white, and white on navy.
 */

/* chrome.css strips GeneratePress's containers for body.page; blog views
   carry .blog / .single-post instead, so the same reset is repeated here. */
body.blog .site,
body.blog .site-content,
body.blog .content-area,
body.blog .grid-container,
body.single-post .site,
body.single-post .site-content,
body.single-post .content-area,
body.single-post .grid-container {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

body.blog .site-content,
body.single-post .site-content { display: block; }

body.blog,
body.blog *,
body.single-post,
body.single-post * { box-sizing: border-box; }

.hobbs-blog { display: block; width: 100%; }

/* ---------- Banner (same plain navy banner as Contact) ---------- */
.blog-hero { background: radial-gradient(ellipse 95% 160% at 100% 0%, #134A73 0%, rgba(17,70,110,0.6) 40%, rgba(10,37,64,0) 90%), var(--navy); padding: 60px 0 40px; text-align: center; }

.blog-hero h1 { color: var(--white); margin: 0; }

/* The line under the Blog page heading, as on the Contact banner. */
.blog-hero h1:has(+ .blog-hero-sub) { margin-bottom: 12px; }

.blog-hero-sub { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 860px; margin: 0 auto; text-wrap: balance; }

.blog-hero-post h1 { font-size: clamp(2rem, 4.2vw, 2.75rem); max-width: 900px; margin: 0 auto 14px; }

.blog-byline { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin: 0; }

.blog-byline-sep { color: var(--gold); margin: 0 10px; }

/* Plain banners are 259px on computers (hero standard, 2026-11-10). */
@media (min-width: 1025px) {
	.blog-hero { min-height: 259px; padding: 48px 0; display: flex; align-items: center; }
	.blog-hero > .container { width: 100%; }
}

/* ---------- Post list ---------- */
.blog-list-section { padding: 72px 0; background: var(--off-white); }

/* ---------- Search box (above the list, same width as the cards) ----------
   One bordered bar holding the icon, the field and the button. The border is
   primary blue so the field's edge is 3:1 against the page (WCAG 1.4.11).
   GeneratePress styles every input and button, and recolours them on hover
   and focus, so each state is restated here. */
.blog-search { max-width: 860px; margin: 0 auto 32px; }

.blog-search-bar { position: relative; display: flex; align-items: stretch; background: var(--white); border: 1px solid var(--primary-blue); border-radius: 12px; overflow: hidden; }

.blog-search-bar:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }

.blog-search-icon { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--primary-blue); pointer-events: none; }

.blog-search .blog-search-bar input[type="search"],
.blog-search .blog-search-bar input[type="search"]:hover,
.blog-search .blog-search-bar input[type="search"]:focus { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; padding: 15px 16px 15px 50px; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; font-family: var(--font-body); font-size: 17px; line-height: 1.4; color: var(--navy); -webkit-appearance: none; appearance: none; }

/* #5A6B7B is 5.49:1 on white. */
.blog-search-bar input[type="search"]::placeholder { color: #5A6B7B; opacity: 1; }

.blog-search .blog-search-bar button,
.blog-search .blog-search-bar button:hover,
.blog-search .blog-search-bar button:focus,
.blog-search .blog-search-bar button:active { flex: 0 0 auto; margin: 0; padding: 0 28px; min-height: 54px; border: 0; border-radius: 0; background: var(--navy); color: var(--white); font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; line-height: 1; cursor: pointer; transition: background var(--transition-fast); }

.blog-search .blog-search-bar button:hover { background: var(--primary-blue); }

/* The bar's own outline shows the group is focused; this inner gold ring
   (6.42:1 on navy) shows it is the button rather than the field. */
.blog-search .blog-search-bar button:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; }

.blog-search-summary { max-width: 860px; margin: 0 auto 24px; color: var(--deep-blue); }

.blog-search-summary a,
.blog-search-summary a:visited { margin-left: 6px; font-weight: 600; color: var(--primary-blue); text-decoration: underline; }

.blog-search-summary a:hover,
.blog-search-summary a:focus,
.blog-search-summary a:active { color: var(--navy); }

.blog-list { list-style: none !important; margin: 0 auto !important; padding: 0 !important; max-width: 860px; display: grid; gap: 24px; }

.blog-list > li { margin: 0 !important; list-style: none !important; }

.blog-card { position: relative; background: var(--white); border: 1px solid #D5E6F2; border-left: 4px solid var(--gold); border-radius: 12px; overflow: hidden; transition: box-shadow var(--transition-medium), transform var(--transition-medium); }

.blog-card:hover,
.blog-card:focus-within { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.blog-card-text { padding: 32px 36px; }

.blog-card.has-photo { display: grid; grid-template-columns: 280px 1fr; }

.blog-card-photo { position: relative; min-height: 220px; }

.blog-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-card-date { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-blue); margin: 0 0 8px; }

.blog-card-title { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: 0 0 12px; }

/* GeneratePress recolours a:hover/a:focus/a:active; restate every state. */
.blog-card-title a,
.blog-card-title a:visited { color: var(--navy); text-decoration: none; }

.blog-card-title a:hover,
.blog-card-title a:focus,
.blog-card-title a:active { color: var(--primary-blue); }

/* The title link covers the card, so the whole card is one target. */
.blog-card-title a::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }

.blog-card-title a:focus-visible { outline: none; }

.blog-card-title a:focus-visible::after { outline: 3px solid var(--navy); outline-offset: -3px; }

.blog-card-excerpt { margin: 0 0 16px; color: var(--deep-blue); }

.blog-card-more { margin: 0; font-weight: 600; color: var(--primary-blue); }

.blog-card-arrow { display: inline-block; transition: transform var(--transition-fast); }

.blog-card:hover .blog-card-arrow { transform: translateX(4px); }

.blog-empty { text-align: center; font-size: 1.1rem; margin: 0; }

/* Page numbers. shared.css styles every bare <nav> as the header menu (a
   flex row; hidden, absolute and padded on phones), so all of that is reset
   here. 0-2-1 beats `nav` (0-0-1) and `nav.active` (0-1-1) at every width. */
.hobbs-blog nav.pagination { display: block; position: static; top: auto; left: auto; right: auto; background: none; padding: 0; box-shadow: none; gap: 0; align-items: normal; flex-direction: row; max-width: 860px; margin: 40px auto 0; }

.hobbs-blog nav.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.hobbs-blog nav.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--primary-blue); border-radius: 8px; background: var(--white); color: var(--primary-blue); font-weight: 600; text-decoration: none; }

.hobbs-blog nav.pagination a.page-numbers:hover,
.hobbs-blog nav.pagination a.page-numbers:focus { background: var(--light-blue); color: var(--navy); }

.hobbs-blog nav.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: var(--white); }

.hobbs-blog nav.pagination .page-numbers.dots { border-color: transparent; background: none; color: var(--deep-blue); }

/* ---------- Single post ---------- */
.blog-post-section { padding: 72px 0; background: var(--white); }

.blog-post-photo { max-width: 860px; margin: 0 auto 40px; }

.blog-post-photo img { display: block; width: 100%; height: auto; border-radius: 12px; }

.blog-post-body { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.7; }

.blog-post-body > *:first-child { margin-top: 0; }

.blog-post-body > *:last-child { margin-bottom: 0; }

.blog-post-body p { margin: 0 0 1.25em; color: var(--deep-blue); }

.blog-post-body h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2em 0 0.6em; }

.blog-post-body h3 { font-size: clamp(1.25rem, 2.4vw, 1.4rem); margin: 1.6em 0 0.5em; }

.blog-post-body h4 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; margin: 1.5em 0 0.5em; }

.blog-post-body ul,
.blog-post-body ol { margin: 0 0 1.25em 1.4em; padding: 0; }

.blog-post-body li { margin: 0 0 0.7em; color: var(--deep-blue); }

.blog-post-body li::marker { color: var(--primary-blue); }

.blog-post-body strong { color: var(--navy); font-weight: 600; }

/* Links in running text are underlined, not told apart by colour alone. */
.blog-post-body a:not([class]),
.blog-post-body a:not([class]):visited { color: var(--primary-blue); text-decoration: underline; }

.blog-post-body a:not([class]):hover,
.blog-post-body a:not([class]):focus,
.blog-post-body a:not([class]):active { color: var(--navy); }

.blog-post-body img { max-width: 100%; height: auto; border-radius: 12px; }

.blog-post-body figure { margin: 1.75em 0; max-width: 100%; }

.blog-post-body figcaption { font-size: 15px; color: var(--deep-blue); margin-top: 8px; text-align: center; }

.blog-post-body blockquote { margin: 1.75em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--gold); font-size: 1.1em; }

.blog-post-body blockquote p:last-child { margin-bottom: 0; }

.blog-post-body hr { border: 0; border-top: 1px solid #D5E6F2; margin: 2.5em 0; }

/* A button added in the editor looks like the site's gold button. */
.blog-post-body .wp-block-button__link,
.blog-post-body .wp-block-button__link:visited,
.blog-post-body .wp-block-button__link:hover,
.blog-post-body .wp-block-button__link:focus,
.blog-post-body .wp-block-button__link:active { display: inline-flex; align-items: center; padding: 14px 32px; background: var(--gold); color: var(--navy); font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 4px; text-decoration: none; }

.blog-post-body .wp-block-button__link:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Tables: navy header row, light rows. Cells wrap, so a table never needs
   sideways scrolling on a phone. */
.blog-post-body .wp-block-table { margin: 1.75em 0; overflow: visible; }

.blog-post-body table { width: 100%; margin: 0; border: 1px solid #C9DCEA; border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; font-size: 16px; line-height: 1.5; }

.blog-post-body .wp-block-table thead { border: 0; }

.blog-post-body .wp-block-table th,
.blog-post-body table th { background: var(--navy); color: var(--white); font-family: var(--font-body); font-weight: 600; text-align: left; padding: 14px 18px; border: 0; vertical-align: bottom; overflow-wrap: break-word; }

.blog-post-body .wp-block-table td,
.blog-post-body table td { padding: 14px 18px; border: 0; border-top: 1px solid #D5E6F2; color: var(--deep-blue); vertical-align: top; overflow-wrap: break-word; }

.blog-post-body table tbody tr:nth-child(even) td { background: var(--off-white); }

.blog-post-body table td:first-child { font-weight: 600; color: var(--navy); }

.blog-back { max-width: 760px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid #D5E6F2; }

.blog-back a,
.blog-back a:visited { font-weight: 600; color: var(--primary-blue); text-decoration: underline; }

.blog-back a:hover,
.blog-back a:focus,
.blog-back a:active { color: var(--navy); }

/* ---------- Tablets and phones ---------- */
@media (max-width: 768px) {
	.blog-list-section,
	.blog-post-section { padding: 48px 0; }

	.blog-card-text { padding: 24px 22px; }

	.blog-search { margin-bottom: 24px; }

	.blog-search .blog-search-bar button,
	.blog-search .blog-search-bar button:hover,
	.blog-search .blog-search-bar button:focus,
	.blog-search .blog-search-bar button:active { padding: 0 20px; }

	.blog-card.has-photo { grid-template-columns: 1fr; }

	.blog-card-photo { min-height: 0; aspect-ratio: 16 / 9; }

	.blog-post-body { font-size: 17px; }

	.blog-post-body table { font-size: 15px; }

	.blog-post-body .wp-block-table th,
	.blog-post-body table th,
	.blog-post-body .wp-block-table td,
	.blog-post-body table td { padding: 10px 12px; }
}
