
:root {
    --color-primary: #002c7a;
    --color-primary-hover: #001f5f;
    --color-primary-active: #001844;
    --color-primary-contrast: #ffffff;
    --color-sidebar-header: #002c7a;
    --color-sidebar-bg: #ffffff;
    --color-sidebar-bg-dark: #101114;
    --color-heritage-gold: #7b5800;
    --color-surface: #ffffff;
    --color-border: #e0e0e0;
    --color-text: #333333;
    --color-link-hover: #990000;
}

nav.nav-deep-dark .nav-item > a.nav-link {
    color: var(--color-primary);
    font-weight: 500;
}

html[data-bs-theme="light"] body.layout-admin {
    background-color: #e5e5e5;
    color: #212529;
}

html[data-bs-theme="dark"] body.layout-admin {
    background-color: #101114;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23ffffff' fill-opacity='.035'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='36' cy='82' r='1'/%3E%3Ccircle cx='58' cy='34' r='1'/%3E%3Ccircle cx='76' cy='118' r='1'/%3E%3Ccircle cx='98' cy='54' r='1'/%3E%3Ccircle cx='124' cy='24' r='1'/%3E%3Ccircle cx='112' cy='92' r='1'/%3E%3Ccircle cx='24' cy='122' r='1'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #101114 0%, #15171d 100%);
    background-repeat: repeat, no-repeat;
    background-size: 140px 140px, 100% 100%;
    color: #e5e7eb;
}

body.layout-admin {
    background-color: #e7e7e7;
}
.aside-primary {
    color: var(--color-text);
    background-color: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
}

html[data-bs-theme="dark"] .aside-primary {
    color: #e5e7eb;
    background-color: var(--color-sidebar-bg-dark);
    background-image: none;
    border-right-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] nav.nav-deep-dark .nav-item > a.nav-link {
    color: #e5e7eb;
}

html[data-bs-theme="dark"] nav.nav-deep-dark .nav-item > a.nav-link:hover {
    color: var(--color-heritage-gold);
    background-color: rgba(0, 44, 122, 0.08);
}

nav.nav-deep-dark .nav-item > a.nav-link:hover,
.aside-primary .nav-item > a.nav-link:hover {
    color: var(--color-heritage-gold);
    background-color: rgba(0, 44, 122, 0.08);
}

nav.nav-deep-dark .nav-item > a.nav-link.active,
nav.nav-deep-dark .nav-item.active > a.nav-link,
.aside-primary .nav-item.active > a.nav-link {
    color: var(--color-primary-contrast);
    background-color: var(--color-primary);
}

html[data-bs-theme="dark"] #middle,
html[data-bs-theme="dark"] #footer,
html[data-bs-theme="dark"] .text-gray-800 {
    color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .card {
    --bs-card-bg: #1f2937;
    --bs-card-border-color: rgba(255, 255, 255, 0.08);
    --bs-card-cap-bg: #181c24;
    --bs-card-color: #e5e7eb;
    background-color: #1f2937 !important;
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .offcanvas,
html[data-bs-theme="dark"] .js-image-uploader-placeholder,
html[data-bs-theme="dark"] .js-image-uploader-preview {
    background-color: #1f2937 !important;
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer {
    background-color: #181c24 !important;
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .card-title {
    color: #f3f4f6;
}

html[data-bs-theme="dark"] .card-subtitle {
    color: #9ca3af !important;
}

html[data-bs-theme="dark"] .card-text {
    color: #d1d5db;
}

html[data-bs-theme="dark"] .card-link {
    color: #f87171;
}

html[data-bs-theme="dark"] .card-link:hover {
    color: #fca5a5;
}

html[data-bs-theme="dark"] .card .list-group-item {
    background-color: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .section {
    background-color: #181b20;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

html[data-bs-theme="dark"] .section .text-muted,
html[data-bs-theme="dark"] .section small {
    color: #9ca3af !important;
}

html[data-bs-theme="dark"] .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #20242b;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

html[data-bs-theme="dark"] .tag a,
html[data-bs-theme="dark"] .tag .text-muted {
    color: inherit !important;
}

html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] .table-datatable,
html[data-bs-theme="dark"] table.table {
    --bs-table-bg: #181b20;
    --bs-table-striped-bg: #1d2127;
    --bs-table-hover-bg: #242932;
    --bs-table-border-color: rgba(255, 255, 255, 0.09);
    --bs-table-color: #e5e7eb;
    color: #e5e7eb;
    background-color: #181b20;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

html[data-bs-theme="dark"] .table > :not(caption) > * > *,
html[data-bs-theme="dark"] .table-datatable > :not(caption) > * > * {
    background-color: transparent;
    color: inherit;
    border-bottom-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

html[data-bs-theme="dark"] .table-light,
html[data-bs-theme="dark"] thead.table-light,
html[data-bs-theme="dark"] .table thead {
    --bs-table-bg: #20242b;
    --bs-table-color: #f3f4f6;
    color: #f3f4f6 !important;
    background-color: #20242b !important;
}

html[data-bs-theme="dark"] .table-hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] .table-hover > tbody > tr:hover {
    color: #ffffff;
    background-color: #242932 !important;
}

html[data-bs-theme="dark"] .table-bordered,
html[data-bs-theme="dark"] .table-bordered > :not(caption) > * {
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background-color: #111418;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #d1d5db !important;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
    background: #242932 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .small.text-muted,
html[data-bs-theme="dark"] .form-check-label,
html[data-bs-theme="dark"] .js-image-uploader-placeholder .text-muted {
    color: #9ca3af !important;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group-text {
    background-color: #111827;
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] #header.header-match-aside-primary {
    background: linear-gradient(135deg, var(--color-sidebar-header), var(--color-primary-hover), var(--color-primary));
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] #footer {
    background-color: #111827 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#header.header-match-aside-primary {
    background: linear-gradient(135deg, var(--color-sidebar-header), var(--color-primary-hover), var(--color-primary));
    border-bottom: 1px solid var(--color-border);
}

.bg-primary{
    background-color: var(--color-primary) !important;
}

.text-primary{
    color: var(--color-primary) !important;
}

.btn-light-blue {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--color-primary-hover);
    --bs-btn-hover-border-color: var(--color-primary-hover);
    --bs-btn-focus-shadow-rgb: 0, 44, 122; /* RGB of #002c7a */
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--color-primary-active);
    --bs-btn-active-border-color: var(--color-primary-active);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--color-primary);
    --bs-btn-disabled-border-color: var(--color-primary);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--color-primary-hover);
    --bs-btn-hover-border-color: var(--color-primary-hover);
    --bs-btn-focus-shadow-rgb: 0, 44, 122; /* RGB of #002c7a */
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--color-primary-active);
    --bs-btn-active-border-color: var(--color-primary-active);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--color-primary);
    --bs-btn-disabled-border-color: var(--color-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);

    --bs-btn-focus-shadow-rgb: 0, 44, 122; /* RGB of #002c7a */

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--color-primary-active);
    --bs-btn-active-border-color: var(--color-primary-active);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);

    --bs-btn-disabled-color: var(--color-primary);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--color-primary);

    --bs-gradient: none;
}

/* Links in primary/gold */

a:hover {
    color: var(--color-heritage-gold) !important;
}

/* .aside-primary a:hover {
    color: var(--color-heritage-gold) !important;
}

.bg-heritage-gold {
    background-color: var(--color-heritage-gold) !important;
} */

.text-heritage-gold {
    color: var(--color-heritage-gold) !important;
}

/* Improve hero spacing */
.container h1 {
    line-height: 1.2;
}

/* Card hover effect */
.card {
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

/* Image consistency */
.card-img-top {
    object-fit: cover;
    height: 220px;
}

/* CTA card */
.card.text-center {
    border: 1px solid var(--color-border);
}

/* ============ Site-wide typography ============ */
/* Glacial Indifference (headings) - local files in /core/fonts */
@font-face {
    font-family: "Glacial Indifference";
    src: url("../../../core/fonts/GlacialIndifference-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Glacial Indifference";
    src: url("../../../core/fonts/GlacialIndifference-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Text: Poppins */
body {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Headings: Glacial Indifference */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: "Glacial Indifference", "Poppins", sans-serif;
}

/* Poppins utility classes */
.poppins-thin { font-family: "Poppins", sans-serif; font-weight: 100; font-style: normal; }
.poppins-extralight { font-family: "Poppins", sans-serif; font-weight: 200; font-style: normal; }
.poppins-light { font-family: "Poppins", sans-serif; font-weight: 300; font-style: normal; }
.poppins-regular { font-family: "Poppins", sans-serif; font-weight: 400; font-style: normal; }
.poppins-medium { font-family: "Poppins", sans-serif; font-weight: 500; font-style: normal; }
.poppins-semibold { font-family: "Poppins", sans-serif; font-weight: 600; font-style: normal; }
.poppins-bold { font-family: "Poppins", sans-serif; font-weight: 700; font-style: normal; }
.poppins-extrabold { font-family: "Poppins", sans-serif; font-weight: 800; font-style: normal; }
.poppins-black { font-family: "Poppins", sans-serif; font-weight: 900; font-style: normal; }
.poppins-thin-italic { font-family: "Poppins", sans-serif; font-weight: 100; font-style: italic; }
.poppins-extralight-italic { font-family: "Poppins", sans-serif; font-weight: 200; font-style: italic; }
.poppins-light-italic { font-family: "Poppins", sans-serif; font-weight: 300; font-style: italic; }
.poppins-regular-italic { font-family: "Poppins", sans-serif; font-weight: 400; font-style: italic; }
.poppins-medium-italic { font-family: "Poppins", sans-serif; font-weight: 500; font-style: italic; }
.poppins-semibold-italic { font-family: "Poppins", sans-serif; font-weight: 600; font-style: italic; }
.poppins-bold-italic { font-family: "Poppins", sans-serif; font-weight: 700; font-style: italic; }
.poppins-extrabold-italic { font-family: "Poppins", sans-serif; font-weight: 800; font-style: italic; }
.poppins-black-italic { font-family: "Poppins", sans-serif; font-weight: 900; font-style: italic; }
