/* ============================================================
   PROJECT: CATHERINE MCKINNON - Digital Resurrection
   FRAMEWORK: BND Solutions Master Design (Bambang Architecture)
   VERSION: 1.6.7 (The Mobile Pyramid Restoration)
   LOGIC: Hardened centering for Pixel 10 Pro; Left-align for Desktop
   ============================================================ */

:root {
    --bnd-primary: #D16E63;       /* Literary Coral */
    --bnd-secondary: #B2C2B9;     /* Muted Footer Teal */
    --bnd-body-bg: #F2F4E7;       /* Sage/Cream Paper */
    --bnd-text-main: #333333;     /* Charcoal */
    --bnd-font-heading: 'Playfair Display', serif;
    --bnd-font-body: 'Source Sans Pro', -apple-system, sans-serif;
    --bnd-para-spacing: 2.5rem;
    --bnd-blur: 18px;
}

/* 1. GLOBAL DEFAULTS */
body {
    background-color: var(--bnd-body-bg) !important;
    color: var(--bnd-text-main) !important;
}

/* 2. HEADER & FROSTY ARCHITECTURE */
header.wp-block-template-part, 
.home-header {
    background-color: rgba(242, 244, 231, 0.7) !important;
    backdrop-filter: blur(var(--bnd-blur)) !important; 
    -webkit-backdrop-filter: blur(var(--bnd-blur)) !important;
    position: sticky !important;
    top: 0;
    z-index: 9999 !important;
    border-bottom: 1px solid rgba(209, 110, 99, 0.1) !important;
}

/* Hardened Shield: Prevent the Site Title from ever mutating into a pill */
.wp-block-site-title,
.wp-block-site-title a {
    white-space: nowrap !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    background-color: transparent !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    transform: none !important;
}

/* 3. THE ALIGNMENT LOCK (Vertical Center Force) */
.bnd-align-lock .wp-block-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
}

.wp-block-site-tagline {
    margin: 0 !important;
    line-height: 1 !important;
}

/* ------------------------------------------------------------
   4. NAVIGATION: THE GEMINI PILL UI (v1.6.7 Standardized)
   Logic: Standardized active states working seamlessly with fixed slugs
   ------------------------------------------------------------ */

/* THE BASE PILL - Universal definition for clean button rendering */
header [class*="wp-block-navigation-item"] a,
header .wp-block-navigation-item__content {
    display: inline-block !important;
    border-radius: 50px !important; 
    padding: 8px 20px !important;   
    border: 1px solid rgba(51, 51, 51, 0.15) !important; 
    background-color: rgba(209, 110, 99, 0.06) !important; 
    font-family: var(--bnd-font-body) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: var(--bnd-text-main) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* THE HOVER STATE */
header [class*="wp-block-navigation-item"] a:hover,
header .wp-block-navigation-item__content:hover {
    background-color: rgba(209, 110, 99, 0.15) !important; 
    border-color: var(--bnd-primary) !important;
    color: var(--bnd-primary) !important;
    transform: translateY(-1px) !important;
}

/* THE CURRENT/ACTIVE STATE (The "You Are Here" Glow) */
header [class*="wp-block-navigation-item"].current-menu-item > a,
header [class*="wp-block-navigation-item"].current-menu-item > .wp-block-navigation-item__content,
header [class*="wp-block-navigation-item"].is-current-page > a,
header [class*="wp-block-navigation-item"].is-current-page > .wp-block-navigation-item__content,
header [class*="wp-block-navigation-item"].current_page_item > a {
    background-color: var(--bnd-primary) !important; 
    border-color: var(--bnd-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(209, 110, 99, 0.2) !important;
}

/* ------------------------------------------------------------
   STUBBORN TAXONOMY SEPARATOR
   Logic: Extra guard to keep Events unlit on the clean Reviews page
   ------------------------------------------------------------ */
body[class*="reviews"] header [class*="wp-block-navigation-item"] a[href*="events"] {
    background-color: rgba(209, 110, 99, 0.06) !important;
    border-color: rgba(51, 51, 51, 0.15) !important;
    color: var(--bnd-text-main) !important;
    box-shadow: none !important;
}

/* ============================================================
   BAMBANG FORENSIC OVERRIDES (The Content-State Lock)
   Logic: Direct page body enforcement when the CMS misbehaves
   ============================================================ */

/* A. THE REVIEWS FIX: Force Reviews ON and strictly turn Events OFF */
body[class*="reviews"] header [class*="wp-block-navigation-item"] a[href*="events"] {
    background-color: rgba(209, 110, 99, 0.06) !important;
    border-color: rgba(51, 51, 51, 0.15) !important;
    color: var(--bnd-text-main) !important;
    box-shadow: none !important;
}
body[class*="reviews"] header [class*="wp-block-navigation-item"] a[href*="reviews"] {
    background-color: var(--bnd-primary) !important; 
    border-color: var(--bnd-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(209, 110, 99, 0.2) !important;
}

/* B. THE CONTACT FIX: Force Contact ON when viewing the contact page layout */
body[class*="contact"] header [class*="wp-block-navigation-item"] a[href*="contact"] {
    background-color: var(--bnd-primary) !important; 
    border-color: var(--bnd-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(209, 110, 99, 0.2) !important;
}

/* 5. CONTENT & FOOTER */
footer { background-color: var(--bnd-secondary) !important; }

/* ------------------------------------------------------------
   6. MOBILE RESPONSIVE SUITE (Pixel 10 Pro - Center Pyramid)
   Logic: Perfect fluid wrapping with precise scaling to eliminate cropping
   ------------------------------------------------------------ */
@media (max-width: 781px) {
    .wp-block-site-title,
    .wp-block-site-tagline {
        text-align: center !important;
        width: 100% !important;
    }

    .bnd-align-lock .wp-block-row,
    header .wp-block-row {
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .wp-block-social-links {
        justify-content: center !important;
        margin-top: 5px !important;
    }

    /* THE NAVIGATION PYRAMID MATRIX */
    .wp-block-navigation ul.wp-block-navigation__container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important; /* Allows items to naturally step down into rows instead of clipping */
        justify-content: center !important; /* Centers the remaining pills on the second row */
        align-items: center !important;
        gap: 8px 6px !important; /* 8px vertical gap between rows, 6px horizontal gap between pills */
        padding: 0 15px !important; /* Safety padding inside phone screen edges */
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    /* MICRO-SCALING HARDENING: Making tap targets compact to stay on screen */
    header [class*="wp-block-navigation-item"] a,
    header .wp-block-navigation-item__content {
        padding: 5px 11px !important; /* Tighter padding to save precious phone layout width */
        font-size: 0.72rem !important; /* Crisp, perfectly legible literary microtype */
        white-space: nowrap !important; /* Prevents button words from snapping awkwardly in half */
        display: inline-block !important;
    }

    header .wp-block-group {
        align-items: center !important;
    }
}