/* ═══ Frontend Extras – professionelle Zusatzfeatures ═══ */

/* Lesefortschritt */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    z-index: 10001;
    transition: width .1s linear;
    pointer-events: none;
}

/* Nächster-Termin-Streifen */
.event-strip {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    padding: .65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.event-strip__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.25rem;
}
.event-strip__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .15);
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.event-strip__text { flex: 1; min-width: 200px; font-size: .92rem; }
.event-strip__meta { opacity: .85; font-weight: 400; }
.event-strip__cta { white-space: nowrap; }

/* Cookie-Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10050;
    padding: 1rem;
    transform: translateY(110%);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}
.cookie-consent.is-visible {
    transform: translateY(0);
}
.cookie-consent__inner {
    max-width: 960px;
    margin: 0 auto;
    background: var(--color-primary-dark);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, .12);
}
.cookie-consent__text { flex: 1; min-width: 240px; }
.cookie-consent__text p { margin: .35rem 0 0; font-size: .9rem; opacity: .9; }
.cookie-consent__text a { color: #fff; text-decoration: underline; }
.cookie-consent__actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* Live-Suche Modal */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1rem, 8vh, 5rem) 1rem 1rem;
}
.search-modal[hidden] { display: none; }
.search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 24, 16, .65);
    backdrop-filter: blur(4px);
}
.search-modal__panel {
    position: relative;
    width: min(100%, 640px);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
    overflow: hidden;
    animation: searchModalIn .25s ease-out;
}
@keyframes searchModalIn {
    from { opacity: 0; transform: translateY(-12px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.search-modal__form {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    gap: .75rem;
}
.search-modal__icon { color: var(--color-muted); font-size: 1.1rem; }
.search-modal__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: var(--font-body);
    background: transparent;
}
.search-modal__close {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.2rem;
    padding: .35rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.search-modal__close:hover { background: rgba(0, 0, 0, .06); color: var(--color-text); }
.search-modal__hint {
    padding: .5rem 1.25rem;
    font-size: .78rem;
    color: var(--color-muted);
    background: var(--color-cream);
}
.search-modal__hint kbd {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .72rem;
}
.search-modal__results { max-height: 360px; overflow-y: auto; }
.search-modal__item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--color-border);
    transition: background .15s;
}
.search-modal__item:hover,
.search-modal__item.is-active { background: rgba(26, 77, 46, .06); }
.search-modal__item-type {
    flex-shrink: 0;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: rgba(26, 77, 46, .1);
    color: var(--color-primary);
}
.search-modal__item-type--event { background: rgba(193, 120, 23, .15); color: #8a5a0f; }
.search-modal__item-type--page { background: rgba(100, 100, 100, .12); color: #555; }
.search-modal__item-body h4 { font-size: .95rem; margin: 0 0 .15rem; color: var(--color-primary-dark); }
.search-modal__item-body p { margin: 0; font-size: .82rem; color: var(--color-muted); }
.search-modal__empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--color-muted);
}
.search-modal__all {
    display: block;
    text-align: center;
    padding: .75rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    border-top: 1px solid var(--color-border);
}
.search-modal__all:hover { background: rgba(26, 77, 46, .04); }

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9995;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .08);
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
}
.mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .4rem .25rem;
    font-size: .68rem;
    font-weight: 600;
    color: var(--color-muted);
    text-decoration: none;
    transition: color .15s;
}
.mobile-bottom-nav__item i { font-size: 1.15rem; }
.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover { color: var(--color-primary); }

body.has-mobile-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
body.cookie-visible.has-mobile-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

@media (max-width: 767.98px) {
    .mobile-bottom-nav { display: flex; }
    body.has-mobile-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .back-to-top { bottom: calc(72px + env(safe-area-inset-bottom)); }
    .cookie-consent { padding-bottom: calc(1rem + 64px + env(safe-area-inset-bottom)); }
}

/* Share Buttons modern */
.share-buttons--modern { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.share-buttons__title { font-size: 1rem; margin-bottom: 1rem; color: var(--color-primary-dark); }
.share-buttons__grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    font-family: var(--font-body);
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.share-btn--facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn--whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-btn--email:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.share-btn--ical:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.share-btn--copy:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.share-copy-toast {
    margin-top: .75rem;
    font-size: .85rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* Artikel-Meta Erweiterung */
.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    font-size: .875rem;
    color: var(--color-muted);
}
.article-meta-bar span { display: inline-flex; align-items: center; gap: .35rem; }

/* Footer Newsletter */
.footer-newsletter {
    background: rgba(255, 255, 255, .06);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
}
.footer-newsletter h6 { color: #fff; margin-bottom: .35rem; font-size: .95rem; }
.footer-newsletter p { font-size: .82rem; opacity: .75; margin-bottom: .75rem; }
.footer-newsletter .form-control {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .2);
    color: #fff;
}
.footer-newsletter .form-control::placeholder { color: rgba(255, 255, 255, .5); }
.footer-newsletter .btn-accent { flex-shrink: 0; }

/* Utility-Bar Suche als Button */
.utility-bar__search-btn {
    background: none;
    border: none;
    color: inherit;
    padding: .25rem .5rem;
    cursor: pointer;
    font-size: inherit;
    opacity: .85;
    transition: opacity .15s;
}
.utility-bar__search-btn:hover { opacity: 1; }

/* Drucken */
@media print {
    .utility-bar, .site-header, .site-footer, .mobile-bottom-nav,
    .cookie-consent, .back-to-top, .search-modal, .event-strip,
    .share-buttons, .widget, .breadcrumb, .season-fx { display: none !important; }
    body { padding: 0 !important; }
    .hero, .news-hero, .event-hero { min-height: auto !important; padding: 1rem 0 !important; }
    a[href]::after { content: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .search-modal__panel { animation: none; }
    .cookie-consent { transition: none; }
}
