/*
Theme Name: Bear Dog Theme
Theme URI: https://beardogenterprises.ca
Author: Bear Dog Enterprises
Author URI: https://beardogenterprises.ca
Description: A custom block theme for Bear Dog Enterprises
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bear-dog
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --color-primary: #d71f1e;
    --color-primary-hover: #b91a19;
    --color-secondary: #dab164;
    --color-beige: #e3d3c5;
    --color-dark: #1a1a1a;
    --color-light: #f7f7f5;
    --color-white: #ffffff;
    --color-gray: #666666;

    --font-heading: 'Teko', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--color-dark);
    background: var(--color-white);
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

h1 {
    font-weight: 500;
    letter-spacing: 0.03em;
}

h2 {
    font-weight: 600;
    letter-spacing: 0.02em;
}

h3, h4 {
    font-weight: 600;
    letter-spacing: 0.02em;
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
}

/* Ensure all paragraphs use body font and consistent size */
.wp-block-paragraph,
p {
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    font-style: normal;
    line-height: 1.75;
}

/* Intentional exceptions — hero subtext & CTA lead paragraphs */
.hero-subheading,
.hero-subheading.wp-block-paragraph,
body:not(.home) .site-hero .wp-block-cover__inner-container p:not(.has-small-font-size) {
    font-size: 1.25rem !important;
}

/* Eyebrow / label paragraphs stay small */
.has-small-font-size.wp-block-paragraph,
.scroll-indicator p,
.scroll-indicator .wp-block-paragraph {
    font-size: 0.875rem !important;
}

/* Trust-tile body text — slightly smaller than default, generous leading */
.trust-tile p,
.trust-tile .wp-block-paragraph {
    font-size: 0.9rem !important;
    line-height: 1.75 !important;
}

/* Headings spacing */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

/* Hero subheading text - lighter */
.wp-block-cover p {
    font-weight: 300;
}

/* Small label text */
.has-small-font-size {
    font-size: 0.875rem !important;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Section Typography - Visual Hierarchy
   ========================================================================== */

/* Larger, bolder section headings */
.wp-block-heading.has-heading-font-family[style*="font-size:2.5rem"],
.wp-block-heading.has-heading-font-family[style*="font-size:2.75rem"] {
    line-height: 1.1;
}

/* Secondary text for better contrast */
.has-gray-color {
    color: #555555 !important;
}

/* ==========================================================================
   Element Spacing - Modern & Clean
   ========================================================================== */

/* Button spacing */
.wp-block-buttons {
    margin-top: 2rem;
    gap: 1rem;
}

.wp-block-button {
    margin-bottom: 0;
    margin-right: 0;
}

/* Hero buttons spacing */
.site-hero .wp-block-buttons {
    gap: 1.5rem;
}

/* Separator spacing */
.wp-block-separator {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Last paragraph before buttons - reduce margin */
.wp-block-paragraph + .wp-block-buttons {
    margin-top: 2rem;
}

/* Paragraph after heading - tighter */
.wp-block-heading + .wp-block-paragraph {
    margin-top: 0.5rem;
}

/* Multiple paragraphs spacing */
.wp-block-paragraph + .wp-block-paragraph {
    margin-top: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

/* ==========================================================================
   Layout Reset
   ========================================================================== */

.wp-site-blocks > * {
    margin-top: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   Hero with Header Overlay
   ========================================================================== */

.hero-with-header {
    position: relative;
}

.hero-with-header .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent !important;
    box-shadow: none;
}

.hero-with-header .site-hero {
    padding-top: 0;
}

/* ==========================================================================
   Header — Sticky + Scroll Effect
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: none;
    transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

/* No padding offset needed — all pages use transparent overlay header */

.site-header.bd-header--scrolled,
.site-header.bd-header--scrolled.has-white-background-color,
.site-header.bd-header--scrolled.has-background,
header.site-header.bd-header--scrolled {
    box-shadow: var(--shadow-md);
    background: var(--color-dark) !important;
    background-color: var(--color-dark) !important;
}

.site-header .wp-block-navigation a,
.site-header .wp-block-navigation-item__content {
    font-size: 1.5rem !important;
    transition: font-size 0.3s ease !important;
}

.site-header.bd-header--scrolled .wp-block-navigation a,
.site-header.bd-header--scrolled .wp-block-navigation-item__content {
    color: var(--color-white) !important;
    font-size: 1.125rem !important;
}

.site-header.bd-header--scrolled .wp-block-navigation a:hover,
.site-header.bd-header--scrolled .wp-block-navigation-item__content:hover {
    color: var(--color-secondary) !important;
}

.site-header .site-logo img {
    width: 240px !important;
    max-width: 240px !important;
    height: auto !important;
    transition: width 0.3s ease !important;
}

.site-header.bd-header--scrolled .site-logo img {
    width: 160px !important;
    max-width: 160px !important;
}

.site-header.bd-header--scrolled .site-logo img {
    filter: brightness(0) invert(1) !important;
}

.site-header.is-transparent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: transparent !important;
    box-shadow: none;
}

.site-header.is-transparent:not(.bd-header--scrolled) .wp-block-navigation a,
.site-header.is-transparent:not(.bd-header--scrolled) .wp-block-navigation-item__content {
    color: var(--color-white) !important;
}

.site-header.is-transparent:not(.bd-header--scrolled) .wp-block-navigation a:hover,
.site-header.is-transparent:not(.bd-header--scrolled) .wp-block-navigation-item__content:hover {
    color: var(--color-secondary) !important;
}

.site-header.is-transparent:not(.bd-header--scrolled) .site-logo img {
    filter: brightness(0) invert(1);
}

/* Ensure white logo in transparent header when not scrolled */
.hero-with-header .site-header:not(.bd-header--scrolled) .site-logo img {
    filter: brightness(0) invert(1);
}

.hero-with-header .site-header.bd-header--scrolled .site-logo img {
    filter: brightness(0) invert(1) !important;
}

/* White navigation text in hero overlay when not scrolled */
.hero-with-header .site-header:not(.bd-header--scrolled) .wp-block-navigation a,
.hero-with-header .site-header:not(.bd-header--scrolled) .wp-block-navigation-item__content {
    color: var(--color-white) !important;
}

.hero-with-header .site-header:not(.bd-header--scrolled) .wp-block-navigation a:hover,
.hero-with-header .site-header:not(.bd-header--scrolled) .wp-block-navigation-item__content:hover {
    color: var(--color-secondary) !important;
}

/* Nav link underline animation */
.site-header .wp-block-navigation a {
    position: relative;
    padding-bottom: 4px;
}

.site-header .wp-block-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width var(--transition), left var(--transition);
}

.site-header .wp-block-navigation a:hover::after {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   Buttons — More Polished
   ========================================================================== */

.wp-block-button__link {
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.wp-block-button__link:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Outline button style */
.wp-block-button.is-style-outline .wp-block-button__link {
    border-width: 2px;
}

/* ==========================================================================
   Cards & Content Blocks
   ========================================================================== */

.wp-block-group.has-background:not(.alignfull) {
    border-radius: var(--radius-md);
}

/* Cards with white background - subtle shadow only */
.wp-block-group.has-white-background-color:not(.alignfull):not(.site-header) {
    box-shadow: var(--shadow-sm);
}

/* Only apply hover effect to explicit card classes */
.trust-tile,
.partner-card {
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.trust-tile:hover,
.partner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13);
}

/* Partner cards — lift on hover (bd-hover-lift class on page-partners.php) */
.bd-hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}

.bd-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Region card glass effect */
.region-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform var(--transition), border-color var(--transition);
}

.region-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-secondary) !important;
}

/* How We Work image styling */
.how-we-work-image img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* ==========================================================================
   Images
   ========================================================================== */

.wp-block-image img {
    border-radius: var(--radius-md);
}

.wp-block-image.alignfull img,
.wp-block-cover img {
    border-radius: 0;
}

.partner-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem 3rem;
    padding-top: var(--wp--preset--spacing--60);
    padding-bottom: var(--wp--preset--spacing--60);
}

.partner-logo-item {
    flex: 0 0 calc(20% - 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 90px;
}

.partner-logo-item img,
.partner-logo-item svg {
    max-height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0 !important;
    display: block;
}

/* Partner section — full-bleed landscape image with dark overlay */
.partner-section-bg {
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    position: relative;
    isolation: isolate;
}

.partner-section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.80);
    z-index: 0;
}

.partner-section-bg > * {
    position: relative;
    z-index: 1;
}

/* Partner group sections */
.partner-groups {
    padding-top: var(--wp--preset--spacing--60);
    padding-bottom: var(--wp--preset--spacing--60);
}

.partner-group {
    margin-bottom: var(--wp--preset--spacing--70);
}

.partner-group:last-child {
    margin-bottom: 0;
}

.partner-group-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.partner-group-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-beige);
}

.partner-group-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-secondary);
    white-space: nowrap;
}

/* Partner cards grid — logo + name + blurb tiles */
.partner-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    width: 100%;
}

@media (max-width: 1024px) {
    .partner-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .partner-cards-grid {
        grid-template-columns: 1fr;
    }
}

.partner-cards-grid .partner-card {
    background: var(--color-white);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: default;
}

.partner-card-logo-wrap {
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.25rem;
}

.partner-card-logo-wrap img {
    max-height: 54px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border-radius: 0 !important;
    display: block;
}

.partner-card-logo-wrap a {
    display: flex;
    align-items: center;
}

.partner-card-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
    color: var(--color-dark);
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.partner-card-blurb {
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--color-gray);
    margin: 0;
}

.wp-block-image.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin: 0 auto;
}

.wp-block-image.partner-logo img {
    border-radius: 0;
    width: auto;
    height: auto;
    max-height: 90px;
    max-width: 240px;
    object-fit: contain;
}

/* Partner logo carousel */
.partner-carousel {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.partner-carousel-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: partner-scroll 60s linear infinite;
}

.partner-carousel:hover .partner-carousel-track {
    animation-play-state: paused;
}

@keyframes partner-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.partner-carousel-logo {
    flex: 0 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.partner-carousel-logo img {
    max-height: 70px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border-radius: 0;
}

.partner-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    margin-top: 1rem;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    border: 1.5px solid var(--wp--preset--color--primary);
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.partner-card-link:hover {
    background: var(--wp--preset--color--primary);
    color: #fff;
}

/* Dark chip for reverse (white) partner logos — applied to the container
   so it remains visible even if the image is slow or fails to load. */
.partner-card-logo-wrap.is-reverse,
.partner-carousel-logo.is-reverse {
    background: var(--color-dark);
    padding: 8px 14px;
    border-radius: 6px;
    box-sizing: border-box;
    justify-content: center;
}
.partner-card-logo-wrap.is-reverse img,
.partner-carousel-logo.is-reverse img {
    background: transparent;
}

/* ==========================================================================
   Family-Governed Indigenous Economic Platform — goals checklist
   ========================================================================== */
.platform-goals {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}

.platform-goals li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-dark);
}

.platform-goals li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.85rem;
    height: 0.5rem;
    border-left: 2.5px solid var(--color-primary);
    border-bottom: 2.5px solid var(--color-primary);
    transform: rotate(-45deg);
}

/* Section photo floats right so the body text wraps alongside and beneath it. */
.platform-media.alignright {
    width: 42%;
    margin: 0.4rem 0 1.5rem 2.5rem;
}

.platform-media img {
    width: 100%;
    height: auto;
}

/* Intro group establishes a block formatting context so it fully contains
   the floated photo even when the text is shorter than the image. */
.platform-intro {
    display: flow-root;
}

/* Goals band: full-width photo background with content held to the site's
   standard width. Light text + gold ticks read cleanly over the dark overlay. */
.platform-goals-band p {
    max-width: 820px;
}

.platform-goals-band .platform-goals {
    margin-top: 0.5rem;
    gap: 1.1rem 3rem;
    padding: 2rem 2.25rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.platform-goals-band .platform-goals li {
    color: #fff;
}

.platform-goals-band .platform-goals li::before {
    border-left-color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

@media (max-width: 781px) {
    .platform-goals {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .platform-media.alignright {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem;
    }
}

/* ==========================================================================
   Project carousel (active / development-stage mines)
   ========================================================================== */
.project-carousel {
    position: relative;
}

.project-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem 1.5rem;
    scrollbar-width: thin;
}

.project-carousel-track::-webkit-scrollbar {
    height: 6px;
}

.project-carousel-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.project-card {
    position: relative;
    flex: 0 0 300px;
    min-height: 170px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background-image: linear-gradient(180deg, rgba(26, 26, 26, 0) 30%, rgba(26, 26, 26, 0.55) 65%, rgba(26, 26, 26, 0.92) 100%), var(--project-card-bg);
    background-size: cover, auto 110%;
    background-position: center, center bottom;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card:hover,
.project-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.project-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.project-card-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.15;
}

.project-card-owner {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
}

.project-card-link {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary);
}

.project-card-link span {
    display: inline-block;
    transition: transform 0.25s ease;
}

.project-card:hover .project-card-link span {
    transform: translateX(4px);
}

/* Carousel nav arrows (below the track, clear of the images) */
.project-carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

.project-carousel-nav {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--color-dark);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.project-carousel-nav:hover {
    background: var(--color-primary);
    color: #fff;
}

.project-carousel-nav[disabled] {
    opacity: 0.35;
    pointer-events: none;
}

/* Exploration projects list */
.exploration-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.exploration-list-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark);
    background: #f5f3f0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    line-height: 1;
}

@media (max-width: 781px) {
    .project-card {
        flex-basis: 78%;
        min-height: 150px;
    }
}

/* Leadership cards — bio text wraps around the avatar */
.leadership-card {
    display: block;
}

.leadership-card .leadership-avatar {
    float: left;
    width: 210px;
    margin: 0.25rem 1.5rem 0.5rem 0 !important;
}

.leadership-card::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 600px) {
    .leadership-card .leadership-avatar {
        float: none;
        margin: 0 auto 1rem !important;
    }
}

/* ==========================================================================
   Bear Dog Icon Mask Effect
   ========================================================================== */

.intro-section-wrapper {
    overflow: visible;
    position: relative;
}

.intro-section-wrapper > .wp-block-columns {
    margin: 0 !important;
    gap: 0 !important;
    overflow: visible;
    min-height: 50vh;
}

.intro-text-column {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.intro-text-column > .wp-block-group {
    max-width: 520px;
    margin-left: auto;
}

.intro-masked-image {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
    padding: 0 !important;
    overflow: visible;
    position: relative;
    min-height: 500px;
}

.bear-dog-mask {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 120%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    max-width: none;
    overflow: hidden;
    -webkit-mask-image: url('./assets/images/bear-dog-icon.png');
    mask-image: url('./assets/images/bear-dog-icon.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.bear-dog-mask img {
    width: 100%;
    height: 200%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    /* Parallax effect - image scrolls slower than page */
    position: relative;
    top: -50%;
    will-change: transform;
}

/* JS-driven parallax for the image inside the mask */
.bear-dog-mask.parallax-active img {
    transition: transform 0.05s linear;
}

/* ==========================================================================
   Masked Image Section - Parallax with Natural Scroll
   ========================================================================== */

.masked-image-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background icon pattern */
.masked-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('./assets/images/bear-dog-icon.png');
    background-repeat: repeat;
    background-size: 120px;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.masked-image-container {
    position: relative;
    z-index: 1;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bear-dog-mask-centered {
    position: relative !important;
    width: 780px !important;
    max-width: 90% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto !important;
    -webkit-mask-image: url('./assets/images/bear-dog-icon.png');
    mask-image: url('./assets/images/bear-dog-icon.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    /* Override the absolute positioning from original bear-dog-mask */
    top: auto !important;
    left: auto !important;
    transform: none !important;
    overflow: hidden;
}

.bear-dog-mask-centered img {
    width: 100% !important;
    height: 150% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    position: relative !important;
    top: -25% !important;
}


/* Responsive adjustments for masked image section */
@media (max-width: 782px) {
    .bear-dog-mask-centered {
        width: 480px !important;
    }
    
    .masked-image-section::before {
        background-size: 80px;
    }
}

/* ==========================================================================
   Cover Blocks
   ========================================================================== */

.wp-block-cover {
    overflow: hidden;
}

.wp-block-cover h1,
.wp-block-cover h2 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Separators / Gold Accent Lines
   ========================================================================== */

.wp-block-separator {
    border: none;
    opacity: 1;
}

.wp-block-separator:not(.is-style-wide) {
    width: 50px;
    height: 3px;
    border-radius: 3px;
    margin-left: 0;
}

.wp-block-separator.aligncenter:not(.is-style-wide) {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-separator.has-secondary-background-color {
    background: var(--color-secondary);
}

/* BD Accent Lines — short decorative horizontal bars used before headings */
.bd-accent-line.is-style-wide,
.bd-accent-line {
    width: 50px !important;
    max-width: 50px !important;
    height: 3px !important;
    border-radius: 3px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    background: var(--color-secondary) !important;
    display: block;
}

.bd-accent-line--primary.is-style-wide,
.bd-accent-line--primary {
    background: var(--color-primary) !important;
}

/* ==========================================================================
   Homepage Section Spacing — Generous & Breathing
   ========================================================================== */

/* Ensure consistent vertical rhythm */
.wp-block-group.alignfull {
    margin-top: 0;
    margin-bottom: 0;
}

/* Ensure sections have minimum height */
main.wp-block-group > .wp-block-group.alignfull,
main.wp-block-group > .wp-block-cover.alignfull,
main > .wp-block-group.alignfull,
main > .wp-block-cover.alignfull {
    min-height: 50vh !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Also target patterns within main that might not have direct relationship */
.wp-block-group.alignfull.has-white-background-color,
.wp-block-group.alignfull.has-light-background-color,
.wp-block-group.alignfull.has-dark-background-color,
.wp-block-group.alignfull.has-primary-background-color,
.wp-block-group.alignfull.has-tertiary-background-color,
.wp-block-group.alignfull.has-contrast-background-color,
.wp-block-cover.alignfull:not(.site-hero) {
    min-height: 50vh !important;
}

/* Home hero section — full viewport height */
.hero-with-header .wp-block-cover.alignfull.site-hero {
    min-height: 100vh !important;
}

/* Inner page hero — respect the inline min-height (70vh / 60vh) */
.wp-block-cover.alignfull.site-hero {
    min-height: 70vh;
}

/* Push hero content clear of the fixed header — header is ~87px on desktop, ~65px on mobile.
   Adds 1.5rem breathing room on top of the existing spacing-80 (96px) padding. */
.site-hero .wp-block-cover__inner-container > .wp-block-group:first-child {
    padding-top: calc(var(--wp--preset--spacing--80) + 1.5rem) !important;
}

/* Darken inner page hero overlays for better text readability (home page excluded via body class) */
body:not(.home) .site-hero .wp-block-cover__background {
    background-color: rgba(0, 0, 0, 0.55) !important;
    opacity: 1 !important;
}


/* Trust-tile headings — clear hierarchy */
.trust-tile h3 {
    font-weight: 400 !important;
    letter-spacing: 0.04em;
    opacity: 0.6;
}

.trust-tile h4 {
    font-family: var(--font-body) !important;
    font-weight: 700;
    font-size: 0.8rem !important;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--color-dark);
}

/* Trust tiles - consistent card styling */
.wp-block-group.alignfull.has-light-background-color .wp-block-columns .wp-block-column .wp-block-group.has-white-background-color {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Column vertical alignment fix */
.wp-block-columns.alignwide {
    align-items: stretch;
}

/* Ensure paragraphs in cards don't have extra bottom margin */
.wp-block-group.has-white-background-color:not(.alignfull) p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Scroll-Triggered Animations
   ========================================================================== */

.bd-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bd-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bd-fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bd-fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.bd-fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bd-fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animation delays for child elements */
.bd-stagger > *:nth-child(1) { transition-delay: 0s; }
.bd-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.bd-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.bd-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.bd-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.bd-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* Scale-up animation for cards */
.bd-scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bd-scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Hero content animation */
.site-hero .wp-block-cover__inner-container {
    animation: heroFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Home hero inner container — full viewport, space-between for scroll indicator */
.hero-with-header .site-hero .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 100vh;
    padding-top: 0 !important;
    padding-bottom: var(--wp--preset--spacing--60) !important;
}

/* Home hero content group — grows to fill and centers its children */
.hero-with-header .site-hero .wp-block-cover__inner-container > .wp-block-group:not(.scroll-indicator) {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Scroll indicator stays in flow, centered at bottom (home hero only) */
.hero-with-header .site-hero .scroll-indicator {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0 !important;
}

/* Hero subheading styling */
.hero-subheading {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Scroll indicator animation */
.scroll-indicator {
    opacity: 0.7;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator p {
    position: relative;
    padding-bottom: 1.5rem;
}

.scroll-indicator p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes scrollLine {
    0%, 100% { opacity: 0.3; height: 20px; }
    50% { opacity: 0.7; height: 30px; }
}

/* ==========================================================================
   Eyebrow Labels - Modern Label Styling
   ========================================================================== */

/* Ensure eyebrow labels have proper styling */
.has-secondary-color[style*="letter-spacing: 0.15em"] {
    font-family: var(--font-body);
}

/* ==========================================================================
   Section Divider Accents
   ========================================================================== */

/* Subtle top border accent on alternating sections */
.wp-block-group.alignfull + .wp-block-group.alignfull,
.wp-block-cover.alignfull + .wp-block-group.alignfull,
.wp-block-group.alignfull + .wp-block-cover.alignfull {
    position: relative;
}

/* ==========================================================================
   Community Section - Icon Pattern Overlay
   ========================================================================== */

.community-section {
    position: relative;
    overflow: hidden;
}

.community-section::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -20%;
    transform: translateY(-50%);
    width: 150%;
    height: 150%;
    background-image: url('./assets/images/bear-dog-icon.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.community-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 0;
}

.community-section > .wp-block-group {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Footer — Refined Spacing
   ========================================================================== */

.site-footer {
    background: var(--color-dark);
    color: var(--color-white);
    position: relative;
    /* Pull the footer up so its rounded top corners tuck flush
       under the preceding section — eliminates the colour gap
       regardless of what colour the section above is. */
    margin-top: calc(-1 * var(--radius-md));
    /* Sit on top of the section above so content isn't hidden */
    z-index: 1;
    /* Only round the top two corners; override the generic
       .wp-block-group.has-background rule which has higher specificity */
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.site-footer h4 {
    color: var(--color-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.site-footer a:hover {
    color: var(--color-secondary);
}

.site-footer .wp-block-separator {
    background: rgba(255, 255, 255, 0.1);
    height: 1px;
}

/* Footer nav links spacing */
.site-footer .wp-block-navigation-item {
    transition: transform var(--transition);
}

.site-footer .wp-block-navigation-item:hover {
    transform: translateX(4px);
}

.site-footer .wp-block-group.alignwide:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-footer .wp-block-group.alignwide:last-child > p:nth-child(2) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-footer .wp-block-group.alignwide:last-child {
    position: relative;
}

/* ==========================================================================
   Section Spacing
   ========================================================================== */

.alignfull + .alignfull {
    margin-top: 0;
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */

@media (max-width: 1024px) {
    /* Trust tiles: 2-column grid on tablet */
    .wp-block-group.alignfull.has-light-background-color .wp-block-columns.alignwide.bd-stagger {
        flex-wrap: wrap;
    }

    .wp-block-group.alignfull.has-light-background-color .wp-block-columns.alignwide.bd-stagger > .wp-block-column {
        flex-basis: calc(50% - 1rem) !important;
        min-width: calc(50% - 1rem);
    }

    /* Two-col sections: tighten gap on tablet */
    .wp-block-columns.alignwide[style*="blockGap"] {
        gap: 3rem !important;
    }

    /* Hero heading size reduction for tablet */
    .site-hero h1 {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 782px) {
    :root {
        --radius-lg: 20px;
        --radius-md: 12px;
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-direction: column;
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 100% !important;
    }

    /* Trust tiles: single column on mobile */
    .wp-block-group.alignfull.has-light-background-color .wp-block-columns.alignwide.bd-stagger > .wp-block-column {
        flex-basis: 100% !important;
        min-width: 100%;
    }

    /* Reduce section min-heights on mobile */
    main.wp-block-group > .wp-block-group.alignfull,
    main.wp-block-group > .wp-block-cover.alignfull,
    main > .wp-block-group.alignfull,
    main > .wp-block-cover.alignfull,
    .wp-block-group.alignfull.has-white-background-color,
    .wp-block-group.alignfull.has-light-background-color,
    .wp-block-group.alignfull.has-dark-background-color,
    .wp-block-group.alignfull.has-primary-background-color,
    .wp-block-cover.alignfull {
        min-height: auto !important;
    }

    /* Tighter section padding on mobile */
    .wp-block-group.alignfull[style*="padding-top:var(--wp--preset--spacing--80)"] {
        padding-top: var(--wp--preset--spacing--60) !important;
        padding-bottom: var(--wp--preset--spacing--60) !important;
    }

    /* Community section heading size */
    .community-section h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    /* Disable animations on mobile for performance */
    .bd-fade-in,
    .bd-fade-in-left,
    .bd-fade-in-right,
    .bd-scale-in {
        opacity: 1;
        transform: none;
    }

    /* Logo — smaller on mobile */
    .site-header .site-logo img {
        width: 160px !important;
        max-width: 160px !important;
    }

    .site-header.bd-header--scrolled .site-logo img {
        width: 120px !important;
        max-width: 120px !important;
    }

    /* Hero — reduce min-height on mobile */
    .hero-with-header .wp-block-cover.alignfull.site-hero,
    .wp-block-cover.alignfull.site-hero {
        min-height: 60vh !important;
    }

    .hero-with-header .site-hero .wp-block-cover__inner-container {
        min-height: 60vh;
        padding-bottom: var(--wp--preset--spacing--40) !important;
    }

    /* Hide scroll indicator on mobile — no room and not needed */
    .scroll-indicator {
        display: none;
    }

    /* Hero subheading — tighter font size on mobile */
    .hero-subheading,
    .hero-subheading.wp-block-paragraph,
    body:not(.home) .site-hero .wp-block-cover__inner-container p:not(.has-small-font-size) {
        font-size: 1rem !important;
    }

    /* Nav font size in mobile overlay */
    .site-header .wp-block-navigation a,
    .site-header .wp-block-navigation-item__content {
        font-size: 2rem !important;
    }

    /* Mobile menu — full-width nav items */
    .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        width: 100%;
        align-items: stretch;
    }

    .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
        width: 100%;
    }

    .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 0;
    }

    /* Section padding — also cover spacing-70 */
    .wp-block-group.alignfull[style*="padding-top:var(--wp--preset--spacing--70)"] {
        padding-top: var(--wp--preset--spacing--50) !important;
        padding-bottom: var(--wp--preset--spacing--50) !important;
    }

    /* Partner logo grid — 3 columns on mobile */
    .partner-logo-item {
        flex: 0 0 calc(33% - 2rem);
        min-width: 90px;
        min-height: 70px;
    }

    /* Dropdown — prevent overflow off right edge on narrow screens */
    .bd-portal-dropdown,
    .bd-user-dropdown {
        max-width: calc(100vw - 1rem);
    }

    /* Column gaps — tighter when stacked */
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        gap: 1.5rem;
    }

    .wp-block-columns.is-not-stacked-on-mobile {
        gap: 2rem !important;
    }

    /* Hero site heading */
    .site-hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    /* -----------------------------------------------------------------------
       Footer — mobile layout
       ----------------------------------------------------------------------- */

    /* Reduce top padding */
    .site-footer {
        padding-top: var(--wp--preset--spacing--60) !important;
    }

    /* Stacked columns: consistent gap and full-width */
    .site-footer .wp-block-columns {
        gap: var(--wp--preset--spacing--50) !important;
    }

    /* Separator — tighter margins */
    .site-footer .wp-block-separator.alignwide {
        margin-top: var(--wp--preset--spacing--50) !important;
        margin-bottom: var(--wp--preset--spacing--30) !important;
    }

    /* Bottom bar — stack vertically, remove the absolute-centred middle item */
    .site-footer .wp-block-group.alignwide:last-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .site-footer .wp-block-group.alignwide:last-child > p:nth-child(2) {
        position: static;
        left: auto;
        transform: none;
    }

    /* Remove excess bottom margin from footer paragraphs in the bottom bar */
    .site-footer .wp-block-group.alignwide:last-child p {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   Responsive — Small phones (480px and below)
   ========================================================================== */

@media (max-width: 480px) {
    /* Partner card padding — tighter on small phones */
    .partner-cards-grid .partner-card {
        padding: 1.25rem;
    }

    /* Partner logo grid — 2 columns */
    .partner-logo-item {
        flex: 0 0 calc(50% - 2rem);
    }

    /* Login modal — tighter padding on small phones */
    .bd-login-modal__panel {
        padding: 1.5rem 1.25rem 2rem;
    }

    /* Dropdown — full-width on very small screens */
    .bd-portal-dropdown,
    .bd-user-dropdown {
        min-width: auto;
        width: calc(100vw - 1rem);
        right: 0;
    }

    /* Button group spacing */
    .wp-block-buttons {
        margin-top: 1.5rem;
        gap: 0.75rem;
    }

    /* Tighter heading bottom spacing */
    h1, h2, h3, h4, h5, h6,
    .wp-block-heading {
        margin-bottom: 0.875rem;
    }
}

/* ==========================================================================
   Mobile menu scroll lock
   ========================================================================== */

body.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

::selection {
    background: var(--color-secondary);
    color: var(--color-dark);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bd-fade-in,
    .bd-fade-in-left,
    .bd-fade-in-right,
    .bd-scale-in {
        opacity: 1;
        transform: none;
    }
}

/* =============================================================================
   LOGIN ICON + MODAL
   ============================================================================= */

/* Fix header flex layout when login icon is injected after the nav block.
   Override space-between so the logo stays left and nav+icon group right. */
.site-header .wp-block-group.alignwide {
    justify-content: flex-start !important;
}
.site-header .wp-block-group.alignwide .wp-block-navigation {
    margin-left: auto;
}
.site-header .wp-block-group.alignwide .bd-login-icon-wrap {
    margin-left: var(--wp--preset--spacing--40);
}

.bd-login-icon-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

/* --- Logged-out: person icon button --- */
.bd-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    color: inherit;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.bd-login-btn:hover {
    opacity: 0.7;
}

/* On transparent (white-text) header the icon should be white */
.is-transparent .bd-login-icon {
    stroke: #ffffff;
}

/* After scroll, header turns red — keep icon white */
.bd-header--scrolled .bd-login-icon {
    stroke: #ffffff;
}

/* On solid white header, icon should be dark */
.site-header:not(.is-transparent):not(.bd-header--scrolled) .bd-login-icon {
    stroke: var(--wp--preset--color--dark, #1a1a1a);
}

/* --- Logged-out: portal choice dropdown --- */
.bd-portal-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    z-index: 9998;
    animation: bd-modal-in 0.18s ease;
}

.bd-portal-dropdown[hidden] {
    display: none;
}

.bd-portal-dropdown__link {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--wp--preset--color--dark, #1a1a1a);
    text-decoration: none;
    transition: background 0.15s ease;
}

.bd-portal-dropdown__link:hover {
    background: #f7f7f5;
    color: var(--wp--preset--color--primary, #d71f1e);
}

.bd-portal-dropdown__divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0.25rem 0;
}

.bd-portal-dropdown__signin {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #d71f1e);
    cursor: pointer;
    transition: background 0.15s ease;
}

.bd-portal-dropdown__signin:hover {
    background: #f7f7f5;
}

/* --- Login modal overlay --- */
.bd-login-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-login-modal[hidden] {
    display: none;
}

.bd-login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(3px);
}

.bd-login-modal__panel {
    position: relative;
    background: #ffffff;
    padding: 2.5rem 2.5rem 3rem;
    width: min(420px, calc(100vw - 2rem));
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bd-modal-in 0.22s ease;
}

@keyframes bd-modal-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bd-login-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--wp--preset--color--gray, #666);
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
    transition: color 0.15s ease;
}

.bd-login-modal__close:hover {
    color: var(--wp--preset--color--dark, #1a1a1a);
}

.bd-login-modal__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.bd-login-modal__logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.bd-login-error {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 2px;
    font-size: 0.875rem;
    color: #b91c1c;
    line-height: 1.5;
}

.bd-login-modal__title {
    font-family: var(--wp--preset--font-family--heading, 'Teko', sans-serif);
    font-size: 1.75rem;
    font-weight: 400;
    text-align: center;
    color: var(--wp--preset--color--dark, #1a1a1a);
    margin: 0 0 1.5rem;
    letter-spacing: 0.02em;
}

/* WordPress login form overrides inside the modal */
.bd-login-modal__panel .login-username,
.bd-login-modal__panel .login-password,
.bd-login-modal__panel .login-remember {
    margin-bottom: 1rem;
}

.bd-login-modal__panel label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp--preset--color--gray, #666);
    margin-bottom: 0.4rem;
}

.bd-login-modal__panel input[type="text"],
.bd-login-modal__panel input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 1rem;
    color: var(--wp--preset--color--dark, #1a1a1a);
    background: #fafafa;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.bd-login-modal__panel input[type="text"]:focus,
.bd-login-modal__panel input[type="password"]:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #d71f1e);
    background: #fff;
}

.bd-login-modal__panel .login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bd-login-modal__panel .login-remember label {
    margin: 0;
    text-transform: none;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0;
}

.bd-login-modal__panel input[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-top: 1.25rem;
    background: var(--wp--preset--color--primary, #d71f1e);
    color: #ffffff;
    border: none;
    border-radius: 2px;
    font-family: var(--wp--preset--font-family--heading, 'Teko', sans-serif);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bd-login-modal__panel input[type="submit"]:hover {
    background: #b81918;
}

/* --- Logged-in: user initial button + dropdown --- */
.bd-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wp--preset--color--primary, #d71f1e);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bd-user-btn:hover {
    opacity: 0.85;
}

.bd-user-initial {
    font-family: var(--wp--preset--font-family--heading, 'Teko', sans-serif);
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0.05em;
}

.bd-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    z-index: 9998;
    animation: bd-modal-in 0.18s ease;
}

.bd-user-dropdown[hidden] {
    display: none;
}

.bd-user-name {
    padding: 0.6rem 1rem 0.4rem;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--wp--preset--color--gray, #666);
    border-bottom: 1px solid #f0f0f0;
}

.bd-user-dropdown__link {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--wp--preset--color--dark, #1a1a1a);
    text-decoration: none;
    transition: background 0.15s ease;
}

.bd-user-dropdown__link:hover {
    background: #f7f7f5;
    color: var(--wp--preset--color--primary, #d71f1e);
}

.bd-user-dropdown__link--logout {
    border-top: 1px solid #f0f0f0;
    margin-top: 0.25rem;
    color: var(--wp--preset--color--gray, #666);
}

/* ============================================================
   Cookie Consent Banner
   ============================================================ */

#bd-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--wp--preset--color--dark, #1a1a1a);
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.2);
    animation: bd-cookie-slide-up 0.3s ease;
}

@keyframes bd-cookie-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#bd-cookie-banner.bd-cookie-banner--hidden {
    animation: bd-cookie-slide-down 0.3s ease forwards;
}

@keyframes bd-cookie-slide-down {
    from { transform: translateY(0); }
    to   { transform: translateY(110%); }
}

.bd-cookie-banner__text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    flex: 1;
    min-width: 200px;
}

.bd-cookie-banner__link {
    color: var(--wp--preset--color--secondary, #c8a96a);
    text-underline-offset: 3px;
}

.bd-cookie-banner__link:hover {
    color: #fff;
}

.bd-cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.bd-cookie-banner__accept,
.bd-cookie-banner__decline {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.bd-cookie-banner__accept {
    background: var(--wp--preset--color--primary, #d71f1e);
    color: #fff;
}

.bd-cookie-banner__decline {
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
}

.bd-cookie-banner__accept:hover {
    opacity: 0.88;
}

.bd-cookie-banner__decline:hover {
    color: #fff;
    border-color: #999;
}

@media (max-width: 600px) {
    #bd-cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Family Photo Collage ===== */
.family-pinboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 8px;
}

.family-pin img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.family-pin--1 { transform: rotate(-3.5deg); }
.family-pin--2 { transform: rotate(3.2deg);  }
.family-pin--3 { transform: rotate(2.8deg);  }
.family-pin--4 { transform: rotate(-4.5deg); }

.family-pin--1:hover { transform: rotate(-3.5deg) scale(1.05); }
.family-pin--2:hover { transform: rotate(3.2deg)  scale(1.05); }
.family-pin--3:hover { transform: rotate(2.8deg)  scale(1.05); }
.family-pin--4:hover { transform: rotate(-4.5deg) scale(1.05); }

/* ===== About Page — mobile layout improvements ===== */
@media (max-width: 600px) {

    /* Hero h1: rein in the size on narrow screens */
    .site-hero h1.wp-block-heading {
        font-size: clamp(2rem, 9vw, 3rem) !important;
        line-height: 1.1 !important;
    }

    /* Leadership bios: tighter type so the long copy is easier to scan */
    .leadership-card p {
        font-size: 0.875rem !important;
        line-height: 1.75 !important;
    }

    /* "How we work" cards: reduce the generous desktop padding */
    .community-section .bd-scale-in {
        padding: 1.5rem !important;
    }

    /* "How we work" two-column items: stack heading above copy */
    .community-section .wp-block-columns {
        flex-direction: column !important;
    }
    .community-section .wp-block-columns .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
    }
    .community-section .wp-block-columns .wp-block-heading {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
}
