.navbar,
.navbar * {
    color: #000 !important;
}
footer,
footer * {
    color: #ffffff !important;
}

:root {
    --btncolor: #4e73df;
    --apply_heading: #1a5276;
    --header-bg: #ffffff;
    --footer-bg: #1a1a2e;
}

/* Form header styling */
.form-head {
    background-color: var(--apply_heading);
    color: white;
    font-weight: bold;
    padding: 15px;
    text-align: center;
}

/* Button styling */
.btn-primary,
.btn-submit {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
}

.btn-primary:hover,
.btn-submit:hover {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
    opacity: 0.9;
}

.btn-call {
    background-color: var(--btncolor);
    border-color: var(--btncolor);
    color: var(--btn-text-color, white);
}

/* Dynamic text color calculation for call button */
.btn-call,
.btn-call * {
    --btn-text-color: white; /* Default to white for most button colors */
}

/* For light colored buttons (yellow, light colors), use black text */
:root:has([style*="--btncolor: #FFE"]),
:root:has([style*="--btncolor: #FFF"]),
:root:has([style*="--btncolor: #EEE"]),
:root:has([style*="--btncolor: #DDD"]) {
    --btn-text-color: black;
}

/* Fallback: Use contrast-based approach with mix-blend-mode for better readability */
.navbar .btn-call,
.navbar .btn-call .tracking_href,
.navbar .btn-call .trackingid,
.navbar .btn-call span,
.navbar .btn-call b {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* For very light button colors, override to use dark text */
.btn-call.light-button,
.btn-call.light-button * {
    color: black !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

/* Layout: clearance below the fixed single-row header (~72px tall). */
.content {
    padding-top: 100px;
}

/* ------------------------------------------------------------------ */
/* Header / top navigation (modernized, issue #444 phase 13)          */
/* Single row on desktop: logo left, micro-site links center, phone   */
/* CTA far right. Below 992px the links collapse behind a hamburger.  */
/* ------------------------------------------------------------------ */
.navbar {
    background-color: var(--header-bg);
}

.navbar.ms-topnav {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.ms-topnav-links .nav-link {
    color: #333333 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
    text-decoration: none;
}

.ms-topnav-links .nav-link:hover,
.ms-topnav-links .nav-link:focus {
    color: var(--btncolor) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Compact one-line phone CTA pill. Keeps .tracking_href/.trackingid so the
   async tracking_did_loader can swap in the campaign DID. */
.ms-call-cta {
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.95rem;
}

.ms-call-cta:hover,
.ms-call-cta:focus {
    text-decoration: none;
    opacity: 0.9;
}

/* Footer styles */
footer {
    background-color: var(--footer-bg);
}

footer p,
footer a {
    color: #ffffff !important;
}

/* Muted footer link strip (issue #444 phase 13): visually quieter than the
   address block -- smaller type, reduced opacity, spaced separators -- but
   still clickable and WCAG-readable. */
footer .footer-links {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

footer .footer-links a {
    text-decoration: none;
}

footer .footer-links a:hover,
footer .footer-links a:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

footer .footer-sep {
    margin: 0 0.4rem;
    opacity: 0.5;
}

/* Background */
body {
    background: url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* Form container styling */
.custom-bg-top {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Legal-page card (privacy / sms-terms / opt-out): the shared-legal body
   partials render inside this card, which pins dark-on-light text so the
   copy never inherits the white hero text color from bs4_base2's
   `.content { color: white }` rule (the phase-13 white-on-white bug). */
.ms-legal-card {
    color: #212529;
}

.ms-legal-card > .container {
    /* The body partials carry their own `container py-5` wrapper for the
       standalone shared-legal pages; inside the card that padding doubles
       up, so tighten it (py-5 is !important, hence !important here). */
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Main content area */
.masthead-minor {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-uppercase {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Logo sizing
 * `width: auto` defeats any HTML `width=""` attribute so the logo keeps its
 * natural aspect ratio when `max-height` clamps it. Override per-blueprint by
 * setting `logo_max_height` on customermodel (rendered as inline style in topnav.html).
 */
.navbar-brand img {
    max-height: 60px;
    width: auto;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    /* Keep logo + CALL pill + hamburger on ONE compact row at 375px:
       tighter brand margin, smaller logo, denser pill and toggler. */
    .navbar.ms-topnav .navbar-brand {
        margin-right: 0.25rem;
    }

    .navbar-brand img {
        /* !important: must beat the inline `max-height: 60px`
           style topnav.html stamps on the img for desktop sizing. */
        max-height: 36px !important;
        width: auto;
    }

    .navbar.ms-topnav .navbar-toggler {
        padding: 0.25rem 0.5rem;
    }

    /* The header is a single compact row (logo + CALL pill + hamburger);
       the expanded link menu overlays the page as a dropdown. Neutralize
       bs4_base2.html's inline 170px mobile body-padding hack (page.css
       loads after that style block) and give the content just enough
       clearance for the collapsed bar. */
    body {
        padding-top: 0;
    }

    .content {
        padding-top: 84px;
    }

    .ms-call-cta {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem !important;
    }

    /* Expanded mobile menu: stacked links on the header background. */
    .navbar.ms-topnav .navbar-collapse {
        background-color: var(--header-bg);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 0.5rem;
    }

    .ms-topnav-links .nav-link {
        padding: 0.55rem 0.25rem;
    }
}

/* Hero CTA stack classes (kicker / headline / bullets / tagline) -- used by
 * config-driven herocontent HTML (e.g. micro-site variants). White over the
 * photo like .masthead-minor, with the same legibility shadow. Harmless when
 * a config's herocontent does not use them. */
.hero-stack { max-width: 560px; }
.hero-kicker { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 0.35rem; color: #1a5276; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); }
.hero-headline { font-weight: 700; margin-bottom: 0.75rem; color: #ffffff; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
.hero-stack .hero-content strong { font-size: 1.15rem; }
.hero-stack .hero-content p { margin-bottom: 0.75rem; }
.hero-bullets { list-style: none; padding-left: 0; margin-bottom: 0.9rem; }
.hero-bullets li { padding-left: 1.4em; position: relative; margin-bottom: 0.3rem; font-weight: 600; }
.hero-bullets li::before { content: "\2713"; position: absolute; left: 0; color: #4e73df; font-weight: 700; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); }
.hero-tagline { font-style: italic; font-weight: 600; margin-bottom: 0; }
