/* assets/css/public-app.css – 2026 Modern Public Styles (Bereinigt 04/2026) */

@import url('public/theme.css');
@import url('components.css');
@import url('forms.css');

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }

body.public-page {
    margin: 0;
    padding: 0;
    max-width: none;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
}

.public-page h1,
.public-page h2,
.public-page h3 {
    line-height: 1.2;
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #2b2b2b;
    border-bottom: none;
    box-shadow: var(--shadow-nav);
}

.site-header__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.site-header__title {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-left: auto;
}

/* ================================================
   HAMBURGER
   ================================================ */
.nav-toggle {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.45);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 201;
}

.nav-toggle__lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle__line {
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle:hover .nav-toggle__line {
    background: var(--color-accent);
}
.nav-toggle.is-open .nav-toggle__line {
    background: var(--color-accent);
}

.nav-toggle.is-open .nav-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle__line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-section-label {
    display: block;
    padding: 12px 2rem 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    cursor: default;
}

.nav-sub {
    padding-left: 2.75rem;
}

/* ================================================
   MOBILE NAV — volle Breite
   ================================================ */
.site-nav--mobile {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 200;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 16px 20px 32px;
    gap: 2px;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.77, 0, 0.175, 1);
}

@media (min-width: 480px) {
    .site-nav--mobile {
        width: 50%;
    }
}

@media (min-width: 900px) {
    .site-nav--mobile {
        width: 33%;
    }
}

.site-nav--mobile__logo {
    padding: 8px 0 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 8px;
}

.site-nav--mobile__logo img {
    height: 60px;
    width: auto;
    display: block;
}

.site-nav--mobile.is-open {
    transform: translateX(0);
}

.site-nav--mobile__close {
    position: absolute;
    top: 18px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #555;
    padding: 6px 10px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.site-nav--mobile__close:hover {
    background: #e2e8f0;
    color: #111;
}

/* Nav bleibt immer hell — auch im Dark Mode */
html.dark-theme .site-nav--mobile {
    background: #ffffff;
}

html.dark-theme .site-nav--mobile__close {
    color: #555;
}

html.dark-theme .site-nav--mobile__close:hover {
    background: #e2e8f0;
    color: #111;
}

html.dark-theme .site-nav--mobile__logo {
    border-bottom-color: #e2e8f0;
}

html.dark-theme details summary {
    color: #d0d0d0;
}

/* ================================================
   THEME SWITCHER (unten im Nav)
   ================================================ */
.theme-switcher {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.theme-btn {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    transition: background 0.2s;
}

.theme-btn:hover {
    background: #f0f0f0;
}

/* ================================================
   BACKDROP
   ================================================ */
.site-nav--backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.30);
}

.site-nav--backdrop.is-open {
    display: block;
}

/* ================================================
   HERO
   ================================================ */
.site-hero {
    height: var(--hero-min-height);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 24px auto 0;
    max-width: 800px;
}

.site-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

/* ================================================
   MAIN
   ================================================ */
.site-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 0px;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    background: #2b2b2b;
    color: #ffffff;
    padding: 40px 24px;
    margin-top: 60px;
}

.site-footer__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
}

.site-footer__logo {
    width: 200px;
    height: auto;
    display: block;
}

.site-footer__address {
    font-style: normal;
    font-size: 0.85rem;
    color: #ffffff;
    opacity: 0.75;
    line-height: 1.6;
    margin: 0;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-footer__link {
    color: #ffffff;
    opacity: 0.75;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.site-footer__link:hover {
    opacity: 1;
}

.site-footer__copy {
    font-size: 0.82rem;
    color: #ffffff;
    opacity: 0.5;
    margin: 0;
}

@media (max-width: 600px) {
    .site-footer__inner {
        flex-direction: column;
        gap: 24px;
    }
}

/* ================================================
   POST-CARDS (index.php)
   ================================================ */
.post-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.post-card h2 {
    font-weight: 500;
    margin-top: 0;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(42,77,63,0.12);
}

.post-card__meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 12px;
}

.post-card__excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ================================================
   POST DETAIL (post.php)
   ================================================ */
.post-detail {
    background: var(--color-bg-card);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.post-content a,
.post-card__excerpt a {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-content a:hover,
.post-card__excerpt a:hover {
    color: var(--color-primary-dark);
}

.post-nav {
    margin-bottom: 20px;
}

.post-nav__back {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.post-nav__back:hover {
    color: var(--color-primary-dark);
}

.post-content blockquote,
.post-card__excerpt blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg);
    margin: 16px 0;
    padding: 16px 16px;
    border-radius: 0 6px 6px 0;
    color: var(--color-text-muted);
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
}

/* ================================================
   DARK MODE
   ================================================ */
html.dark-theme a,
html.dark-theme .post-content a,
html.dark-theme .post-card__excerpt a,
html.dark-theme .post-nav__back {
    color: #d0d0d0;
}

html.dark-theme a:hover,
html.dark-theme .post-content a:hover,
html.dark-theme .post-card__excerpt a:hover,
html.dark-theme .post-nav__back:hover {
    color: #ffffff;
}

/* Header & Footer: Links immer weiß */
.site-header a,
.site-footer a,
.site-footer .site-footer__link {
    color: #ffffff;
}

html.dark-theme .site-header a,
html.dark-theme .site-footer a,
html.dark-theme .site-footer .site-footer__link {
    color: #ffffff;
}

html.dark-theme .site-footer .site-footer__link:hover,
html.dark-theme .site-footer a:hover {
    opacity: 1;
    color: #ffffff;
}

/* Nav: immer hell, keine active-Hervorhebung — light UND dark
   MUSS nach .site-header a stehen, da Nav innerhalb header eingebettet ist */
.site-nav--mobile a,
html.dark-theme .site-nav--mobile a {
    color: #1f2937;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    padding: 4px 14px;
    border-radius: 6px;
    background: none;
    transition: background 0.2s, color 0.2s;
}

.site-nav--mobile a:hover,
html.dark-theme .site-nav--mobile a:hover {
    background: #e2e8f0;
    color: #2a4d3f;
}

.site-nav--mobile a.nav-active,
html.dark-theme .site-nav--mobile a.nav-active {
    background: none;
    color: #1f2937;
    font-weight: 400;
}

/* ================================================
   EVENT-BOX & FORM-GRID (forms/)
   ================================================ */
.event-box {
    background: var(--color-bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    margin-top: 32px;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ================================================
   BESTÄTIGUNG (confirmation.php)
   ================================================ */
.confirmation-header {
    margin-bottom: 24px;
}

.confirmation-title {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

/* ================================================
   BUTTONS (public-spezifisch)
   ================================================ */
.public-page .btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
}

.public-page .btn-primary { background: #d6c9a8; color: #3a3228; }
.public-page .btn-success  { background: #d6c9a8; color: #3a3228; }
.public-page .btn-danger   { background: #a55050; color: white; }

.public-page .btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(42,77,63,0.25);
}

html.dark-theme .public-page .btn-primary { background: #2a2a2a; color: #e8e8e8; border: 1px solid #555555; }
html.dark-theme .public-page .btn-success  { background: #2a2a2a; color: #e8e8e8; border: 1px solid #555555; }
html.dark-theme .public-page .btn-danger   { background: #3a1f1f; color: #e8e8e8; border: 1px solid #555555; }

.public-page .btn-register {
    background: #2a4d3f;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 400;
    border-radius: 8px;
    letter-spacing: 0.02em;
    justify-content: center;
}

.public-page .btn-register:hover {
    background: #1f3a2f;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(42,77,63,0.3);
}

html.dark-theme .public-page .btn-register {
    background: #d0d0d0;
    color: #111111;
    border: none;
}

/* ================================================
   HILFSTEXTE
   ================================================ */
.text-muted  { color: var(--color-text-muted); }
.text-small  { font-size: 0.85rem; }
.section-divider { border: none; border-top: 1px solid var(--color-border); margin: 32px 0; }

/* ================================================
   ACCORDION (details/summary)
   ================================================ */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 24px 0;
}

details {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-bg-card);
}

details summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    font-size: 1.1rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-left: 12px;
}

details[open] summary::after {
    content: '−';
}

details[open] summary {
    border-bottom: 1px solid var(--color-border);
}

details .details-body {
    padding: 16px;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ================================================
   NAV KONTAKT-WIDGET
   ================================================ */
.nav-contact-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 1.2rem;
    color: #1f2937;
    text-align: left;
    transition: background 0.2s;
    width: 100%;
}

.nav-contact-toggle:hover {
    background: #e2e8f0;
}

.nav-contact {
    padding: 6px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-contact__select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #f8f8f8;
    cursor: pointer;
}

.nav-contact__result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 10px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.nav-contact__address {
    flex: 1;
    color: #1f2937;
    word-break: break-all;
}

.nav-contact__icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    padding: 2px 4px;
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

.nav-contact__icon:hover {
    color: #2a4d3f;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .site-header__inner { padding: 0 16px; }

    .site-hero { height: 180px; max-width: 100%; margin: 0; border-radius: 0; }

    .site-main { padding: 20px 4px; }
}