:root {
    color-scheme: light;
    --bg: #f5f3ee;
    --panel: #ffffff;
    --text: #24221f;
    --muted: #6f6a61;
    --line: #dfd8cd;
    --accent: #1f7a68;
    --accent-dark: #155747;
    --gold: #b9832f;
    --clay: #b9573f;
    --warn: #a44235;
    --shadow: 0 18px 48px rgba(41, 35, 28, .12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 280px),
        var(--bg);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
.site-header, .site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px clamp(16px, 4vw, 48px);
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 48px; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 18px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    min-width: 0;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1f7a68 0%, #d8b36a 100%);
    color: white;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 14px 30px rgba(31, 122, 104, .22);
    flex-shrink: 0;
}
.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.brand-copy strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}
.brand-copy small {
    color: var(--muted);
    font-size: 13px;
}
.quick-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 104, .14);
    background: rgba(255, 255, 255, .86);
    color: var(--text);
    font-weight: 700;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.quick-link:hover {
    background: white;
    border-color: rgba(31, 122, 104, .28);
    color: var(--text);
    transform: translateY(-1px);
}
.quick-link-admin {
    background: linear-gradient(135deg, var(--accent) 0%, #2f927f 100%);
    border-color: transparent;
    color: white;
}
.quick-link-admin:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #247364 100%);
    color: white;
}
.container { width: min(1180px, calc(100% - 32px)); margin: 30px auto; }
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: stretch;
    min-height: 430px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(110deg, rgba(26, 35, 30, .86), rgba(26, 35, 30, .54)),
        var(--hero-image),
        linear-gradient(135deg, #315c52, #d8b36a);
    background-size: cover, 320px, cover;
    background-position: center, right 42px bottom 28px, center;
    color: white;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 760px; }
.eyebrow {
    color: var(--gold);
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1; margin: 0 0 18px; letter-spacing: 0; }
.hero p { color: rgba(255, 255, 255, .88); margin: 0; font-size: 20px; line-height: 1.5; max-width: 620px; }
.hero-panel {
    align-self: end;
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 24px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(16px);
}
.hero-total { display: grid; gap: 6px; }
.hero-panel strong { display: block; font-size: 54px; line-height: .95; }
.hero-total span { color: rgba(255, 255, 255, .82); font-size: 15px; }
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.hero-stats article {
    display: grid;
    gap: 4px;
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
}
.hero-stats b { font-size: 26px; line-height: 1; }
.hero-stats span { color: rgba(255, 255, 255, .82); font-size: 13px; }
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin: 38px 0 16px;
}
.section-heading h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: 0; }
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr)) auto auto;
    gap: 12px;
    align-items: end;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(41, 35, 28, .06);
}
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    background: white;
}
textarea { min-height: 120px; resize: vertical; }
button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-dark); color: white; }
.button.secondary { background: #ece6dc; color: var(--text); }
.button.secondary:hover { background: #ded4c4; color: var(--text); }
.animal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.animal-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(41, 35, 28, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}
.animal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-image {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    color: white;
    background: transparent;
}
.card-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e3e7e4; }
.card-image span {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(31, 122, 104, .92);
    color: white;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}
.card-body { padding: 16px; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.animal-card h2 { margin: 8px 0; font-size: 22px; }
.card-meta { color: var(--muted); font-size: 14px; text-transform: capitalize; }
.animal-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 32px;
}
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; }
.gallery-zoom {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.detail-text { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 24px;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 19, 18, .82);
    backdrop-filter: blur(6px);
}
.lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 100%);
    margin: 0;
}
.lightbox-image {
    max-width: min(1100px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border-radius: 14px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, .35);
}
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    min-height: 44px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
}
.has-lightbox { overflow: hidden; }
.form {
    display: grid;
    gap: 16px;
    max-width: 720px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
.alert.success { background: #e3f5eb; color: #135536; }
.alert.error { background: #fde8e5; color: var(--warn); }
@media (max-width: 800px) {
    .hero, .featured-grid, .filters, .animal-detail { grid-template-columns: 1fr; }
    .site-header {
        align-items: stretch;
        padding: 14px 16px;
        gap: 14px;
    }
    .brand {
        gap: 12px;
        width: 100%;
    }
    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 14px;
    }
    .brand-copy strong {
        font-size: 16px;
    }
    .brand-copy small {
        font-size: 12px;
    }
    .quick-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }
    .quick-link {
        min-height: 40px;
        padding: 9px 10px;
        font-size: 14px;
    }
    .hero {
        min-height: auto;
        gap: 18px;
        padding: 24px 20px;
        border-radius: 28px;
        background-position: center, right -12px bottom 18px, center;
    }
    .hero h1 { font-size: clamp(30px, 10vw, 44px); margin-bottom: 12px; }
    .hero p { font-size: 16px; line-height: 1.45; max-width: none; }
    .hero-panel {
        gap: 14px;
        padding: 18px;
        border-radius: 22px;
    }
    .hero-panel strong { font-size: 38px; }
    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .hero-stats article {
        padding: 10px 8px;
        border-radius: 16px;
    }
    .hero-stats b { font-size: 20px; }
    .hero-stats span { font-size: 11px; }
    .filters {
        grid-template-columns: 1fr;
        padding: 16px;
        border-radius: 20px;
    }
}
