/* ============================================================================
 * site-overrides.css
 * Additions on top of the verbatim live-site site.css.
 * The live CSS already handles: .navbar-custom, .mjs-body, .bg-custom*,
 * .parallax1-3, .fa-* social brand colors, .text-custom.
 * Anything below is new for the ASP.NET rewrite.
 * ============================================================================ */

/* Bootstrap 5 .card forces its own color, breaking the text-white inheritance
   the live BS4 site relied on. Re-establish white text inside cards that sit
   on dark backgrounds. */
.card.bg-custom,
.card.bg-custom2,
.card.bg-custom3,
.card.bg-custom .card-header,
.card.bg-custom .card-body,
.card.bg-custom2 .card-header,
.card.bg-custom2 .card-body,
.card.bg-custom3 .card-header,
.card.bg-custom3 .card-body {
    color: #fff;
    background-color: transparent;
}
.card.bg-custom .card-header,
.card.bg-custom2 .card-header,
.card.bg-custom3 .card-header {
    border-bottom-color: rgba(255, 255, 255, .2);
}
.card.bg-custom a,
.card.bg-custom2 a,
.card.bg-custom3 a {
    color: #9ec5fe;
}

/* Live HTML uses .list-display for bullet lists inside requirements/sendgrid
   cards. The live class is defined elsewhere; mirror a minimal version. */
.list-display {
    padding-left: 1.5rem;
}
.list-display li { margin-bottom: .35rem; }


/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.site-footer .footer-copyright {
    color: #fff;
    font-size: .95rem;
}

.site-footer .footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .15);
    opacity: 1;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer .footer-privacy {
    color: rgba(255, 255, 255, .7);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background-color: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    text-decoration: none;
    font-size: 1rem;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, .22);
    border-color: #fff;
    transform: translateY(-2px);
}

:root {
    --ds-navy: #0C3C60;
    --ds-red: #FF0000;
    --ds-blue-card: rgba(57, 115, 155, .9);
    --ds-blue-card-light: rgba(112, 146, 190, .5);
    --ds-text-custom: rgb(76, 129, 165);
}


/* Live h1/h2/h3 reset (small sizes) is too compact for hero/section headers — restore something usable */
.page-hero h1, .section-band h2, .product-section h2 { font-size: 2rem; }
.page-hero h1 { font-size: 2.4rem; }

/* ===== Hero / Carousel (front page) ===== */
#heroCarousel .carousel-item {
    height: 70vh;
    min-height: 360px;
}
#heroCarousel .carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
#heroCarousel .carousel-caption {
    background: rgba(12, 60, 96, .55);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    bottom: 15%;
}
#heroCarousel .carousel-caption h2 { font-weight: 700; }

/* ===== Feature tiles (Products / Demo / Support cards on home) ===== */
.feature-tile {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    overflow: hidden;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}
.feature-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.feature-tile img { width: 100%; height: 220px; object-fit: cover; }
.feature-tile .tile-body { padding: 1.25rem 1.5rem 1.75rem; }
.feature-tile h3 { color: var(--ds-navy); font-weight: 700; }

/* ===== Section bands ===== */
.section-band { padding: 4rem 0; }
.section-band.light { background: #f3f6f9; }
.section-band.dark  { background: var(--ds-navy); color: #fff; }
.section-band.dark h1,
.section-band.dark h2,
.section-band.dark h3 { color: #fff; }

/* ===== Home page News & Updates: featured + latest (ticket 595f9fc3) =====
   Replaces the old #newsTickerCarousel. Markup: _FrontPageNewsPartial.cshtml. */
.home-news {
    background: var(--ds-navy);
    border-top: 1px solid var(--ds-red);
    padding: 3.5rem 1rem 4rem;
    text-align: left;
}
.home-news-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.75rem; }
.home-news-head {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem;
    border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 1rem;
}
.home-news-head h2 { margin: 0; color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: -.01em; }
.home-news-all {
    color: #fff; font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
}
.home-news-all:hover, .home-news-all:focus { color: #fff; text-decoration: underline; }
.home-news-empty { color: rgba(255,255,255,.85); margin: 0; }
.home-news-body { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: stretch; }

.home-news-featured {
    flex: 999 1 520px; min-width: 0;
    background: #fff; border-radius: 10px; padding: 2rem;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.home-news-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; }
.home-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: #5b6b7a; font-size: .9rem; }
.home-news-featured h3 { margin: 0; color: var(--ds-navy); font-size: 1.75rem; line-height: 1.2; font-weight: 700; }
.home-news-featured p { margin: 0; color: #2f3b46; font-size: 1.05rem; line-height: 1.6; }
.home-news-read {
    margin-top: auto; align-self: flex-start;
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem;
    border-radius: 8px; background: var(--ds-navy); color: #fff; font-weight: 600; text-decoration: none;
}
.home-news-read:hover, .home-news-read:focus { background: #082a44; color: #fff; }

.home-news-badge {
    /* Deeper than --ds-red: white on #FF0000 fails WCAG AA contrast. */
    display: inline-block; background: #C62828; color: #fff;
    font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .25rem .65rem; border-radius: 999px; line-height: 1.2;
}
.home-news-badge-sm { font-size: .68rem; padding: .15rem .5rem; margin-right: .4rem; vertical-align: .15em; }

.home-news-latest { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: .75rem; }
/* The list scrolls inside a column exactly as tall as the featured card:
   the column stretches to the row's height, and the list is taken out of the
   height calculation (absolute inside .home-news-latest), so more items never
   make the section taller. */
.home-news-list {
    display: flex; flex-direction: column; gap: .75rem;
    flex: 1 1 auto; min-height: 220px;
    overflow-y: auto; padding-right: .35rem;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
}
.home-news-list:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 10px; }
.home-news-list::-webkit-scrollbar { width: 8px; }
.home-news-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 8px; }
@media (min-width: 960px) {
    /* A short featured story still leaves room for about three entries. */
    .home-news-featured { min-height: 430px; }
    .home-news-latest { position: relative; }
    .home-news-list {
        position: absolute; left: 0; right: 0;
        top: 2rem;          /* below the "Latest" label */
        bottom: 3.25rem;    /* above "See all earlier news" */
    }
    .home-news-earlier { position: absolute; left: 0; bottom: 0; }
}
.home-news-earlier {
    color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none;
    display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
}
.home-news-earlier:hover, .home-news-earlier:focus { color: #fff; text-decoration: underline; }
/* Phones and narrow screens: no inner scroll area, just the first three. */
@media (max-width: 959.98px) {
    .home-news-list { overflow: visible; min-height: 0; padding-right: 0; }
    .home-news-list > .home-news-item:nth-child(n+4) { display: none; }
}
.home-news-label {
    margin: 0; color: rgba(255,255,255,.78);
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.home-news-item {
    text-decoration: none; display: flex; flex-direction: column; gap: .35rem;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px; padding: 1rem 1.1rem;
}
.home-news-item:hover, .home-news-item:focus { background: rgba(255,255,255,.14); }
.home-news-item-title { color: #fff; font-size: 1.05rem; font-weight: 650; line-height: 1.3; }
.home-news-item-text { color: rgba(255,255,255,.8); font-size: .9rem; line-height: 1.5; }
.home-news-item time { color: rgba(255,255,255,.72); font-size: .8rem; }

@media (max-width: 575.98px) {
    .home-news { padding: 2.25rem 1rem 2.5rem; }
    .home-news-head h2 { font-size: 1.5rem; }
    .home-news-featured { padding: 1.25rem; }
    .home-news-featured h3 { font-size: 1.3rem; }
    .home-news-featured p { font-size: 1rem; }
}

/* News page cards are link targets from the home section: keep the fixed
   navbar from covering the card's heading when the page jumps to it. */
.news-anchor { scroll-margin-top: 110px; }

/* ===== Contact / Demo forms ===== */
.contact-form .form-control,
.contact-form .form-select {
    border-radius: 4px;
    padding: .65rem .85rem;
}
.contact-form label { font-weight: 600; color: var(--ds-navy); }
.btn-send {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    padding: .55rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}
.btn-send:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
}

/* ===== Page hero (interior pages) ===== */
.page-hero {
    color: #fff;
    padding: 5rem 0 3rem;
    text-align: center;
    background-color: var(--ds-navy);
    background-blend-mode: multiply;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.page-hero h1 { font-weight: 700; letter-spacing: 1px; color: #fff; }
.page-hero .lead { color: #cfd8e0; }

/* ===== Section title bar ===== */
.section-title-bar {
    display: inline-block;
    border-bottom: 3px solid var(--ds-red);
    padding-bottom: .25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--ds-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--ds-navy);
    color: #cfd8e0;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
}
.site-footer h6 { color: #fff; }
.site-footer a { color: #cfd8e0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer address { line-height: 1.5; }

/* ===== Product page sections ===== */
.product-section { padding: 3.5rem 0; }
.product-section:nth-child(even) { background: #f3f6f9; }
.product-section h2 { color: var(--ds-navy); font-weight: 700; }
.product-section ul.feature-list { list-style: none; padding-left: 0; }
.product-section ul.feature-list li {
    padding: .35rem 0 .35rem 1.75rem;
    position: relative;
}
.product-section ul.feature-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--ds-red);
    position: absolute;
    left: 0;
    top: .45rem;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 768px) {
    .mjs-body { padding-top: 75px; }
    #heroCarousel .carousel-item { height: 50vh; }
}

/* ===== Read more / less toggle on news cards =====
   The dual-span trick: Bootstrap's collapse plugin sets aria-expanded
   on the toggle button; we swap which label is visible based on that. */
.read-more-btn .less { display: none; }
.read-more-btn[aria-expanded="true"] .more { display: none; }
.read-more-btn[aria-expanded="true"] .less { display: inline; }

/* ===== /News page (ticket 91e511d2). Markup: _NewsListPartial.cshtml, script: js/news.js ===== */
.nws {
    --nws-ground: #F5F6F8; --nws-surface: #FFFFFF; --nws-border: #E3E7EC; --nws-ink: #0F1B2A;
    --nws-muted: #4A5868; --nws-soft: #556372; --nws-red: #C62828;
    --nws-on-navy: #C9D6E2;
    /* Sits on the site's navy body, like the home page news section: white
       cards on navy, light text for headings between them. */
    background: transparent; color: var(--nws-ink); text-align: left;
}
.nws-wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .nws-wrap { padding-left: 32px; padding-right: 32px; } }
.nws-tools-band { background: transparent; }
.nws-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-block: 24px 4px; }
.nws-search { position: relative; flex: 1 1 240px; max-width: 360px; margin: 0; }
.nws-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #C9D6E2; }
.nws-search input { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 0 14px 0 40px; }
.nws-search input::placeholder { color: #C9D6E2; }
.nws-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nws-chips button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.32); background: transparent; color: #fff; font-weight: 600; }
.nws-chips button[aria-pressed="true"] { background: #fff; color: var(--ds-navy); border-color: #fff; }
.nws-chips button:focus-visible, .nws-search input:focus-visible, .nws-card:focus-visible, .nws-pinned:focus-visible,
.nws-reader button:focus-visible { outline: 3px solid #F2B544; outline-offset: 2px; }

.nws-list { display: flex; flex-direction: column; gap: 32px; padding-block: 32px 72px; }
.nws-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .875rem; color: var(--nws-soft); }
.nws-tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.nws-important { background: var(--nws-red); color: #fff; }
.nws-cat-product { background: #E6EEFB; color: #1F4FA8; }
.nws-cat-support { background: #E5F3EC; color: #16603C; }
.nws-cat-payroll { background: #FCEEE2; color: #9A4A12; }
.nws-cat-company { background: #F1ECFA; color: #5B3A8C; }
.nws-summary { color: var(--nws-muted); line-height: 1.55; }
.nws-more { margin-top: auto; padding-top: 4px; font-weight: 600; color: var(--ds-navy); }
.nws-more::after { content: " \2192"; }

.nws-pinned { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); width: 100%; padding: 0; text-align: left; background: var(--nws-surface); color: var(--nws-ink); border: 1px solid var(--nws-border); border-radius: 20px; overflow: hidden; cursor: pointer; }
.nws-pinned-text { display: flex; flex-direction: column; gap: 12px; padding: 30px 32px; }
.nws-pinned-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.15; color: var(--ds-navy); }
.nws-pinned-img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.nws-pinned.is-text { grid-template-columns: minmax(0, 1fr); }
.nws-pinned.is-text .nws-summary { max-width: 75ch; }

.nws-month-title { font-size: .95rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--nws-on-navy); padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.18); margin: 0 0 16px; }
.nws-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nws-card { display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; padding: 22px; background: var(--nws-surface); color: var(--nws-ink); border: 1px solid var(--nws-border); border-radius: 16px; cursor: pointer; }
.nws-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.25; color: var(--nws-ink); }
.nws-card .nws-summary { font-size: .95rem; }
.nws-card, .nws-pinned { border-color: transparent; transition: box-shadow .15s ease, transform .15s ease; }
.nws-card:hover, .nws-pinned:hover { box-shadow: 0 0 0 3px rgba(242, 181, 68, .85); }
.nws-card.is-flash, .nws-pinned.is-flash { animation: nws-flash 1s ease; }
@keyframes nws-flash { 35% { box-shadow: 0 0 0 6px rgba(198, 40, 40, .35); } }
.nws-empty { padding: 28px; border: 1px dashed #C5CED8; border-radius: 16px; color: var(--nws-muted); text-align: center; background: var(--nws-surface); }
@media (max-width: 980px) { .nws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .nws-grid, .nws-pinned { grid-template-columns: minmax(0, 1fr); } .nws-pinned-img { order: -1; max-height: 220px; } }

.nws-locked { overflow: hidden; }
.nws-scrim { position: fixed; inset: 0; z-index: 1080; background: rgba(8, 20, 34, .55); opacity: 0; transition: opacity .28s ease; }
.nws-scrim.is-on { opacity: 1; }
.nws-reader { position: fixed; z-index: 1081; left: 0; right: 0; margin: 0 auto; top: calc(env(safe-area-inset-top, 0px) + 4vh); top: calc(env(safe-area-inset-top, 0px) + 4dvh); width: min(780px, calc(100% - 32px)); max-height: calc(92vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); max-height: calc(92dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; background: #fff; color: var(--nws-ink); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; transform-origin: 0 0; text-align: left; }
.nws-reader-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px 12px 24px; border-bottom: 1px solid var(--nws-border); }
.nws-reader-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: #F1F4F7; color: var(--nws-ink); display: flex; align-items: center; justify-content: center; }
.nws-reader-body { overflow: auto; padding: 22px 32px 28px; outline: none; }
.nws-reader-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.12; color: var(--ds-navy); margin: 0 0 16px; }
.nws-reader-content { max-width: 68ch; line-height: 1.65; }
.nws-reader-content img, .nws-reader-content iframe { max-width: 100%; height: auto; }
.nws-reader-img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; margin-bottom: 18px; }
.nws-reader-nav { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--nws-border); background: #F7F9FB; }
.nws-reader-nav button { min-height: 44px; max-width: 48%; padding: 0 14px; border-radius: 10px; border: 1px solid var(--nws-border); background: #fff; color: var(--nws-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nws-reader-nav button:disabled { opacity: .45; }
@media (max-width: 600px) { .nws-reader-body { padding: 18px 18px 22px; } .nws-pinned-text { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { .nws-scrim { transition: none; } .nws-card.is-flash, .nws-pinned.is-flash { animation: none; } }

/* ===== Print styles =====
   Strips the dark navy chrome (navbar + footer) so printouts are
   clean page-content-only. Used today by /Requirements and /SendGrid
   which both have a "Print this page" button; benefits any other page
   the operator hits Ctrl+P on.

   `.no-print` is the opt-out hook — slap it on anything that shouldn't
   appear in the printout (Print buttons themselves, action toolbars,
   etc.). */
@media print {
    .navbar,
    .site-footer,
    .no-print {
        display: none !important;
    }

    /* `.mjs-body` reserves 90px top padding for the fixed navbar; with
       the navbar hidden we want the content flush at the top. */
    body.mjs-body {
        padding-top: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    /* Card body content on Requirements/SendGrid is rendered on a dark
       background by the page wrapper — flip it to plain black-on-white
       for print so it doesn't waste a ton of ink. */
    .bg-custom, .text-white {
        background: #fff !important;
        color: #000 !important;
    }

    /* Force every text element to pure black for print. Without this,
       Bootstrap utility classes (.text-muted, .text-secondary, alert
       text colors, etc.) render as varying greys on the page, which
       looks washed out on a B&W printer and inconsistent on a colour
       one. Includes pseudo-elements so the link-URL annotations and
       any ::before/::after icons get the same treatment. */
    *, *::before, *::after {
        color: #000 !important;
    }

    /* Avoid awkward orphan headings at the bottom of a printed page. */
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }

    /* Show inline anchor URLs after links so the printout is useful
       off-screen. Exclude anchors that are clearly UI (jump-to-section
       links to fragments within the page itself). */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }
}
