/*
Theme Name: Briscoe, Doddo and Associates
Theme URI: https://www.briscoepa.com/
Description: Child theme of protaxalliance, customized for Briscoe, Doddo and Associates, CPA, P.A.
Author: Briscoe migration
Template: protaxalliance
Version: 1.1.0
Text Domain: briscoe-child
*/

/* ===== Palette (navy + gold from live briscoepa.com logo) ===== */
:root {
    --briscoe-navy: #1e3b66;
    --briscoe-navy-dark: #072d68;
    --briscoe-navy-bright: #2a4d7a;
    --briscoe-gold: #c89941;
    --briscoe-gold-light: #f4f4c0;
    --briscoe-gold-dark: #a27a2e;
    --briscoe-cream: #faf6ed;
    --briscoe-silver: #e6e2dd;

    /* Override parent protaxalliance's --blue HSL */
    --blue-h: 214;
    --blue-s: 54%;
    --blue-l: 26%;
    --blue: var(--blue-h), var(--blue-s), var(--blue-l);

    --dark-blue-h: 218;
    --dark-blue-s: 87%;
    --dark-blue-l: 22%;
    --dark-blue: var(--dark-blue-h), var(--dark-blue-s), var(--dark-blue-l);
}

/* ===== Override parent theme's light-blue flourishes ===== */
.light-blue,
.grey-bg .check-list { color: var(--briscoe-gold) !important; }
.grey-bg .check-list svg,
.number-section span.number { color: var(--briscoe-navy) !important; background-color: var(--briscoe-navy) !important; }
.social-media a:hover { background: var(--briscoe-gold) !important; }

.btn.btn-blue,
a.btn.btn-blue {
    background-color: var(--briscoe-navy) !important;
    border-color: var(--briscoe-navy) !important;
    color: #ffffff !important;
}
.btn.btn-blue:hover,
a.btn.btn-blue:hover {
    background-color: var(--briscoe-gold) !important;
    border-color: var(--briscoe-gold) !important;
}

.slider-arrow { color: var(--briscoe-gold) !important; }
.slider-arrow:hover { color: var(--briscoe-gold-dark) !important; }

/* ===== Hero slider fade-effect fix =====
 * The swiper-bundle shipped with protaxalliance (Swiper 9.1.0) is missing the
 * position:absolute rule for .swiper-fade .swiper-slide, so all three hero
 * slides render stacked vertically. Restore the canonical fade overlay.
 */
.hero-slider.swiper-fade .swiper-wrapper { position: relative; }
.hero-slider.swiper-fade .swiper-slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    transform: none !important;
    opacity: 0 !important;
    transition: opacity 600ms ease-in-out;
    pointer-events: none;
    z-index: 0;
}
.hero-slider.swiper-fade .swiper-slide-active {
    opacity: 1 !important;
    position: relative !important;
    pointer-events: auto;
    z-index: 1;
}

/* Safari-only: with absolute-stacked fade slides + opacity transitions,
 * Safari paints inactive slides' figures (still in DOM, opacity 0) on top
 * of the active image because everything has z-index:auto. Force the figure
 * column to a higher stacking layer so the visible image always wins.
 * Chrome composites opacity:0 elements out of paint; Safari does not. */
.hero-section .hero-slider .swiper-slide > .row > .col-lg.order-lg-2,
.hero-section .hero-slider figure {
    position: relative;
    z-index: 2;
}

/* The three hero images have different native aspect ratios. In fade mode
 * every slide stacks at the tallest slide's height, stretching the whole
 * section. Lock each figure to a consistent ratio and cover the image so
 * the section stays a predictable height regardless of which slide shows. */
.hero-section .hero-slider figure {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 0 !important;
}
.hero-section .hero-slider figure img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: none !important;
    display: block;
}

@media (max-width: 900px) {
    .hero-section .hero-slider figure { aspect-ratio: 4 / 3; }
}

/* Spacing between the navy h3 headline and the lighter h4 description in
 * each hero slide. The parent theme stacks them flush; give the headline a
 * little breathing room before the descriptive subtitle. */
.hero-section .hero-content h3 {
    margin-bottom: 0.6em;
}
.hero-section .hero-content h4 {
    margin-top: 0;
}

/* ===== Scroll-reveal animations ============================================
 * .briscoe-reveal is added by reveal.js to sections, service cards, process
 * steps, and the team-page rows. They start hidden + offset, then transition
 * to their final state when IntersectionObserver flags them in-view.
 * Children of grouped containers get a transition-delay set inline by the
 * script so they cascade. */
.briscoe-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.briscoe-reveal--in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .briscoe-reveal,
    .briscoe-reveal--in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ===== Sub-heading typography inside content widgets =====
 * SiteOrigin Editor widgets (used on service pages, team bios, and the
 * Meet the Team hub) render raw <h2>/<h3>/<h4> with no parent-theme styling
 * — they inherit body text. Give them the Briscoe display look so bio
 * sections like "Academic and Professional Credentials" stand out.
 */
.panel-grid .so-panel.widget_sow-editor h2,
.panel-grid .so-panel.widget_sow-editor h3,
.panel-grid .so-panel.widget_sow-editor h4,
.so-widget-sow-editor h2,
.so-widget-sow-editor h3,
.so-widget-sow-editor h4 {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--briscoe-navy);
    line-height: 1.2;
    font-weight: 700;
}
.panel-grid .so-panel.widget_sow-editor h2,
.so-widget-sow-editor h2 {
    font-size: 2rem;
    margin: 1.6em 0 0.6em;
}
.panel-grid .so-panel.widget_sow-editor h3,
.so-widget-sow-editor h3 {
    font-size: 1.5rem;
    margin: 1.4em 0 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--briscoe-gold);
    display: inline-block;
}
.panel-grid .so-panel.widget_sow-editor h4,
.so-widget-sow-editor h4 {
    font-size: 1.2rem;
    margin: 1.2em 0 0.4em;
    color: var(--briscoe-navy-bright);
}

/* ===== Meet the Team page ===== */
body.page-id-415 .briscoe-team-card,
.briscoe-team-card {
    padding: 0.5em 0 1.5em;
}
.briscoe-team-card--principal { padding-bottom: 2em; }
.briscoe-team-card h3,
.briscoe-team-card h4 {
    font-family: "Playfair Display", serif;
}
.briscoe-team-card a.btn.btn-blue:hover {
    background: var(--briscoe-gold) !important;
    color: #fff !important;
}

/* Welcome row group photo (right column) — clip to a balanced ratio so
 * it doesn't dwarf the copy on the left. */
body.page-id-415 #pg-415-1 .so-panel.widget_sow-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center center;
    border-radius: 4px;
}

/* Principals row: photos cap to a consistent portrait crop so a tall
 * source (Richard) and a wide source (Brandon, seated) match in size.
 * Both cards live in the same 50/50 row (#pg-415-3). */
body.page-id-415 #pg-415-3 .so-panel.widget_sow-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 480px;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
}
/* Staff grid: enforce a consistent square tile for all 4 thumbnails. */
body.page-id-415 #pg-415-5 .so-panel.widget_sow-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
}

/* ===== /our-services/ card grid =============================================
 * 9 services rendered as clickable cards with icon, title, bullet list, and a
 * "Learn more" CTA. Mirrors the home-page service-card aesthetic but uses a
 * fresh class name so it doesn't fight the parent theme's 4-col layout. */
.briscoe-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 2rem auto 1rem;
    max-width: 1280px;
}
.briscoe-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--briscoe-silver);
    border-radius: 12px;
    padding: 2.5rem 1.75rem 1.75rem;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 2px 8px rgba(7, 45, 104, 0.04);
    transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease, background 280ms ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.briscoe-service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--briscoe-navy) 0%, var(--briscoe-gold) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 350ms ease;
}
.briscoe-service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(196, 158, 71, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 350ms ease;
    z-index: -1;
}
.briscoe-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(7, 45, 104, 0.16);
    border-color: var(--briscoe-gold);
}
.briscoe-service-card:hover::before {
    transform: scaleX(1);
}
.briscoe-service-card:hover::after {
    opacity: 1;
}
.briscoe-service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--briscoe-navy);
    color: #ffffff;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
    transition: background 280ms ease, transform 280ms ease, box-shadow 280ms ease;
    box-shadow: 0 6px 16px rgba(7, 45, 104, 0.18);
    position: relative;
}
.briscoe-service-card__icon::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(196, 158, 71, 0.35);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 320ms ease, transform 320ms ease;
}
.briscoe-service-card:hover .briscoe-service-card__icon {
    background: var(--briscoe-gold);
    transform: scale(1.06);
    box-shadow: 0 10px 22px rgba(196, 158, 71, 0.32);
}
.briscoe-service-card:hover .briscoe-service-card__icon::before {
    opacity: 1;
    transform: scale(1);
}
.briscoe-service-card__title {
    font-family: "Playfair Display", Georgia, serif !important;
    color: var(--briscoe-navy) !important;
    font-size: 1.65rem !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    line-height: 1.2;
    width: 100%;
}
.briscoe-service-card__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.4rem !important;
    flex: 1;
    width: 100%;
    text-align: left;
}
.briscoe-service-card__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    color: #444;
    font-size: 0.97rem;
    line-height: 1.45;
}
.briscoe-service-card__list i {
    color: var(--briscoe-gold);
    flex-shrink: 0;
    padding-top: 4px;
}
.briscoe-service-card__cta {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--briscoe-navy);
    background: transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-top: auto;
    padding: 0.7rem 1.6rem;
    border: 2px solid var(--briscoe-navy);
    border-radius: 999px;
    transition: color 260ms ease, background 260ms ease, border-color 260ms ease, gap 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}
.briscoe-service-card__cta i {
    transition: transform 260ms ease;
}
.briscoe-service-card:hover .briscoe-service-card__cta {
    color: #ffffff;
    background: var(--briscoe-navy);
    border-color: var(--briscoe-navy);
    gap: 0.75rem;
    box-shadow: 0 8px 18px rgba(7, 45, 104, 0.22);
}
.briscoe-service-card:hover .briscoe-service-card__cta i {
    transform: translateX(3px);
}

@media (max-width: 960px) {
    .briscoe-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .briscoe-services-grid { grid-template-columns: 1fr; gap: 1rem; }
    .briscoe-service-card { padding: 2rem 1.5rem 1.5rem; }
    .briscoe-service-card__icon { width: 72px; height: 72px; font-size: 1.75rem; }
    .briscoe-service-card__title { font-size: 1.45rem !important; }
}

/* ===== Global Professional Affiliations strip (footer) =====
 * Rendered on every page above the footer columns. Swiper-driven loop;
 * degrades to a flex row if Swiper isn't loaded. */
.briscoe-affiliations {
    background: #ffffff;
    padding: 9rem 0 2.5rem;
    border-top: 1px solid var(--briscoe-silver);
}
.briscoe-affiliations__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.briscoe-affiliations__heading {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 2.2rem;
    color: var(--briscoe-navy);
    text-align: center;
    margin: 0 0 2.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.briscoe-affiliations__swiper {
    overflow: hidden;
    width: 100%;
}
.briscoe-affiliations__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    padding: 0 0.5rem;
    box-sizing: border-box;
}
.briscoe-affiliations__slide img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.92;
    transition: filter 250ms ease, opacity 250ms ease, transform 250ms ease;
}
.briscoe-affiliations__slide img:hover {
    filter: none;
    opacity: 1;
    transform: scale(1.04);
}
/* Static fallback when Swiper isn't available. */
.briscoe-affiliations__swiper--static .swiper-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}
.briscoe-affiliations__swiper--static .briscoe-affiliations__slide {
    flex: 0 1 18%;
    min-width: 130px;
}
@media (max-width: 600px) {
    .briscoe-affiliations { padding: 6rem 0 1.8rem; }
    .briscoe-affiliations__heading { font-size: 1.65rem; margin-bottom: 1.4rem; }
    .briscoe-affiliations__slide { height: 80px; }
}

/* ===== "Why Choose Us" section (parent's .testimonial block) =====
 * Parent CSS doesn't cap the figure's width, so any image larger than the
 * old customers-review.png steals the entire flex row. Constrain the figure
 * so the text content (our Briscoe "why us" copy) gets its half.
 */
.testimonial { align-items: stretch; }
.testimonial > figure {
    width: 45%;
    max-width: 560px;
    flex-shrink: 0;
    margin: 0;
    overflow: hidden;
}
.testimonial > figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.testimonial .testimonial-content { min-width: 0; flex: 1 1 auto; }

@media (max-width: 900px) {
    .testimonial { flex-direction: column; margin-left: 0; padding-top: 0; }
    .testimonial > figure {
        width: 100%;
        max-width: none;
        margin: 0 0 1.5rem;
        border: 0;
    }
    .testimonial > figure img { max-height: 320px; }
    /* Parent theme draws a decorative navy half-height bar via ::after
     * (positioned 50% / -50% / -50% with width:100% and z-index:-1). On
     * mobile that bar bleeds outside the column and ends up overlapping
     * the text. Disable it on mobile — desktop still gets the accent. */
    .testimonial::after { display: none; }
    .testimonial-content { padding: 0 1.25rem 2rem !important; }
    /* Parent's `.testimonial-content .section-content { padding: 0 5rem; }`
     * leaves almost no usable width on a phone. Strip the inner side
     * padding so the body text actually has room to read. */
    .testimonial-content .section-content { padding: 0 !important; }
    .testimonial-content .section-header { text-align: center; }
}

.gradient,
.hero-section figure::after {
    background: linear-gradient(0deg, var(--briscoe-navy) 0%, var(--briscoe-gold) 100%) !important;
}

/* Parent theme sets `html, body { overflow-x: hidden }` which breaks
 * `position: sticky` (a hidden overflow ancestor creates a scroll container
 * without actually scrolling, so sticky never pins). `overflow: clip`
 * prevents horizontal overflow without making the element a scroll
 * container, so sticky works. */
html,
body {
    overflow-x: clip !important;
}

/* ===== Site header =====
 * Sticky header that smoothly shrinks to a smaller size when scrolled.
 *
 * Animation history: an earlier version snapped the size change instantly
 * because animating layout (padding + logo max-height) over 250ms while
 * hysteresis was narrow (SHRINK_AT=80 / EXPAND_AT=20) caused a visible
 * shake — content below the sticky header reflowed mid-animation, the
 * scroll position re-crossed the threshold, and the header oscillated.
 *
 * The hysteresis was widened to SHRINK_AT=120 / EXPAND_AT=10 (see
 * js/nav.js:21-22). The 110px gap is far larger than the ~50px reflow
 * caused by the animation, so the threshold can no longer be re-crossed
 * mid-tween. Animations are now safe to re-enable; the wide hysteresis
 * is what keeps the wobble from coming back. */
header.site-header {
    background: #ffffff;
    border-bottom: 3px solid var(--briscoe-gold);
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Override parent's fixed min-height so the sticky shrink actually
     * shrinks the outer header to the inner content's natural size. */
    min-height: 0 !important;
    transition: box-shadow 220ms ease, border-bottom-width 220ms ease;
    will-change: box-shadow;
}

header.site-header.is-scrolled {
    box-shadow: 0 3px 14px rgba(7, 45, 104, 0.12);
    border-bottom-width: 2px;
}

header.site-header .site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px;
    gap: 20px;
    transition:
        padding-top 220ms cubic-bezier(0.22, 1, 0.36, 1),
        padding-bottom 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

header.site-header.is-scrolled .site-header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
}

header.site-header .site-logo,
header.site-header .site-branding img {
    max-height: 96px !important;
    max-width: 320px !important;
    transition:
        max-height 220ms cubic-bezier(0.22, 1, 0.36, 1),
        max-width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

header.site-header.is-scrolled .site-logo,
header.site-header.is-scrolled .site-branding img {
    max-height: 44px !important;
    max-width: 170px !important;
}

header.site-header .site-branding {
    text-decoration: none;
    color: var(--briscoe-navy);
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

header.site-header .site-logo {
    display: block;
    max-width: 280px;
    max-height: 70px;
    width: auto;
    height: auto;
}

header.site-header .firm-name {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--briscoe-navy);
    letter-spacing: 0.5px;
}

/* ===== Hamburger toggle (mobile only) ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--briscoe-navy);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--briscoe-navy);
    margin: 0 auto;
    transition: all 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Primary nav (desktop) ===== */
/* Use `header nav ul` selectors so we beat the parent protaxalliance rules
   that live on the same path — importantly `nav ul { display:flex !important }`
   at min-width:768px which otherwise forces our submenus visible. */
header nav > ul,
header nav ul.menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

header nav ul li {
    position: relative;
    list-style: none;
}

header nav ul li a {
    color: var(--briscoe-navy);
    font-weight: 600;
    text-decoration: none;
    padding: 10px 12px;
    display: block;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-family: "Montserrat", sans-serif;
}

header nav ul li a:hover {
    color: var(--briscoe-gold-dark);
}

/* Reset parent theme's absolute-positioned `::after` underline pseudo;
   put our caret inline after the label text. \25BE = ▾. */
header nav ul li.menu-item-has-children > a::after {
    content: " \25BE";
    font-size: 10px;
    position: static !important;
    display: inline-block;
    margin-left: 6px;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    transform: none !important;
    left: auto !important;
    bottom: auto !important;
    color: var(--briscoe-gold);
}

/* Submenus: hidden until hover. Parent theme has
   `nav ul { display:flex !important }` at min-width:768px —
   we have to use !important to beat that. */
header nav ul li.menu-item-has-children > ul,
header nav ul li .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid var(--briscoe-silver);
    border-top: 3px solid var(--briscoe-gold);
    min-width: 280px;
    max-width: 360px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 30px rgba(30, 59, 102, 0.18);
    z-index: 1000;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

header nav ul li.menu-item-has-children:hover > ul,
header nav ul li.menu-item-has-children:focus-within > ul {
    display: flex !important;
}

header nav ul li.menu-item-has-children > ul li {
    width: 100%;
}

header nav ul li.menu-item-has-children > ul li a {
    padding: 10px 18px;
    text-transform: none;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0;
    white-space: normal;
    line-height: 1.35;
    color: var(--briscoe-navy);
    border-left: 3px solid transparent;
}

header nav ul li.menu-item-has-children > ul li a:hover {
    background: var(--briscoe-cream);
    border-left-color: var(--briscoe-gold);
    color: var(--briscoe-navy-dark);
}

/* Current menu item */
header nav ul li.current-menu-item > a,
header nav ul li.current-page-ancestor > a,
header nav ul li.current-menu-ancestor > a {
    color: var(--briscoe-gold-dark);
}

/* ===== Mobile (< 900px) ===== */
@media (max-width: 899px) {
    header.site-header .site-header-inner {
        position: relative;
        flex-wrap: wrap;
    }

    header.site-header .site-logo {
        max-width: 200px;
    }

    .nav-toggle {
        display: flex;
    }

    header nav.primary-nav {
        display: none;
        flex-basis: 100%;
        order: 3;
        background: var(--briscoe-navy);
        border-top: 1px solid var(--briscoe-navy-dark);
        margin-top: 12px;
        padding: 0;
    }

    header nav.primary-nav.is-open {
        display: block;
    }

    header nav.primary-nav > ul,
    header nav.primary-nav ul.menu {
        display: block !important;
        flex-direction: column;
        gap: 0;
        padding: 0;
        background: var(--briscoe-navy);
    }

    header nav.primary-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        background: var(--briscoe-navy);
    }

    header nav.primary-nav ul li:last-child {
        border-bottom: none;
    }

    header nav.primary-nav ul li a {
        padding: 16px 24px;
        white-space: normal;
        color: #ffffff !important;
        background-color: var(--briscoe-navy) !important;
        font-weight: 600;
        border-bottom: none !important;
    }

    header nav.primary-nav ul li a:hover,
    header nav.primary-nav ul li a:focus {
        background: var(--briscoe-navy-bright);
        color: #ffffff !important;
    }

    header nav.primary-nav ul li.current-menu-item > a,
    header nav.primary-nav ul li.current-page-ancestor > a {
        color: var(--briscoe-gold-light) !important;
    }

    /* Mobile submenus: inline, darker background, expanded via .is-expanded */
    header nav.primary-nav ul li.menu-item-has-children > ul,
    header nav.primary-nav ul li .sub-menu {
        position: static !important;
        display: none !important;
        box-shadow: none;
        border: none;
        border-top: none;
        background: var(--briscoe-navy-dark);
        max-width: 100%;
        padding: 0;
    }

    header nav.primary-nav ul li.menu-item-has-children.is-expanded > ul {
        display: block !important;
    }

    header nav.primary-nav ul li.menu-item-has-children > ul li {
        background: var(--briscoe-navy-dark);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    header nav.primary-nav ul li.menu-item-has-children > ul li a {
        padding: 12px 24px 12px 44px;
        font-size: 13px;
        text-transform: none;
        font-weight: 400;
        color: #f1e7cf !important;
        background-color: var(--briscoe-navy-dark) !important;
    }

    header nav.primary-nav ul li.menu-item-has-children > ul li a:hover {
        background-color: var(--briscoe-navy-bright) !important;
        color: #ffffff !important;
    }

    header nav.primary-nav ul li.menu-item-has-children > a::after {
        float: right;
        margin-left: 10px;
        color: var(--briscoe-gold) !important;
    }
}

/* ===== Hide parent-theme breakaway artifacts that sometimes leak in ===== */
/* Parent header.php had a hardcoded `<a class="services-nav"><img>` caret image
   plus `<div class="dropdownMenu">` that are now unused by our header.php,
   but any stale cached copies should stay hidden. */
.services-nav img,
.dropdownMenu { display: none !important; }

/* ===== SiteOrigin widget tweaks ===== */
.so-widget-sow-headline h1,
.so-widget-sow-headline h2,
.so-widget-sow-headline h3 {
    color: var(--briscoe-navy) !important;
    font-family: "Playfair Display", Georgia, serif !important;
}
.so-widget-sow-headline .sow-sub-headline {
    color: var(--briscoe-gold-dark) !important;
}

.so-widget-sow-cta {
    border: 1px solid var(--briscoe-gold) !important;
    background: var(--briscoe-cream) !important;
}
.so-widget-sow-cta h3.sow-cta-title {
    color: var(--briscoe-navy) !important;
}

.so-widget-sow-features .sow-features-list-item-title { color: var(--briscoe-navy) !important; }
.so-widget-sow-features .sow-features-list-item:hover .sow-features-list-item-title { color: var(--briscoe-gold-dark) !important; }

.so-widget-sow-button a,
.panel-layout a.sow-button {
    background-color: var(--briscoe-navy) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}
.so-widget-sow-button a:hover,
.panel-layout a.sow-button:hover,
.panel-layout .sow-button-container a:hover {
    background-color: var(--briscoe-gold) !important;
    color: #ffffff !important;
}

/* Generic body polish */
body { font-family: "Lato", "Open Sans", system-ui, sans-serif; color: #2a2a2a; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; color: var(--briscoe-navy); }
h1 { font-weight: 700; }
a { color: var(--briscoe-navy-bright); }
a:hover { color: var(--briscoe-gold-dark); }

/* ===== Site footer ===== */
footer.site-footer {
    background: var(--briscoe-navy-dark);
    color: #ffffff;
    padding: 60px 24px 0;
    margin-top: 80px;
}
footer.site-footer .site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px 32px;
}
footer.site-footer h3 {
    color: var(--briscoe-gold);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    margin: 0 0 16px;
    letter-spacing: 0.3px;
}
footer.site-footer p,
footer.site-footer a {
    color: #e9e4d7;
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
}
footer.site-footer a:hover { color: var(--briscoe-gold-light); }

footer.site-footer .footer-menu {
    list-style: none;
    padding: 0; margin: 0;
}
footer.site-footer .footer-menu li { padding: 3px 0; }

footer.site-footer .site-footer-colophon {
    max-width: 1280px;
    margin: 48px auto 0;
    padding: 20px 0;
    border-top: 1px solid rgba(200, 153, 65, 0.2);
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #c8beab;
}

/* ===== Internal-page header pinstripes =====
 * Classic letterhead-style pinstripe behind the h1 in #inner-page-header.
 * Two diagonal hairlines per cycle — a navy structural line paired with a
 * gold accent — at very low opacity so the title remains dominant. */
#inner-page-header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
#inner-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -8deg,
        transparent 0,
        transparent 26px,
        rgba(30, 59, 102, 0.10) 26px,
        rgba(30, 59, 102, 0.10) 27px,
        transparent 27px,
        transparent 32px,
        rgba(200, 153, 65, 0.18) 32px,
        rgba(200, 153, 65, 0.18) 33px
    );
    z-index: -1;
    pointer-events: none;
}
#inner-page-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--briscoe-gold) 30%,
        var(--briscoe-gold) 70%,
        transparent 100%);
    opacity: 0.55;
    pointer-events: none;
}
@media (max-width: 600px) {
    #inner-page-header::before {
        background-image: repeating-linear-gradient(
            -8deg,
            transparent 0,
            transparent 18px,
            rgba(30, 59, 102, 0.10) 18px,
            rgba(30, 59, 102, 0.10) 19px,
            transparent 19px,
            transparent 22px,
            rgba(200, 153, 65, 0.18) 22px,
            rgba(200, 153, 65, 0.18) 23px
        );
    }
}

/* ===== Hide reCAPTCHA v3 floating badge =====
 * The badge is a Google-injected fixed-position widget on every page that
 * uses CF7 + reCAPTCHA. Per Google's ToS, when the badge is hidden the
 * reCAPTCHA disclosure must appear near the form submit button instead.
 * Disclosure copy lives in the contact form panel. */
.grecaptcha-badge {
    visibility: hidden !important;
}
