/* ============================================
   FUN FACTS BLOG - shared styles for /blog/ + /de/blog/
   Loads after style.css and reuses its CSS variables.
   ============================================ */

/* Blog Header */
.blog-header {
    padding: var(--space-2xl) var(--space-lg) var(--space-lg);
    text-align: center;
}

.blog-header-container {
    max-width: 700px;
    margin: 0 auto;
}

.blog-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: inline-block;
}

.blog-logo:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.blog-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.blog-nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: color 0.2s ease;
}

.blog-nav-link:hover {
    color: var(--color-text-primary);
}

.blog-nav-lang {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.blog-nav-lang:hover {
    border-color: var(--color-text-primary);
    color: var(--color-text-primary);
}

/* Blog Index */
.blog-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
}

.blog-hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 540px;
    margin: 0 auto;
}

.article-list {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-3xl);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--space-lg);
    align-items: stretch;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* height:auto is required — the img height attribute would otherwise win over aspect-ratio */
.article-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Grow so the read-more link sits on the same baseline in every tile */
.article-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-lg);
}

.article-card:hover {
    border-color: var(--color-text-tertiary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.article-card-category {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    background: var(--color-text-primary);
    color: var(--color-surface);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card-date {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.article-card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
    text-wrap: balance;
}

.article-card-excerpt {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.article-card-readmore {
    display: inline-block;
    margin-top: auto;
    padding-top: var(--space-sm);
    color: #ff5e6c;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Article Page */
.article {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-lg) var(--space-3xl);
}

.article-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.article-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: var(--space-sm) 0;
}

.article-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
}

/* Article hero image (breaks out of the text column on wide screens) */
.article-hero {
    margin: 0 0 var(--space-xl);
}

@media (min-width: 900px) {
    .article-hero {
        margin-left: -6rem;
        margin-right: -6rem;
    }
}

.article-hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.article-hero figcaption {
    margin-top: var(--space-xs);
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.article-hero figcaption a {
    color: var(--color-text-tertiary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body {
    font-size: var(--font-size-lg);
    line-height: 1.75;
    color: var(--color-text-primary);
}

/* Lead paragraph */
.article-body > p:first-of-type {
    font-size: var(--font-size-xl);
    line-height: 1.6;
}

.article-body h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: var(--space-2xl) 0 var(--space-md);
}

.article-body h2::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #ff5e6c, #ffa06b);
    margin-bottom: var(--space-xs);
}

.article-sources h2::before,
.timeline + .article-sources h2::before {
    display: none;
}

.article-body p {
    margin-bottom: var(--space-md);
}

.article-body a {
    color: #ff5e6c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: #ff4757;
}

/* Pull quote for source citations */
.article-body blockquote {
    margin: var(--space-lg) 0;
    padding: 0 0 0 var(--space-lg);
    border-left: 4px solid var(--color-border);
}

.article-body blockquote p {
    margin: 0;
    font-size: var(--font-size-lg);
    line-height: 1.6;
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Fun fact callout box */
.fact-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid #ff5e6c;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-sm);
}

.fact-box-label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ff5e6c;
    margin-bottom: var(--space-xs);
}

.fact-box p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
}

/* Timeline — card-based, alternating two-column on wide screens */
.timeline {
    list-style: none;
    margin: var(--space-xl) 0;
    padding: var(--space-sm) 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, #ff6b9d 0%, #ff5e6c 55%, #ffa06b 100%);
}

.timeline li {
    position: relative;
    margin: 0 0 var(--space-md) 3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.5s ease;
}

.timeline li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 94, 108, 0.35);
}

.timeline li:last-child {
    margin-bottom: 0;
}

/* Dot on the line */
.timeline li::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.05rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 4px solid #ff5e6c;
    box-shadow: 0 0 0 3px rgba(255, 94, 108, 0.15);
}

.timeline-year {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    background: var(--color-text-primary);
    color: var(--color-surface);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.timeline li p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* Scroll reveal (activated by blog.js, skipped for reduced motion) */
.timeline.tl-animate li {
    opacity: 0;
    transform: translateY(18px);
}

.timeline.tl-animate li.tl-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline.tl-animate li.tl-visible:hover {
    transform: translateY(-3px);
}

@media (min-width: 900px) {
    .timeline {
        margin-left: -6rem;
        margin-right: -6rem;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline li {
        width: calc(50% - 2.75rem);
        margin: 0 0 var(--space-md) 0;
    }

    .timeline li:nth-child(odd) {
        margin-right: auto;
    }

    .timeline li:nth-child(even) {
        margin-left: auto;
    }

    .timeline li:nth-child(odd)::before {
        left: auto;
        right: calc(-2.75rem - 7px);
    }

    .timeline li:nth-child(even)::before {
        left: calc(-2.75rem - 7px);
    }
}

/* Sources */
.affiliate-note {
    width: fit-content;
    margin: var(--space-2xl) auto 0;
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-align: center;
}

.article-sources {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.article-sources h2 {
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
}

.article-sources ul {
    list-style: none;
    padding: 0;
}

.article-sources li {
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.article-sources a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-sources a:hover {
    color: var(--color-text-primary);
}

/* Language hint banner */
.lang-hint {
    display: none;
    max-width: 680px;
    margin: 0 auto var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-align: center;
}

.lang-hint a {
    color: #ff5e6c;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Back to generator CTA */
.blog-cta {
    max-width: 680px;
    margin: var(--space-2xl) auto 0;
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

.blog-cta p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.blog-cta a {
    color: #ff5e6c;
    font-weight: 700;
    font-size: var(--font-size-lg);
    text-decoration: none;
}

.blog-cta a:hover {
    color: #ff4757;
}

@media (max-width: 768px) {
    .article {
        padding: var(--space-md) var(--space-md) var(--space-2xl);
    }

    .article-body {
        font-size: var(--font-size-base);
    }

    .article-body > p:first-of-type {
        font-size: var(--font-size-lg);
    }

    .article-list {
        padding: var(--space-lg) var(--space-md) var(--space-2xl);
    }

    .article-card-content {
        padding: var(--space-md);
    }

    .article-hero img {
        border-radius: var(--radius-lg);
    }
}
