/*
Theme Name:        Dr. Gad Dental Clinic
Theme URI:         https://doctorgad.com
Author:            Dr. Gad Dental Clinic
Description:        Premium block theme for a cosmetic + family dental clinic in Business Bay, Dubai. Companion to the dg-clinic plugin. Design system: "Enamel".
Version:           1.1.1
Requires at least: 6.5
Tested up to:      6.7
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       doctorgad
Tags:              full-site-editing, block-patterns, custom-colors, blog, one-column
*/

/* ---------------------------------------------------------------------------
   DIVISION OF LABOUR
   Base design tokens (colour, type, spacing, buttons, headings) live in
   theme.json and emit --wp--preset--* CSS vars. This file only styles the
   SIGNATURE / interactive components that theme.json can't express. Patterns
   use the .dg-* classes below. Custom classes mirror design/index.html.
   JS for .dg-compare, .dg-reveal, .dg-header and the mobile bar should be
   extracted from design/index.html into assets/js/theme.js and enqueued.
--------------------------------------------------------------------------- */

/* ---- shared ---- */
/* rose-ink (theme.json token, --wp--preset--color--rose-ink #9B565B) is the
   AA-safe rose for SMALL TEXT on light backgrounds: brand --rose #B67E7B is
   only 3.06:1 on porcelain, below WCAG 2.1 AA 4.5:1. Bright --rose stays for
   large fills, underlines, and star graphics (the 3:1 non-text threshold).
   See DESIGN.md §1/§4 (AA is the non-negotiable floor). */
.dg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.dg-eyebrow{
  font-size:var(--wp--preset--font-size--eyebrow);
  font-weight:700;letter-spacing:.18em;text-transform:uppercase;
  color:var(--wp--preset--color--rose-ink);display:inline-block;margin-bottom:.75rem;
}
.dg-eyebrow--on-dark{color:#D9A9A4}
.dg-stars{color:var(--wp--preset--color--rose);letter-spacing:.08em}

/* hairline-grid helper — the signature 1px-separated card grid */
.dg-grid{display:grid;gap:1px;background:var(--wp--preset--color--line);border:1px solid var(--wp--preset--color--line)}
.dg-grid--2{grid-template-columns:repeat(2,1fr)}
.dg-grid--3{grid-template-columns:repeat(3,1fr)}
.dg-grid--4{grid-template-columns:repeat(4,1fr)}
.dg-grid--5{grid-template-columns:repeat(5,1fr)}

/* ---- sticky header helper (JS toggles .is-stuck) ---- */
.dg-header{position:sticky;top:0;z-index:60;background:rgba(242,245,244,.82);backdrop-filter:saturate(140%) blur(10px);border-bottom:1px solid transparent;transition:border-color .3s}
.dg-header.is-stuck{border-bottom-color:var(--wp--preset--color--line)}
/* the brand and CTA never squash: brand stays one line, button keeps its
   intrinsic width (600–920px used to crush "Book a visit" one letter per line) */
.dg-brand .wp-block-site-title{white-space:nowrap}
.dg-header .wp-block-buttons,.dg-header .wp-block-button__link{flex:none;white-space:nowrap}
/* tablet band: the full nav + submenu can't fit between brand and CTA, so hide
   the inline nav and use the burger up to 920px (the burger's own reveal is in
   the R2 tap-target block below — one breakpoint, one rule) */
@media (min-width:600px) and (max-width:920px){
  .dg-nav .wp-block-navigation__responsive-container:not(.is-menu-open){display:none}
}
/* keep burger + CTA hugging the right container edge whenever nav collapses */
.dg-header .dg-nav{margin-left:auto}

/* ---- shade scale (signature) ---- */
.dg-shade{border-block:1px solid var(--wp--preset--color--line);background:var(--wp--preset--color--white)}
.dg-shade__row{display:flex;align-items:center;gap:clamp(1rem,4vw,3rem);padding:1.5rem 0;flex-wrap:wrap}
.dg-shade__label{font-size:var(--wp--preset--font-size--eyebrow);letter-spacing:.16em;text-transform:uppercase;color:var(--wp--preset--color--stone);font-weight:700;white-space:nowrap}
.dg-shade__scale{display:flex;flex:1;min-width:220px;height:26px;border:1px solid var(--wp--preset--color--line)}
.dg-shade__scale span{flex:1;position:relative}
.dg-shade__scale span::after{content:attr(data-s);position:absolute;top:calc(100% + 7px);left:50%;transform:translateX(-50%);font-size:.62rem;letter-spacing:.05em;color:var(--wp--preset--color--stone);font-weight:600}

/* ---- hero rating badge ---- */
.dg-badge{background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);padding:1rem 1.25rem;display:inline-flex;align-items:center;gap:.85rem}
.dg-badge b{font-family:var(--wp--preset--font-family--cormorant);font-size:2rem;font-weight:600;line-height:1;color:var(--wp--preset--color--petrol)}
.dg-badge small{font-size:.78rem;color:var(--wp--preset--color--stone);line-height:1.35;display:block}

/* ---- service cards (numbered, hover arrow) ---- */
.dg-service{background:var(--wp--preset--color--porcelain);padding:2.4rem 2rem 2.2rem;transition:background .3s}
.dg-service:hover{background:var(--wp--preset--color--white)}
/* number: scope under .dg-service so it beats `.dg-service p` (0,1,1) — keeps the rose 1.1rem italic accent */
.dg-service .dg-service__no{font-family:var(--wp--preset--font-family--cormorant);font-size:1.1rem;color:var(--wp--preset--color--rose-ink);font-style:italic}
.dg-service__link{margin-top:1.4rem;font-size:.85rem;font-weight:600;color:var(--wp--preset--color--petrol);display:inline-flex;gap:.4rem;align-items:center}
.dg-service__link span{transition:transform .25s}
.dg-service:hover .dg-service__link span{transform:translateX(4px)}

/* ---- first-visit steps (numbered) ---- */
.dg-step{background:var(--wp--preset--color--porcelain);padding:2rem 1.6rem}
.dg-step__no{font-family:var(--wp--preset--font-family--cormorant);font-size:2.6rem;font-weight:500;color:var(--wp--preset--color--line);line-height:1}

/* ---- before/after compare (signature) ----
   NO-JS DEFAULT: the two panels stack, both fully visible and labelled — a
   graceful fallback that still shows the transformation. WITH JS (.dg-js) they
   become the overlay drag-slider (theme.js sets the clip + handle position). */
.dg-compare{border:1px solid var(--wp--preset--color--line)}
.dg-compare__img{aspect-ratio:1/1;display:flex;align-items:flex-end;padding:1rem 1.2rem}
.dg-compare__after{background:linear-gradient(160deg,#F3F3EF,#E7ECEA 60%,#D5E2DF)}
.dg-compare__before{background:linear-gradient(160deg,#D8CFBE,#C9C2AE 60%,#B4B199)}
.dg-compare__tag{font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:#12211F;background:rgba(255,255,255,.82);padding:.3rem .55rem}
.dg-compare__handle{display:none}
/* JS-enhanced overlay slider — gated on .is-ready, which theme.js adds ONLY
   after it binds the drag/keyboard handlers. If theme.js is blocked or errors,
   the stacked fallback stays and no dead role="slider" handle is exposed. */
.dg-compare.is-ready{position:relative;aspect-ratio:1/1;overflow:hidden;user-select:none;touch-action:none}
.dg-compare.is-ready .dg-compare__img{position:absolute;inset:0;aspect-ratio:auto}
.dg-compare.is-ready .dg-compare__before{clip-path:inset(0 50% 0 0)}
.dg-compare.is-ready .dg-compare__after .dg-compare__tag{position:absolute;right:1.2rem;bottom:1rem}
.dg-compare.is-ready .dg-compare__handle{display:block;position:absolute;top:0;bottom:0;left:50%;width:2px;background:#fff;transform:translateX(-50%);cursor:ew-resize}
.dg-compare__grip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff;border:1px solid var(--wp--preset--color--line);display:flex;align-items:center;justify-content:center;color:var(--wp--preset--color--petrol);box-shadow:0 2px 10px rgba(12,58,64,.14)}

/* ---- review cards ---- */
.dg-review{background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);padding:2rem 1.8rem;display:flex;flex-direction:column}
.dg-review__q{font-family:var(--wp--preset--font-family--cormorant);font-size:1.28rem;line-height:1.4;font-weight:500;flex:1}
.dg-review__by{display:flex;align-items:center;gap:.7rem;margin-top:1.6rem;padding-top:1.3rem;border-top:1px solid var(--wp--preset--color--line)}
.dg-review__av{width:38px;height:38px;border-radius:50%;background:var(--wp--preset--color--petrol);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:600;flex:none}

/* ---- story band accents (group uses petrol bg via theme.json) ---- */
.dg-story__q{font-family:var(--wp--preset--font-family--cormorant);font-style:italic;line-height:1.4;color:#fff;border-left:2px solid var(--wp--preset--color--rose);padding-left:1.6rem}

/* ---- journal cards ---- */
.dg-post{background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);transition:border-color .3s}
.dg-post:hover{border-color:var(--wp--preset--color--petrol)}

/* ---- mobile action bar (JS/CSS shows under 640px) ---- */
.dg-mobile-bar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:70;background:var(--wp--preset--color--white);border-top:1px solid var(--wp--preset--color--line);padding:.6rem;gap:.5rem}
.dg-mobile-bar a{flex:1;text-align:center;padding:.8rem;font-size:.82rem;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:.25rem;color:var(--wp--preset--color--ink);text-decoration:none}
.dg-mobile-bar a.is-primary{background:var(--wp--preset--color--petrol);color:#fff}

/* ---- scroll reveal (JS adds .is-in; gated on .dg-js so content shows with JS off) ---- */
.dg-js .dg-reveal{opacity:0;transform:translateY(22px);transition:opacity .7s ease,transform .7s ease}
.dg-js .dg-reveal.is-in{opacity:1;transform:none}

/* ---- responsive ---- */
@media(max-width:1000px){
  .dg-grid--3,.dg-grid--4{grid-template-columns:repeat(2,1fr)}
  .dg-grid--5{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:640px){
  .dg-grid--2,.dg-grid--3,.dg-grid--4,.dg-grid--5{grid-template-columns:1fr}
  .dg-mobile-bar{display:flex}
  /* Reserve the bar's space only when the bar actually rendered (functions.php
     sets the body class) — if staff ever hide every button there is no bar AND
     no dead strip. Real clearance value is set later (5.75rem, same guard). */
  body.dg-has-mobile-bar{padding-bottom:70px}
}

/* ---- a11y ---- */
:focus-visible{outline:2px solid var(--wp--preset--color--rose);outline-offset:3px}
@media(prefers-reduced-motion:reduce){
  .dg-js .dg-reveal{opacity:1;transform:none;transition:none}
}

/* ===========================================================================
   FOUNDATION (P1) — container, header parts, footer, blog cards.
   Added alongside the header/footer template parts and the blog templates.
   Design tokens still come from theme.json (--wp--preset--*).
   =========================================================================== */

/* container that mirrors design/index.html .wrap */
.dg-wrap{max-width:var(--wp--style--global--content-size,1180px);margin-inline:auto;padding-inline:clamp(1.25rem,4vw,2rem);width:100%;box-sizing:border-box}

/* ---- header row + brand ---- */
.dg-header__row{min-height:74px;column-gap:2rem}
/* Cluster the nav + Book button on the right with a deliberate, fixed 2rem gap
   (the row's blockGap) instead of space-between stretching them apart: the auto
   inline-start margin absorbs the free space between the brand and the nav, so the
   nav↔Book gap stays constant across viewports. */
.dg-header__row > .dg-nav{margin-inline-start:auto}
.dg-brand .wp-block-site-title{font-family:var(--wp--preset--font-family--cormorant);font-weight:600;font-size:1.5rem;letter-spacing:-.01em;line-height:1}
.dg-brand .wp-block-site-title a{color:var(--wp--preset--color--ink);text-decoration:none}
.dg-brand__mark{width:26px;height:26px;border:1.5px solid var(--wp--preset--color--petrol);border-radius:50%;position:relative;flex:none;display:inline-block}
.dg-brand__mark::after{content:"";position:absolute;inset:6px;background:var(--wp--preset--color--petrol);border-radius:50% 50% 50% 0;transform:rotate(-45deg)}

/* ---- nav: rose underline on hover (native core/navigation markup) ---- */
.dg-nav .wp-block-navigation-item__content{font-weight:500;color:var(--wp--preset--color--ink);position:relative;padding-block:.25rem}
.dg-nav .wp-block-navigation-item__content::after{content:"";position:absolute;left:0;bottom:-2px;width:0;height:1.5px;background:var(--wp--preset--color--rose);transition:width .25s}
.dg-nav .wp-block-navigation-item__content:hover::after,
.dg-nav .current-menu-item>.wp-block-navigation-item__content::after{width:100%}

/* header "Book" button hides on mobile — the fixed mobile bar takes over */
/* Hide the header Book button on mobile (the fixed bottom bar carries Book there).
   Needs .dg-header to out-specify WP's .wp-block-buttons.is-layout-flex{display:flex},
   otherwise the button stays and gets crushed to a char-by-char wrap. */
@media(max-width:640px){ .dg-header .dg-hide-mobile{display:none} }

/* ---- footer (dark ink band) ---- */
.dg-footer{background:var(--wp--preset--color--ink);color:#B6C2BF;padding-top:clamp(3.5rem,7vw,5.5rem)}
.dg-footer p{font-size:.92rem;line-height:1.7}
.dg-footer a{color:#B6C2BF;text-decoration:none;transition:color .2s}
.dg-footer a:hover{color:#fff}
.dg-footer__brand{font-family:var(--wp--preset--font-family--cormorant);font-size:1.6rem;color:#fff;font-weight:600;margin-bottom:1rem}
.dg-footer__label{font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;color:#7E8E8B;font-weight:700;margin-bottom:1.2rem}
.dg-footer__links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}
.dg-footer__links li{font-size:.92rem;line-height:1.6}
/* footer Explore column rendered as the seeded Footer nav menu */
.dg-footer-nav .wp-block-navigation__container{gap:.7rem}
.dg-footer-nav .wp-block-navigation-item__content{padding:0;font-size:.92rem}
.dg-footer__map{aspect-ratio:16/10;background:linear-gradient(150deg,#1c2d2a,#0C3A40);border:1px solid #2a3b38;display:flex;align-items:center;justify-content:center;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:#6d7d7a;font-weight:700;text-align:center}
.dg-footer__bar{border-top:1px solid #263533;padding:1.6rem 0;margin-top:.5rem;font-size:.82rem;color:#7E8E8B}
.dg-footer__bar p{font-size:.82rem;color:#7E8E8B;margin:0}
.dg-footer__copy{margin:0}
.dg-footer__social a{color:#7E8E8B}

/* onDark button (white on the ink footer) */
.dg-btn-on-dark .wp-block-button__link{background:#fff;color:var(--wp--preset--color--petrol)}
.dg-btn-on-dark .wp-block-button__link:hover{background:var(--wp--preset--color--porcelain);color:var(--wp--preset--color--petrol)}

/* ---- blog / journal cards (index + archive) ---- */
.dg-post{overflow:hidden}
.dg-post__cat{text-transform:uppercase;letter-spacing:.14em;font-weight:700;margin:0;color:var(--wp--preset--color--rose-ink)}
.dg-post .wp-block-post-title{margin:.3rem 0 .5rem}
.dg-post .wp-block-post-title a{text-decoration:none}
.dg-byline .wp-block-post-author-name a{text-decoration:none}

/* ===========================================================================
   PATTERNS (P2) — section rhythm, hero, services grid.
   Ports the remaining design/index.html component rules the dg/* patterns use.
   Layout for these is CSS-driven (the .dg-* classes), so the patterns set
   blockGap:0 to avoid WP injecting competing child margins.
   =========================================================================== */

/* section rhythm + generic section heads */
.dg-section{padding-block:var(--wp--preset--spacing--80)}
.dg-lede{font-size:1.15rem;line-height:1.6;color:var(--wp--preset--color--stone);max-width:60ch;margin:0}
/* inside constrained page content every child centres; this keeps a lede on the
   left content edge (used by the gallery page intro) */
.entry-content > .dg-lede--left{margin-inline:0 !important}
.dg-head{margin-bottom:clamp(2.5rem,5vw,3.5rem)}
.dg-head--split{display:flex;justify-content:space-between;align-items:flex-end;gap:2rem;flex-wrap:wrap}
.dg-head--center{text-align:center;max-width:640px;margin-inline:auto}
.dg-head--split .dg-lede,.dg-head--center .dg-lede{margin-top:1rem}
/* Section heads use blockGap:0 + explicit margins, but browser UA margins leak
   onto the heading (~0.83em top) and float the eyebrow away from it. Zero them so
   the eyebrow→heading gap is exactly the eyebrow's own margin (a tight kicker). */
.dg-head :where(h1,h2,h3,h4){margin-block:0}

/* image placeholder panels (hero portrait etc.) */
.dg-ph{position:relative;overflow:hidden;display:flex;align-items:flex-end;height:100%;min-height:220px;padding:1.1rem 1.25rem;background:linear-gradient(150deg,#DCE6E4 0%,#C4D6D3 45%,#0C3A40 200%)}
.dg-ph__tag{font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;color:rgba(18,33,31,.55);font-weight:700;margin:0}

/* hero */
.dg-hero{padding-top:clamp(3rem,7vw,5.5rem);padding-bottom:var(--wp--preset--spacing--80)}
.dg-hero__grid{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(2rem,5vw,4.5rem);align-items:center}
.dg-hero__title em{font-style:italic;color:var(--wp--preset--color--petrol)}
.dg-hero__cta{display:flex;flex-wrap:wrap;gap:.85rem;align-items:center}
.dg-hero__cta .wp-block-buttons{margin-block:0}
.dg-hero__call{font-size:.92rem;color:var(--wp--preset--color--stone);margin:0}
.dg-hero__call a{font-weight:600;color:var(--wp--preset--color--ink);text-decoration:none}
.dg-hero__media{position:relative;aspect-ratio:4/5}
.dg-hero__media :where(img){width:100%;height:100%;object-fit:cover;display:block}
.dg-hero__badge{position:absolute;left:-18px;bottom:34px}

/* services cards — titles + copy are Inter (sans), per design */
.dg-service h3{font-family:var(--wp--preset--font-family--inter);font-size:1.32rem;font-weight:600;letter-spacing:-.01em;margin:1.4rem 0 .7rem}
.dg-service p{font-size:.96rem;line-height:1.65;color:var(--wp--preset--color--stone);margin:0}
.dg-service .dg-service__link{color:var(--wp--preset--color--petrol)}

@media(max-width:1000px){
  .dg-hero__grid{grid-template-columns:1fr}
  .dg-hero__media{max-width:440px;aspect-ratio:4/5}
}
@media(max-width:640px){
  .dg-hero__badge{left:0}
  .dg-head--split{align-items:flex-start}
}

/* ---- before/after section ---- */
.dg-ba{background:var(--wp--preset--color--white);border-block:1px solid var(--wp--preset--color--line)}
.dg-ba__grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:clamp(2rem,5vw,4rem);align-items:center}
.dg-ba__treat{display:inline-flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:600;color:var(--wp--preset--color--petrol);border:1px solid var(--wp--preset--color--line);padding:.4rem .8rem}
.dg-ba__note{font-size:.82rem;line-height:1.6;color:var(--wp--preset--color--stone);margin-top:1.6rem;padding-top:1.2rem;border-top:1px solid var(--wp--preset--color--line)}
@media(max-width:1000px){ .dg-ba__grid{grid-template-columns:1fr} }

/* ---- smile gallery (consented before/after cases → [dg_smile_gallery]) --------
   The plugin shortcode emits this markup; the consent gate guarantees only
   consented cases ever reach it. The unit is a before/after PAIR — the
   transformation is the point — laid out on a calm responsive grid, with a
   designed empty state for when no consented cases exist yet. */
.dg-gallery{padding-block:clamp(1rem,3vw,1.8rem) clamp(2.5rem,6vw,4.5rem)}
.dg-gallery__grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:clamp(1.4rem,2.6vw,2.2rem);
}
.dg-case{display:flex;flex-direction:column;background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line)}
/* Before/after pair: two rectangular crops that show the smile, split by a hairline.
   Use flex with flex-basis:0 (not grid) so each shot's width comes purely from the
   flex distribution — a grid auto-row lets an aspect-ratio item's intrinsic image
   size leak in and inflates the row, floating one shot lower than the other. */
.dg-case__pair{display:flex;align-items:flex-start;gap:1px;background:var(--wp--preset--color--line)}
.dg-case__shot{flex:1 1 0;min-width:0;position:relative;margin:0;aspect-ratio:4/5;overflow:hidden;background:var(--wp--preset--color--porcelain)}
/* The gallery lives inside .entry-content, whose prose rhythm adds margin-top:1rem
   to a <figure> that follows another <figure>. The two shots ARE adjacent figures,
   so the AFTER shot was pushed 16px down (reading as unequal heights + misaligned
   tags). Reset it with higher specificity than the .entry-content rule. */
.dg-case__pair > .dg-case__shot{margin:0}
/* Force EVERY before/after image to the same 4/5 crop, whatever the uploaded file's
   natural dimensions: fill the shot and cover-crop. Both shots are equal width →
   equal 4/5 height → the pair lines up and the tags sit at the same height. */
.dg-case__img{display:block;width:100%;height:100%;object-fit:cover}
.dg-case__tag{position:absolute;top:.65rem;left:.65rem;z-index:1;font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--wp--preset--color--ink);background:rgba(255,255,255,.85);padding:.28rem .5rem;backdrop-filter:saturate(1.2)}
.dg-case__shot--after .dg-case__tag,.dg-case__pair .dg-case__shot:last-child .dg-case__tag{left:auto;right:.65rem}
.dg-case__body{padding:1.05rem 1.15rem 1.25rem;display:flex;flex-direction:column;gap:.3rem}
.dg-case__treat{margin:0;font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:var(--wp--preset--color--petrol)}
.dg-case__title{margin:0;font-family:var(--wp--preset--font-family--cormorant);font-size:1.3rem;line-height:1.15;color:var(--wp--preset--color--ink)}
.dg-case__note{margin:.2rem 0 0;font-size:.85rem;line-height:1.55;color:var(--wp--preset--color--stone)}

/* Empty state — intentional and on-brand: a muted before/after pair (the same
   language as a real card) + honest copy. Never stock faces posing as patients. */
.dg-gallery--empty{padding-block:clamp(1.5rem,5vw,3.5rem)}
.dg-gallery__empty{max-width:600px;margin-inline:auto;text-align:center}
.dg-gallery__empty-visual{display:grid;grid-template-columns:1fr 1fr;gap:1px;max-width:400px;margin:0 auto 2.2rem;background:var(--wp--preset--color--line);border:1px solid var(--wp--preset--color--line)}
.dg-gallery__empty-shot{position:relative;aspect-ratio:4/5;display:block}
.dg-gallery__empty-shot--before{background:linear-gradient(160deg,#D8CFBE,#C9C2AE 60%,#B4B199)}
.dg-gallery__empty-shot--after{background:linear-gradient(160deg,#F3F3EF,#E7ECEA 60%,#D5E2DF)}
.dg-gallery__empty-shot::after{content:"";position:absolute;inset:0;background:rgba(242,245,244,.35)}
.dg-gallery__empty-shot .dg-case__tag{color:rgba(18,33,31,.55)}
.dg-gallery__empty-shot--after .dg-case__tag{left:auto;right:.65rem}
.dg-gallery__empty-h{font-family:var(--wp--preset--font-family--cormorant);font-size:clamp(1.55rem,3.2vw,2.1rem);line-height:1.1;letter-spacing:-.01em;color:var(--wp--preset--color--ink);margin:0 0 .9rem}
.dg-gallery__empty-p{font-size:.98rem;line-height:1.65;color:var(--wp--preset--color--stone);margin:0 auto;max-width:44ch}
.dg-gallery__empty-cta{margin:1.8rem 0 0}

/* ---- reviews (query loop → dg_testimonial) ---- */
.dg-rev-grid{gap:1.25rem}
.dg-review__stars{color:var(--wp--preset--color--rose);letter-spacing:.1em;margin:0 0 1.1rem}
/* filled/empty split emitted by the plugin's dg/rating block: filled stars keep the bright rose above; empties fade back so a 4★ review reads as 4-of-5 (aria-label carries the exact value) */
.dg-review__stars-on{color:inherit}
.dg-review__stars-off{opacity:.3}
.dg-review__q{margin:0}
.dg-review__q p{margin:0}
/* name is core/post-title — scope under .dg-review to beat theme.json's serif post-title (keeps it Inter, per design) */
.dg-review .dg-review__nm{font-family:var(--wp--preset--font-family--inter);font-size:.9rem;font-weight:600;line-height:1.25;margin:0}
.dg-review__src{font-size:.75rem;color:var(--wp--preset--color--stone);display:flex;align-items:center;gap:.3rem;margin:.15rem 0 0}
.dg-review__src svg{width:13px;height:13px;flex:none}
.dg-review__av{background:var(--wp--preset--color--petrol);color:#fff;font-family:var(--wp--preset--font-family--cormorant)}
.dg-reviews__foot{margin-top:2.2rem;display:flex;align-items:center;gap:1.2rem;flex-wrap:wrap}
.dg-reviews__score{display:flex;align-items:center;gap:.65rem;font-size:.95rem}
.dg-reviews__score b{font-family:var(--wp--preset--font-family--cormorant);font-size:1.6rem;font-weight:600;color:var(--wp--preset--color--petrol);line-height:1}
.dg-reviews__score small{color:var(--wp--preset--color--stone)}

/* post-template wraps each card in an <li> grid cell; make the card fill it so
   bordered cards keep a shared bottom edge when quotes differ in length */
.dg-rev-grid>li{display:flex}
/* reviews responsive: 3 → 2 (tablet) → 1, matching the design (doubled class beats WP's grid-layout rule) */
@media(max-width:1000px){ .dg-rev-grid.dg-rev-grid{grid-template-columns:repeat(2,1fr)} }
@media(max-width:640px){ .dg-rev-grid.dg-rev-grid{grid-template-columns:1fr} }

/* hairline ghost button (design .btn--ghost) — core is-style-outline draws a
   heavy 2px currentColor border with the wrong padding/hover */
.dg-btn-ghost .wp-block-button__link{background:transparent;color:var(--wp--preset--color--ink);border:1px solid var(--wp--preset--color--line);padding:.95rem 1.7rem}
.dg-btn-ghost .wp-block-button__link:hover{background:transparent;border-color:var(--wp--preset--color--petrol);color:var(--wp--preset--color--petrol)}

/* ---- shared: intentional empty state for the CPT query loops (pre-seed) ---- */
.dg-empty{border:1px dashed var(--wp--preset--color--line);background:var(--wp--preset--color--white);padding:clamp(2rem,5vw,3.5rem);text-align:center;color:var(--wp--preset--color--stone);font-size:.96rem;line-height:1.6}

/* ---- first-visit steps (titles are Inter, per design) ---- */
.dg-step h3{font-family:var(--wp--preset--font-family--inter);font-size:1.05rem;font-weight:600;letter-spacing:0;margin:1.1rem 0 .5rem}
.dg-step p{font-size:.9rem;line-height:1.6;color:var(--wp--preset--color--stone);margin:0}

/* ---- brand story band (petrol) ---- */
.dg-story{background:var(--wp--preset--color--petrol)}
.dg-story__grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,6vw,5rem);align-items:center}
.dg-story h2{color:#fff}
.dg-story p{color:#B9CBC9;font-size:1.08rem;line-height:1.7;margin:1.5rem 0 0}
.dg-story__q{font-family:var(--wp--preset--font-family--cormorant);font-style:italic;font-size:clamp(1.5rem,3vw,2.1rem);line-height:1.4;color:#fff;border-left:2px solid var(--wp--preset--color--rose);padding-left:1.6rem;margin:0}
/* the quote's inner <p> must take the blockquote styling, not the .dg-story p body rule */
.dg-story__q p{margin:0;color:#fff;font-size:inherit;line-height:inherit}
@media(max-width:1000px){ .dg-story__grid{grid-template-columns:1fr} }

/* ---- team (query loop → dg_practitioner); gapped grid, not the hairline helper ---- */
.dg-team-grid{gap:1.25rem}
.dg-team-grid>li{display:flex}
/* The li is a flex row, so the card must fill its cell (width:100%) — otherwise it
   shrinks to its name/role text and the 3/4 panel renders at different widths per
   card, leaving a ragged grid with names on different baselines. */
.dg-mem{display:flex;flex-direction:column;width:100%}
.dg-mem__ph{aspect-ratio:3/4;background:linear-gradient(160deg,#D3DEDB,#0C3A40 260%)}
/* Practitioner portrait: featured image when set, placeholder panel when not.
   The featured image renders first; when present it hides the panel that follows.
   aspectRatio on the block + WP's width/height attrs hold the space (no CLS). */
.dg-mem__img{margin:0;overflow:hidden}
/* Clamp real portraits to the same 3/4 as the placeholder panel so every card is
   the same height and the names sit on one baseline (uniform team-grid rhythm). */
.dg-mem__img img{width:100%;aspect-ratio:3/4;object-fit:cover;display:block}
.dg-mem__img + .dg-mem__ph{display:none}
/* Bio page portrait (single-dg_practitioner) — wide 4/3 with the same fallback. */
.dg-bio__img img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.dg-bio__ph{aspect-ratio:4/3;margin:1.5rem 0 2rem;background:linear-gradient(150deg,#DCE6E4,#C4D6D3 60%,#0C3A40 260%)}
.dg-bio__img + .dg-bio__ph{display:none}
/* Breathing space between the portrait and the caption. Driven by the name's own
   top margin (not the image figure's bottom margin) so it holds regardless of how
   the featured-image block renders its figure — image cards and placeholder cards
   both get the same clear gap. */
.dg-mem .dg-mem__nm{font-size:1.15rem;font-weight:600;margin:1.25rem 0 0}
.dg-mem__nm a{color:inherit;text-decoration:none;transition:color .2s}
.dg-mem__nm a:hover,.dg-mem__nm a:focus-visible{color:var(--wp--preset--color--rose-ink)}
.dg-mem__role{font-size:.82rem;color:var(--wp--preset--color--stone);margin:.15rem 0 0}
@media(max-width:1000px){ .dg-team-grid.dg-team-grid{grid-template-columns:repeat(3,1fr)} }
@media(max-width:640px){ .dg-team-grid.dg-team-grid{grid-template-columns:1fr} }

/* ---- journal cards (query loop → Posts) ---- */
.dg-blog-grid{gap:1.25rem}
.dg-blog-grid>li{display:flex}
.dg-post{display:flex;flex-direction:column}
/* always-present image band: shows the gradient placeholder, hidden when the post has a featured image (so image-less posts don't lose their top band) */
.dg-post::before{content:"";display:block;aspect-ratio:16/10;background:linear-gradient(150deg,#DCE6E4,#C4D6D3 70%,#0C3A40 260%)}
.dg-post:has(.dg-post__img)::before{display:none}
.dg-post__img{margin:0}
.dg-post__img img{aspect-ratio:16/10;object-fit:cover;width:100%}
.dg-post__body{display:flex;flex-direction:column;flex:1;padding:1.6rem 1.5rem 1.8rem}
.dg-post .dg-post__ttl{font-size:1.4rem;font-weight:600;line-height:1.25;margin:.8rem 0 .9rem}
.dg-post .dg-post__ttl a{text-decoration:none}
.dg-post__excerpt{font-size:.92rem;line-height:1.6;color:var(--wp--preset--color--stone);margin:0}
.dg-post__meta{margin-top:auto;font-size:.8rem;color:var(--wp--preset--color--stone);padding-top:1.1rem;display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}
.dg-post__meta .wp-block-post-author-name,.dg-post__meta .wp-block-post-date{font-size:.8rem;color:var(--wp--preset--color--stone)}
.dg-post__meta .wp-block-post-author-name a{text-decoration:none}
@media(max-width:1000px){ .dg-blog-grid.dg-blog-grid{grid-template-columns:repeat(2,1fr)} }
@media(max-width:640px){ .dg-blog-grid.dg-blog-grid{grid-template-columns:1fr} }

/* ===========================================================================
   CONTENT PAGES (P3) — the CTA callout + FAQ accordion the md->blocks seeder
   (DG_Content_Seeder) emits. Native <details> keeps the accordion no-JS.
   =========================================================================== */
/* In-content CTA callout (converter output: a blockquote carrying a [button]).
   Lay it out as an intentional horizontal banner — the bold lead becomes its own
   Cormorant line, the supporting sentence sits under it, and the petrol button is
   pinned to the right (wraps under on narrow screens). */
.dg-cta{
  background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);
  border-left:3px solid var(--wp--preset--color--rose);padding:clamp(1.5rem,3vw,2.1rem);margin-block:2.5rem;
  display:flex;align-items:center;justify-content:space-between;gap:clamp(1.25rem,3vw,2.5rem);flex-wrap:wrap;
}
.dg-cta>p{flex:1 1 320px;margin:0;color:var(--wp--preset--color--stone);line-height:1.55}
.dg-cta>p strong{display:block;font-family:var(--wp--preset--font-family--cormorant);font-weight:600;font-size:1.35rem;line-height:1.2;letter-spacing:-.01em;color:var(--wp--preset--color--ink);margin-bottom:.3rem}
.dg-cta .wp-block-buttons{flex:0 0 auto;margin:0}
.dg-cta>p{margin:0 0 1.1rem;font-size:1.08rem}
.dg-cta .wp-block-buttons{margin:0}

.dg-faq{border-bottom:1px solid var(--wp--preset--color--line)}
.dg-faq summary{list-style:none;cursor:pointer;font-weight:600;font-size:1.05rem;padding:1.1rem 2rem 1.1rem 0;position:relative}
.dg-faq summary::-webkit-details-marker{display:none}
/* The +/− toggle glyph as two hairline bars (not swapped text content, so it can
   animate): ::before is the fixed horizontal stroke, ::after the vertical one,
   which rotates onto the horizontal when open — plus melts into minus. */
.dg-faq summary::before,
.dg-faq summary::after{content:"";position:absolute;right:.3rem;top:1.75rem;width:14px;height:2px;background:var(--wp--preset--color--petrol);transition:transform .25s ease-out}
.dg-faq summary::after{transform:rotate(90deg)}
.dg-faq[open] summary::after{transform:rotate(0deg)}
.dg-faq p{margin:0 0 1.1rem;color:var(--wp--preset--color--stone)}
/* Smooth open/close. <details> can't transition height:auto classically; the
   modern pair interpolate-size + ::details-content can — and browsers without
   them simply skip this whole block (native instant open/close, no max-height
   hack to jump on long answers). content-visibility must transition discretely
   (allow-discrete) or the closing animation would be cut off. */
@supports (interpolate-size: allow-keywords){
  .dg-faq{interpolate-size:allow-keywords}
  .dg-faq::details-content{opacity:0;block-size:0;overflow:clip;transition:block-size .25s ease-out,opacity .25s ease-out,content-visibility .25s allow-discrete}
  .dg-faq[open]::details-content{opacity:1;block-size:auto}
}
@media(prefers-reduced-motion:reduce){
  .dg-faq summary::before,.dg-faq summary::after,.dg-faq::details-content{transition:none}
}

/* ===========================================================================
   SERVICE PAGES (P9) — chrome the page-service template wraps around the seeded
   copy: breadcrumb, content rhythm, and the closing book CTA band.
   =========================================================================== */
/* padding-BLOCK only — the inline padding must stay .dg-wrap's clamp() so the
   breadcrumb (and everything below it) shares the header's container edges.
   The old `padding:1.4rem 0 0` shorthand zeroed the wrap's inline padding and
   pushed the whole service-page interior 32px left of the header logo. */
.dg-crumb{padding-block:1.4rem 0;gap:.5rem;align-items:center;font-size:.8rem}
.dg-crumb p{margin:0;color:var(--wp--preset--color--stone)}
.dg-crumb__i a{color:var(--wp--preset--color--stone);text-decoration:none}
.dg-crumb__i a:hover,.dg-crumb__i a:focus-visible{color:var(--wp--preset--color--rose-ink)}
.dg-crumb__sep{color:var(--wp--preset--color--line)}
/* The current-page crumb is a core/post-title, which inherits the Cormorant
   heading font — in a breadcrumb that reads as a stray serif next to the sans
   trail. Force Inter so the whole breadcrumb is one consistent, refined line. */
.dg-crumb__here{font-family:var(--wp--preset--font-family--inter);font-weight:600;color:var(--wp--preset--color--ink);line-height:1.35}

/* Top: real breathing room below the breadcrumb before the large Cormorant H1 (a
   display title needs more air above it than body copy). Bottom: 0 — the section
   that follows (team) brings its own top padding, so the two don't stack into a
   yawning gap. The last content block's bottom margin is zeroed for the same reason. */
/* ---- two-column service layout: reading column + sticky right rail ----
   Column 1 = the article (measure still capped at 64ch — the empty right half
   is solved by the rail, never by stretching body text). Column 2 = a sticky
   rail: on-page H2 nav (scrollspy, built by theme.js) + compact booking card.
   Below 1024px the rail disappears and the page is the single column it was. */
.dg-service-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;column-gap:clamp(2.5rem,5vw,4.5rem);align-items:start}
/* no own block padding — the layout is injected INSIDE .dg-article (which
   already pads 3rem), so both columns start on the same line */
.dg-service-rail{position:sticky;top:calc(74px + 1.5rem);display:flex;flex-direction:column;gap:1.25rem}
@media(max-width:1024px){
  .dg-service-layout{display:block}
  .dg-service-rail{display:none}
}

/* on-page nav — Enamel hairline voice: quiet stone links on a 1px rule,
   the active section marked by a rose rule + petrol text */
.dg-service-toc__label{font-size:var(--wp--preset--font-size--eyebrow);font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--wp--preset--color--stone);margin:0 0 .8rem}
.dg-service-toc__list{list-style:none;margin:0;padding:0}
.dg-service-toc__list a{display:block;font-size:.88rem;font-weight:500;line-height:1.4;color:var(--wp--preset--color--stone);text-decoration:none;padding:.45rem 0 .45rem 1rem;border-left:1px solid var(--wp--preset--color--line);transition:color .2s,border-color .2s}
.dg-service-toc__list a:hover,.dg-service-toc__list a:focus-visible{color:var(--wp--preset--color--petrol)}
.dg-service-toc__list a.is-active{color:var(--wp--preset--color--petrol);border-left:2px solid var(--wp--preset--color--rose);padding-left:calc(1rem - 1px);font-weight:600}

/* compact booking card */
.dg-rail-card{background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);padding:1.5rem 1.4rem}
.dg-rail-card .dg-eyebrow{margin-bottom:.6rem}
.dg-rail-card__t{margin:0 0 1.1rem;font-size:.9rem;line-height:1.55;color:var(--wp--preset--color--stone)}
.dg-rail-card__btn{display:block;text-align:center;background:var(--wp--preset--color--petrol);color:var(--wp--preset--color--white);font-weight:600;font-size:var(--wp--preset--font-size--small);padding:.85rem 1.5rem;text-decoration:none;transition:background .2s}
.dg-rail-card__btn:hover,.dg-rail-card__btn:focus-visible{background:var(--wp--preset--color--petrol-2);color:var(--wp--preset--color--white)}
.dg-rail-card__call{margin:.8rem 0 0;font-size:.82rem;color:var(--wp--preset--color--stone);text-align:center}
.dg-rail-card__call a{color:var(--wp--preset--color--petrol);font-weight:600;text-decoration:none}

/* anchor jumps land clear of the sticky header; smooth only when motion is OK */
.entry-content :where(h2,h3){scroll-margin-top:104px}
@media(prefers-reduced-motion:no-preference){ html{scroll-behavior:smooth} }

.dg-article{padding-block:3rem 0}
/* inside the service layout the wrap already carries the page's inline padding —
   strip the constrained entry-content's has-global-padding so the H1/body sit
   exactly on the wrap edge, flush with the breadcrumb and the header logo */
.dg-service-copy .entry-content{padding-inline:0}
.dg-article .entry-content > :last-child{margin-block-end:0}
/* The constrained layout centres every child (margin-inline:auto). Combined with
   the prose max-widths below, that shoves the H1 and body into a narrow column
   floated to the right, off the content grid the left-aligned breadcrumb sits on.
   Left-align them to the grid edge instead so H1, body and breadcrumb share one
   left margin; the max-widths still cap the reading measure (ragged right). */
.dg-article .entry-content > :where(:not(.alignwide):not(.alignfull)){margin-inline:0 !important}
.dg-article h1{font-size:var(--wp--preset--font-size--xxl);line-height:1.05;letter-spacing:-.01em;max-width:22ch}
.dg-article :where(p,li){max-width:64ch}

/* ---------------------------------------------------------------------------
   ONE PROSE RHYTHM for all page content (service pages, About, Contact, Book,
   Smile gallery — anything rendered inside .entry-content). This reconciles the
   three competing spacing sources (theme.json blockGap, .dg-article rem margins,
   and leaked browser UA margins) into a single scale:
     space ABOVE a heading  >  space BELOW it  >  space between paragraphs
   Opposing margins are zeroed (not collapsed) so every gap is exactly one value.
   --------------------------------------------------------------------------- */
.entry-content :where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,figure,blockquote,.wp-block-image,.wp-block-list){margin-block:0}
.entry-content :where(p,ul,ol,dl,blockquote,figure,.wp-block-image) + :where(p,ul,ol,dl,blockquote,figure,.wp-block-image){margin-block-start:1rem}   /* paragraph rhythm = 16 */
.entry-content :where(h1){margin-block:0 1.5rem}   /* h1 → body   : 24 */
.entry-content :where(h2){margin-block:3rem 1.5rem}   /* above 48 · below 24 */
.entry-content :where(h3){margin-block:2rem .75rem}   /* above 32 · below 12 */
.entry-content :where(h4){margin-block:1.5rem .5rem}  /* above 24 · below  8 */
.entry-content > :where(h1,h2,h3,h4):first-child{margin-block-start:0}

.dg-service-cta{background:var(--wp--preset--color--petrol);color:#fff}
.dg-service-cta__in{padding-block:clamp(3rem,6vw,4.6rem);text-align:center;max-width:640px}
.dg-service-cta .dg-eyebrow{color:#D9A9A4}
.dg-service-cta__h{color:#fff;font-size:var(--wp--preset--font-size--xl);margin:.4rem 0 1rem}
.dg-service-cta .dg-lede{color:rgba(255,255,255,.82);margin:0 auto 1.8rem;max-width:52ch}
.dg-service-cta__row{display:flex;align-items:center;justify-content:center;gap:1.3rem;flex-wrap:wrap}
.dg-service-cta__call{margin:0;font-size:.92rem;color:rgba(255,255,255,.72)}
.dg-service-cta__call a{color:#fff;text-decoration:none;font-weight:600}
.dg-service-cta .wp-block-button__link{background:#fff;color:var(--wp--preset--color--petrol)}
.dg-service-cta .wp-block-button__link:hover{background:var(--wp--preset--color--porcelain)}

/* ===========================================================================
   RESPONSIVE FIXES + SERVICES DROPDOWN
   R1 shade overflow · R2 menu tap targets · R3 link padding · header submenu.
   =========================================================================== */
/* R1 — the shade strip's two nowrap labels + a min-width scale forced horizontal
   overflow (61px @768; layout-viewport expansion @375). Stack it below 960px so
   nothing is pinned side-by-side and the scale can shrink to full width. */
@media(max-width:960px){
  .dg-shade__row{flex-direction:column;align-items:flex-start;gap:.9rem}
  .dg-shade__label{white-space:normal}
  .dg-shade__scale{width:100%;min-width:0;flex:none}
}
/* R2 — 44px tap targets. The hamburger (open button) must show only while the
   inline nav is hidden. That's now everything up to 920px: below 600 core swaps
   to the overlay itself, and 600–920 is the tablet band where the full nav +
   CTA can't share the row (the header block above hides the inline nav there). */
.dg-nav .wp-block-navigation__responsive-container-open{display:none !important}
@media(max-width:920px){
  .dg-nav .wp-block-navigation__responsive-container-open{display:flex !important;min-width:44px;min-height:44px;align-items:center;justify-content:center}
}
.dg-nav .wp-block-navigation__responsive-container-close{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
/* R3 — a little more height on the card "Learn more" and the header nav links. */
.dg-service__link{padding-block:.5rem}
/* Composed top-level nav: refined size + subtle tracking, generous item spacing. */
.dg-nav .wp-block-navigation-item__content{padding-block:.55rem;font-size:.9rem;font-weight:500;letter-spacing:.03em}
.dg-nav ul.wp-block-navigation__container{gap:clamp(1.5rem,2.1vw,2.4rem)}
/* Header "Services" dropdown — Enamel-styled menu: soft elevation, padding
   rhythm, porcelain/petrol hover, rounded rows. */
.dg-nav .wp-block-navigation__submenu-container{
  background:var(--wp--preset--color--white);border:1px solid var(--wp--preset--color--line);
  border-radius:3px;box-shadow:0 18px 44px -14px rgba(12,58,64,.28);
  min-width:262px;padding:.5rem;margin-top:.7rem;
}
.dg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item{width:100%}
.dg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
  display:block;padding:.55rem .95rem;border-radius:2px;font-size:.85rem;font-weight:500;letter-spacing:.01em;
  color:var(--wp--preset--color--ink);white-space:nowrap;transition:background .15s,color .15s;
}
.dg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.dg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible{
  background:var(--wp--preset--color--porcelain);color:var(--wp--preset--color--petrol);
}
.dg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after{display:none}
/* Footer treatments column shares the footer link styling. */
.dg-footer__links a{color:#B6C2BF;text-decoration:none}
.dg-footer__links a:hover{color:#fff}

/* Mobile bar icons had no size constraint → rendered ~88px. Constrain to ~20px. */
.dg-mobile-bar svg{width:20px;height:20px;flex:none}
.dg-mobile-bar a{padding:.55rem}
/* The fixed bar was overlapping page content (the hero). Give the page bottom
   clearance ≥ the bar's height (~84px) so nothing hides behind it (≤640px).
   Gated on .dg-has-mobile-bar: no rendered bar → no reserved strip either. */
@media(max-width:640px){ body.dg-has-mobile-bar{padding-bottom:5.75rem} }
/* Hide the bar while the full-screen menu overlay is open (WP sets has-modal-open
   on <html>) — otherwise it floats over the menu and its bottom items. */
.has-modal-open .dg-mobile-bar{display:none}

/* Mobile nav overlay — own the full-screen panel. WP's core overlay CSS wasn't
   fully applying: the container computed height:0 (a strip) and the nav items
   inherited align-items:flex-end from the desktop justify:right layout (links
   jammed right). Force full height + left alignment. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open{
  position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100dvh !important;
  box-sizing:border-box;
  z-index:100000;background:var(--wp--preset--color--porcelain);
  padding:1.5rem 1.5rem 2rem;overflow-y:auto;
  display:flex;flex-direction:column;justify-content:flex-start;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{
  width:100%;height:auto;align-items:flex-start !important;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item{
  align-items:flex-start !important;text-align:left;
}
/* Overlay vertical rhythm: tight and even — padding-block sets the beat, not gaps. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container{
  flex-direction:column;gap:.1rem;width:100%;
}
/* Top-level items are the strongest voice: large, semibold, ink. Only the direct
   children of the overlay list + the Services toggle — never the nested links. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle{
  font-size:1.5rem;font-weight:600;color:var(--wp--preset--color--ink);
  padding-block:.5rem;white-space:normal;text-align:left;letter-spacing:0;line-height:1.2;
}
/* Services children: clearly subordinate — smaller, lighter, muted — grouped as a
   set on a hairline rail with a modest, deliberate indent (no floating dropdown
   box). Selector mirrors WP core's own overlay rule so it out-specifies the 2rem
   indent + border reset WP forces here. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container{
  position:static;box-shadow:none;background:transparent;min-width:0;
  display:flex;flex-direction:column;gap:0;
  border:0;border-left:1px solid var(--wp--preset--color--line);
  margin:.2rem 0 .8rem .1rem;padding-left:1.15rem;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
  font-size:1.02rem;font-weight:400;color:var(--wp--preset--color--stone);
  padding-block:.32rem;letter-spacing:0;line-height:1.3;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible{
  color:var(--wp--preset--color--petrol);
}
/* Kill the raw rose selection/active box on the overlay items — the rose
   underline (__content::after, full-width on hover/current/expanded) reads as a
   stray selection box in the overlay; neutralise it plus the default outline +
   tap highlight, and give focus an intentional petrol treatment instead. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle{
  background:transparent;-webkit-tap-highlight-color:transparent;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle::after{display:none}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="true"]{
  background:transparent;box-shadow:none;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle:focus{outline:none}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible,
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle:focus-visible{
  outline:none;color:var(--wp--preset--color--petrol);
}
/* Close button: the header's backdrop-filter makes fixed/absolute resolve against
   the header (off-screen), so position it IN FLOW instead — make its parent
   dialog a column and float the close to the top-right with flex order. */
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog{
  display:flex;flex-direction:column;width:100%;
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close{
  position:static;order:-1;align-self:flex-end;margin:0 0 1rem;color:var(--wp--preset--color--ink);
}
.dg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg{width:26px;height:26px}

/* ===========================================================================
   "INSIDE OUR CLINIC" GALLERY — the [dg_clinic_gallery] mixed photo/video grid
   (plugin emits the markup; presentation + lightbox behavior live theme-side).
   Grid tiles are uniform 4:3 crops; a video tile is its poster + play glyph +
   duration badge — no <video>/<iframe> exists until the lightbox opens.
   =========================================================================== */
.dg-cg__grid{list-style:none;margin:2rem 0 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
@media(max-width:1000px){.dg-cg__grid{grid-template-columns:repeat(2,1fr);gap:.8rem}}
.dg-cg__cell{margin:0}
.dg-cg__tile{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;background:var(--wp--preset--color--porcelain);border:1px solid var(--wp--preset--color--line)}
.dg-cg__tile .dg-cg__img,.dg-cg__tile img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.dg-cg__tile:hover img,.dg-cg__tile:focus-visible img{transform:scale(1.04)}
.dg-cg__img--blank{background:linear-gradient(160deg,var(--wp--preset--color--petrol),#0E3538)}
.dg-cg__play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;pointer-events:none}
.dg-cg__play svg{width:52px;height:52px;padding:13px;box-sizing:border-box;background:rgba(16,42,45,.6);border:1px solid rgba(255,255,255,.35);border-radius:50%;backdrop-filter:blur(2px)}
.dg-cg__dur{position:absolute;right:.55rem;bottom:.55rem;background:rgba(10,22,24,.72);color:#fff;font-size:.7rem;font-weight:600;letter-spacing:.04em;padding:.16rem .45rem;font-variant-numeric:tabular-nums}
@media(prefers-reduced-motion:reduce){.dg-cg__tile img{transition:none}}

/* ---- lightbox (theme.js builds it; hidden until a tile is opened) ---- */
html.dg-lb-open{overflow:hidden}
.dg-lb{position:fixed;inset:0;z-index:120;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(11,24,26,.94);padding:3.5rem 1rem 2rem}
.dg-lb[hidden]{display:none}
.dg-js .dg-lb:not([hidden]){animation:dg-lb-in .2s ease-out}
@keyframes dg-lb-in{from{opacity:0}to{opacity:1}}
.dg-lb__stage{margin:0;display:flex;align-items:center;justify-content:center;max-width:min(1100px,94vw)}
.dg-lb__stage img,.dg-lb__stage video{display:block;max-width:94vw;max-height:74vh;width:auto;height:auto;background:#000}
.dg-lb__stage iframe{display:block;border:0;width:min(1100px,94vw);aspect-ratio:16/9;max-height:74vh;background:#000}
.dg-lb__caption{color:#D9E2E0;font-size:.92rem;line-height:1.5;margin:1rem 0 0;text-align:center;max-width:70ch}
.dg-lb__count{color:#8FA6A3;font-size:.75rem;letter-spacing:.1em;margin:.4rem 0 0}
.dg-lb__btn{position:absolute;display:flex;align-items:center;justify-content:center;width:44px;height:44px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.28);color:#fff;cursor:pointer;padding:0}
.dg-lb__btn:hover{background:rgba(255,255,255,.16)}
.dg-lb__btn svg{width:22px;height:22px}
.dg-lb__close{top:.9rem;right:.9rem}
.dg-lb__prev{left:.7rem;top:50%;transform:translateY(-50%)}
.dg-lb__next{right:.7rem;top:50%;transform:translateY(-50%)}
@media(max-width:640px){
  .dg-lb{padding:3.2rem .5rem 4.5rem}
  /* keep arrows off the media on small screens — park them at the bottom */
  .dg-lb__prev,.dg-lb__next{top:auto;bottom:.9rem;transform:none}
  .dg-lb__prev{left:.9rem}
  .dg-lb__next{right:.9rem}
}
@media(prefers-reduced-motion:reduce){.dg-js .dg-lb:not([hidden]){animation:none}}

/* =========================================================================== 
   CLINIC GALLERY — uniform hairline grid of square photos + Enamel lightbox.
   Markup = core Gallery block (client-editable from the Media Library) inside
   .dg-clinic-gallery.dg-lightbox (see the dg/clinic-gallery pattern). The grid
   is the signature 1px-line grid; captions stay out of the grid and appear in
   the lightbox. theme.js drives .dg-lightbox (arrows / Esc / swipe).
   =========================================================================== */
.dg-clinic-gallery .wp-block-gallery{display:grid !important;grid-template-columns:repeat(3,1fr);gap:1px !important;background:var(--wp--preset--color--line);border:1px solid var(--wp--preset--color--line);margin:0}
.dg-clinic-gallery .wp-block-gallery .wp-block-image{margin:0 !important;width:auto !important;overflow:hidden;background:var(--wp--preset--color--white)}
.dg-clinic-gallery .wp-block-gallery .wp-block-image a{display:block}
.dg-clinic-gallery .wp-block-gallery .wp-block-image img{display:block;width:100% !important;height:auto;aspect-ratio:1/1;object-fit:cover;transition:transform .45s ease}
.dg-clinic-gallery .wp-block-gallery .wp-block-image:hover img{transform:scale(1.03)}
.dg-clinic-gallery .wp-block-gallery figcaption{display:none} /* captions live in the lightbox */
@media(max-width:1000px){ .dg-clinic-gallery .wp-block-gallery{grid-template-columns:repeat(2,1fr)} }
@media(prefers-reduced-motion:reduce){ .dg-clinic-gallery .wp-block-gallery .wp-block-image img{transition:none} .dg-clinic-gallery .wp-block-gallery .wp-block-image:hover img{transform:none} }

/* ---- lightbox overlay (built by theme.js only when a .dg-lightbox gallery
        exists; with JS off the photo links open the image file directly) ---- */
.dg-lightbox-overlay{position:fixed;inset:0;z-index:120;background:rgba(18,33,31,.97);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:clamp(1rem,4vw,3rem)}
.dg-lightbox-overlay[hidden]{display:none}
.dg-lightbox-overlay img{max-width:min(1100px,92vw);max-height:78vh;display:block;background:var(--wp--preset--color--white)}
.dg-lightbox-overlay figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:.9rem}
.dg-lightbox-overlay figcaption{color:#EAF0EF;font-size:.9rem;line-height:1.5;text-align:center;max-width:60ch}
.dg-lightbox__count{color:#9DB0AD;font-size:var(--wp--preset--font-size--eyebrow);font-weight:700;letter-spacing:.18em;text-transform:uppercase}
.dg-lightbox__btn{position:absolute;background:transparent;border:1px solid rgba(234,240,239,.28);color:#EAF0EF;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.1rem;line-height:1;transition:border-color .2s,background .2s}
.dg-lightbox__btn:hover,.dg-lightbox__btn:focus-visible{border-color:#EAF0EF;background:rgba(234,240,239,.08)}
.dg-lightbox__close{top:clamp(.75rem,2vw,1.5rem);right:clamp(.75rem,2vw,1.5rem)}
.dg-lightbox__prev{left:clamp(.5rem,2vw,1.5rem);top:50%;transform:translateY(-50%)}
.dg-lightbox__next{right:clamp(.5rem,2vw,1.5rem);top:50%;transform:translateY(-50%)}
@media(max-width:640px){
  .dg-lightbox__prev,.dg-lightbox__next{top:auto;bottom:.9rem;transform:none}
  .dg-lightbox__prev{left:.9rem}
  .dg-lightbox__next{right:.9rem}
}
