/* ==========================================================
   Nattwerder.de – Custom Styles
   Bootstrap 5.3 · Light / Dark Theme · Mobile-First
   ========================================================== */

/* --- Custom Properties ---------------------------------- */
:root {
    --nw-font-heading: 'Josefin Slab', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --nw-font-body: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --nw-box-bg: rgba(255, 255, 255, 0.92);
    --nw-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --nw-brand-color: #fff;
    --nw-brand-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    --nw-hr-color: #999;
    --nw-footer-bg: rgba(255, 255, 255, 0.92);
    --nw-text-body: #212529;
    --nw-text-muted: #6c757d;
    --nw-link-color: #0d6efd;
    --nw-overlay: none;
}

[data-bs-theme="dark"] {
    --nw-box-bg: rgba(33, 37, 41, 0.92);
    --nw-box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    --nw-brand-color: #f0f0f0;
    --nw-brand-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
    --nw-hr-color: #495057;
    --nw-footer-bg: rgba(33, 37, 41, 0.92);
    --nw-text-body: #dee2e6;
    --nw-text-muted: #adb5bd;
    --nw-link-color: #6ea8fe;
    --nw-overlay: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

/* --- Base ----------------------------------------------- */
body {
    font-family: var(--nw-font-body);
    background-image: url('../img/background.JPG');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

[data-bs-theme="dark"] body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                      url('../img/background.JPG');
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center center;
    background-attachment: fixed, fixed;
    background-size: cover, cover;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nw-font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

p {
    font-size: 1.125rem;
    line-height: 1.7;
}

hr {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    border-color: var(--nw-hr-color);
    opacity: .5;
}

a {
    color: var(--nw-link-color);
}

/* --- Skip Link ------------------------------------------ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: .5rem 1rem;
    background: var(--bs-primary);
    color: #fff;
    border-radius: .25rem;
}
.skip-link:focus {
    top: 1rem;
}

/* --- Brand Header --------------------------------------- */
.site-brand {
    padding-top: 1.5rem;
}

.brand-title {
    font-family: var(--nw-font-heading);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--nw-brand-color);
    text-shadow: var(--nw-brand-shadow);
    padding-bottom: .5rem;
}

.brand-location {
    font-size: clamp(.85rem, 1.5vw, 1.15rem);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--nw-brand-color);
    text-shadow: var(--nw-brand-shadow);
    padding-bottom: 1.5rem;
}

/* --- Navigation ----------------------------------------- */
.navbar {
    background: var(--nw-box-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    z-index: 1030;
    transition: background .3s ease;
}

.navbar-nav {
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 2px;
}

.navbar-nav .nav-link {
    padding: .75rem 1rem;
    font-size: .85rem;
    transition: color .2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
}

.navbar-brand {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
    font-size: .8rem;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding: 1.25rem 1rem;
        font-size: .9rem;
    }
    .navbar-nav {
        font-size: 1rem;
    }
}

/* --- Theme Toggle --------------------------------------- */
.theme-toggle {
    font-size: 1.2rem;
    transition: transform .3s ease;
    border: none;
    background: none;
}
.theme-toggle:hover {
    transform: scale(1.15);
}

/* --- Content Boxes -------------------------------------- */
.box {
    margin-bottom: 1.5rem;
    border-radius: .375rem;
    padding: 2rem 1.5rem;
    background: var(--nw-box-bg);
    color: var(--nw-text-body);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: var(--nw-box-shadow);
    transition: background .3s ease, color .3s ease;
}

/* --- Page Content (strip editor inline styles) ---------- */
.page-content [style] {
    background-color: transparent !important;
    color: inherit !important;
}

/* --- Brand In-Box Text ---------------------------------- */
.brand-before {
    text-transform: capitalize;
    margin: .75rem 0;
}
.brand-before small {
    font-size: .8em;
}
.brand-name {
    text-transform: capitalize;
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4rem);
}

/* --- Section Headers ------------------------------------ */
.intro-text {
    text-transform: uppercase;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* --- Image Helpers -------------------------------------- */
.img-left {
    float: none;
    margin: 0 auto 1rem;
    display: block;
}

@media (min-width: 768px) {
    .img-left {
        float: left;
        margin-right: 1.5rem;
        margin-bottom: 1rem;
    }
    img.img-left:not([style*="max-width"]) {
        max-width: 40%;
    }
}

.img-right {
    float: none;
    margin: 0 auto 1rem;
    display: block;
}

@media (min-width: 768px) {
    .img-right {
        float: right;
        margin-left: 1.5rem;
        margin-bottom: 1rem;
    }
    img.img-right:not([style*="max-width"]) {
        max-width: 40%;
    }
}

@media (max-width: 767.98px) {
    img.img-left[style*="max-width"],
    img.img-right[style*="max-width"],
    img.d-block.mx-auto[style*="max-width"],
    .carousel.img-left[style*="max-width"],
    .carousel.img-right[style*="max-width"],
    .carousel.d-block.mx-auto[style*="max-width"] {
        max-width: 100% !important;
    }
}

/* --- Gallery -------------------------------------------- */
.gallery-item {
    margin-bottom: 1rem;
    cursor: pointer;
    overflow: hidden;
    border-radius: .375rem;
}
.gallery-item img,
.gallery-item video {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .3s ease, opacity .3s ease;
}
@media (hover: hover) {
    .gallery-item:hover img {
        transform: scale(1.05);
        opacity: .85;
    }
}
.gallery-item:focus-within img {
    transform: scale(1.05);
    opacity: .85;
}

.modal-gallery .modal-body {
    padding: 0;
}
.modal-gallery .carousel-item img {
    width: 100%;
    height: auto;
}

/* --- Google Maps Responsive ----------------------------- */
.map-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: .375rem;
}
.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Footer --------------------------------------------- */
.site-footer {
    background: var(--nw-footer-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background .3s ease;
}
.site-footer a {
    text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus {
    text-decoration: underline;
}
.site-footer p {
    font-size: .95rem;
}

/* --- Dark-Theme: Alerts barrierefrei -------------------- */
[data-bs-theme="dark"] .alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.3);
    color: #6edff6;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75b798;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

[data-bs-theme="dark"] .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Spenden / Bank-Info -------------------------------- */
.bank-info {
    padding: 1rem 1.5rem;
    border-radius: .25rem;
}

/* --- Print ---------------------------------------------- */
@media print {
    body {
        background: #fff !important;
    }
    .navbar, .site-footer, .theme-toggle, .skip-link {
        display: none !important;
    }
    .box {
        background: #fff;
        box-shadow: none;
        break-inside: avoid;
    }
}
