/*
 * Digital Deckhand: WordPress compatibility layer.
 * Loaded after site-overrides.css. Only covers markup introduced by the
 * dynamic templates and core blocks (Query Loop lists, pagination links,
 * shared template parts). Values are copied from the matching site.css rules
 * so the rendered design is unchanged.
 */

/* ===== Shared chrome ===== */

/* The footer used to be "main>footer" (site-overrides.css). */
.ddh-site-footer > footer { padding-top: 60px; }

/* Views without a dark hero behind the header (insights index, plain pages). */
.ddh-solid-header .site-header::before { background: var(--ink); }

/* Active navigation state (aria-current is set server-side). */
.desktop-nav > a[aria-current="page"],
.services-menu.is-current > .services-menu-trigger { color: var(--signal); }
.services-mega-menu a[aria-current="page"] strong { color: var(--teal); }
.mobile-menu nav a[aria-current="page"] { font-weight: 800; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* Skip link for PHP document shells (block templates get core's own). */
.skip-link.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link.screen-reader-text:focus { background: var(--bone); clip-path: none; color: var(--ink); display: block; font-size: 14px; font-weight: 700; height: auto; left: 8px; line-height: normal; padding: 15px 23px 14px; text-decoration: none; top: 8px; width: auto; z-index: 100000; }

/* Locations: keep the sticky in-page nav clear of the fixed header while it is shown. */
.ddh-locations-page:has(.site-header.is-scrolled:not(.is-hidden)) .ddh-lp .section-nav { top: calc(80px + var(--ddh-sticky-offset, 0px)); }
.ddh-locations-page .ddh-lp .section-nav { transition: top .32s ease; }

/* ===== Query Loop grids (li wrappers around the legacy card markup) ===== */
.wp-block-post-template.blog-article-grid,
.wp-block-post-template.category-grid { list-style: none; padding-inline: 0; }
.wp-block-post-template.blog-article-grid > li,
.wp-block-post-template.category-grid > li { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.blog-article-grid > li > .blog-article-card { display: block; flex: 1; }
.category-grid > li > a { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.category-grid > li > a > div { background: #dce8e4; border-radius: 18px; height: 270px; overflow: hidden; }
.blog-article-copy > span time,
.category-grid a > span time { font: inherit; }
.blog-article-copy h2,
.blog-article-copy h3,
.category-grid h2,
.article-related h3 { overflow-wrap: break-word; }

/* Cards without a featured image. */
.ddh-image-placeholder { background: radial-gradient(circle at 78% 24%, #419a9a55, #0000 45%), linear-gradient(135deg, #071d22, #0d3339 55%, #24797b); }
.ddh-image-placeholder--related { border-radius: 17px; height: 230px; }
@media (max-width: 700px) { .ddh-image-placeholder--related { height: 235px; } }

/* ===== Insights topic filter (links instead of JS buttons) ===== */
.blog-filter-bar a { align-items: center; background: #ffffff8c; border: 1px solid #071d222b; border-radius: 13px; color: var(--ink); display: inline-flex; gap: 15px; min-height: 52px; padding: 0 17px; text-decoration: none; transition: transform .2s, border-color .2s; }
.blog-filter-bar a:hover { border-color: #338688; transform: translateY(-2px); }
.blog-filter-bar a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.blog-filter-bar a span { font-size: 12px; font-weight: 740; letter-spacing: .02em; }
.blog-filter-bar a small { background: #071d2214; border-radius: 7px; color: #51686c; display: grid; font-size: 12px; height: 23px; min-width: 23px; padding-inline: 6px; place-items: center; }
.blog-filter-bar a[aria-current="page"] small { background: #95c9c321; color: var(--aqua); }
@media (max-width: 700px) {
  .blog-filter-bar a { gap: 7px; justify-content: space-between; min-width: 0; padding: 0 11px; }
  .blog-filter-bar a span { font-size: 12px; text-align: left; }
}

/* ===== Pagination (core Query Pagination, styled like the legacy JS pager) ===== */
.blog-pagination.wp-block-query-pagination { align-items: center; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 48px; }
.blog-pagination .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-pagination a,
.blog-pagination .page-numbers { align-items: center; background: #fff; border: 1px solid #06191d29; border-radius: 11px; color: var(--ink); display: inline-flex; font-size: 13px; font-weight: 700; justify-content: center; letter-spacing: normal; min-height: 46px; min-width: 46px; padding: 0 20px; text-decoration: none; text-transform: none; transition: background .2s, color .2s; }
.blog-pagination a:hover { background: var(--ink); color: #fff; }
.blog-pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.blog-pagination .page-numbers.dots { background: none; border-color: transparent; min-width: 0; padding: 0 4px; }
.category-grid + .blog-pagination { margin: -60px auto 120px; width: min(100% - 64px, 1440px); }
@media (max-width: 700px) {
  .blog-pagination .page-numbers { padding: 0 14px; }
  .category-grid + .blog-pagination { margin: -40px auto 90px; width: min(100% - 36px, 1440px); }
}

/* ===== Single article ===== */
.article-overline a { color: inherit; text-decoration: none; }
.article-overline a:hover { color: var(--bone); }
.ddh-article-info { flex-wrap: wrap; row-gap: 10px; }
.ddh-article-info a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.article-content > .wp-block-post-content > :first-child { margin-top: 0; }
.article-content > .wp-block-post-content > :last-child { margin-bottom: 0; }
.ddh-article-tags { border-top: 1px solid #071d2224; color: #566b6f; font-size: 13px; margin-top: 56px; padding-top: 24px; }
.ddh-article-tags .wp-block-post-terms__separator { display: none; }
.ddh-article-tags .wp-block-post-terms__prefix { font-weight: 750; letter-spacing: .1em; margin-right: 6px; text-transform: uppercase; font-size: 12px; }
.article-content .ddh-article-tags a { border: 1px solid #071d2229; border-radius: 999px; color: var(--ink); display: inline-block; margin: 6px 6px 0 0; padding: 6px 14px; text-decoration: none; }
.article-content .ddh-article-tags a:hover { background: var(--ink); color: #fff; }

/* Gutenberg content inside articles. */
.article-content .wp-block-image,
.article-content .wp-block-gallery,
.article-content .wp-block-embed,
.article-content .wp-block-table { margin: 45px 0; }
.article-content .wp-block-image img,
.article-content .wp-block-gallery img,
.article-content .wp-block-media-text img,
.article-content .wp-block-cover img { margin: 0; }
.article-content .wp-block-gallery img { border-radius: 14px; height: 100%; }
.article-content .wp-block-gallery.has-nested-images figure.wp-block-image { margin: 0; }
.article-content .wp-block-embed iframe { border: 0; border-radius: 20px; max-width: 100%; width: 100%; }
.article-content .wp-block-quote p:last-child,
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content .wp-block-quote cite,
.article-content .wp-block-pullquote cite { color: #566b6f; display: block; font-size: 13px; font-style: normal; font-weight: 700; letter-spacing: .08em; margin-top: 14px; text-transform: uppercase; }
.article-content .wp-block-pullquote { border-block: 1px solid #071d2233; margin: 56px 0; padding: 40px 0; }
.article-content .wp-block-pullquote blockquote { background: none; border: 0; margin: 0; padding: 0; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-buttons.is-vertical { flex-direction: column; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }
.wp-block-buttons.is-content-justification-space-between { justify-content: space-between; }
.article-content .wp-block-buttons { margin: 32px 0; }
.article-content .wp-block-button__link { background: var(--teal); border-radius: 13px; color: #fff; font-size: 13px; font-weight: 750; letter-spacing: .06em; padding: 16px 24px; text-decoration: none; text-transform: uppercase; }
.article-content .wp-block-button__link:hover { background: var(--ink); color: #fff; }
.article-content .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 1px solid currentColor; color: var(--ink); }
.article-content hr,
.article-content .wp-block-separator { border: 0; border-top: 1px solid #071d2233; margin: 56px 0; }
.article-content .wp-block-table figcaption,
.article-content .wp-block-image figcaption { margin-bottom: 0; }
.article-content .wp-block-table table { margin: 0; }
.article-content .wp-block-code,
.article-content pre { background: #dce8e4; border-radius: 14px; font-size: 14px; margin: 32px 0; overflow-x: auto; padding: 20px 24px; }
.article-content .post-password-form input[type="password"] { border: 1px solid #071d2240; border-radius: 11px; margin: 8px 8px 0 0; min-height: 46px; padding: 0 14px; }
.article-content .post-password-form input[type="submit"] { background: var(--ink); border-radius: 11px; color: #fff; cursor: pointer; font-weight: 700; min-height: 46px; padding: 0 20px; }

/* ===== Archive / search hero ===== */
.category-hero-inner .wp-block-post-date,
.ddh-page-updated { color: #f3f2ec85; font-size: 12px; font-weight: 730; letter-spacing: .11em; margin-top: 24px; text-transform: uppercase; }
.ddh-search-form,
.ddh-search-block .wp-block-search__inside-wrapper { display: flex; gap: 10px; margin-top: 30px; max-width: 560px; width: 100%; }
.ddh-search-form input[type="search"],
.ddh-search-block .wp-block-search__input { background: #ffffff14; border: 1px solid #f3f2ec40; border-radius: 13px; color: inherit; flex: 1; font: inherit; font-size: 15px; min-height: 52px; padding: 0 18px; }
.ddh-search-block .wp-block-search__input { background: #fff; border-color: #071d222b; color: var(--ink); }
.ddh-search-form button,
.ddh-search-block .wp-block-search__button { align-items: center; background: var(--aqua); border: 0; border-radius: 13px; color: var(--ink); cursor: pointer; display: inline-flex; font: inherit; font-size: 12px; font-weight: 780; gap: 12px; letter-spacing: .1em; margin: 0; min-height: 52px; padding: 0 20px; text-transform: uppercase; }
.ddh-search-block .wp-block-search__button { background: var(--ink); color: #fff; }

/* ===== Empty states ===== */
.ddh-archive-query > .ddh-empty-state,
.blog-index .ddh-empty-state { padding-block: 70px 110px; }
.ddh-archive-query > .ddh-empty-state { margin-inline: auto; width: min(100% - 64px, 1440px); }
.ddh-empty-state h2 { font-size: clamp(36px, 4vw, 55px); font-weight: 610; letter-spacing: -.055em; line-height: 1.02; margin: 0 0 22px; max-width: 760px; }
.ddh-empty-state p { color: #50666a; font-size: 16px; line-height: 1.7; margin: 0 0 30px; max-width: 560px; }
.ddh-empty-state .ddh-empty-link { align-items: center; border-bottom: 1px solid #071d2259; color: #153f45; display: inline-flex; font-size: 12px; font-weight: 780; gap: 30px; letter-spacing: .1em; padding-bottom: 12px; text-transform: uppercase; }
@media (max-width: 700px) { .ddh-archive-query > .ddh-empty-state { width: min(100% - 36px, 1440px); } }

/* ===== Theme button style used in template parts ===== */
.wp-block-button.is-style-ddh-text-link > a { align-items: center; border-bottom: 1px solid currentColor; display: inline-flex; font-size: 12px; font-weight: 780; gap: 30px; letter-spacing: .1em; padding-bottom: 10px; text-transform: uppercase; }
.article-cta .wp-block-buttons,
.blog-cta .wp-block-buttons { margin: 0; }

/* The shared header is fixed and 108px tall. In the 1.x layout these heroes'
   first line sat lower (the article hero had no H1 of its own, so its overline
   was pushed down by margin-top:auto; the 404 had no header at all). With the
   H1 now in the article hero, a long title fills its min-height at any width,
   so reserve room below the header. Short titles keep their position: the
   auto margin absorbs the padding. */
.article-hero-inner { padding-top: 140px; }
@media (max-width: 700px) {
  .not-found-grid { padding-top: 140px; }
}
