:root {
    --navy: #0f2d46;
    --green: #2f7d3f;
    --blue: #2f6690;
    --cream: #faf8f4;
    --border: #d9dee5;
    --text: #102a43;
    --muted: #607087;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background: var(--cream);
}

.site-header {
    height: 92px;
    padding: 0 88px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    margin-left: 36px;

    align-items: center;
    text-decoration: none;
}

.brand-image {
    height: 76px;
    width: auto;
    display: block;
}

.divider {
    height: 52px;
    width: 1px;
    background: var(--border);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;   /* Adjust this value to taste */
}

.site-nav a {
    text-decoration: none;
    color: var(--navy);
    font-weight: 700;
    padding: 8px 0;
    position: relative;
    transition: color .2s ease;
}

.site-nav a:hover {
    color: var(--green);
}

.site-nav a.active {
    color: var(--green);
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;

    height: 3px;
    background: var(--green);
    border-radius: 3px;
}

.site-header {
    height: 92px;
    padding: 0 32px 0 0;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero {
    background: linear-gradient(rgba(15,45,70,.75), rgba(15,45,70,.75)),
                url("/static/images/img/hero.avif");
    background-size: cover;
    background-position: center;
    color: #fefefe;
    padding: 42px 88px;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: 42px;
    margin: 0 0 10px;
}

.hero p {
    font-size: 18px;
    margin: 0;
}

.page-container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.filter-card {
    padding: 24px;
    margin-bottom: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1.5fr;
    gap: 20px;
    align-items: end;
}

input, select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.btn-primary {
    background: var(--navy);
    color: white;
    padding: 11px 18px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
    margin-left: 18px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.image-card {
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
}

.image-card img,
.image-placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e9edf2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-card-body {
    padding: 14px;
}

.image-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.meta-line {
    color: var(--muted);
    font-size: 14px;
    margin: 6px 0;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5f3e8;
    color: var(--green);
    font-size: 12px;
    font-weight: bold;
}

.pagination {
    margin: 28px 0;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.pagination a {
    color: var(--navy);
    font-weight: bold;
    text-decoration: none;
}

.site-footer {
    background: var(--navy);
    color: white;
    padding: 42px 88px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.site-footer p {
    color: #d7e2ec;
    line-height: 1.6;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    background: none;
    border: none;
    color: var(--navy);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 0;
    transition: color .2s ease;
}

.logout-form button:hover {
    color: var(--green);
}

.content-page {
    max-width: 1100px;
    margin: 0 auto;
}

.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.content-card h2 {
    color: var(--navy);
    font-family: Georgia, serif;
    font-size: 30px;
    margin-top: 0;
}

.stat-grid,
.project-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat-box,
.project-card,
.contact-card {
    background: #f8faf7;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.stat-number {
    font-size: 34px;
    font-weight: 800;
    color: var(--green);
}

.project-card h3,
.contact-card h3 {
    margin-top: 0;
    color: var(--navy);
}

.button-link {
    display: inline-block;
    background: var(--navy);
    color: white;
    padding: 11px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.external-link {
    color: var(--blue);
    font-weight: bold;
}

.detail-page {
    max-width: 1600px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.detail-header h1 {
    margin: 0;
    font-size: 28px;
    color: var(--navy);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 24px;
}

.detail-grid > .wide {
    flex: 1;
}

.detail-grid > .detail-card:not(.wide) {
    width: 360px;
    flex-shrink: 0;
}

.detail-image {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    background: black;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.image-placeholder.large {
    height: 520px;
    border-radius: 10px;
}

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    font-size: 20px;
    margin-top: 0;
    color: var(--navy);
}

.detail-card.wide {
    width: 100%;
    min-width: 0;
}

.meta-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    margin: 14px 0;
    align-items: start;
}

.meta-row strong {
    color: var(--navy);
}

.detail-card input,
.detail-card textarea,
.detail-card select {
    width: 100%;
    box-sizing: border-box;
}

.detail-card textarea {
    min-height: 120px;
}

.detail-card .meta-row {
    grid-template-columns: 140px 1fr;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.clean-table th,
.clean-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.clean-table th {
    background: #f3f6f8;
    color: var(--navy);
}

.clean-table tr:nth-child(even) {
    background: #fafafa;
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid var(--border);
    font-weight: 700;
}

.alert.success {
    background: #eef8f0;
    color: #24733a;
    border-color: #b8dfc2;
}

.alert.warning {
    background: #fff7e8;
    color: #9a5a00;
    border-color: #f2d39b;
}

.save-bar {
    margin-top: 24px;
    text-align: right;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.upload-card h2 {
    font-size: 24px;
}

.dashboard-link {
    text-decoration: none;
    color: var(--text);
    display: block;
}

.dashboard-link:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

.login-page {
    max-width: 520px;
}

.login-card input {
    width: 100%;
}

.editable-detections-table {
    width: 100%;
    table-layout: fixed;
}

.editable-detections-table th,
.editable-detections-table td {
    padding: 8px;
}

.editable-detections-table input[type="text"],
.editable-detections-table input[type="number"] {
    width: 100%;
    box-sizing: border-box;
}

.editable-detections-table th:first-child,
.editable-detections-table td:first-child input {
    min-width: 160px;
}