/**
 * Content Dashboard CSS
 * Dunkles Design inspiriert vom Salon
 */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #e8e8e8;
    --text-primary: #121212;
    --text-secondary: #333333;
    --text-muted: #767676;
    --accent: #326891;
    --accent-hover: #5a8cb8;
    --border: #dfdfdf;
    --shadow: rgba(0, 0, 0, 0.1);
    --podcast-color: #d63031;
    --blog-color: #326891;
    --bluesky-color: #1185fe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-primary);
    font-family: 'Lora', Georgia, serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

header h1 .subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.5rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.8;
    font-family: 'Inter', -apple-system, sans-serif;
    text-transform: lowercase;
}

.header-info {
    display: none;
}

/* Sticky Date */
.sticky-date {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: none;
}

.sticky-date.visible {
    display: block;
}

.home-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    text-transform: lowercase;
    font-weight: 400;
}

.home-link:hover {
    color: var(--accent);
}

.filter-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.05em;
    padding: 0;
    transition: color 0.2s ease;
    text-transform: lowercase;
    font-weight: 400;
}

.filter-link:hover {
    color: var(--text-secondary);
}

.filter-link.active {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Loading */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

.no-items {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}

/* Timeline - Stream Layout */
.timeline {
    display: flex;
    flex-direction: column;
    max-width: 680px;
    margin: 0 auto;
    gap: 0;
}

/* Category Separator (first item) */
.category-separator {
    position: relative;
    padding: 0 0 1rem 0;
}

.category-separator::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0 1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

.category-separator::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
        transparent 0%,
        var(--border) 15%,
        var(--border) 45%,
        transparent 50%,
        var(--border) 55%,
        var(--border) 85%,
        transparent 100%);
}

/* Base Timeline Item */
.timeline-item {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    break-inside: avoid;
    padding: 1rem 0;
    position: relative;
}

.timeline-item:last-child::after {
    display: none;
}

/* Fading border line with optional label */
.timeline-item::after {
    content: attr(data-next-label);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0 1rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

/* Linie mit Unterbrechung (wenn Label vorhanden) */
.timeline-item[data-next-label]:not([data-next-label=""])::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
        transparent 0%,
        var(--border) 15%,
        var(--border) 45%,
        transparent 50%,
        var(--border) 55%,
        var(--border) 85%,
        transparent 100%);
}

/* Linie ohne Unterbrechung (kein Label) */
.timeline-item:not([data-next-label])::before,
.timeline-item[data-next-label=""]::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
        transparent 0%,
        var(--border) 20%,
        var(--border) 80%,
        transparent 100%);
}

.timeline-item:hover {
    transform: none;
    box-shadow: none;
}

/* BLOG POSTS - Large, Prominent */
.timeline-item[data-type="blog"] {
    width: 100%;
}

.timeline-item[data-type="blog"] .item-content-wrapper {
    display: flex;
    flex-direction: column;
}

.timeline-item[data-type="blog"] .item-meta {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Inter', -apple-system, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item[data-type="blog"] .item-type {
    display: none;
}

.timeline-item[data-type="blog"] .item-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.1;
    color: var(--text-primary);
    font-family: 'Lora', Georgia, serif;
}

.timeline-item[data-type="blog"] .item-title a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s;
}

.timeline-item[data-type="blog"] .item-title a:hover {
    color: var(--accent);
}

.timeline-item[data-type="blog"] .item-image {
    width: 100%;
    margin-bottom: 0.75rem;
    order: 2;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.timeline-item[data-type="blog"] .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.timeline-item[data-type="blog"] .item-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-family: Georgia, serif;
    order: 3;
}

/* PODCASTS - Medium Priority */
.timeline-item[data-type="podcast"] {
    width: 100%;
}

.timeline-item[data-type="podcast"] .item-content-wrapper {
    display: flex;
    flex-direction: column;
}

.timeline-item[data-type="podcast"] .item-meta {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Inter', -apple-system, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.timeline-item[data-type="podcast"] .item-type {
    display: none;
}

.timeline-item[data-type="podcast"] .podcast-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.timeline-item[data-type="podcast"] .podcast-text {
    display: flex;
    flex-direction: column;
}

.timeline-item[data-type="podcast"] .item-image {
    width: 120px;
    min-width: 120px;
    height: 120px;
    overflow: hidden;
    margin-right: 1rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.timeline-item[data-type="podcast"] .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-item[data-type="podcast"] .podcast-text {
    flex: 1;
}

.timeline-item[data-type="podcast"] .item-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0;
    font-family: 'Lora', Georgia, serif;
}

.timeline-item[data-type="podcast"] .item-title a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s;
}

.timeline-item[data-type="podcast"] .item-title a:hover {
    color: var(--podcast-color);
}

.timeline-item[data-type="podcast"] .item-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-top: 0;
}

/* BLUESKY - Small Updates */
.timeline-item[data-type="bluesky"] {
    width: 100%;
    padding: 1rem 0;
}

.timeline-item[data-type="bluesky"] .item-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 70%;
    margin: 0 auto;
}

.timeline-item[data-type="bluesky"] .repost-info {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.5px;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.timeline-item[data-type="bluesky"] .item-type {
    display: none;
}

.timeline-item[data-type="bluesky"] .bluesky-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

.timeline-item[data-type="bluesky"] .item-image {
    width: 50px;
    min-width: 50px;
    height: 50px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 4px;
}

/* Wenn Repost-Info vorhanden, Bild nach unten verschieben */
.timeline-item[data-type="bluesky"] .bluesky-content.has-repost .item-image {
    margin-top: 1.7rem;
}

.timeline-item[data-type="bluesky"] .bluesky-text {
    flex: 1;
}

.timeline-item[data-type="bluesky"] .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-item[data-type="bluesky"] .bluesky-text {
    flex: 1;
}

.timeline-item[data-type="bluesky"] .item-title {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    font-family: Georgia, serif;
    color: var(--text-primary);
}

.timeline-item[data-type="bluesky"] .item-title a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s;
}

.timeline-item[data-type="bluesky"] .item-title a:hover {
    color: var(--bluesky-color);
}

.timeline-item[data-type="bluesky"] .item-description {
    display: none;
}

/* Allgemeine Image-Styles */
.item-image {
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.timeline-item:hover .item-image img {
    transform: scale(1.05);
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    gap: 1rem;
}

.item-date {
    margin-left: 0;
}

.item-type {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-item[data-type="podcast"] .item-type {
    color: var(--podcast-color);
}

.timeline-item[data-type="blog"] .item-type {
    color: var(--blog-color);
}

.timeline-item[data-type="bluesky"] .item-type {
    color: var(--bluesky-color);
}

.item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.item-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-title a:hover {
    color: var(--accent);
}

.item-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        margin-bottom: 1rem;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header h1 .subtitle {
        font-size: 1rem;
    }

    /* Blog bleibt wie Desktop */
    .timeline-item[data-type="blog"] .item-title {
        font-size: 1.75rem;
    }

    /* Podcast bleibt wie Desktop */
    .timeline-item[data-type="podcast"] .item-title {
        font-size: 1.125rem;
    }

    /* Bluesky - Bild kleiner auf Mobile */
    .timeline-item[data-type="bluesky"] .item-image {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .timeline-item[data-type="bluesky"] .item-content-wrapper {
        width: 85%;
    }

    .timeline-item[data-type="bluesky"] .item-title {
        font-size: 0.875rem;
    }

    .timeline-item[data-type="bluesky"] .repost-info {
        font-size: 0.625rem;
    }

    /* Podcast Repost Margin anpassen */
    .timeline-item[data-type="bluesky"] .bluesky-content.has-repost .item-image {
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header h1 .subtitle {
        font-size: 0.9rem;
    }

    .timeline-item[data-type="blog"] .item-title {
        font-size: 1.5rem;
    }

    .timeline-item[data-type="podcast"] .podcast-content {
        gap: 0.75rem;
    }

    .timeline-item[data-type="podcast"] .item-image {
        width: 100px;
        min-width: 100px;
        height: 100px;
        margin-right: 0.375rem;
    }
}
