/*
 * Shared site chrome for bd777.
 * Keeps the existing navigation and footer copy intact while giving both
 * surfaces a clearer, branded information hierarchy.
 */

.navbar {
    position: relative;
    isolation: isolate;
    border-bottom: 1px solid rgba(96, 165, 250, .28) !important;
    background:
        linear-gradient(90deg, rgba(8, 16, 33, .98), rgba(16, 25, 48, .96) 52%, rgba(8, 16, 33, .98)) !important;
    box-shadow: 0 10px 28px rgba(3, 7, 18, .28) !important;
}

.navbar::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 8%;
    bottom: -1px;
    width: min(34vw, 410px);
    height: 2px;
    background: linear-gradient(90deg, transparent, #fbbf24, #38bdf8, transparent);
    opacity: .9;
}

.navbar .container {
    min-height: 76px;
    gap: 20px;
}

.navbar-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 54px;
    margin: 0;
    padding: 5px 3px;
}

.navbar-brand::before {
    display: none;
}

.navbar-brand img {
    width: auto;
    height: 48px !important;
    max-width: min(190px, 28vw);
    object-fit: contain;
}

.navbar-toggler {
    border: 1px solid rgba(96, 165, 250, .55) !important;
    border-radius: 10px;
    box-shadow: none !important;
}

.navbar-toggler:focus-visible,
.navbar .nav-link:focus-visible,
footer a:focus-visible {
    outline: 3px solid rgba(56, 189, 248, .55);
    outline-offset: 3px;
}

.navbar-nav {
    align-items: center;
    gap: 4px;
}

.navbar .nav-link {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: .62rem .82rem !important;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #dbeafe !important;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .01em;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.navbar .nav-link::after {
    content: "";
    position: absolute;
    right: 15px;
    bottom: 5px;
    left: 15px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, #fbbf24, #38bdf8);
    transition: transform .2s ease;
}

.navbar .nav-link:hover {
    border-color: rgba(96, 165, 250, .28);
    background: rgba(59, 130, 246, .1);
    color: #fff !important;
    transform: translateY(-1px);
}

.navbar .nav-link.active {
    border-color: rgba(251, 191, 36, .42);
    background: rgba(251, 191, 36, .1);
    color: #fef3c7 !important;
}

.navbar .nav-link.active::after {
    transform: scaleX(1);
}

.navbar .nav-link:hover::after {
    transform: scaleX(1);
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #94a3b8;
}

.breadcrumb {
    border-left: 4px solid #f97316;
}

footer {
    position: relative;
    overflow: hidden;
    margin-top: clamp(56px, 7vw, 88px) !important;
    padding: clamp(48px, 6vw, 72px) 0 22px !important;
    border-top: 1px solid rgba(96, 165, 250, .28) !important;
    background:
        radial-gradient(circle at 12% 0, rgba(56, 189, 248, .13), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(251, 191, 36, .09), transparent 24%),
        #081121 !important;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #fbbf24 50%, #38bdf8);
}

footer > .container {
    position: relative;
}

footer > .container > .row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
    gap: clamp(32px, 5vw, 72px);
    margin: 0;
}

footer > .container > .row > .col-md-6 {
    width: auto;
    max-width: none;
    margin: 0 !important;
    padding: 0;
}

footer > .container > .row > .col-md-6:first-child {
    max-width: 520px;
    padding-right: clamp(0px, 3vw, 44px);
}

footer > .container > .row > .col-md-6:last-child {
    padding-left: clamp(0px, 4vw, 52px);
    border-left: 1px solid rgba(148, 163, 184, .18);
}

footer h5 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 17px !important;
    color: #fef3c7 !important;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: .035em;
}

footer > .container > .row > .col-md-6:first-child h5::before {
    content: "";
    width: 34px;
    height: 3px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #38bdf8);
}

footer p {
    color: #a9b8ce;
    line-height: 1.82;
}

footer > .container > .row > .col-md-6:last-child > .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 34px;
    margin: 0;
}

footer > .container > .row > .col-md-6:last-child > .row > .col-6 {
    width: auto;
    max-width: none;
    padding: 0;
}

footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
}

footer li {
    margin: 0 !important;
}

footer a {
    display: inline-flex;
    align-items: baseline;
    width: fit-content;
    color: #cad8ec !important;
    line-height: 1.55;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

footer a::before {
    content: "›";
    margin-right: 7px;
    color: #38bdf8;
    font-weight: 800;
    transition: transform .2s ease;
}

footer a:hover {
    color: #fef3c7 !important;
    transform: translateX(3px);
}

footer a:hover::before {
    transform: translateX(2px);
}

footer hr {
    margin: 36px 0 20px !important;
    border-color: rgba(148, 163, 184, .2) !important;
    opacity: 1;
}

footer .text-center {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #8090a8;
    font-size: .86rem;
    text-align: left !important;
}

footer .text-center p {
    margin: 0;
    color: inherit;
}

@media (max-width: 991.98px) {
    .navbar .container {
        min-height: 68px;
    }

    .navbar .navbar-collapse {
        margin: 0 -12px -8px;
        padding: 12px;
        border-top: 1px solid rgba(148, 163, 184, .16);
        background: rgba(8, 16, 33, .82);
    }

    .navbar-nav {
        align-items: stretch;
        gap: 3px;
    }

    .navbar .nav-link {
        width: 100%;
        padding-right: 15px !important;
        padding-left: 15px !important;
        border-radius: 10px;
    }

    footer > .container > .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    footer > .container > .row > .col-md-6:last-child {
        padding-top: 28px;
        padding-left: 0;
        border-top: 1px solid rgba(148, 163, 184, .18);
        border-left: 0;
    }
}

@media (max-width: 575.98px) {
    .navbar .container {
        gap: 10px;
    }

    .navbar-brand {
        min-height: 50px;
        padding-right: 9px;
    }

    .navbar-brand img {
        height: 40px !important;
        max-width: 170px;
    }

    footer {
        padding-top: 42px !important;
    }

    footer > .container > .row > .col-md-6:last-child > .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    footer .text-center {
        display: block;
        text-align: center !important;
    }
}

/* Unified footer layout, based on the information-first structure used across the site. */
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(138px, .76fr)) minmax(190px, 1fr);
    gap: 34px;
    align-items: start;
}

.site-footer .footer-brand {
    margin-bottom: 17px;
}

.site-footer .footer-brand a,
.site-footer .footer-contact > a,
.site-footer .footer-bottom a,
.site-footer .footer-links a {
    display: inline-flex;
}

.site-footer .footer-brand a::before,
.site-footer .footer-contact > a::before,
.site-footer .footer-bottom a::before,
.site-footer .footer-links a::before {
    display: none;
}

.site-footer .footer-brand img {
    display: block;
    width: 140px;
    height: 46px;
    object-fit: contain;
}

.site-footer .footer-desc {
    max-width: 390px;
    margin: 0;
}

.site-footer .footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.site-footer .footer-badge {
    padding: 5px 9px;
    border: 1px solid rgba(96, 165, 250, .3);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, .62);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}

.site-footer .footer-title {
    margin: 3px 0 15px;
    color: #fef3c7;
    font-size: .94rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.site-footer .footer-links {
    display: grid;
    gap: 10px;
}

.site-footer .footer-links a {
    width: fit-content;
    color: #cad8ec !important;
    font-size: .91rem;
}

.site-footer .footer-contact > a {
    margin-bottom: 11px;
    color: #fbbf24 !important;
    font-weight: 700;
}

.site-footer .footer-contact p {
    max-width: 270px;
    margin: 0;
    font-size: .91rem;
}

.site-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, .2);
    color: #8090a8;
    font-size: .86rem;
}

.site-footer .footer-bottom a {
    color: #a9b8ce !important;
}

@media (max-width: 1199.98px) {
    .site-footer .footer-grid {
        grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(135px, 1fr));
    }

    .site-footer .footer-contact {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: max-content minmax(180px, .7fr) minmax(260px, 1.5fr);
        gap: 18px;
        align-items: start;
        padding-top: 22px;
        border-top: 1px solid rgba(148, 163, 184, .16);
    }

    .site-footer .footer-contact .footer-title,
    .site-footer .footer-contact > a,
    .site-footer .footer-contact p {
        margin: 0;
    }
}

@media (max-width: 767.98px) {
    .site-footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 22px;
    }

    .site-footer .footer-overview,
    .site-footer .footer-contact {
        grid-column: 1 / -1;
    }

    .site-footer .footer-contact {
        display: block;
    }

    .site-footer .footer-contact .footer-title {
        margin-bottom: 12px;
    }

    .site-footer .footer-contact > a {
        display: inline-flex;
        margin-bottom: 12px;
    }

    .site-footer .footer-bottom {
        display: grid;
        gap: 7px;
    }
}

@media (max-width: 460px) {
    .site-footer .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Standalone editorial images: one image per content row, never in the footer. */
.site-inline-media {
    display: block;
    clear: both;
    width: min(100%, 920px);
    margin: clamp(32px, 5vw, 58px) auto;
}

.site-inline-media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(96, 165, 250, .26);
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(2, 6, 23, .28);
}

/* When an editorial image lands inside a grid/card, promote that card to a full row. */
.site-mod-index-item:has(> .site-inline-media),
.site-mod-stair-item:has(> .site-inline-media),
.step-content:has(> .site-inline-media),
.checklist-item:has(> .site-inline-media),
.site-mod-callout-copy:has(> .site-inline-media),
.highlight-box:has(> .site-inline-media),
.site-mod-safety-tools-item:has(> .site-inline-media),
.info-box:has(> .site-inline-media),
.timeline-content:has(> .site-inline-media),
.contact-method:has(> .site-inline-media),
.success-box:has(> .site-inline-media),
.site-mod-privacy-vault-rule:has(> .site-inline-media) {
    grid-column: 1 / -1;
    flex-basis: 100%;
    width: 100%;
    max-width: none;
}
