html, body {
    height: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.container, main {
    flex: 1 0 auto;
}
.site-footer {
    flex-shrink: 0;
}
/* Custom CSS to enhance Bootstrap 5 */

/* Custom Variables */
:root {
    --primary-color: #001f3f; /* Navy blue */
    --primary-dark: #001737; /* Darker navy */
    --secondary-color: #2c3e50; /* unchanged */
    --accent-color: #e74c3c; /* unchanged */
    --success-color: #006A4E; /* Bottle green */
    --warning-color: #f39c12; /* unchanged */
    --info-color: #001f3f; /* Navy blue */
    --light-bg: #eeeeee; /* Light grey */
    --dark-bg: #0a0a0a; /* Dark black */
    --text-color: #0a0a0a; /* Dark black */
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 0.5rem 1rem rgba(10, 10, 10, 0.15);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    background-color: var(--light-bg);
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #001f3f, #001737);
    color: #eeeeee;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23eeeeee' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
    z-index: 0;
}

.site-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.site-header p {
    opacity: 0.9;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Content Styles */
.content-card {
    background-color: #f5f5f5; /* Light grey */
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(10, 10, 10, 0.075);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(10, 10, 10, 0.15);
}

/* Info Box Styles */
.info-box {
    background-color: #eeeeee;
    border-left: 4px solid #001f3f;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin: 1.5rem 0;
}

/* Table Styles */
.table-custom {
    box-shadow: 0 0.125rem 0.25rem rgba(10, 10, 10, 0.075);
    border-radius: 0.5rem;
    overflow: hidden;
}

.table-custom thead {
    background-color: #001f3f;
    color: #eeeeee;
}

.table-custom th {
    font-weight: 600;
    border-bottom: none;
}

/* Search Box Styles */
.search-container {
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-input {
    padding-left: 2.5rem;
}

/* Form Styles */
.form-control:focus {
    border-color: #001f3f;
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.25);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Footer Styles */
.site-footer {
    background-color: #0a0a0a;
    color: rgba(238, 238, 238, 0.6);
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer a {
    color: rgba(238, 238, 238, 0.8);
    text-decoration: none;
}

.site-footer a:hover {
    color: #eeeeee;
    text-decoration: underline;
}

/* Bootstrap overrides for palette mapping */
.navbar-dark.bg-dark {
    background-color: #0a0a0a !important;
}

/* Navbar text uses light grey instead of pure white */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: rgba(238, 238, 238, 0.85);
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #eeeeee;
}

.btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
}
.btn-primary:hover {
    background-color: #001737;
    border-color: #001737;
}
.text-primary { color: #001f3f !important; }
.bg-primary { background-color: #001f3f !important; }

.btn-success {
    background-color: #006A4E;
    border-color: #006A4E;
}
.btn-success:hover {
    background-color: #00543e;
    border-color: #00543e;
}
.text-success { color: #006A4E !important; }
.bg-success { background-color: #006A4E !important; }

.text-white { color: #eeeeee !important; }
.bg-white { background-color: #eeeeee !important; }
.table-light { background-color: #eeeeee !important; }

.btn-outline-light {
    color: #0a0a0a;
    border-color: #eeeeee;
}
.btn-outline-light:hover {
    background-color: #eeeeee;
    color: #0a0a0a;
}

/* Map Bootstrap light/dark utilities to new palette */
.text-dark { color: #0a0a0a !important; }
.bg-light { background-color: #eeeeee !important; }
.text-light { color: #eeeeee !important; }

/* Alerts mapped to navy palette */
.alert-info {
    background-color: rgba(0, 31, 63, 0.08);
    border-color: rgba(0, 31, 63, 0.25);
    color: #001f3f;
}

/* Directory page helpers */
.navbar-brand span { font-weight: 600; }
th.sortable { cursor: pointer; }
th.sortable i { opacity: 0.5; }
/* Style table images without forcing size; HTML sets width/height */
table img {
    border: 2px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 0.25rem 0.5rem rgba(10, 10, 10, 0.1);
    object-fit: cover;
}

/* Align Choices.js select with Bootstrap input-group sizing */
.input-group .choices { flex: 1 1 auto; }
.input-group .choices .choices__inner {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group .choices[data-type*="select-one"] .choices__inner { padding-right: 2.25rem; }
.input-group .choices .choices__list--single { padding: 0; }
.input-group .choices.is-focused .choices__inner,
.input-group .choices.is-open .choices__inner {
    border-color: #001f3f;
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.25);
}
