html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #dce5f8;
    scroll-padding-top: 80px; /* prevents content from hiding under sticky header */
}

.flex-fill {
    display: flex;
    flex-direction: column;
}

/*=============================================
=            HEADER (Sticky + Style)          =
=============================================*/
.region5_header {
    position: sticky;
    top: 0;
    z-index: 1030; /* ensure it stays above other content */
    background-color: #001d5a; /* dark blue background */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Navbar link colors */
.custom-font-color {
    color: #fff !important;
}

/* Search bar (default desktop size) */
.region5_header form[role="search"] input {
    width: 180px;
}

/* Make search bar transition smoothly when resizing */
.region5_header form[role="search"] input,
.region5_header form[role="search"] button {
    transition: all 0.3s ease;
}

/*=============================================
=            MOBILE RESPONSIVE                =
=============================================*/
@media (max-width: 768px) {

    /* Reduce navbar padding */
    .navbar {
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }

    /* Make logo smaller */
    .navbar-brand img {
        height: 32px;
    }

    /* Collapse dropdowns fully and align left */
    .navbar-nav {
        text-align: left;
    }

        /* Slightly smaller font for mobile menu items */
        .navbar-nav .nav-link {
            font-size: 0.95rem;
            padding: 0.4rem 0.8rem;
        }

    /* --- Compact search box on mobile --- */
    .region5_header form[role="search"] input {
        width: 100px; /* smaller width */
        font-size: 0.85rem; /* smaller text */
        padding: 0.25rem 0.5rem; /* tighter padding */
    }

    .region5_header form[role="search"] button {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
        border-width: 1px;
    }

    /* Reduce left spacing */
    .region5_header form[role="search"] {
        margin-left: 0.5rem;
    }

    /* Keep form aligned properly beside the menu button */
    .navbar .d-flex {
        flex-wrap: nowrap;
        align-items: center;
    }
    .region5_header form[role="search"] input {
        width: 100px;
        transition: width 0.3s ease;
    }

        .region5_header form[role="search"] input:focus {
            width: 160px; /* expands on focus */
        }
}

/*=============================================
=            SUBHEADER SECTION                =
=============================================*/
.subheader {
    text-align: center;
    height: 40px;
    background-color: #003774;
    padding-top: 0px;
    border-top: 1px solid #4d5d88;
    border-bottom: 1px solid #4d5d88;
    color: #5e7ca3;
}

.top-header-image {
    position: relative;
    top: 6px;
    padding-right: 10px;
}

.subheader-title {
    display: inline;
    position: relative;
    top: 6px;
    font-size: clamp(12px, 1.2vw, 13px);
    color: #85a6d7;
    padding-right: 5px;
    padding-left: 5px;
}

.subheader-link {
    font-size: clamp(12px, 1.2vw, 13px);
    color: #85a6d7;
}

/*=============================================
=            FOOTER SECTION                   =
=============================================*/
.region5-footer {
    background-color: #001d5a;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

.footer-content {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}
