/* Zusätzliche Stile für die Salon-Seite */

/* Noscript Warning */
.noscript-warning {
    padding: 3rem 2rem;
    text-align: center;
    background: #fff3cd;
    border: 2px solid #FFC107;
    margin: 2rem;
    border-radius: 8px;
}

.noscript-warning h2 {
    color: #856404;
    margin-bottom: 1rem;
}

.noscript-warning p {
    color: #856404;
    font-size: 1.1rem;
}

.site-subtitle a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-subtitle a:hover {
    color: var(--fg);
}

.salon-intro {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--bg-warm-light, #fbfaf7);
    border-radius: 8px;
    text-align: center;
}

.salon-intro p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--fg, #1a1a1a);
}

.salon-intro strong {
    color: var(--salon-accent, #FFC107);
}

.salon-search-section {
    background: var(--bg-warm-light, #fbfaf7);
    padding-bottom: 0;
}

.nav-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-container {
    padding: 1.5rem 0 1rem 0;
    position: sticky;
    top: 0;
    z-index: 98;
    background: var(--bg-warm-light, #fbfaf7);
}

#salon-search {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-family: var(--font-sans, 'Inter', sans-serif);
    border: 2px solid var(--border, #e0e0e0);
    border-radius: 50px;
    background: var(--bg, #fff);
    color: var(--fg, #111111);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#salon-search:focus {
    outline: none;
    border-color: var(--salon-accent, #FFC107);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.2);
}

.year-navigation {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--bg-warm-light, #fbfaf7);
    padding: 1rem 0 1.5rem 0;
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.year-nav-link {
    font-family: var(--font-serif, 'Source Serif 4', serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--muted, #666666);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e0e0e0);
    transition: all 0.2s ease;
}

.year-nav-link:hover {
    color: var(--fg, #111111);
    background: var(--salon-accent, #FFC107);
    border-color: var(--salon-accent, #FFC107);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.episodes-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.year-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.year-heading {
    font-family: var(--font-serif, 'Source Serif 4', serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fg, #111111);
    border-bottom: 3px solid var(--salon-accent, #FFC107);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #999;
    opacity: 0.5;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: center;
}

.back-to-top:hover {
    color: var(--salon-accent, #FFC107);
    opacity: 1;
    background: var(--bg-subtle, #f5f5f5);
    transform: translateY(-2px);
}

.back-to-top svg {
    display: block;
}

.year-header {
    font-family: var(--font-serif, 'Source Serif 4', serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fg, #111111);
    border-bottom: 3px solid var(--salon-accent, #FFC107);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.episode-card {
    background: var(--bg-warm-light, #fbfaf7);
    padding: 1.75rem 1.75rem 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border, #e0e0e0);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    row-gap: 0;
    align-items: start;
    scroll-margin-top: 80px;
}

.episode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.episode-cover-link {
    flex-shrink: 0;
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.episode-cover-link:hover {
    transform: scale(1.02);
}

.episode-cover {
    flex-shrink: 0;
}

.episode-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.episode-content {
    flex: 1;
}

.episode-header {
    margin-bottom: 0;
}

.episode-date {
    font-size: 0.9rem;
    color: var(--muted, #666666);
    margin-bottom: 0.5rem;
}

.file-date {
    font-size: 0.875rem;
    color: var(--salon-accent, #FFC107);
    margin-top: 0.25rem;
}

.episode-title-link {
    text-decoration: none;
    display: block;
}

.episode-title-link:hover .episode-title {
    color: var(--accent, #757575);
}

.episode-title {
    font-family: var(--font-serif, 'Source Serif 4', serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--fg, #111111);
    line-height: 1.3;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease-in-out;
}

.gemeinsame-lektuere {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--salon-accent, #FFC107);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.lektuere-label {
    background: var(--bg-warm-light, #fbfaf7);
    color: var(--fg, #111111);
    padding: 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.book-title {
    font-size: 1rem;
    color: var(--fg, #111111);
    line-height: 1.4;
}

.preview-expand {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.5rem 0 0.75rem 0;
}

.preview-expand a {
    color: var(--muted, #666666);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.preview-expand a:hover {
    color: var(--fg, #111111);
}

.episode-actions {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0 1.75rem 0 1.75rem;
}

.expanded-actions {
    display: none;
}

.expanded-actions.visible {
    display: flex;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg, #fff);
    color: var(--fg, #111111);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.action-btn:hover {
    border-color: var(--salon-accent, #FFC107);
    background: var(--salon-accent, #FFC107);
    color: var(--fg, #111111);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.75em;
}

.toggle-icon.rotated {
    transform: rotate(90deg);
}

.chapters-preview {
    grid-column: 1 / -1;
    margin-top: 0;
    position: relative;
}

.chapters-preview .chapters {
    margin: 0.75rem 0 0 0;
    padding: 0.75rem 1rem 1rem 1rem;
    background: var(--bg, #fff);
    border-radius: 6px;
    border-left: 4px solid var(--salon-accent, #FFC107);
    position: relative;
}

.chapters-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(251, 250, 247, 0) 0%, rgba(251, 250, 247, 0.8) 60%, var(--bg-warm-light, #fbfaf7) 100%);
    pointer-events: none;
}

.chapters-container {
    grid-column: 1 / -1;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapters-container.chapters-visible {
    max-height: 5000px;
}

.chapters-preview.hidden {
    display: none;
}

.chapters {
    margin: 0.75rem 0 0 0;
    padding: 0.75rem 1rem 1rem 1rem;
    background: var(--bg, #fff);
    border-radius: 6px;
    border-left: 4px solid var(--salon-accent, #FFC107);
}

.chapters-title {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--fg, #1a1a1a);
    margin-bottom: 1rem;
}

.chapter-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border, #e0e0e0);
    line-height: 1.6;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: baseline;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-time {
    font-family: 'Courier New', monospace;
    color: var(--salon-accent, #FFC107);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.chapter-title {
    color: var(--fg, #1a1a1a);
}

.chapter-link {
    color: var(--salon-accent, #FFC107);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
}

.chapter-link:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.chapter-link-placeholder {
    min-width: 1.5rem;
    display: inline-block;
}

.preview-expand-overlay {
    position: absolute;
    bottom: 0.25rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.preview-expand-overlay a {
    background: var(--bg, #fff);
    color: var(--muted, #666666);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border, #e0e0e0);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-expand-overlay a:hover {
    color: var(--fg, #111111);
    border-color: var(--salon-accent, #FFC107);
    background: var(--salon-accent, #FFC107);
}

.no-chapters {
    grid-column: 1 / -1;
    color: var(--muted, #666666);
    font-style: italic;
    padding: 0.625rem 0;
}

@media (max-width: 768px) {
    .year-header {
        font-size: 2rem;
    }

    .episode-title {
        font-size: 1.25rem;
    }

    .episode-card {
        padding: 1.5rem;
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }

    /* Auf Mobile: Title-Banner nicht sticky */
    .title-banner {
        position: static;
    }

    /* Suchfeld sticky am oberen Rand */
    .search-container {
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 99;
        background: var(--bg-warm-light, #fbfaf7);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .salon-search-section {
        position: sticky;
        top: calc(1rem + 3.5rem);
        z-index: 98;
        background: var(--bg-warm-light, #fbfaf7);
        padding: 0.75rem 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .salon-search-section::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera */
    }

    .year-navigation {
        display: flex;
        padding: 0 1rem;
        border-bottom: none;
        flex-wrap: nowrap;
        gap: 0.75rem;
        min-width: min-content;
    }

    .year-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .year-section {
        scroll-margin-top: 140px;
    }

    .episode-card {
        scroll-margin-top: 140px;
    }

    .gemeinsame-lektuere {
        margin-top: 1rem;
        margin-bottom: 0.75rem;
    }

    .chapters-preview .chapters {
        margin: 1rem 0 0 0;
    }

    .chapters {
        margin: 1rem 0 0 0;
    }
}

@media (max-width: 480px) {
    .episode-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .episode-cover img {
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: block;
    }

    .salon-search-section {
        top: 0;
    }
}

/* Dark Mode */
html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #212121;
    --fg: #e0e0e0;
    --muted: #a9a9a9;
    --border: #424242;
    --accent: #a0a0a0;

    --bg-warm-light: #292929;
    --bg-warm-medium: #2c2c2c;
    --bg-warm-dark: #303030;
}

html[data-theme="dark"] .chapters-fade {
    background: linear-gradient(to bottom, rgba(41, 41, 41, 0) 0%, rgba(41, 41, 41, 0.8) 60%, var(--bg-warm-light, #292929) 100%);
}

html[data-theme="dark"] .action-btn:hover {
    color: #111111;
}

html[data-theme="dark"] .year-btn:hover,
html[data-theme="dark"] .year-btn.active {
    color: #111111;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
