:root {
    --trke-dark: #0b3d2a;
    --trke-green: #146c43;
    --trke-accent: #00d084;
    --trke-soft: #eef7f2;
    --trke-bg: #f2f5f3;
}

html { overflow-y: scroll; }

body {
    background: var(--trke-bg);
    color: #222;
    font-family: "Segoe UI", Arial, sans-serif;
}

.navbar-custom {
    background: var(--trke-dark);
    padding: 12px 0;
}

.navbar-brand img {
    border: 2px solid #fff;
    border-radius: 14px;
}

.brand-section {
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.nav-link {
    color: rgba(255,255,255,.86) !important;
    font-weight: 600;
    margin-left: 14px;
}

.nav-link:hover,
.nav-link.active { color: var(--trke-accent) !important; }
.nav-main-site { border-left: 1px solid rgba(255,255,255,.25); }
.navbar-spacer { height: 92px; }

.page-heading {
    color: var(--trke-dark);
    font-weight: 800;
}

.page-heading::after {
    background: #198754;
    border-radius: 3px;
    content: "";
    display: block;
    height: 4px;
    margin-top: 10px;
    width: 64px;
}

.hero-card,
.content-card,
.news-card,
.admin-card {
    background: #fff;
    border: 0;
    border-left: 4px solid #198754;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,.06);
}

.hero-card {
    background: linear-gradient(135deg, #0b3d2a, #146c43);
    border-left: 0;
    color: #fff;
    padding: 34px;
}

.hero-card h1 { font-weight: 800; }
.section-title { color: var(--trke-dark); font-weight: 800; }

.news-card { height: 100%; overflow: hidden; }
.news-card img,
.news-detail-image {
    background: #fff;
    display: block;
    height: 360px;
    max-height: none;
    object-fit: contain;
    width: 100%;
}

.news-card img { border-bottom: 1px solid #e4e8e5; }

.news-card .card-title { color: var(--trke-dark); font-weight: 750; }
.news-date { color: #66736c; font-size: .88rem; }

.accordion-item {
    border: 0;
    border-radius: 14px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,.06);
    margin-bottom: 18px;
    overflow: hidden;
}

.accordion-button {
    background: var(--trke-dark);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 18px 22px;
}

.accordion-button:not(.collapsed) { background: var(--trke-green); color: #fff; }
.accordion-button:focus { box-shadow: none; }
.accordion-button::after { filter: invert(1) brightness(2); }
.accordion-body { padding: 24px; }

.race-block + .race-block { border-top: 2px solid #e8eee9; margin-top: 30px; padding-top: 28px; }
.race-title { border-left: 4px solid #198754; color: var(--trke-dark); font-size: 1.1rem; font-weight: 800; padding-left: 10px; }

.table-results { background: #fff; margin-bottom: 0; }
.table-results thead { background: #eef1ef; font-size: .78rem; letter-spacing: .4px; text-transform: uppercase; }
.table-results th, .table-results td { border: 1px solid #e4e8e5; padding: 10px; vertical-align: middle; }
.table-results tbody tr:hover { background: var(--trke-soft); }
.place-cell { color: var(--trke-green); font-size: 1.05rem; font-weight: 800; text-align: center; }
.horse-name { color: var(--trke-dark); font-weight: 800; }

.table-statistics th:not(:nth-child(2)),
.table-statistics td:not(:nth-child(2)) { text-align: center; }
.stat-rank {
    color: var(--trke-green);
    font-size: 1.05rem;
    font-weight: 800;
    min-width: 34px;
    text-align: center;
}
.statistics-leader { background: #fff8d8 !important; }
.statistics-mobile .stat-number {
    color: var(--trke-green);
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}
.statistics-mobile .stat-number + span {
    color: #66736c;
    display: block;
    font-size: .7rem;
}

.result-mobile-card {
    background: #fff;
    border: 1px solid #dfe7e1;
    border-left: 4px solid #198754;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px;
}

.btn-trke { background: var(--trke-green); border-color: var(--trke-green); color: #fff; font-weight: 650; }
.btn-trke:hover { background: var(--trke-dark); border-color: var(--trke-dark); color: #fff; }
.btn-outline-trke { border: 2px solid var(--trke-green); color: var(--trke-green); font-weight: 650; }
.btn-outline-trke:hover { background: var(--trke-green); color: #fff; }

.btn-year { border: 2px solid var(--trke-dark); border-radius: 30px; color: var(--trke-dark); font-weight: 650; padding: 6px 16px; text-decoration: none; }
.btn-year:hover, .btn-year.active { background: var(--trke-green); border-color: var(--trke-green); color: #fff; }

.site-footer { background: var(--trke-dark); color: rgba(255,255,255,.8); }
.site-footer a { color: #fff; }
.empty-state { color: #66736c; padding: 45px 15px; text-align: center; }

.form-label { color: var(--trke-dark); font-weight: 650; }
.form-control:focus, .form-select:focus { border-color: #198754; box-shadow: 0 0 0 .15rem rgba(25,135,84,.15); }
.admin-shell { max-width: 1200px; }
.admin-topbar { background: #062b1d; color: #fff; }
.admin-topbar a { color: rgba(255,255,255,.88); text-decoration: none; }
.admin-topbar a:hover { color: var(--trke-accent); }
.required::after { color: #b42318; content: " *"; }
.entry-row td { min-width: 115px; }
.entry-row td:nth-child(1), .entry-row td:nth-child(2) { min-width: 70px; }
.entry-row td:nth-child(3) { min-width: 180px; }

@media (max-width: 991px) {
    .nav-link { margin-left: 0; }
    .nav-main-site { border-left: 0; }
}

@media (max-width: 767px) {
    .navbar-spacer { height: 86px; }
    .hero-card { padding: 24px 20px; }
    .hero-card h1 { font-size: 1.6rem; }
    .accordion-body { padding: 16px; }
    .accordion-button { font-size: .93rem; padding: 15px; }
    .news-card img, .news-detail-image { height: auto; max-height: none; }
/* Kleine, vollständig sichtbare Flyer-Vorschau */
.news-card img {
    background: #fff;
    display: block;
    height: 220px;
    object-fit: contain;
    width: 100%;
}

.news-image-button {
    background: #f7f8f7;
    border: 0;
    cursor: zoom-in;
    display: block;
    padding: 0;
    position: relative;
    width: 100%;
}

.news-image-button:focus-visible {
    outline: 3px solid rgba(122, 20, 40, 0.35);
    outline-offset: -3px;
}

.news-zoom-hint {
    align-items: center;
    background: rgba(20, 31, 25, 0.78);
    border-radius: 50%;
    bottom: 12px;
    color: #fff;
    display: flex;
    height: 38px;
    justify-content: center;
    position: absolute;
    right: 12px;
    width: 38px;
}

.flyer-modal-content {
    background: #f7f8f7;
}

.flyer-modal-image {
    display: block;
    margin: 0 auto;
    max-height: calc(100vh - 140px);
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .news-detail-image {
        height: 240px;
        max-height: none;
    }
}