/* ==================================================================
   base.css — ersetzt Bootstrap 4 + FontAwesome (nur was die Seite braucht)
   Klassennamen bewusst wie bei Bootstrap, damit index.md / devlog.md /
   Posts / README-Modals unverändert bleiben.
   ================================================================== */

/* ---------- reboot ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 1rem; font-weight: 400; line-height: 1.5; text-align: left;
}
[tabindex="-1"]:focus { outline: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; font-weight: 500; line-height: 1.2; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; }
ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; }
blockquote { margin: 0 0 1rem; }
hr { box-sizing: content-box; height: 0; overflow: visible; margin: 1rem 0; border: 0; border-top: 1px solid rgba(0,0,0,.1); }
a { text-decoration: none; background-color: transparent; }
a:hover { text-decoration: underline; }
a:not([href]):not([class]) { color: inherit; text-decoration: none; }
pre, code, kbd, samp { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 1em; }
pre { margin: 0 0 1rem; overflow: auto; }
code { font-size: 87.5%; color: #e83e8c; word-wrap: break-word; }
pre code { font-size: inherit; color: inherit; word-break: normal; }
small { font-size: 80%; }
img, svg { vertical-align: middle; }
img { border-style: none; }
svg { overflow: hidden; }
table { border-collapse: collapse; }
th { text-align: inherit; }
button { border-radius: 0; margin: 0; font: inherit; text-transform: none; overflow: visible; }
button:focus { outline: 1px dotted; outline: 5px auto -webkit-focus-ring-color; }
button, [type="button"] { -webkit-appearance: button; }
button:not(:disabled), [type="button"]:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- utilities ---------- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.text-muted { color: #6c757d !important; }
.d-flex { display: flex; }
.ml-auto { margin-left: auto; }
.mt-3 { margin-top: 1rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* ---------- grid (container / row / col-12 / col-md-4) ---------- */
.container { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.col-12, .col-md-4 { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 768px) { .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; } }

/* ---------- buttons ---------- */
.btn {
    display: inline-block; font-weight: 400; text-align: center; vertical-align: middle;
    user-select: none; border: 1px solid transparent; padding: .375rem .75rem;
    font-size: 1rem; line-height: 1.5; color: #212529;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .65; pointer-events: none; }
.btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; }
.btn-primary:hover { color: #fff; background-color: #0069d9; border-color: #0062cc; }
.btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-secondary:hover { color: #fff; background-color: #5a6268; border-color: #545b62; }
.btn:focus { outline: 0; box-shadow: 0 0 0 .2rem rgba(0,123,255,.5); }
.btn-secondary:focus { box-shadow: 0 0 0 .2rem rgba(130,138,145,.5); }

/* ---------- card ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-clip: border-box; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-title { margin-bottom: .75rem; }
.card-text:last-child { margin-bottom: 0; }

/* ---------- navbar + collapse ---------- */
.collapse:not(.show) { display: none; }
.navbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .5rem 1rem; }
.navbar > .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.navbar-brand { display: inline-block; padding: .3125rem 0; margin-right: 1rem; font-size: 1.25rem; line-height: inherit; white-space: nowrap; }
.navbar-brand:hover { text-decoration: none; }
.navbar-nav { display: flex; flex-direction: column; padding-left: 0; margin: 0; list-style: none; }
.nav-link { display: block; padding: .5rem 1rem; }
.nav-link:hover { text-decoration: none; }
.navbar-collapse { flex-basis: 100%; flex-grow: 1; align-items: center; }
.navbar-toggler {
    padding: .25rem .75rem; font-size: 1.25rem; line-height: 1; background-color: transparent;
    border: 1px solid rgba(255,255,255,.1); border-radius: .25rem; color: rgba(255,255,255,.5);
}
.navbar-toggler-icon {
    display: inline-block; width: 1.5em; height: 1.5em; vertical-align: middle;
    background: no-repeat center / 100% 100%
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.navbar-dark .navbar-nav .active > .nav-link { color: #fff; }
@media (min-width: 992px) {
    .navbar-expand-lg { flex-flow: row nowrap; justify-content: flex-start; }
    .navbar-expand-lg > .container { flex-wrap: nowrap; }
    .navbar-expand-lg .navbar-nav { flex-direction: row; }
    .navbar-expand-lg .navbar-nav .nav-link { padding-right: .5rem; padding-left: .5rem; }
    .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-expand-lg .navbar-toggler { display: none; }
}

/* ---------- modal (JS in site.js) ---------- */
.fade { transition: opacity .15s linear; }
.fade:not(.show) { opacity: 0; }
.modal-open { overflow: hidden; }
.modal-open .modal { overflow-x: hidden; overflow-y: auto; }
.modal { position: fixed; top: 0; left: 0; z-index: 1050; display: none; width: 100%; height: 100%; overflow: hidden; outline: 0; }
.modal-dialog { position: relative; width: auto; margin: .5rem; pointer-events: none; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background-clip: padding-box; outline: 0; }
.modal-backdrop { position: fixed; top: 0; left: 0; z-index: 1040; width: 100vw; height: 100vh; background-color: #000; }
.modal-backdrop.show { opacity: .5; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1rem; }
.modal-title { margin: 0; line-height: 1.5; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1rem; }
.modal-body img { max-width: 100%; }
.modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; padding: .75rem; }
.modal-footer > * { margin: .25rem; }
@media (min-width: 576px) { .modal-dialog { max-width: 500px; margin: 1.75rem auto; } }
@media (min-width: 992px) { .modal-lg { max-width: 800px; } }
.close {
    float: right; font-size: 1.5rem; font-weight: 700; line-height: 1; color: #000;
    text-shadow: 0 1px 0 #fff; opacity: .5; padding: 0; background-color: transparent; border: 0;
}
.close:hover { opacity: .75; text-decoration: none; }
.modal-header .close { padding: 1rem; margin: -1rem -1rem -1rem auto; }

/* ---------- Masonry-Animation beim Resize (wie Masonry.js, 0.4s) ---------- */
.grid-animate > .col-md-4 { transition: left .4s, top .4s; }
.grid-animate { transition: height .4s; }

/* ---------- icons (SVG-Sprite im Layout) ---------- */
.icon { display: inline-block; height: 1em; fill: currentColor; vertical-align: -.125em; }

@media (prefers-reduced-motion: reduce) {
    .fade, .btn, .grid-animate, .grid-animate > .col-md-4 { transition: none; }
}
