/* DAM Flow 1.6.6 — logical properties enable RTL and LTR without duplicated styles. */
:root {
    --dam-brand: #dd3333;
    --dam-brand-dark: #a82222;
    --dam-accent: #e60000;
    --dam-brand-tint: #fff0f2; /* Derived light tint: not extracted from OceanWP CSS. */
    --dam-emphasis-text: #711522;
    --dam-brand-soft: #fc8a95;
    --dam-topbar: #64a7d8;
    --dam-footer: #232629;
    --dam-ink: #494949;
    --dam-page-bg: #ffffff;
    --dam-card-bg: #ffffff;
    --dam-nav-bg: rgb(255 255 255 / 94%);
    --dam-nav-bg-solid: #ffffff;
    --dam-nav-border: rgb(221 51 51 / 16%);
    --dam-nav-text: #29343e;
    --dam-nav-hover: #fff0f2;
    --dam-input-bg: #ffffff;
    --dam-link: #b92832;
    --dam-nav-pill-shadow: 0 12px 40px rgb(16 26 43 / 17%);
    --dam-surface: #fff7f8;
    --dam-muted: #616161;
    --dam-news-bg: #f3f6f8;
    --dam-banner-bg: linear-gradient(125deg, #fff7f8, #ffffff);
    --dam-white: #fff;
    --dam-border: #eadfe2;
    --dam-shadow: 0 20px 55px rgb(28 34 48 / 9%);
    --dam-radius: 20px;
    --dam-container: 100%;
    --dam-content-max: 1360px;
    --dam-article-width: 940px;
    --dam-left-sidebar-width: 330px;
    --dam-right-sidebar-width: 300px;
    --dam-sidebar-gap: 32px;
}
*, *::before, *::after { box-sizing: border-box; }
html[dir="rtl"] .site { direction: rtl; }
html[dir="ltr"] .site { direction: ltr; }
html { scroll-behavior: smooth; scroll-padding-top: 115px; width: 100%; max-width: 100%; overflow-x: clip; overscroll-behavior-x: none; }
body { width: 100%; max-width: 100%; overflow-x: clip; overscroll-behavior-x: none; margin: 0; margin-inline: 0 !important; text-align: start; color: var(--dam-ink); background: var(--dam-page-bg); font: 400 16px/1.72 "Heebo", Arial, sans-serif; overflow-wrap: break-word; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--dam-link); text-decoration: none; }
a:hover { color: var(--dam-brand); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ec9b44; outline-offset: 3px; }
[hidden] { display: none !important; }
.container { width: min(calc(100% - 48px), var(--dam-container)); margin-inline: auto; }
#page { width: 100%; min-width: 0; max-width: 100%; overflow-x: clip; margin-inline: 0; }
/* Keep the header, utility strip, and all footer regions full-width. Only main content is bounded. */
.site-main .container { width: min(calc(100% - 48px), var(--dam-content-max)); max-width: 100%; margin-inline: auto; }
.site-main { min-width: 0; max-width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus, .skip-link:focus { width: auto; height: auto; clip: auto; margin: 0; padding: 10px 18px; position: fixed !important; z-index: 10001; inset-block-start: 8px; inset-inline-start: 8px; background: var(--dam-nav-bg-solid); border-radius: 8px; color: var(--dam-ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid transparent; border-radius: 11px; padding: 12px 22px; font-size: .96rem; font-weight: 700; line-height: 1.5; text-align: center; min-height: 46px; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--dam-brand); color: var(--dam-white); }
.button-primary:hover { background: var(--dam-brand-dark); color: var(--dam-white); }
.button-light { background: var(--dam-white); color: var(--dam-brand-dark); }
.button-light:hover { background: var(--dam-brand-tint); color: var(--dam-brand-dark); }
.button-outline-light { background: transparent; border-color: rgb(255 255 255 / 65%); color: var(--dam-white); }
.button-outline-light:hover { background: rgb(255 255 255 / 12%); color: var(--dam-white); }
.text-link { font-weight: 700; color: var(--dam-link); }
.text-link:hover { color: var(--dam-brand); }
/* Header – a self-contained floating surface, never a full-width white strip. */
.utility-bar { background: var(--dam-topbar); color: #122b3e; font-size: .86rem; }
.utility-bar-inner { min-height: 37px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.utility-bar a { color: #122b3e; }
.utility-bar a:hover { color: #122b3e; text-decoration: underline; }
.utility-message { font-weight: 600; color: #122b3e; }
.utility-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.utility-actions a { display: inline-flex; align-items: center; gap: 5px; }
.header-utility-widgets { display: flex; align-items: center; gap: 10px; }
.header-utility-widgets select { color: #1e3046; font-size: .82rem; }
.site-header {
    --dam-header-space: 112px;
    height: var(--dam-header-space);
    position: sticky;
    inset-block-start: 0;
    z-index: 500;
    display: flow-root;
    background: var(--dam-page-bg);
    color: var(--dam-nav-text);
}
.site-header-static { position: relative; }
.site-header.is-floating {
    margin-block-end: calc(-1 * var(--dam-header-space));
    background: transparent;
    pointer-events: none;
}
.admin-bar .site-header:not(.site-header-static) { inset-block-start: 32px; }
.site-header .header-main,
.site-header .header-search-panel { pointer-events: auto; }
.header-main {
    width: min(calc(100% - 44px), var(--dam-container));
    min-height: 78px;
    margin-block-start: 15px;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 20px);
    padding: 8px clamp(14px, 1.8vw, 29px);
    background: var(--dam-nav-bg);
    border: 1px solid var(--dam-nav-border);
    border-radius: 20px;
    box-shadow: var(--dam-nav-pill-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
/* 1.6.4: Align the custom-logo box on the exact vertical center of the pill,
   at all breakpoints. No positioning, sizing or sticky logic is changed. */
.site-branding { flex: 0 0 auto; max-width: clamp(165px, 16vw, 250px); min-width: 0; display: flex; align-items: center; align-self: stretch; justify-content: center; line-height: 0; }
.custom-logo-link { display: inline-flex; align-items: center; justify-content: center; block-size: 100%; max-width: 100%; line-height: 0; }
.custom-logo { display: block; width: auto; max-width: 100%; max-height: 62px; height: auto; object-fit: contain; object-position: center center; margin-block: 0; }
.brand-name { display: inline-flex; align-items: center; gap: 11px; max-width: 235px; font-size: clamp(.98rem, 1.12vw, 1.17rem); line-height: 1.36; letter-spacing: 0; color: var(--dam-brand-dark); font-weight: 800; }
.brand-name:hover { color: var(--dam-brand); }
.brand-mark { width: 40px; height: 44px; display: inline-grid; place-items: center; flex: none; background: var(--dam-brand); border: 2px solid #fff; box-shadow: 0 1px 6px rgb(0 0 0 / 12%); border-radius: 60% 60% 65% 65%; color: #fff; font-size: 1.3rem; }
.main-navigation { flex: 1 1 auto; min-width: 0; }
.primary-menu { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 1px; list-style: none; margin: 0; padding: 0; }
.primary-menu li { position: relative; list-style: none; min-width: 0; }
.primary-menu a { display: block; padding: 14px clamp(6px,.66vw,10px); line-height: 1.45; font-size: clamp(.84rem,.93vw,.94rem); font-weight: 700; color: var(--dam-nav-text); white-space: nowrap; transition: color .18s ease, background .18s ease; border-radius: 8px; }
.primary-menu a:hover, .primary-menu li.current-menu-item > a, .primary-menu li.current-menu-ancestor > a { color: var(--dam-brand-dark); background: var(--dam-nav-hover); }
.primary-menu > li.menu-item-has-children > a, .primary-menu > li.page_item_has_children > a { padding-inline-end: 26px; }
/* A single arrow per submenu: the accessible JS-created button, never a second a::after icon. */
.primary-menu .submenu-toggle { position: absolute; z-index: 2; inset-inline-end: 0; inset-block-start: 8px; width: 24px; height: 35px; background: transparent; border: 0; color: var(--dam-nav-text); display: inline-grid; place-items: center; padding: 0; }
.primary-menu .submenu-toggle::before { content: ''; display: block; width: 7px; height: 7px; border-right: 1.8px solid; border-bottom: 1.8px solid; transform: rotate(45deg); transition: transform .16s ease; }
.primary-menu .sub-menu, .primary-menu .children {
    position: absolute;
    z-index: 900;
    inset-block-start: calc(100% - 1px);
    inset-inline-start: 0;
    width: min(290px, 88vw);
    padding: 9px;
    margin: 0;
    border: 1px solid var(--dam-nav-border);
    border-block-start: 3px solid var(--dam-brand);
    border-radius: 14px;
    background: var(--dam-nav-bg-solid);
    box-shadow: 0 18px 42px rgb(12 24 35 / 24%);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.primary-menu .sub-menu li a, .primary-menu .children li a { white-space: normal; font-size: .91rem; line-height: 1.6; padding: 10px 13px; font-weight: 500; }
.primary-menu .sub-menu li.menu-item-has-children > a, .primary-menu .children li.page_item_has_children > a { padding-inline-end: 35px; }
.primary-menu .sub-menu .submenu-toggle, .primary-menu .children .submenu-toggle { inset-block-start: 7px; inset-inline-end: 7px; width: 30px; height: 33px; }
/* Each nested submenu opens to the LEFT in RTL and RIGHT in LTR. */
html[dir="rtl"] .primary-menu .sub-menu .submenu-toggle::before,
html[dir="rtl"] .primary-menu .children .submenu-toggle::before { transform: rotate(135deg); }
html[dir="ltr"] .primary-menu .sub-menu .submenu-toggle::before,
html[dir="ltr"] .primary-menu .children .submenu-toggle::before { transform: rotate(-45deg); }
.primary-menu .sub-menu .sub-menu, .primary-menu .children .children { inset-block-start: -12px; inset-inline-start: calc(100% - 3px); inset-inline-end: auto; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu, .primary-menu li.is-open > .sub-menu,
.primary-menu li:hover > .children, .primary-menu li:focus-within > .children, .primary-menu li.is-open > .children { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.header-actions .button { padding: 10px 14px; font-size: .85rem; white-space: nowrap; }
.search-toggle, .dam-color-toggle { display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 100px; color: var(--dam-nav-text); min-width: 40px; min-height: 40px; padding: 9px; }
.search-toggle:hover, .search-toggle[aria-expanded='true'], .dam-color-toggle:hover { background: var(--dam-nav-hover); color: var(--dam-brand-dark); }
.dam-color-toggle-icon { font-size: 1.35rem; line-height: 1; }
.header-search-panel { width: min(calc(100% - 44px), var(--dam-container)); margin: 7px auto 0; padding: 18px; border: 1px solid var(--dam-nav-border); border-radius: 15px; background: var(--dam-nav-bg-solid); box-shadow: var(--dam-shadow); }
.header-search-panel .search-form { max-width: 600px; margin-inline-start: auto; }
.menu-toggle { display: none; border: 1px solid var(--dam-nav-border); border-radius: 11px; background: var(--dam-nav-bg-solid); padding: 9px 11px; min-height: 44px; gap: 9px; align-items: center; color: var(--dam-nav-text); font-weight: 700; }
.menu-toggle-bars { display: grid; width: 21px; gap: 4px; }
.menu-toggle-bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle-bars span:nth-child(2) { width: 78%; }
.mobile-nav-cta, .mobile-nav-color-toggle, .mobile-site-name { display: none; }
/* Core menu item from the old site: keep the blood-donation item recognisable. */
.primary-menu > .dam-menu-emphasis > a,
.primary-menu > .menu-item-29 > a { background: var(--dam-brand-soft); color: #4e1920; font-weight: 800; border-radius: 9px; }
.primary-menu > .dam-menu-emphasis > a:hover,
.primary-menu > .menu-item-29 > a:hover,
.primary-menu > .dam-menu-emphasis.current-menu-item > a,
.primary-menu > .menu-item-29.current-menu-item > a { background: var(--dam-brand); color: #fff; }
/* Elementor Free: existing builder layouts use the_content() without max-width or theme typography overrides. */
.dam-elementor-layout,
.dam-elementor-layout .dam-elementor-article,
.dam-elementor-layout .dam-elementor-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.dam-elementor-layout .dam-elementor-content { font-size: inherit; line-height: inherit; }
.dam-elementor-layout .elementor { width: 100%; }

/* 1.6.5: Restore native WordPress alignment for images inserted in rich text,
   including Elementor Free's Text Editor. WordPress/Elementor add alignleft,
   alignright or aligncenter to the media; the theme must provide the matching
   float rules for text to wrap next to the image. Selectors use :where() to
   keep specificity at zero, so explicit Elementor/widget/inline styles win.
   Do NOT impose layout, flex order or floats on Elementor Image/Image Box widgets. */
:where(.dam-elementor-content, .entry-content) :where(img.alignleft, figure.alignleft, .wp-caption.alignleft, a.alignleft) {
    float: left;
    margin: 0 1rem 1rem 0;
}
:where(.dam-elementor-content, .entry-content) :where(img.alignright, figure.alignright, .wp-caption.alignright, a.alignright) {
    float: right;
    margin: 0 0 1rem 1rem;
}
:where(.dam-elementor-content, .entry-content) :where(img.aligncenter, figure.aligncenter, .wp-caption.aligncenter, a.aligncenter) {
    display: block;
    margin-inline: auto;
}
/* Hero */
.hero { position: relative; isolation: isolate; background: linear-gradient(115deg, var(--dam-brand-dark) 0%, var(--dam-brand) 60%, var(--dam-brand) 100%); color: white; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 23% 0, rgb(255 255 255 / 13%), transparent 42%); }
.hero-grid { min-height: 510px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 48px; padding-block: 58px 72px; }
.hero-copy { position: relative; z-index: 3; }
.eyebrow { font-size: .84rem; font-weight: 700; display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgb(255 255 255 / 24%); background: rgb(255 255 255 / 10%); padding: 7px 13px; border-radius: 100px; }
.eyebrow-dot { width: 8px; height: 8px; flex: none; background: #ffd3da; border-radius: 50%; }
.hero h1 { font-size: clamp(2.35rem, 4.2vw, 4.4rem); line-height: 1.17; letter-spacing: -.9px; max-width: 630px; margin: 24px 0 16px; color: white; font-weight: 800; }
.hero-lead { max-width: 610px; font-size: clamp(1.02rem, 1.35vw, 1.25rem); line-height: 1.85; color: rgb(255 255 255 / 91%); margin: 0 0 27px; }
.hero-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-buttons .button { min-width: 168px; }
.hero-proof { margin-block-start: 34px; font-size: .92rem; font-weight: 600; color: #ffffff; }
.hero-proof span { margin-inline-end: 8px; font-size: 1.5rem; vertical-align: -2px; }
.hero-art { position: relative; height: 405px; max-width: 475px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.hero-circle { position: absolute; border-radius: 50%; border: 1px solid rgb(255 255 255 / 20%); }
.hero-circle-1 { width: 390px; height: 390px; background: rgb(255 255 255 / 8%); }
.hero-circle-2 { width: 295px; height: 295px; background: rgb(255 255 255 / 7%); }
.hero-drop { position: relative; width: 193px; height: 247px; background: #fff; border-radius: 68% 10% 66% 66%; transform: rotate(45deg); display: flex; align-items: center; justify-content: center; box-shadow: 0 32px 75px rgb(63 9 22 / 20%); }
.hero-drop span { display: inline-block; transform: rotate(-45deg); font-size: 96px; color: var(--dam-brand); margin-block-start: 23px; }
.hero-star { position: absolute; color: rgb(255 255 255 / 81%); }
.hero-star-a { font-size: 40px; inset-block-start: 35px; inset-inline-end: 68px; }
.hero-star-b { font-size: 26px; inset-block-end: 34px; inset-inline-start: 32px; }
.hero-art-photo { border-radius: 25px; overflow: hidden; box-shadow: 0 28px 68px rgb(63 9 22 / 20%); height: 370px; }
.hero-image { width: 100%; height: 100%; object-fit: cover; }
.hero-bottom-wave { position: absolute; height: 25px; inset-inline: 0; inset-block-end: -14px; background: #fff; transform: rotate(-.45deg) scaleX(1.03); border-radius: 50% 50% 0 0; }
/* Actions + section headings */
.section-pad { padding-block: 78px; }
.section-heading { margin-block-end: 34px; }
.section-heading-centered { text-align: center; max-width: 690px; margin-inline: auto; }
.section-heading-split { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.section-kicker { display: inline-block; margin-block-end: 8px; color: var(--dam-brand); font-size: .88rem; font-weight: 800; }
.section-heading h2, .closing-cta h2 { font-size: clamp(1.8rem, 2.75vw, 2.65rem); line-height: 1.28; margin: 0 0 10px; letter-spacing: -.6px; }
.section-heading p { color: var(--dam-muted); font-size: 1.04rem; margin: 0; }
.actions-grid, .posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.action-card { display: flex; flex-direction: column; min-width: 0; background: var(--dam-card-bg); border: 1px solid var(--dam-border); padding: 29px; border-radius: var(--dam-radius); box-shadow: 0 8px 25px rgb(24 34 49 / 4%); color: var(--dam-ink); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.action-card:hover { transform: translateY(-5px); border-color: #fc8a95; box-shadow: var(--dam-shadow); color: var(--dam-ink); }
.action-card-icon { display: grid; place-items: center; width: 57px; height: 57px; border-radius: 17px; background: var(--dam-brand-tint); color: var(--dam-brand); font-size: 1.9rem; font-weight: bold; }
.action-card:nth-child(2) .action-card-icon { background: var(--dam-brand-tint); color: var(--dam-brand-dark); }
.action-card:nth-child(3) .action-card-icon { background: var(--dam-brand-tint); color: var(--dam-brand-dark); }
.action-card h3 { font-size: 1.3rem; line-height: 1.45; margin: 23px 0 6px; }
.action-card p { color: var(--dam-muted); margin: 0 0 22px; font-size: .95rem; flex: 1; }
.card-arrow { color: var(--dam-brand); font-weight: 700; font-size: .92rem; }
.existing-home-content { padding-block: 40px 65px; background: var(--dam-page-bg); }
.existing-home-content .entry-content { max-width: 100%; }
.latest-news { background: var(--dam-news-bg); }
.post-card { min-width: 0; background: var(--dam-card-bg); border-radius: var(--dam-radius); overflow: hidden; box-shadow: 0 8px 26px rgb(22 30 40 / 6%); border: 1px solid var(--dam-border); display: flex; flex-direction: column; }
.post-card-media { display: block; background: #eadfe2; overflow: hidden; aspect-ratio: 1.65; }
.post-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.post-placeholder { display: grid; place-items: center; background: linear-gradient(130deg, #fff0f2, #fc8a95); width: 100%; height: 100%; color: var(--dam-brand); font-size: 5rem; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 23px; }
.post-date { color: #7a8190; font-size: .81rem; }
.post-card-title { font-size: 1.17rem; line-height: 1.5; margin: 9px 0 8px; }
.post-card-title a { color: var(--dam-ink); }
.post-card-title a:hover { color: var(--dam-brand); }
.post-card-body p { margin: 0 0 18px; color: var(--dam-muted); font-size: .93rem; flex: 1; }
.closing-cta { background: var(--dam-surface); }
.closing-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.closing-cta-inner > div { max-width: 720px; }
.closing-cta p { color: var(--dam-muted); margin: 0; }
.closing-cta .button { flex: 0 0 auto; }
/* Inner pages and native WordPress content */
.page-banner { padding-block: 43px 52px; background: var(--dam-banner-bg); border-block-end: 1px solid var(--dam-border); }
.page-title { max-width: 850px; font-size: clamp(2rem, 3.3vw, 3.2rem); letter-spacing: -.5px; line-height: 1.3; margin: 0; }
.archive-description { max-width: 850px; color: var(--dam-muted); }
.content-layout { padding-block: 55px 85px; }
.page-article, .single-article { width: 100%; max-width: min(100%, var(--dam-article-width)); margin-inline: auto; }
/* Within a sidebar grid, give ordinary text a readable central column, not an extreme right edge. */
.dam-layout-with-sidebar > :is(.page-article,.single-article) { justify-self: center; }
.entry-content { font-size: 1.04rem; line-height: 1.9; }
.entry-content:not(.dam-elementor-content) > *:first-child { margin-block-start: 0; }
.entry-content:not(.dam-elementor-content) h2, .entry-content:not(.dam-elementor-content) h3, .entry-content:not(.dam-elementor-content) h4 { line-height: 1.45; margin-block-start: 1.7em; }
.entry-content:not(.dam-elementor-content) a:not(.wp-block-button__link):not(.button) { text-decoration: underline; text-underline-offset: 3px; }
.entry-content:not(.dam-elementor-content) :where(img) { border-radius: 9px; }
/* 1.6.6: Non-invasive default quote appearance. The previous selector did not
   cover Elementor Text Editor blockquotes and applied a high-specificity,
   unconditional style to Gutenberg .wp-block-quote. :where() has ZERO
   specificity: any explicit WordPress block style, Elementor widget style,
   theme Customizer style or inline formatting takes precedence. Exclude the
   Gutenberg Plain style, Elementor's own Blockquote widget, and Pullquote.
   Do not control alignment, image floats, columns, or typography sizes. */
:where(.entry-content, .dam-elementor-content) :where(blockquote:not(.is-style-plain):not(.elementor-blockquote):not(.wp-block-pullquote blockquote)) {
    margin-block: 1.6em;
    margin-inline: 0;
    padding-block: 12px;
    padding-inline: 20px;
    border-inline-start: 3px solid var(--dam-topbar);
    background-color: rgb(100 167 216 / 6%);
    font-style: italic;
}

.entry-content:not(.dam-elementor-content) table { border-collapse: collapse; width: 100%; }
.entry-content:not(.dam-elementor-content) td, .entry-content:not(.dam-elementor-content) th { border: 1px solid var(--dam-border); padding: 10px; }
.entry-content:not(.dam-elementor-content) .alignwide { width: min(100%, 1180px); max-width: 1180px; }
.entry-content:not(.dam-elementor-content) .alignfull { width: 100%; max-width: none; }
.entry-content iframe { max-width: 100%; }
.single-featured { margin-block-end: 30px; }
.single-featured img { display: block; width: 100%; max-height: 560px; object-fit: cover; border-radius: 16px; }
.post-tags { border-block-start: 1px solid var(--dam-border); margin-block-start: 32px; padding-block-start: 15px; }
.post-tags a { display: inline-block; background: var(--dam-surface); margin: 5px; padding: 3px 10px; border-radius: 7px; font-size: .86rem; }
.post-navigation { margin-block-start: 35px; }
.post-navigation .nav-links { display: flex; gap: 15px; justify-content: space-between; }
.archive-content { padding-block: 56px 90px; }
.archive-content .posts-grid { margin-block-end: 40px; }
.navigation.pagination .nav-links { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.navigation.pagination .page-numbers { display: inline-flex; min-width: 43px; min-height: 43px; align-items: center; justify-content: center; border: 1px solid var(--dam-border); border-radius: 8px; padding: 5px 10px; }
.navigation.pagination .page-numbers.current { color: #fff; background: var(--dam-brand); border-color: var(--dam-brand); }
.empty-state { max-width: 720px; margin-inline: auto; text-align: center; padding: 40px 0; }
.not-found { padding-block: 100px; text-align: center; }
.not-found-number { display: block; font-weight: 900; color: var(--dam-brand); font-size: clamp(5rem, 11vw, 10rem); line-height: 1; }
.not-found .search-form { max-width: 650px; margin: 30px auto; }
.search-form { display: flex; gap: 10px; align-items: stretch; }
.search-field { width: 100%; min-width: 0; border: 1px solid var(--dam-border); padding: 11px 15px; min-height: 49px; border-radius: 10px; background: var(--dam-input-bg); color: var(--dam-ink); }
.search-form button { flex: 0 0 auto; }
.entry-content:not(.dam-elementor-content) :where(input:not([type=checkbox]):not([type=radio]), textarea, select) { max-width: 100%; border: 1px solid var(--dam-border); border-radius: 8px; padding: 10px 13px; background: var(--dam-input-bg); color: var(--dam-ink); }
.entry-content:not(.dam-elementor-content) :where(input[type=submit], button[type=submit]) { background: var(--dam-brand); color: #fff; border-color: var(--dam-brand); padding: 11px 22px; border-radius: 8px; cursor: pointer; }
.entry-content:not(.dam-elementor-content) :where(input[type=submit], button[type=submit]):hover { background: var(--dam-brand-dark); }
.comments-area { width: min(calc(100% - 48px), 950px); margin: 40px auto 75px; }
.comment-list { padding-inline-start: 26px; }
.comment-body { padding: 15px 0; border-block-end: 1px solid var(--dam-border); }
.comment-form textarea, .comment-form input:not([type=checkbox]) { display: block; max-width: 100%; width: 100%; border: 1px solid var(--dam-border); padding: 12px; border-radius: 9px; }
/* Footer – same dark charcoal aesthetic as the original OceanWP design. */
.site-footer { background: var(--dam-footer); color: #e9edf3; }
.footer-accent { height: 4px; background: linear-gradient(90deg, var(--dam-brand), var(--dam-accent)); }
.footer-grid, .footer-widget-columns { display: grid; gap: clamp(24px, 3vw, 55px); padding-block: 58px 44px; }
.footer-grid { grid-template-columns: minmax(0,1.3fr) repeat(2,minmax(0,1fr)); }
.footer-grid.has-four-columns { grid-template-columns: repeat(4,minmax(0,1fr)); }
.footer-widget-columns { grid-template-columns: repeat(var(--dam-footer-columns,3), minmax(0,1fr)); }
.footer-grid h2, .footer-widget-column .widget-title { font-size: 1.08rem; line-height: 1.5; margin: 0 0 17px; color: #fff; border-inline-start: 3px solid var(--dam-topbar); padding-inline-start: 10px; }
.footer-grid a, .footer-widget-columns a, .footer-extra-widgets a { color: #e8f0f8; }
.footer-grid a:hover, .footer-widget-columns a:hover, .footer-extra-widgets a:hover { color: #fff; text-decoration: underline; }
.footer-about p { max-width: 350px; line-height: 1.85; color: #cdd5dc; margin-block: 0 18px; }
.footer-grid .footer-link { color: #ffb6be; font-weight: 700; }
.footer-grid .footer-contact .footer-link { color: #ffb6be; }
.footer-menu, .footer-widget-columns ul { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-widget-columns li { padding-block: 5px; }
.footer-contact > a { display: block; margin-block: 9px; }
.footer-widget-column { min-width: 0; overflow-wrap: anywhere; }
.footer-widget-column .dam-widget, .footer-extra-widgets .dam-widget { margin-block-end: 22px; }
.footer-widget-column .dam-widget :is(p,span,li), .footer-extra-widgets .dam-widget :is(p,span,li) { color: #d6dce4; }
/* 1.7.2: Footer widget logos respect their HTML/inline CSS dimensions.
   Keep the global img max-width:100% to prevent narrow-screen overflow.
   No forced width or max-height is applied to footer widget images. */
.footer-widget-column iframe { max-width: 100%; }
.footer-extra-widgets { display: grid; gap: 22px; border-block-start: 1px solid rgb(255 255 255 / 16%); padding-block: 24px; }
/* Editable copyright + small-print credits + independently configured social profiles. */
.footer-bottom { border-block-start: 1px solid rgb(255 255 255 / 16%); padding-block: 17px 25px; display: flex; flex-direction: column; align-items: stretch; gap: 13px; font-size: .86rem; color: #b9c5d3; }
.footer-bottom a { color: #dee5ec; }
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; align-items: center; gap: 9px 17px; flex-wrap: wrap; }
.footer-meta { border-block-start: 1px solid rgb(255 255 255 / 12%); padding-block-start: 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px 26px; width: 100%; min-width: 0; }
.footer-credits { flex: 1 1 auto; min-width: 0; font-size: .76rem; line-height: 1.75; overflow-wrap: anywhere; color: #c7d2e0; }
.footer-credits a { color: #ffd0d3; text-decoration: underline; text-underline-offset: 3px; }
.footer-credits a:hover { color: #fff; }
.footer-social { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: flex-start; }
.footer-social-link { width: 37px; height: 37px; flex: none; display: inline-grid; place-items: center; background: rgb(255 255 255 / 9%); border: 1px solid rgb(255 255 255 / 24%); border-radius: 10px; color: #e9f4ff !important; transition: background .16s ease, transform .16s ease; }
.footer-social-link:hover, .footer-social-link:focus-visible { background: var(--dam-brand-dark); color: #fff !important; transform: translateY(-2px); }
.footer-social-link svg { display: block; max-width: 21px; max-height: 21px; }
.footer-social-widgets { min-width: 0; }

/* Left sidebar: in RTL the grid's second column is physically on the left. */
.dam-layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) var(--dam-left-sidebar-width); align-items: start; gap: var(--dam-sidebar-gap); padding-block: 40px 75px; }
.dam-layout-with-sidebar.dam-right-sidebar-only { grid-template-columns: var(--dam-right-sidebar-width) minmax(0,1fr); }
.dam-layout-with-sidebar.dam-two-sidebars { grid-template-columns: var(--dam-right-sidebar-width) minmax(0,1fr) var(--dam-left-sidebar-width); }
.dam-page-primary { min-width: 0; margin-inline: auto; }
.dam-layout-with-sidebar > .dam-page-primary { width: 100%; }
.dam-left-sidebar { min-width: 0; border-inline-start: 1px solid var(--dam-border); padding-inline-start: 21px; }
.dam-right-sidebar { min-width: 0; border-inline-end: 1px solid var(--dam-border); padding-inline-end: 21px; }
.dam-left-sidebar .dam-widget, .dam-right-sidebar .dam-widget { margin-block-end: 26px; }
.dam-left-sidebar .widget-title, .dam-right-sidebar .widget-title { font-size: 1.02rem; font-weight: 700; color: var(--dam-brand-dark); border-inline-start: 3px solid var(--dam-topbar); padding-inline-start: 10px; margin: 0 0 14px; }
.dam-left-sidebar :is(img,video), .dam-right-sidebar :is(img,video) { max-width: 100%; height: auto; }
.dam-left-sidebar iframe, .dam-right-sidebar iframe { max-width: 100%; }
.dam-left-sidebar :is(input,textarea,select), .dam-right-sidebar :is(input,textarea,select) { max-width: 100%; }
.dam-left-sidebar .wp-block-search__inside-wrapper, .dam-right-sidebar .wp-block-search__inside-wrapper { flex-wrap: wrap; }
.dam-left-sidebar a, .dam-right-sidebar a { color: var(--dam-link); }
.dam-left-sidebar .dam-widget :is(ul,ol), .dam-right-sidebar .dam-widget :is(ul,ol) { padding-inline-start: 22px; }
.dam-layout-with-sidebar .dam-elementor-content,
.dam-layout-with-sidebar .dam-elementor-content .elementor { max-width: 100%; min-width: 0; }
/* Tablet and mobile: a single compact floating navigation, never two menus. */
@media (max-width: 1380px) {
    .site-header { --dam-header-space: 100px; }
    .header-main { min-height: 70px; margin-block-start: 12px; position: relative; gap: 10px; }
    .site-branding { margin-inline-end: auto; }
    .custom-logo { max-height: 57px; }
    .menu-toggle { display: inline-flex; order: 3; }
    .header-actions { order: 2; }
    .main-navigation {
        order: 4;
        position: absolute;
        z-index: 20;
        inset-block-start: calc(100% + 7px);
        inset-inline: 0;
        max-height: min(73vh, 660px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--dam-nav-border);
        border-radius: 15px;
        background: var(--dam-nav-bg-solid);
        box-shadow: 0 22px 48px rgb(12 24 35 / 20%);
    }
    html.js-nav-ready .main-navigation:not(.is-open) { display: none; }
    .primary-menu { display: block; padding: 12px 14px; }
    .primary-menu li { display: flex; flex-wrap: wrap; align-items: center; width: 100%; }
    .primary-menu > li + li { border-block-start: 1px solid var(--dam-border); }
    .primary-menu li > a { flex: 1 1 auto; white-space: normal; font-size: 1rem; line-height: 1.55; padding: 12px 14px; }
    .primary-menu .submenu-toggle, .primary-menu .sub-menu .submenu-toggle, .primary-menu .children .submenu-toggle { position: static; width: 44px; height: 44px; padding: 7px; border: 1px solid var(--dam-border); border-radius: 9px; flex: none; }
    .primary-menu .submenu-toggle::before,
    html[dir="rtl"] .primary-menu .sub-menu .submenu-toggle::before,
    html[dir="ltr"] .primary-menu .sub-menu .submenu-toggle::before,
    .primary-menu .children .submenu-toggle::before { transform: rotate(45deg); }
    .primary-menu li.is-open > .submenu-toggle::before { transform: rotate(225deg); }
    .primary-menu .sub-menu, .primary-menu .children,
    .primary-menu .sub-menu .sub-menu, .primary-menu .children .children {
        display: none; flex: 0 0 100%; position: static; width: 100%; max-width: none;
        margin: 0; padding: 3px 15px 5px 0; transform: none;
        border: 0; border-inline-start: 2px solid var(--dam-brand-soft); border-radius: 0;
        opacity: 1; visibility: visible; pointer-events: auto; background: var(--dam-nav-bg-solid); box-shadow: none;
    }
    .primary-menu li.is-open > .sub-menu, .primary-menu li.is-open > .children { display: block; }
    .primary-menu li:hover > .sub-menu:not(.is-open), .primary-menu li:focus-within > .sub-menu:not(.is-open),
    .primary-menu li:hover > .children:not(.is-open), .primary-menu li:focus-within > .children:not(.is-open) { display: none; }
    .primary-menu li.is-open:hover > .sub-menu, .primary-menu li.is-open:focus-within > .sub-menu,
    .primary-menu li.is-open:hover > .children, .primary-menu li.is-open:focus-within > .children { display: block; }
    .primary-menu .sub-menu li a { padding: 10px 11px; font-size: .95rem; }
    .mobile-nav-cta { display: inline-flex; margin: 10px 14px 15px; width: calc(100% - 28px); }
    .hero-grid { gap: 25px; }
    .hero-art { height: 340px; }
}
@media (max-width: 1024px) {
    .footer-widget-columns, .footer-grid, .footer-grid.has-four-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dam-layout-with-sidebar:not(.dam-two-sidebars):not(.dam-right-sidebar-only) { grid-template-columns: minmax(0,1fr) minmax(0, min(var(--dam-left-sidebar-width), 34vw)); gap: min(var(--dam-sidebar-gap), 24px); }
    .dam-layout-with-sidebar.dam-right-sidebar-only { grid-template-columns: minmax(0, min(var(--dam-right-sidebar-width), 34vw)) minmax(0,1fr); gap: min(var(--dam-sidebar-gap), 24px); }
    .footer-grid { gap: 25px; }
}
@media (max-width: 780px) {
    .admin-bar .site-header:not(.site-header-static) { inset-block-start: 46px; }
    .site-header { --dam-header-space: 73px; }
    .container { width: min(calc(100% - 32px), var(--dam-container)); }
    /* Physical layout in RTL: hamburger on the RIGHT, search next, name centered, logo on the LEFT. */
    .header-main {
        width: min(calc(100% - 20px), 1430px);
        min-height: 59px;
        margin-block-start: 7px;
        padding: 5px 10px;
        border-radius: 16px;
        display: grid;
        grid-template-columns: 42px 42px minmax(0,1fr) 51px;
        grid-template-areas: "hamburger actions name logo";
        gap: 6px;
        align-items: center;
    }
    .menu-toggle { grid-area: hamburger; order: initial; justify-self: start; min-height: 41px; padding: 8px; width: 41px; justify-content: center; }
    .menu-toggle-text { display: none; }
    .header-actions { grid-area: actions; order: initial; justify-self: center; }
    .header-actions :is(.search-toggle,.dam-color-toggle) { min-height: 38px; min-width: 38px; }
    /* Native mode toggle belongs inside the drawer on phones, preserving room for the title. */
    .header-actions .dam-color-toggle { display: none; }
    .mobile-nav-color-toggle { display: inline-flex; justify-content: center; margin: 7px 14px 10px; width: calc(100% - 28px); gap: 10px; border: 1px solid var(--dam-nav-border); border-radius: 10px; background: var(--dam-nav-hover); color: var(--dam-nav-text); }
    .site-branding { grid-area: logo; order: initial; justify-self: end; margin: 0; max-width: 51px; min-width: 0; }
    .mobile-site-name {
        display: block;
        grid-area: name;
        min-width: 0;
        margin: 0;
        color: var(--dam-nav-text);
        text-align: center;
        font-size: clamp(.77rem,2.25vw,1rem);
        line-height: 1.2;
        font-weight: 800;
        text-wrap: balance;
    }
    .header-search-panel { width: calc(100% - 20px); }
    .brand-name { font-size: .76rem; }
    .brand-name > span:last-child { display: none; }
    .brand-mark { display: inline-grid; width: 36px; height: 40px; font-size: 1.05rem; }
    .custom-logo { display: block; max-height: 46px; max-width: 51px; }
    .utility-bar-inner { min-height: 54px; padding-block: 5px; display: grid; grid-template-columns: minmax(0,1fr); gap: 0; justify-items: center; align-items: center; }
    .utility-message { display: block; max-width: 100%; font-size: clamp(.75rem,2.55vw,.9rem); font-weight: 800; text-align: center; line-height: 1.35; overflow-wrap: anywhere; }
    .utility-actions { display: flex !important; min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: center; gap: 1px 12px; font-size: clamp(.71rem,2.4vw,.82rem); line-height: 1.3; }
    .utility-actions a { max-width: 100%; min-height: 19px; white-space: nowrap; overflow-wrap: anywhere; font-weight: 600; text-decoration: underline transparent; text-underline-offset: 3px; }
    .utility-actions a:hover, .utility-actions a:focus-visible { text-decoration-color: currentColor; }
    .utility-actions bdi { unicode-bidi: isolate; direction: ltr; }
    .header-utility-widgets { display: none; }
    .header-cta { display: none; }
    .hero-grid { padding-block: 112px 72px; grid-template-columns: 1fr; min-height: 0; }
    .hero-art { display: none; }
    .hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); }
    .hero-lead { font-size: 1.04rem; }
    .hero-buttons .button { min-width: 0; }
    .section-pad { padding-block: 53px; }
    .actions-grid, .posts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
    .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-about { grid-column: 1/-1; }
    .dam-layout-with-sidebar:not(.dam-two-sidebars):not(.dam-right-sidebar-only),
    .dam-layout-with-sidebar.dam-two-sidebars,
    .dam-layout-with-sidebar.dam-right-sidebar-only { grid-template-columns: minmax(0,1fr); padding-block: 30px 55px; }
    .dam-layout-with-sidebar > .dam-page-primary { grid-row: 1; }
    .dam-left-sidebar, .dam-right-sidebar { border-inline: 0; border-block-start: 1px solid var(--dam-border); padding-inline: 0; padding-block-start: 28px; }
    .page-banner { padding-block: 38px; }
}
@media (max-width: 530px) {
    .site-header { --dam-header-space: 66px; }
    .menu-toggle-text { display: none; }
    .menu-toggle { min-height: 38px; padding: 6px; width: 38px; justify-content: center; }
    .menu-toggle-bars { width: 20px; }
    .header-actions { gap: 0; }
    .header-main { min-height: 54px; margin-block-start: 6px; padding: 4px 9px; gap: 4px; grid-template-columns: 38px 38px minmax(0,1fr) 46px; }
    .site-branding { max-width: 46px; min-width: 0; }
    .custom-logo { max-height: 43px; max-width: 46px; }
    .mobile-site-name { font-size: clamp(.75rem,3.2vw,.96rem); line-height: 1.18; }
    .brand-name { font-size: .68rem; }
    /* Accessible logo fallback: never leave the left side empty when no custom logo is set. */
    .brand-name > span:last-child { display: none; }
    .brand-mark { display: inline-grid; width: 39px; height: 40px; font-size: 1.1rem; }
    .hero-grid { padding-block: 100px 66px; }
    .hero-buttons { align-items: stretch; }
    .hero-buttons .button { width: 100%; }
    .hero-proof { font-size: .83rem; }
    .actions-grid, .posts-grid { grid-template-columns: 1fr; }
    .footer-widget-columns, .footer-grid, .footer-grid.has-four-columns { grid-template-columns: 1fr; }
    .footer-about { grid-column: auto; }
    .footer-grid, .footer-widget-columns { padding-block: 42px 25px; }
    .search-form { flex-direction: column; }
    .footer-bottom { gap: 12px; }
    .footer-meta, .footer-legal { justify-content: center; text-align: center; }
    .footer-meta { flex-direction: column; gap: 14px; }
    .footer-credits { text-align: center; }
    .not-found { padding-block: 65px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Ensure Elementor-built homepage content is full-bleed when set to content-only. */
.existing-home-content.dam-elementor-section { padding-block: 0; }
.existing-home-content.dam-elementor-section > .dam-elementor-layout { width: 100%; max-width: none; }
/* The floating header is above Elementor slider imagery without introducing a white band. */
.site-header.is-floating + main > :first-child { position: relative; }
/* A page created with Elementor should retain its own widgets and font sizes. */
.dam-elementor-layout .dam-elementor-content,
.dam-elementor-article .dam-elementor-content { font-size: inherit; }
/* Low-specificity base font: Elementor's explicit per-widget font family still takes priority. */
:where(.elementor) { font-family: "Heebo", Arial, sans-serif; }

/* Night palette. Only theme-owned surfaces are affected; custom Elementor sections retain their styling.
   Supports DAM Flow's own toggle plus common class-based dark-mode plugins. */
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body,
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) {
    --dam-page-bg: #0f1722;
    --dam-card-bg: #1c2938;
    --dam-nav-bg: rgb(23 36 49 / 96%);
    --dam-nav-bg-solid: #1b2939;
    --dam-nav-border: rgb(182 205 225 / 24%);
    --dam-nav-text: #edf4fa;
    --dam-nav-hover: #28394b;
    --dam-input-bg: #142130;
    --dam-news-bg: #14212e;
    --dam-banner-bg: linear-gradient(125deg, #1b2937, #13202d);
    --dam-ink: #f1f5f9;
    --dam-muted: #ced8e3;
    --dam-link: #ffa0a7;
    --dam-surface: #223142;
    --dam-border: #405064;
    --dam-brand-tint: #382432;
    --dam-footer: #0b121c;
    --dam-shadow: 0 15px 45px rgb(0 0 0 / 35%);
    --dam-nav-pill-shadow: 0 17px 55px rgb(0 0 0 / 40%);
    color-scheme: dark;
}
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body .site,
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) .site { background: var(--dam-page-bg); color: var(--dam-ink); }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.entry-content,.action-card,.post-card,.dam-left-sidebar,.page-banner,.section-heading,.footer-grid),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.entry-content,.action-card,.post-card,.dam-left-sidebar,.page-banner,.section-heading,.footer-grid) { color: var(--dam-ink); }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.brand-name,.dam-left-sidebar .widget-title),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.brand-name,.dam-left-sidebar .widget-title) { color: #ffa0a7; }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.page-title, .section-heading h2, .action-card h3, .post-card-title a, .closing-cta h2),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.page-title, .section-heading h2, .action-card h3, .post-card-title a, .closing-cta h2) { color: #f1f5f9; }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.section-kicker,.text-link),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.section-kicker,.text-link) { color: #ff9aa1; }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.utility-bar,.site-footer),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.utility-bar,.site-footer) { color: #eaf0f7; }
/* Form widgets and Elementor Free's unstyled controls follow the dark surface. */
html[data-dam-theme="dark"] :is(.dam-left-sidebar, .dam-elementor-layout) :is(input:not([type=checkbox]):not([type=radio]),textarea,select),
body.wp-dark-mode-active :is(.dam-left-sidebar, .dam-elementor-layout) :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { background-color: var(--dam-input-bg); color: var(--dam-ink); border-color: var(--dam-border); }
/* Do not invert photos, SVG icons, branding, or the hero image. */

/* Make action links and glyphs readable in dark mode without muting photographs. */
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.card-arrow, .action-card-icon, .post-date),
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.card-arrow, .action-card-icon, .post-date) { color: #ffb2b9; }
html:is([data-dam-theme="dark"], .wp-dark-mode-active, .mdm-dark-mode, [data-mdm-dark-mode="dark"], [data-theme="dark"], .dark-mode, .dark) body :is(.action-card:hover, .post-card):hover,
body:is(.wp-dark-mode-active, .wp-dark-mode-enabled, .dark-mode, .dark) :is(.action-card:hover, .post-card):hover { border-color: #a76c76; }

/* 1.6 responsive containment: constrain the intrinsic width of 3rd-party widgets. */
:where(.site, .site-main, .inner-page, .dam-elementor-layout, .dam-elementor-content, .entry-content, .dam-page-primary, .dam-left-sidebar, .dam-right-sidebar) { min-width: 0; }
:where(.elementor, .elementor-section, .elementor-container, .elementor-column, .elementor-widget, .elementor-widget-wrap, .elementor-widget-container, .e-con, .e-con-inner, .wp-block-group, .wp-block-column, .wp-block-columns) { min-width: 0 !important; max-width: 100% !important; }
.entry-content :is(img,picture,video,canvas,object,embed,iframe), .dam-elementor-content :is(img,picture,video,canvas,object,embed,iframe) { max-inline-size: 100%; }
.entry-content :is(figure,.wp-caption,.wp-block-image,.wp-block-embed), .dam-elementor-content :is(figure,.wp-caption,.wp-block-image,.wp-block-embed) { max-inline-size: 100%; }
.entry-content :is(pre,.wp-block-code), .dam-elementor-content :is(pre,.wp-block-code) { max-width: 100%; overflow-x: auto; }
:where(.entry-content,.dam-elementor-content) .wp-block-table { max-width: 100%; overflow-x: auto; }
:where(.entry-content,.dam-elementor-content) table { display: block; max-width: 100% !important; overflow-x: auto; }
:where(.entry-content,.dam-elementor-content) :where(.wp-block-table table) { max-width: none; }
:where(.entry-content,.dam-elementor-content) :where(.wp-block-columns,.wp-block-group,.wp-block-gallery) { max-inline-size: 100%; }
:where(.entry-content,.dam-elementor-content) :where(.wp-block-embed__wrapper,.elementor-wrapper) { max-width: 100%; }
@media (max-width: 1280px) {
    /* Two large sidebars cannot squeeze a tablet / narrow-desktop reading column. */
    .dam-layout-with-sidebar.dam-two-sidebars { grid-template-columns: minmax(0,1fr); }
    .dam-layout-with-sidebar.dam-two-sidebars > .dam-page-primary { grid-row: 1; }
    .dam-layout-with-sidebar.dam-two-sidebars > :is(.dam-right-sidebar,.dam-left-sidebar) { border-inline: 0; border-block-start: 1px solid var(--dam-border); padding-inline: 0; padding-block-start: 25px; }
}
@media (max-width: 780px) {
    /* Prevent sideways rubber-banding even if an old Elementor widget is wider than viewport.
       Never use touch-action:pan-y globally: sliders and horizontally scrolling tables need touch. */
    html, body, #page { inline-size: 100%; max-inline-size: 100%; overflow-x: clip; overscroll-behavior-x: none; }
    .site-main { max-inline-size: 100%; overflow-x: clip; }
    .site-main .container { width: calc(100% - 32px); max-width: 100%; }
    .site-main :is(.page-article,.single-article) { max-inline-size: 100%; }
    .site, #main-content, .site-main, .inner-page { width: 100%; max-width: 100%; }
    :where(.container,.content-layout,.dam-layout-with-sidebar,.dam-elementor-layout,.dam-elementor-article,.dam-elementor-content,.entry-content,.page-article,.single-article) { min-width: 0; max-width: 100%; }
    :where(.elementor,.elementor-section,.elementor-section-wrap,.elementor-container,.elementor-column,.elementor-widget,.elementor-widget-wrap,.elementor-widget-container,.e-con,.e-con-inner,.wp-block-columns,.wp-block-column) { max-width: 100% !important; min-width: 0 !important; }
    :where(.entry-content,.dam-elementor-content) :is(img,picture,video,canvas,iframe,embed,object,svg) { max-width: 100% !important; }
    :where(.entry-content,.dam-elementor-content) :is(img,video) { height: auto !important; object-fit: contain; }
    .elementor-widget-image img, .elementor-widget-container img, .wp-block-image img { max-width: 100% !important; height: auto !important; }
    :where(.entry-content,.dam-elementor-content) :is(table,.elementor-widget-container table) { display: block; max-width: 100% !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    :where(.entry-content,.dam-elementor-content) :is(input,select,textarea,button,.wpcf7-form-control-wrap) { max-width: 100%; min-width: 0; }
    :where(.entry-content,.dam-elementor-content) :is(pre,code,.wp-block-code) { max-width: 100%; overflow-x: auto; }
    :where(.entry-content,.dam-elementor-content) { overflow-wrap: anywhere; }
    :where(.dam-elementor-content,.entry-content) .elementor .swiper { max-width: 100%; }
    .dam-left-sidebar .dam-widget, .dam-right-sidebar .dam-widget { max-width: 100%; overflow-wrap: anywhere; }
    .footer-social { justify-content: center; }
}

/* 1.6 mobile overflow safeguards. No transform or forced 100vw widths on global containers. */
@media (max-width: 780px) {
    .site { inline-size: 100%; max-inline-size: 100%; }
    .site-main :where(.elementor,.e-con,.e-con-inner,.elementor-section,.elementor-container,.elementor-column,.elementor-widget-wrap,.elementor-widget-container) { min-inline-size: 0; }
    .site-main :where(.elementor-widget-container, .entry-content, .dam-elementor-content) :is(img,figure,video,iframe,canvas,svg) { max-inline-size: 100%; }
    .site-main :where(.elementor-widget-container, .entry-content, .dam-elementor-content) :is(table,pre) { max-inline-size: 100%; overflow-x: auto; }
}

/* 1.6.1: Mobile sticky header is fixed with a flow spacer.
   This avoids relying on sticky behavior through overflow-controlled Elementor pages.
   The banner scrolls away normally, and JS tracks its visible bottom edge. */
.dam-mobile-sticky-spacer { display: none; }
@media (max-width: 780px) {
    .dam-mobile-sticky-spacer {
        display: block;
        block-size: 73px;
        inline-size: 100%;
        pointer-events: none;
    }
    .dam-mobile-sticky-spacer.is-overlay { block-size: 0; }
    .site-header:not(.site-header-static) {
        position: fixed;
        inset-block-start: var(--dam-mobile-sticky-top, 0px) !important;
        inset-inline-start: 0;
        inline-size: 100%;
        max-inline-size: 100%;
        margin-block: 0;
        z-index: 6000;
    }
    .site-header.is-floating:not(.site-header-static) {
        margin-block-end: 0;
        background: transparent;
    }
    .mobile-site-name,
    .mobile-site-name:visited {
        color: var(--dam-brand);
        text-decoration: none;
        cursor: pointer;
    }
    .mobile-site-name:hover, .mobile-site-name:focus-visible {
        color: var(--dam-brand-dark);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
    :where(html[data-dam-theme="dark"],html.wp-dark-mode-active,html.mdm-dark-mode,html[data-mdm-dark-mode="dark"],html[data-theme="dark"],html.dark-mode,html.dark) .mobile-site-name,
    body:is(.wp-dark-mode-active,.wp-dark-mode-enabled,.dark-mode,.dark) .mobile-site-name {
        color: var(--dam-brand-soft);
    }
}
@media (max-width: 530px) {
    .dam-mobile-sticky-spacer:not(.is-overlay) { block-size: 66px; }
}

/* 1.6.2: Desktop sticky guarantee. The theme already uses a flow spacer
   for mobile fixed positioning. The desktop layout now uses the same
   reliable positioning instead of depending on sticky across third-party
   overflow containers. Mobile <= 780px selectors are NOT changed. */
@media (min-width: 781px) {
    .dam-mobile-sticky-spacer:not(.is-overlay) {
        display: block;
        block-size: 112px;
        inline-size: 100%;
        pointer-events: none;
    }
    .dam-mobile-sticky-spacer.is-overlay {
        display: block;
        block-size: 0;
        pointer-events: none;
    }
    .site-header:not(.site-header-static) {
        position: fixed;
        inset-block-start: var(--dam-desktop-sticky-top, 37px);
        inset-inline: 0;
        inline-size: 100%;
        max-inline-size: 100%;
        margin-block: 0;
        z-index: 6000;
    }
    .admin-bar .site-header:not(.site-header-static) {
        inset-block-start: var(--dam-desktop-sticky-top, 32px);
    }
    .site-header.is-floating:not(.site-header-static) {
        margin-block-end: 0;
    }
}
@media (min-width: 781px) and (max-width: 1380px) {
    .dam-mobile-sticky-spacer:not(.is-overlay) {
        block-size: 100px;
    }
}

/* 1.6.3: same transparent floating header canvas on inner pages and home.
   Do NOT modify fixed/sticky positioning, spacers, offsets, menu sizing or
   desktop/mobile breakpoints from 1.6.2. The pill stays opaque/blurred. */
.site-header:not(.site-header-static) {
    background: transparent;
    pointer-events: none;
}


/* 1.6.4: On inner pages, match the small viewport-to-pill air gap used on
   the mobile homepage. 59px + 14px = the existing 73px header budget;
   54px + 12px = the existing 66px budget. Sticky positioning is untouched. */
@media (max-width: 780px) {
    .site-header:not(.site-header-static):not(.is-floating) .header-main {
        margin-block-start: 14px;
    }
}
@media (max-width: 530px) {
    .site-header:not(.site-header-static):not(.is-floating) .header-main {
        margin-block-start: 12px;
    }
}

/* DAM Flow 1.6.9 — RTL inner-page mobile scrollport correction.
 * One vertical scroller: the DOCUMENT, not html plus a second body scroll box.
 * The root owns horizontal clipping; the body stays overflow-visible, so
 * overflow-x:hidden on the user-requested legacy base rule cannot create a
 * second vertical scrollbar/gutter on the physical LEFT in RTL.
 * The narrow root scrollbar has no reserved mobile gutter. Touch and keyboard
 * vertical scrolling remain available. The #page clipping boundary already
 * exists above and still contains wide Elementor/3rd-party content.
 * Only INNER PAGES on <=780px are affected. Home and desktop are unchanged.
 * No changes to the fixed/sticky header or Elementor widget positioning.
 */
@media (max-width: 780px) {
    html:has(> body:not(.home)) {
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-gutter: auto;
        scrollbar-width: none;
    }
    html:has(> body:not(.home))::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }
    body:not(.home) {
        overflow-x: visible;
        overflow-y: visible;
    }
    /* The inner page is the containing block for any absolutely positioned
     * legacy Elementor/widget decorations. Otherwise they can be positioned
     * against the viewport and escape overflow clipping, creating X panning. */
    body:not(.home) .site-main.inner-page {
        position: relative;
    }
}
