/* Sutherland Fort — Site Styles
   Matching reference: https://sutherlandfortcc.com/
   Mobile-first; breakpoints at 480 / 768 / 1024 / 1280 px. */

/* ---------- Google Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@700;900&display=swap");

/* ---------- CSS Custom Properties ---------- */
:root {
    --bs-primary: #0a2e60;
    --bs-primary-rgb: 10, 46, 96;
    --bs-secondary: #d42a2a;
    --bs-secondary-rgb: 212, 42, 42;
    --bs-accent: #d7141a;
    --bs-accent-rgb: 215, 20, 26;
    --bs-white: #ffffff;
    --bs-white-rgb: 255, 255, 255;
    --bs-body-color: #1d2939;
    --bs-body-bg: #ffffff;
    --bs-body-font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    --bs-heading-font-family: "Merriweather", "Georgia", serif;
    --bs-icon-size: 2.5rem;
    --bs-border-radius: 0.5rem;
    --bs-transition: 0.25s ease;

    /* Themed surfaces and text — overridden in dark mode below */
    --bs-heading-color: var(--bs-primary);
    --bs-link-color: var(--bs-primary);
    --bs-strong-color: var(--bs-primary);
    --bs-surface: #ffffff;
    --bs-muted-bg: #f8fafc;
    --bs-border-color: #e2e8f0;
    --bs-rule-color: #e5e9f0;
    --bs-form-border: #d6dde6;
    --bs-content-text: #2c3a4d;
    --bs-lead-color: rgba(29, 41, 57, 0.85);
    --bs-card-shadow: 0 4px 14px rgba(10, 46, 96, 0.06);
    --bs-card-shadow-hover: 0 14px 30px rgba(10, 46, 96, 0.14);
    --bs-image-shadow: 0 6px 20px rgba(10, 46, 96, 0.1);
    --bs-image-shadow-hover: 0 12px 28px rgba(10, 46, 96, 0.18);
    --bs-navbar-shadow: 0 2px 14px rgba(10, 46, 96, 0.08);
    --bs-hero-gradient-start: #ffffff;
    --bs-hero-gradient-end: #f3f6fb;
}

[data-theme="dark"] {
    --bs-body-color: #e6ebf2;
    --bs-body-bg: #0a1224;
    --bs-heading-color: #f1f4fa;
    --bs-link-color: #7ab0ff;
    --bs-strong-color: #ffffff;
    --bs-surface: #142136;
    --bs-muted-bg: #0f1a2c;
    --bs-border-color: #1f2d47;
    --bs-rule-color: #1f2d47;
    --bs-form-border: #2a3a57;
    --bs-content-text: #c5cdda;
    --bs-lead-color: rgba(230, 235, 242, 0.85);
    --bs-card-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    --bs-card-shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.5);
    --bs-image-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    --bs-image-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.55);
    --bs-navbar-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
    --bs-hero-gradient-start: #0a1224;
    --bs-hero-gradient-end: #0f1a2c;
    color-scheme: dark;
}

/* ---------- Resets ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg { max-width: 100%; height: auto; display: block; }

a {
    color: var(--bs-link-color);
    text-decoration: none;
    transition: color var(--bs-transition);
}
a:hover { color: var(--bs-accent); }

p { margin: 0 0 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-heading-font-family);
    color: var(--bs-heading-color);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.625rem); }
h4 { font-size: 1.25rem; }

.lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--bs-lead-color);
}

strong { font-weight: 700; color: var(--bs-strong-color); }

/* ---------- Container / Grid (Bootstrap-compatible subset) ---------- */
.container {
    width: 100%;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -0.75rem;
}
.row > * { padding-inline: 0.75rem; width: 100%; }

.row.g-4 { row-gap: 1.5rem; }
.row.g-3 { row-gap: 1rem; }

[class^="col-"], [class*=" col-"] { flex: 0 0 auto; }

.col-12,
.col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-12,
.col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7,
.col-lg-8, .col-lg-9, .col-lg-10 { width: 100%; }

.col-12 { width: 100%; }

@media (min-width: 768px) {
    .col-md-4  { width: 33.3333%; }
    .col-md-5  { width: 41.6667%; }
    .col-md-6  { width: 50%; }
    .col-md-7  { width: 58.3333%; }
    .col-md-12 { width: 100%; }
}

@media (min-width: 992px) {
    .col-lg-4  { width: 33.3333%; }
    .col-lg-5  { width: 41.6667%; }
    .col-lg-6  { width: 50%; }
    .col-lg-7  { width: 58.3333%; }
    .col-lg-8  { width: 66.6667%; }
    .col-lg-9  { width: 75%; }
    .col-lg-10 { width: 83.3333%; }
}

.order-lg-1 { order: 1; }
.order-lg-2 { order: 2; }
@media (min-width: 992px) {
    .order-lg-1 { order: 1; }
    .order-lg-2 { order: 2; }
}

.row.g-5 { row-gap: 2rem; column-gap: 0; }

.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* spacing utilities */
.py-4 { padding-top: 1.5rem;  padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem;    padding-bottom: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1.5rem; }
.me-2 { margin-right: 0.5rem; }
.me-4 { margin-right: 1.5rem; }

.w-100 { width: 100%; }
.position-relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.img-fluid { max-width: 100%; height: auto; display: block; }
.rounded { border-radius: var(--bs-border-radius); }
.shadow-sm { box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.1); }

.small { font-size: 0.875rem; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Bootstrap Icon helpers (replicate reference) ---------- */
.bs-icon {
    --bs-icon-size: 0.75rem;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    font-size: var(--bs-icon-size);
    width: calc(var(--bs-icon-size) * 2);
    height: calc(var(--bs-icon-size) * 2);
    color: var(--bs-primary);
}
.bs-icon-xs { --bs-icon-size: 1rem;
    width:  calc(var(--bs-icon-size) * 1.5);
    height: calc(var(--bs-icon-size) * 1.5);
}
.bs-icon-sm { --bs-icon-size: 1rem; }
.bs-icon-md { --bs-icon-size: 1.5rem; }
.bs-icon-lg { --bs-icon-size: 2rem; }
.bs-icon-xl { --bs-icon-size: 2.5rem; }

.bs-icon.bs-icon-primary {
    color: var(--bs-white);
    background: var(--bs-primary);
}
.bs-icon.bs-icon-primary-light {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.2);
}
.bs-icon.bs-icon-semi-white {
    color: var(--bs-primary);
    background: rgba(255, 255, 255, 0.5);
}
.bs-icon.bs-icon-rounded { border-radius: 0.5rem; }

/* ---------- Navbar ---------- */
.navbar {
    background-color: var(--bs-surface);
    padding: 0.85rem 0;
    border-bottom: 3px solid var(--bs-primary);
    box-shadow: var(--bs-navbar-shadow);
}
.navbar.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}
.navbar > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    transition: transform var(--bs-transition);
}
.navbar-brand:hover { transform: scale(1.03); }
.navbar-brand img { display: block; height: 50px; width: auto; }

.navbar-toggler {
    background: transparent;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.4);
    border-radius: 0.375rem;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    line-height: 1;
}
.navbar-toggler:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
.navbar-toggler-icon {
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230a2e60' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
}
.collapse:not(.show) { display: none; }

.navbar-nav {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0;
    gap: 0.25rem;
}
.navbar-nav .nav-item { display: block; }
.navbar-nav .nav-link {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--bs-heading-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: color var(--bs-transition), background-color var(--bs-transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--bs-accent);
}
.navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .navbar-expand-md .navbar-toggler { display: none; }
    .navbar-expand-md .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    .navbar-nav {
        flex-direction: row;
        margin: 0;
        gap: 0;
    }
    .navbar-nav.mx-auto { margin-inline: auto; }
    .navbar-nav .nav-link {
        padding: 0.5rem 1.1rem;
        position: relative;
    }
    .navbar-nav .nav-link::after {
        content: "";
        position: absolute;
        left: 1.1rem;
        right: 1.1rem;
        bottom: 0.25rem;
        height: 2px;
        background: var(--bs-accent);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform var(--bs-transition);
    }
    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        transform: scaleX(1);
    }
}

/* ---------- Hero / Logo Section ---------- */
.hero-logo-section {
    background: linear-gradient(180deg, var(--bs-hero-gradient-start) 0%, var(--bs-hero-gradient-end) 100%);
}
.hero-logo {
    max-width: 280px;
    margin: 0 auto;
}
@media (min-width: 768px) { .hero-logo { max-width: 360px; } }

/* ---------- Image rows ---------- */
.banner-section img,
.image-row-section img {
    transition: transform var(--bs-transition);
}

/* ---------- Content section ---------- */
.content-section {
    background: var(--bs-muted-bg);
    border-top: 1px solid var(--bs-rule-color);
    border-bottom: 1px solid var(--bs-rule-color);
}
.content-section p {
    font-size: 1.05rem;
    color: var(--bs-content-text);
}

/* ---------- Values Carousel ---------- */
#valuesCarousel {
    padding: 1rem 3rem 3rem;
}
#valuesCarousel .carousel-item {
    min-height: 280px;
}
#valuesCarousel .value-card {
    padding: 0;
    overflow: hidden;
}
#valuesCarousel .carousel-control-prev-icon,
#valuesCarousel .carousel-control-next-icon {
    background-color: var(--bs-accent);
    border-radius: 50%;
    padding: 1.25rem;
    background-size: 50%;
}
#valuesCarousel .carousel-indicators {
    bottom: 0;
}
#valuesCarousel .carousel-indicators button {
    background-color: var(--bs-accent);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.4;
}
#valuesCarousel .carousel-indicators button.active {
    opacity: 1;
}

.section-heading {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.section-heading::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--bs-accent);
    border-radius: 2px;
}

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #06224a 100%);
    color: var(--bs-white);
    padding: 3rem 0 2.5rem;
    text-align: center;
}
.page-hero h1 { color: var(--bs-white); margin-bottom: 0.5rem; }
.page-hero .lead {
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

@media (min-width: 768px) {
    .page-hero { padding: 4.5rem 0 3.5rem; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.65rem 1.4rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color var(--bs-transition),
                background-color var(--bs-transition),
                border-color var(--bs-transition),
                box-shadow var(--bs-transition),
                transform var(--bs-transition);
}
.btn-lg { padding: 0.8rem 1.7rem; font-size: 1.05rem; }

.btn:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-white);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #06224a;
    border-color: #06224a;
    color: var(--bs-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10, 46, 96, 0.25);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-color: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10, 46, 96, 0.2);
}

/* ---------- Cards / Value boxes ---------- */
.value-card,
.issue-card {
    background: var(--bs-surface);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 1.75rem;
    height: 100%;
    box-shadow: var(--bs-card-shadow);
    transition: transform var(--bs-transition), box-shadow var(--bs-transition);
}
.value-card:hover,
.issue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bs-card-shadow-hover);
}
.value-card h2,
.value-card h3,
.issue-card h2,
.issue-card h3 {
    color: var(--bs-heading-color);
    border-bottom: 2px solid var(--bs-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 0.85rem;
    font-size: 1.3rem;
}
.value-card .icon,
.issue-card .icon {
    font-size: 2rem;
    color: var(--bs-accent);
    margin-bottom: 0.75rem;
}

/* ---------- Bio / Forms ---------- */
.bio-image {
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-image-shadow-hover);
    margin-bottom: 1.5rem;
}

.contact-form .form-control,
.contact-form .form-select,
.form-control,
.form-select {
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid var(--bs-form-border);
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    color: var(--bs-body-color);
    background-color: var(--bs-surface);
    transition: border-color var(--bs-transition), box-shadow var(--bs-transition);
}
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.18);
}
.contact-form label,
.form-label {
    display: inline-block;
    font-weight: 600;
    color: var(--bs-heading-color);
    margin-bottom: 0.4rem;
}

.contact-info-box {
    background: var(--bs-muted-bg);
    border-left: 4px solid var(--bs-accent);
    padding: 1.5rem;
    border-radius: 0.375rem;
}
.contact-info-box h3 {
    color: var(--bs-heading-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}
.contact-info-box i {
    color: var(--bs-accent);
    width: 22px;
}

/* ---------- Form checkbox (matches ALTCHA widget style) ------ */
.contact-form .form-check {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-form-border);
    border-radius: 0.375rem;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
}
.contact-form .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    border: 2px solid #999;
    border-radius: 0.25rem;
    cursor: pointer;
}
.contact-form .form-check-input:checked {
    background-color: var(--bs-accent);
    border-color: var(--bs-accent);
}
.contact-form .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 40, 104, 0.25);
    border-color: var(--bs-primary);
}
.contact-form .form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
}

/* ---------- Honeypot (invisible to humans, traps bots) ------- */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Footer (diagonal effect from reference) ---------- */
footer.text-center,
.diagonal-footer {
    position: relative;
    min-height: 200px;
    overflow: hidden;
    background: #0a2e60;
    color: white;
}
footer.text-center::before,
.diagonal-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #d7141a;
    z-index: 1;
    clip-path: polygon(0 60%, 100% 25%, 100% 100%, 0 100%);
}
footer.text-center::after,
.diagonal-footer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: white;
    z-index: 2;
    clip-path: polygon(0% 0%, 0 60%, 35% 48%, 0 25%);
}
footer.text-center .container,
.diagonal-footer .container {
    position: relative;
    z-index: 10;
}
footer.text-center a,
footer.text-center p,
.diagonal-footer a,
.diagonal-footer p {
    color: white !important;
}

footer.text-center {
    text-align: center;
}

footer .list-inline,
.list-inline {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1rem;
}
footer .list-inline-item,
.list-inline-item {
    display: inline-block;
}

footer .list-inline:first-of-type .list-inline-item a {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color var(--bs-transition), opacity var(--bs-transition);
}
footer .list-inline:first-of-type .list-inline-item a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.85);
}

footer .list-inline:nth-of-type(2) .list-inline-item {
    margin: 0 0.25rem;
}
footer .list-inline:nth-of-type(2) .list-inline-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color var(--bs-transition),
                border-color var(--bs-transition),
                transform var(--bs-transition);
}
footer .list-inline:nth-of-type(2) .list-inline-item a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

footer.text-center a:focus-visible,
.diagonal-footer a:focus-visible {
    outline: 2px solid var(--bs-white);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- Focus-visible for accessibility ---------- */
a:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Responsive breakpoints ---------- */
@media (min-width: 480px) {
    h1 { letter-spacing: -0.015em; }
}

@media (min-width: 768px) {
    body { font-size: 1rem; }
    .py-5 { padding-top: 4rem; padding-bottom: 4rem; }
}

@media (min-width: 1024px) {
    .navbar-nav .nav-link { font-size: 1rem; }
    .content-section p { font-size: 1.1rem; }
}

@media (min-width: 1280px) {
    .hero-logo { max-width: 420px; }
}

/* ---------- Theme toggle ---------- */
.navbar-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.theme-toggle {
    background: transparent;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.4);
    border-radius: 0.375rem;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    line-height: 1;
    color: var(--bs-heading-color);
    font-size: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--bs-transition),
                color var(--bs-transition),
                border-color var(--bs-transition),
                transform var(--bs-transition);
}
.theme-toggle:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-accent);
    transform: translateY(-1px);
}
.theme-toggle:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .navbar-controls {
        order: 3;
        margin-left: 0;
    }
}

/* ---------- Dark-mode element overrides ---------- */
[data-theme="dark"] .navbar,
[data-theme="dark"] .navbar.bg-body {
    background-color: #101d33 !important;
    border-bottom-color: #7ab0ff;
}
[data-theme="dark"] .navbar-nav .nav-link {
    color: #e6ebf2;
}
[data-theme="dark"] .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-nav .nav-link.active {
    color: #ffffff;
}
[data-theme="dark"] .navbar-brand img {
    background-color: #ffffff;
    border-radius: 0.375rem;
    padding: 4px 8px;
}
[data-theme="dark"] .banner-section img,
[data-theme="dark"] .image-row-section img {
    border-radius: 0.5rem !important;
    box-shadow: none !important;
}
[data-theme="dark"] .theme-toggle {
    color: #e6ebf2;
}
[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e6ebf2' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-theme="dark"] .btn-outline-primary {
    color: var(--bs-link-color);
    border-color: var(--bs-link-color);
}
[data-theme="dark"] .btn-outline-primary:hover,
[data-theme="dark"] .btn-outline-primary:focus {
    background-color: var(--bs-link-color);
    border-color: var(--bs-link-color);
    color: var(--bs-body-bg);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .navbar-brand:hover,
    .image-row-section img:hover,
    .value-card:hover,
    .issue-card:hover,
    .btn-primary:hover,
    .btn-outline-primary:hover,
    .theme-toggle:hover,
    footer .list-inline:nth-of-type(2) .list-inline-item a:hover {
        transform: none;
    }
}

/* =================================================================
   Floating Accessibility Widget
   ================================================================= */

/* FAB (floating action button) — bottom-left */
.a11y-widget {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 10000;
    font-family: inherit;
}

.a11y-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--bs-accent, #b22234);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.a11y-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.a11y-fab:focus-visible {
    outline: 3px solid var(--bs-primary, #002868);
    outline-offset: 3px;
}

/* Panel */
.a11y-panel {
    position: absolute;
    bottom: 64px;
    left: 0;
    width: 300px;
    max-height: 80vh;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #1a1a2e);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
}
.a11y-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    background: var(--bs-accent, #b22234);
    color: #fff;
}
.a11y-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}
.a11y-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 0.25rem;
}
.a11y-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
.a11y-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.a11y-panel-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}
.a11y-panel-body hr {
    margin: 0.75rem 0;
    border-color: rgba(128, 128, 128, 0.2);
}

/* Font size controls */
.a11y-group {
    margin-bottom: 0.75rem;
}
.a11y-group-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}
.a11y-font-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.a11y-font-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--bs-accent, #b22234);
    background: transparent;
    color: var(--bs-accent, #b22234);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.a11y-font-controls button:hover {
    background: var(--bs-accent, #b22234);
    color: #fff;
}
.a11y-font-controls button:focus-visible {
    outline: 2px solid var(--bs-primary, #002868);
    outline-offset: 2px;
}
.a11y-font-size-display {
    font-size: 1rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: center;
}

/* Toggle buttons */
.a11y-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.35rem;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 0.5rem;
    background: transparent;
    color: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
}
.a11y-btn i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.a11y-btn:hover {
    background: rgba(128, 128, 128, 0.08);
}
.a11y-btn:focus-visible {
    outline: 2px solid var(--bs-primary, #002868);
    outline-offset: 2px;
}
.a11y-btn.active {
    background: var(--bs-accent, #b22234);
    color: #fff;
    border-color: var(--bs-accent, #b22234);
}
.a11y-btn.a11y-reset {
    justify-content: center;
    border-color: transparent;
    color: var(--bs-accent, #b22234);
    font-weight: 600;
}
.a11y-btn.a11y-reset:hover {
    background: rgba(178, 34, 52, 0.08);
}

/* =================================================================
   Accessibility mode class effects
   ================================================================= */

/* Dyslexia-friendly font */
.a11y-dyslexia-font,
.a11y-dyslexia-font * {
    font-family: 'OpenDyslexic', Arial, Helvetica, sans-serif !important;
}

/* High contrast */
.a11y-high-contrast {
    filter: contrast(1.4);
}

/* Highlight links */
.a11y-highlight-links a {
    outline: 2px solid #ff0 !important;
    outline-offset: 2px;
    background-color: rgba(255, 255, 0, 0.15) !important;
    text-decoration: underline !important;
}
.a11y-highlight-links .a11y-widget a,
.a11y-highlight-links .a11y-panel a {
    outline: none !important;
    background-color: transparent !important;
}

/* Text spacing */
.a11y-text-spacing p,
.a11y-text-spacing li,
.a11y-text-spacing dd,
.a11y-text-spacing span,
.a11y-text-spacing td,
.a11y-text-spacing th,
.a11y-text-spacing label {
    line-height: 2 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

/* Saturation modes */
.a11y-low-saturation {
    filter: saturate(0.5);
}
.a11y-desaturated {
    filter: saturate(0);
}
/* Stack filters when combined */
.a11y-high-contrast.a11y-low-saturation {
    filter: contrast(1.4) saturate(0.5);
}
.a11y-high-contrast.a11y-desaturated {
    filter: contrast(1.4) saturate(0);
}

/* Big cursor */
.a11y-big-cursor,
.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 2l20 14H14l6 12-4 2-6-12-5 8z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Reading guide */
.a11y-reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 40px;
    border-top: 3px solid rgba(178, 34, 52, 0.6);
    border-bottom: 3px solid rgba(178, 34, 52, 0.6);
    background: rgba(178, 34, 52, 0.06);
    pointer-events: none;
    z-index: 9999;
    transition: top 0.05s linear;
}

/* Responsive — smaller screens */
@media (max-width: 575.98px) {
    .a11y-panel {
        width: calc(100vw - 2rem);
        left: -0.5rem;
    }
}
