
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;

    background: #fffae8;
    color: #2f3438;
    line-height: 1.5;
}

a {
    color: #2f6db3;
    text-decoration: none;
}

a:hover {
    color: #24558d;
}


.container {
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.row > * {
    padding: 0.75rem;
}

.g-3 {
    margin: -0.75rem;
}

.g-3 > * {
    padding: 0.75rem;
}

.g-4 {
    margin: -1rem;
}

.g-4 > * {
    padding: 1rem;
}

.col-12 {
    width: 100%;
}

.col-md-1,
.col-md-2,
.col-md-3,
.col-md-6,
.col-lg-4 {
    width: 100%;
}

@media (min-width: 768px) {

    .col-md-1 { width: 8.333%; }
    .col-md-2 { width: 16.666%; }
    .col-md-3 { width: 25%; }
    .col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-4 { width: 33.333%; }
}


.d-flex {
    display: flex;
}

.d-inline {
    display: inline;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.align-items-end {
    align-items: flex-end;
}

.mt-auto {
    margin-top: auto;
}


.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.pt-3 {
    padding-top: 1rem;
}

.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }


.display-4 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.lead {
    font-size: 1.15rem;
}

.fw-bold {
    font-weight: 700;
}

.small {
    font-size: .875rem;
}

.fs-5 {
    font-size: 1.25rem;
}

.text-center {
    text-align: center;
}

.text-secondary {
    color: #66707a;
}

.text-muted {
    color: #8a9299;
}

.text-info {
    color: #2f6db3;
}

.text-warning {
    color: #8b5e34;
}

.text-white {
    color: #2f3438;
}


.card {
    display: flex;
    flex-direction: column;

    height: 100%;

    background: #fffdf9;

    border: 1px solid #d8d2c7;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0,0,0,.05);

    color: #2f3438;
}

.card-title {
    margin: 0;
    color: #2f3438;
}

.card-text {
    color: #58616a;
}


.filter-box {
    background: #fffdf9;
    border: 1px solid #d8d2c7;
    border-radius: 12px;
}



.form-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
}

.form-control,
.form-select {
    width: 100%;

    padding: .75rem;

    font-size: 1rem;

    border: 1px solid #cfc8bc;
    border-radius: 8px;

    background: white;
    color: #2f3438;

    transition: .15s;
}

.form-control:focus,
.form-select:focus {
    border-color: #2f6db3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(47,109,179,.15);
}

.form-check {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
}

.form-check-label {
    cursor: pointer;
}



.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: .65rem 1rem;

    border-radius: 8px;
    border: 1px solid transparent;

    cursor: pointer;

    font-size: .95rem;
    font-weight: 500;

    transition: .15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #2f6db3;
    color: white;
}

.btn-primary:hover {
    background: #255991;
}

.btn-outline-info {
    background: transparent;
    border-color: #2f6db3;
    color: #2f6db3;
}

.btn-outline-info:hover {
    background: #2f6db3;
    color: white;
}

.btn-sm {
    padding: .45rem .75rem;
    font-size: .82rem;
}

.w-100 {
    width: 100%;
}


.badge {
    display: inline-block;

    padding: .35rem .7rem;

    border-radius: 999px;

    font-size: .75rem;
    font-weight: 600;
}

.badge-astro   { background: #2f6db3; color: white; }  /* Astronomie – dein Blau */
.badge-observe { background: #356677; color: white; }  /* Beobachtungsabend – Petrol */
.badge-film    { background: #8b4050; color: white; }  /* Filmvorführung – Weinrot */
.badge-sky     { background: #946a12; color: white; }  /* Himmelsereignis – Gold-Ocker */
.badge-fair    { background: #b35a2b; color: white; }  /* Messen & Kongresse – Terrakotta */
.badge-museum  { background: #566b2c; color: white; }  /* Museen & Ausstellungen – Oliv */
.badge-space   { background: #8b5e34; color: white; }  /* Raumfahrt – dein Braun */
.badge-lecture { background: #6a4a80; color: white; }  /* Vorträge & Kurse – Pflaume */
.badge-other   { background: #7c848d; color: white; }  /* Sonstiges – dein Grau */

.badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

a.badge {
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s, transform .15s;
}

a.badge:hover {
    color: white;
    filter: brightness(1.1);
    transform: translateY(-1px);
}

a.flag-link {
    display: inline-block;
    text-decoration: none;
    transition: transform .15s;
}

a.flag-link:hover {
    transform: scale(1.15);
}


.bg-success {
    background: #4d8252;
    color: white;
}

.bg-secondary {
    background: #7c848d;
    color: white;
}


.border-top {
    border-top: 1px solid #d8d2c7;
}

.border-secondary {
    border-color: #d8d2c7;
}



.pagination {
    display: flex;
    gap: .5rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.page-link {
    display: block;

    padding: .7rem 1rem;

    border-radius: 8px;

    border: 1px solid #d8d2c7;

    background: #fffdf9;

    color: #2f6db3;
}

.page-link:hover {
    background: #f1ebe0;
}

.page-item.disabled {
    opacity: .5;
    pointer-events: none;
}



.h-100 {
    height: 100%;
}

.border-0 {
    border: 0;
}

.events-calendar {
    padding: 1rem;
    color: #2f3438;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    position: relative;
    font-size: 0.9em;
}
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}
.cal-title {
    font-weight: 700;
    font-size: 1.05em;
    color: #2f3438;
}
.cal-nav {
    background: #fffdf9;
    border: 1px solid #d8d2c7;
    color: #2f6db3;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 0;
    transition: .15s;
}
.cal-nav:hover {
    background: #f1ebe0;
    border-color: #cfc8bc;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    flex: 1;
}
.cal-dow {
    text-align: center;
    font-size: 0.75em;
    color: #66707a;
    padding: .25rem 0;
    font-weight: 600;
}
.cal-day {
    position: relative;
    text-align: center;
    padding: .4rem .15rem;
    border-radius: 6px;
    cursor: default;
    min-height: 30px;
    color: #2f3438;
}
.cal-day-empty {
    visibility: hidden;
}
.cal-day-today {
    outline: 1px solid #2f6db3;
    outline-offset: -1px;
}
.cal-day-has-events {
    background: rgba(47, 109, 179, 0.12);
    cursor: pointer;
    font-weight: 700;
    color: #2f6db3;
}
.cal-day-has-events:hover {
    background: rgba(47, 109, 179, 0.22);
}
.cal-day-count {
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.7em;
    background: #2f6db3;
    color: #fff;
    border-radius: 8px;
    padding: 0 4px;
    line-height: 1.3;
    font-weight: 600;
}
.cal-popup {
    position: absolute;
    z-index: 500;
    background: #fffdf9;
    border: 1px solid #d8d2c7;
    border-radius: 10px;
    padding: .6rem .7rem;
    max-height: 220px;
    max-width: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    font-size: 0.85em;
}
.cal-popup-item {
    margin-bottom: .5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #ece6da;
}
.cal-popup-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.cal-popup-time {
    color: #66707a;
    font-size: 0.85em;
    font-weight: 600;
}
.cal-popup a {
    color: #2f6db3;
    text-decoration: none;
}
.cal-popup a:hover {
    color: #24558d;
    text-decoration: underline;
}

.static-venues { min-height: 280px; }
.static-venues-header {
    flex: 0 0 auto;
    padding: .75rem 1rem;
    font-weight: 600;
    color: #2f3438;
}
.static-venues-notice {
    flex: 0 0 auto;
    padding: 0 1rem .6rem;
    font-size: .8em;
    color: #8a9bb0;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.static-venues-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: .25rem 1rem;
}
.static-venue { padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.static-venue:last-child { border-bottom: 0; }
.static-venue-name { font-weight: 600; }
.static-venue-name a { color: #2f3438; text-decoration: none; }
.static-venue-name a:hover { text-decoration: underline; }
.static-venue-meta { font-size: .85em; color: #8a9bb0; }