/* Hide skip link until focused */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 1000;
}

/* Make the skip link visible when focused */
.skip-link:focus {
    position: static;
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    background: #fff;
    border: 2px solid #000;
    text-decoration: none;
}

/* Improve visible focus site-wide */
:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

:root {
    --brand-strip-height: 96px;
    --nhdot-green: #00693e;
    --nhdot-green-dark: #004c2d;
    --nhdot-green-tint: #e7f2ec;
    --nhdot-green-border: #b7d7c6;
    --sticky-header-offset: calc(var(--brand-strip-height) + 32px);
}

body a {
    color: var(--nhdot-green-dark);
    text-decoration: underline;
}

body a:hover,
body a:focus {
    color: var(--nhdot-green);
}

.link-separator {
    display: inline-block;
    margin: 0 0.35rem;
    text-decoration: none;
}

/* Sidebar nav spacing (helps target size a bit) */
.nav-link {
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    color: #0b1f16;
}

.nav-stack .nav-item {
    margin-bottom: 1px;
}

.nav-stack .nav-item:last-child {
    margin-bottom: 0;
}

.nav-link:hover {
    color: var(--nhdot-green-dark);
    background-color: var(--nhdot-green-tint);
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
    color: var(--nhdot-green-dark);
    background-color: var(--nhdot-green-tint);
    box-shadow: inset 4px 0 0 var(--nhdot-green);
    font-weight: 600;
}

.nav-separator {
    margin: 0.6rem 0.75rem 0.4rem;
    border-top: 1px solid var(--nhdot-green-border);
    padding-top: 0.5rem;
}

.nav-social-links {
    padding: 0 0.75rem 0.25rem;
    margin-top: 0.25rem;
}

.nav-link--construction .nav-link-icon {
    color: #e66a00;
}

.nav-link--construction .nav-link-icon + .nav-link-icon {
    margin-left: 0.35rem;
}

.nav-link--construction .nav-link-icon:first-child {
    margin-right: 0.35rem;
}

.construction-title .bi {
    color: #e66a00;
}

.construction-title .btn .bi {
    color: currentColor;
}

.nav-link.nav-link--construction:hover {
    color: #7a3d00;
    background-color: #fff4e6;
    box-shadow: inset 4px 0 0 #e88a1a;
}

.nav-link.nav-link--construction.is-active,
.nav-link.nav-link--construction[aria-current="page"] {
    color: #5a2a00;
    background-color: #ffe3c2;
    box-shadow: inset 4px 0 0 #d97a00;
}

.btn-outline-primary {
    color: var(--nhdot-green-dark);
    border-color: var(--nhdot-green);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #ffffff;
    background-color: var(--nhdot-green);
    border-color: var(--nhdot-green);
}

.btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(0, 105, 62, 0.25);
}

.btn-brand {
    color: #ffffff;
    background-color: var(--nhdot-green);
    border-color: var(--nhdot-green);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #ffffff;
    background-color: var(--nhdot-green-dark);
    border-color: var(--nhdot-green-dark);
}

.btn-brand:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(0, 105, 62, 0.25);
}

.social-links {
    display: grid;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #0b1f16;
}

.social-text {
    text-decoration: underline;
}

.social-link:hover .social-text {
    text-decoration: none;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #ffffff;
    flex: 0 0 32px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.social-icon i {
    font-size: 16px;
    line-height: 1;
}

.social-link--facebook .social-icon {
    background-color: transparent;
    color: #1877f2;
    box-shadow: none;
}

.social-link--x .social-icon {
    background-color: #111111;
}

.social-link--facebook .social-icon i {
    font-size: 30px;
    transform: translateY(1px);
}

.social-card {
    border-radius: 16px;
}

@media (max-width: 991.98px) {
    .social-card--compact .card-body {
        padding: 0.5rem 0.75rem;
    }

    .social-card--compact .social-links {
        gap: 0.5rem;
    }

    .social-card--compact .social-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .social-card--compact .social-icon i {
        font-size: 14px;
    }

    .social-card--compact .social-link--facebook .social-icon i {
        font-size: 24px;
    }
}

.top-banner {
    width: 100%;
    height: 10px;
    background-color: #00693e; /* example NHDOT-style green */
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

html {
    scroll-padding-top: var(--sticky-header-offset);
}

#main {
    scroll-margin-top: var(--sticky-header-offset);
}

/* Brand strip container */
.brand-strip {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: var(--brand-strip-height);
    padding: 0;
    margin: 0;
    line-height: 0;
    overflow: hidden;
}

/* Logo and banner images */
.site-logo,
.site-banner {
    display: block;
    height: var(--brand-strip-height);
    margin: 0;
    padding: 0;
    border: 0;
}

/* Logo sizing */
.site-logo {
    width: auto;
}

/* Banner fills remaining space */
.site-banner {
    width: 100%;
    object-fit: cover;
}

/* Utility row can have normal spacing */
.header-utilities {
    width: 100%;
}

.header-separator {
    width: 100%;
    background-color: #adb5bd; /* lighter gray than before */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    margin: 0;
    padding: 0;
    border: 0;
}

/* default (desktop): thin bar, no button visible anyway because d-lg-none */
.header-separator-inner {
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
}

/* mobile/tablet: give the separator enough height to comfortably hold the Menu button */
@media (max-width: 991.98px) {
    .header-separator-inner {
        height: auto;
        min-height: 44px;
        padding: 6px 12px;
    }
}

.hero {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    padding: 8px;
    border-radius: 26px;
    background: linear-gradient(180deg, #f6f8f7 0%, #e9efec 100%);
    box-shadow: 0 6px 12px rgba(10, 20, 15, 0.1);
    overflow: hidden;
}

.hero img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 65%),
        radial-gradient(120% 120% at 100% 100%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.hero::after {
    content: none;
}

.bi {
    vertical-align: -0.125em;
}

.figure-hero {
    margin: 0;
    padding: 0.5rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #f6f8f7 0%, #e9efec 100%);
    box-shadow: 0 4px 8px rgba(10, 20, 15, 0.1);
}

.figure-hero img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.figure-hero--map img {
    aspect-ratio: auto;
    object-fit: contain;
}

.figure-hero--map-compact {
    max-width: 900px;
    margin-right: auto;
}

.figure-hero figcaption {
    margin-top: 0.5rem;
    text-align: center;
    color: #0b1f16;
    font-size: 0.9rem;
    font-weight: 600;
}

.updates-section {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--nhdot-green-border);
    border-left: 6px solid var(--nhdot-green);
    border-radius: 16px;
    box-shadow: 0 6px 12px rgba(10, 20, 15, 0.08);
}

.updates-section + .updates-section {
    margin-top: 1.25rem;
}

.updates-section ul {
    line-height: 1.35;
}

.updates-section li + li {
    margin-top: 0.45rem;
}

.updates-section h3,
.updates-section h4 {
    margin-top: 0.5rem !important;
}

.construction-lead {
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
}

.figure-hero--carousel {
    max-width: 960px;
    margin-right: auto;
}

.figure-hero--carousel .carousel-item img {
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.figure-hero--carousel .carousel-control-prev,
.figure-hero--carousel .carousel-control-next {
    width: 12%;
    opacity: 1;
}

.figure-hero--carousel .carousel-control-prev-icon,
.figure-hero--carousel .carousel-control-next-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.72);
    background-size: 52% 52%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.figure-hero--carousel .carousel-control-prev:hover .carousel-control-prev-icon,
.figure-hero--carousel .carousel-control-next:hover .carousel-control-next-icon,
.figure-hero--carousel .carousel-control-prev:focus .carousel-control-prev-icon,
.figure-hero--carousel .carousel-control-next:focus .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.86);
}

.figure-hero--carousel .carousel-control-prev:focus-visible,
.figure-hero--carousel .carousel-control-next:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.cu-carousel-caption {
    margin-top: 0.6rem;
    text-align: center;
    color: #0b1f16;
    font-size: 0.95rem;
    font-weight: 600;
}

@media print {
    .updates-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .header-separator-inner .btn[data-bs-toggle="offcanvas"],
    #siteNav.offcanvas {
        display: none !important;
    }
}

.construction-title h1 {
    font-size: 1.75rem;
}

@media (max-width: 575.98px) {
    .construction-title h1 {
        font-size: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .hero {
        padding: 6px;
        border-radius: 22px;
    }

    .hero img {
        border-radius: 16px;
    }

    .hero::after {
        inset: 6px;
        border-radius: 16px;
    }
}

.site-footer {
    background-color: #212529;
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Layout container */
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
}

/* Links */
.site-footer a {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer a:visited {
    color: #ffffff;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: none;
}

.site-footer a:focus,
.site-footer a:active {
    color: #9be7b7;
}

.site-footer a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Responsive behavior */
/* Mobile: reduce header image strip height */
@media (max-width: 575.98px) {
    :root {
        --brand-strip-height: 64px;
    }

    .site-banner {
        object-position: center;
    }
}

/* Small tablets: slightly larger than phone */
@media (min-width: 576px) and (max-width: 767.98px) {
    :root {
        --brand-strip-height: 72px;
    }
}

@media (min-width: 768px) {
    .footer-inner {
        flex-wrap: nowrap;
    }

    .footer-org,
    .footer-address,
    .footer-phone,
    .footer-sep {
        white-space: nowrap;
    }
}

/* On small screens, hide separators and force line break */
@media (max-width: 767.98px) {
    .footer-sep {
        display: none;
    }

    .footer-org {
        flex-basis: 100%;
    }

    .footer-address,
    .footer-phone {
        flex-basis: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    #siteNav.offcanvas {
        min-width: 360px;
    }
}

@media (min-width: 992px) and (max-width: 1587px) {
    .sidebar-col {
        flex: 0 0 280px;
        max-width: 280px;
    }

    .sidebar-col + #main {
        flex: 1 1 0;
        max-width: calc(100% - 280px);
    }
}

/* Construction Updates photo thumbnails */
.cu-thumbs{
    display: grid;
    grid-template-columns: repeat(12, minmax(72px, 1fr));
    gap: 0.5rem;
}

.cu-thumb-btn{
    border: 2px solid transparent;
    padding: 0;
    background: transparent;
    border-radius: 0.25rem;
}

.cu-thumb-btn:focus-visible{
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

.cu-thumb-btn img{
    width: 100%;
    height: 54px;
    object-fit: cover;
    display: block;
    border-radius: 0.2rem;
}

/* Make thumbnails scrollable on small screens */
@media (max-width: 767.98px){
    .cu-thumbs{
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.25rem;
    }
    .cu-thumb-btn{
        flex: 0 0 96px;
    }
    .cu-thumb-btn img{
        height: 64px;
    }
}
