/* Review fixes, 2026-09-25. Loaded after every ported sheet (Page.astro). */

/* Drawer: every submenu group starts CLOSED, the current page's group included.
 * Duda's cascade opens the current group with no class at all
 * (`.unav-item.dmNavItemSelected ~ .unav-sub { max-height: 200em; opacity: 1 }`),
 * so on /about the About group was already open when the drawer appeared and its
 * caret had nothing to open. runtime.js marks each drawer group `mg-drawer-group`
 * and drives `unifiednav__item-wrap_open`; this answers the cascade with the same
 * !important weight the ported rules carry. Deliberate deviation from live, which
 * leaves the current group expanded. */
.dmRoot.dmRoot.dmRoot #dm .layout-drawer .mg-drawer-group:not(.unifiednav__item-wrap_open) > .unav-sub {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none !important;
}
.dmRoot.dmRoot.dmRoot #dm .layout-drawer .mg-drawer-group.unifiednav__item-wrap_open > .unav-sub {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* /blog-search results heading. /blog's list is show-blog-title="false", so the
 * ported sheets give .blog-name no type here. Values measured on live's
 * /blog-search?searchTerm=deck, 2026-09-25: Poppins 700 uppercase, centred,
 * rgb(45,46,50), 32px / 26px (phone), gap to the first card 0.83em. */
#dm .mg-search-heading {
  display: block !important;
  font-family: Poppins, "Poppins Fallback", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  text-align: center;
  color: rgb(45, 46, 50);
  margin: 0 0 0.83em;
  padding: 0;
  width: 100%;
  flex: 0 0 auto;
}
body.dmMobileBody #dm .mg-search-heading, #dm .mg-only-m .mg-search-heading { font-size: 26px; }
@media (max-width: 767px) { #dm .mg-search-heading { font-size: 26px; } }

/* Footer GBP map: house standard caps the embed at 300px (live and the port
 * shipped height="380"). Width is unchanged — it already spans the footer. */
#dm .dmCustomHtml iframe[src*="google.com/maps"] {
  height: 300px !important;
  max-height: 300px;
}

/* Legal pages (/privacy-policy, /terms-and-conditions — tools/build-legal-pages.py).
 * Duda's reset zeroes margin on p/ul/h*, so the policy read as one slab with each
 * heading pressed against the paragraph above it. */
#dm .gy-legal > p:first-child { margin-bottom: 24px; }
#dm .gy-legal h3 { margin: 32px 0 8px; }
#dm .gy-legal h4 { margin: 20px 0 6px; }
#dm .gy-legal p { margin: 0 0 8px; }
#dm .gy-legal ul { margin: 0 0 12px; }

/* Contact-form legal line: one row, cleared below the floated submit, ~15px of
 * PADDING above (a margin collapses against the submit's box), flush left with
 * the submit button, dark ink on the white form. */
#dm .gy-form-legal {
  clear: both;
  display: block;
  width: 100%;
  padding-top: 15px;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
  color: rgb(45, 46, 50);
}
#dm .gy-form-legal a { color: rgb(45, 46, 50); text-decoration: underline; }

/* Footer legal row. It carries the copyright widget's own u_1056813044 class, so
 * the per-band size (11px / 14px tablet) and ink (--color_3, white) come from the
 * same ported rules. Duda orders the footer group's children with per-id `order`
 * (copyright #c0504b3a is 2); without its own the row jumps above the icons. */
#dm .gy-footer-legal { order: 3; width: 100%; }
#dm .gy-footer-legal .copyright { justify-content: center; }
#dm .gy-footer-legal a { color: inherit !important; text-decoration: underline; }

/* /blog "Show More": the anchor shrink-wraps its .text span, which Duda sets to
 * white-space:normal, so at 1440 and 960 the button was 90px wide and read
 * "Show / More" on two lines (live too). Give it the site's standard button
 * width (200px, as LEARN MORE / VIEW MORE) and keep the label on one line.
 * Phone already spans the column and is unchanged. */
#dm .mainBlog .more-posts-text-container { min-width: 200px; }
#dm .mainBlog .more-posts-text-container .morePosts { white-space: nowrap; }

/* CTA band (Page.astro ctaBand): one centred CONTACT US button after the last
 * content section. The button is the site's own flexButton; only its box is
 * per-id in the ported sheets, so the 200x55 of LEARN MORE / VIEW MORE is set
 * here. */
#dm .gy-cta-section { display: flex; justify-content: center; padding: 0 16px 64px; background: transparent; }
/* ~64px either side: pull up into the white the section above already leaves,
 * or, after a photo band, add the space. */
#dm .gy-cta-band:not(.gy-cta-after-bg) { margin-top: -32px; }
#dm .gy-cta-after-bg .gy-cta-section { padding-top: 64px; }
#dm .gy-cta-wrap { width: 200px; height: 55px; }
#dm .gy-cta-wrap > .dmWidget { width: 100%; height: 100%; margin: 0; }
@media (max-width: 767px) {
  /* Phone sections leave little white under their content: add, don't pull up. */
  #dm .gy-cta-band:not(.gy-cta-after-bg) { margin-top: 0; }
  #dm .gy-cta-section, #dm .gy-cta-after-bg .gy-cta-section { padding-top: 40px; padding-bottom: 64px; }
}
