/*
 * MÄNNERRUNDE — Interface Design System
 * --------------------------------------
 * Inspired by calm, spacious product interfaces.
 * Bootstrap 5.3 remains the component foundation.
 * All tokens support light and dark appearance.
 */

:root,
[data-bs-theme="light"] {
    color-scheme: light;
    --mr-canvas: #f5f5f7;
    --mr-surface: #ffffff;
    --mr-surface-muted: #fafafa;
    --mr-ink: #1d1d1f;
    --mr-muted: #6e6e73;
    --mr-line: rgba(0, 0, 0, .075);
    --mr-blue: #0071e3;
    --mr-blue-hover: #0077ed;
    --mr-shadow: 0 8px 32px rgba(0, 0, 0, .045);
    --mr-shadow-hover: 0 18px 50px rgba(0, 0, 0, .09);
    --mr-radius: 22px;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --mr-canvas: #0d0d0f;
    --mr-surface: #1c1c1e;
    --mr-surface-muted: #242426;
    --mr-ink: #f5f5f7;
    --mr-muted: #a1a1a6;
    --mr-line: rgba(255, 255, 255, .105);
    --mr-blue: #2997ff;
    --mr-blue-hover: #54adff;
    --mr-shadow: 0 10px 36px rgba(0, 0, 0, .18);
    --mr-shadow-hover: 0 20px 50px rgba(0, 0, 0, .3);
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    background: var(--mr-canvas) !important;
    color: var(--mr-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -.012em;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

.container { max-width: 1160px; }
main.container { padding-top: 3.5rem !important; padding-bottom: 5rem !important; }
h1, h2, h3, h4, h5 { color: var(--mr-ink); letter-spacing: -.045em; }
h1, .h1 { font-weight: 750; }
h2, .h2 { font-weight: 720; }
h3, .h3 { font-weight: 690; }
h1.h2, main > h1 { font-size: clamp(2rem, 4vw, 3rem); }
.text-secondary { color: var(--mr-muted) !important; }
a { color: var(--mr-blue); }
a:hover { color: var(--mr-blue-hover); }

/* Navigation — translucent, restrained, always accessible. */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 76px;
    background: color-mix(in srgb, var(--mr-surface) 84%, transparent) !important;
    border-bottom: 1px solid var(--mr-line) !important;
    box-shadow: none !important;
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.navbar-brand { color: var(--mr-ink); font-size: 1.1rem; font-weight: 750; letter-spacing: -.04em; }
.navbar-brand:hover { color: var(--mr-ink); }
.navbar-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 13px; }
.navbar-toggler { border: 1px solid var(--mr-line); border-radius: 12px; }
.navbar .nav-link {
    padding: .55rem .85rem !important;
    border-radius: 11px;
    color: var(--mr-muted);
    font-weight: 590;
    transition: background .18s, color .18s;
}
.navbar .nav-link:hover, .navbar .nav-link[aria-current="page"] {
    color: var(--mr-ink);
    background: var(--mr-surface-muted);
}

/* Cards and gallery. */
.card, .accordion-item, .table-responsive.bg-white {
    color: var(--mr-ink);
    background: var(--mr-surface) !important;
    border: 1px solid var(--mr-line) !important;
    border-radius: var(--mr-radius) !important;
    box-shadow: var(--mr-shadow) !important;
}
.card { overflow: hidden; }
.card-body { min-width: 0; }
.card .text-body { color: var(--mr-ink) !important; }
.reise-karte, .medien-grid .card { transition: transform .25s ease, box-shadow .25s ease; }
.reise-karte:hover, .medien-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mr-shadow-hover) !important;
}
.reise-vorschau { width: 100%; height: 185px !important; object-fit: cover; }
.reise-platzhalter { height: 185px !important; background: var(--mr-surface-muted) !important; }
.medien-vorschau, .medien-video { width: 100%; height: 124px !important; object-fit: cover; }
.medien-video { background: #0b0b0d !important; }
.medien-grid { max-width: 1050px; }
.medien-grid .card-body { padding: 1rem !important; }
.dateiname { overflow-wrap: anywhere; }

/* Buttons and forms. */
.btn {
    border-radius: 999px;
    padding: .62rem 1.15rem;
    font-weight: 620;
    letter-spacing: -.01em;
    transition: background-color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-sm { padding: .42rem .85rem; font-size: .82rem; }
.btn-lg { padding: .78rem 1.4rem; }
.btn-primary { background: #0071e3; border-color: #0071e3; box-shadow: none; }
.btn-primary:hover, .btn-primary:focus { background: #0077ed; border-color: #0077ed; }
.btn-outline-primary { color: var(--mr-blue); border-color: var(--mr-blue); }
.btn-outline-primary:hover { background: var(--mr-blue); border-color: var(--mr-blue); color: #fff; }
.form-control, .form-select {
    min-height: 45px;
    padding: .65rem .9rem;
    color: var(--mr-ink);
    background: var(--mr-surface);
    border: 1px solid var(--mr-line);
    border-radius: 13px;
}
.form-control:focus, .form-select:focus {
    background: var(--mr-surface);
    border-color: var(--mr-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}
.form-label { font-weight: 650; }
.form-check-input { cursor: pointer; }

/* Accordions, tables, feedback, media viewer. */
.accordion-item { overflow: hidden; margin-bottom: .8rem; }
.accordion-button { padding: 1.1rem 1.3rem; font-weight: 690; background: var(--mr-surface); color: var(--mr-ink); }
.accordion-button:not(.collapsed) { background: var(--mr-surface-muted); color: var(--mr-ink); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 4px rgba(0, 113, 227, .12); }
.accordion-body { background: var(--mr-surface); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--mr-ink); }
.table thead th { color: var(--mr-muted); font-size: .76rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.table-responsive.bg-white { padding: .75rem; }
.modal-content { border: 1px solid var(--mr-line); border-radius: 22px; box-shadow: 0 28px 90px rgba(0, 0, 0, .25); }
.alert { border-radius: 16px; }
.badge { font-weight: 650; }

/* Theme control and login. */
.mr-theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap; }
.mr-theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mr-login-theme { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 10; }
.login-logo, .maennerrunde-logo { display: block; width: 100%; max-width: 235px; height: auto; margin: 0 auto 1.5rem; object-fit: contain; }
body:has(.login-logo) main .card { max-width: 520px; margin-inline: auto; }

[data-bs-theme="dark"] .bg-white { background: var(--mr-surface) !important; }
[data-bs-theme="dark"] .bg-light { background: var(--mr-surface-muted) !important; }
[data-bs-theme="dark"] .text-dark { color: var(--mr-ink) !important; }
[data-bs-theme="dark"] .shadow-sm { box-shadow: var(--mr-shadow) !important; }
[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

@media (max-width: 767px) {
    main.container { padding-top: 2.1rem !important; }
    .navbar { min-height: 66px; }
    .navbar-brand img { width: 40px; height: 40px; }
    .navbar-collapse { padding: 1rem 0; }
    .reise-vorschau, .reise-platzhalter { height: 135px !important; }
    .medien-vorschau, .medien-video { height: 105px !important; }
    .container { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Media modal image constraints. */
.lightbox-img { max-width: 100%; max-height: 72vh; object-fit: contain; }


/* Platzhalter für Reisen ohne Bilder */
.trip-cover-empty {
    width: 100%;
    height: 185px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252528;
    color: #8e8e93;
}

.trip-cover-empty svg {
    width: 42px;
    height: 42px;
    opacity: 0.65;
}
