/**
 * The Daily Drip - Blog Styles
 * Editorial/Magazine aesthetic with crypto-native dark mode
 * Typography: Playfair Display + Source Serif Pro
 */

/* === CSS Variables (scoped to blog only) === */
.blog-page {
    /* Core palette */
    --blog-void: #050505;
    --blog-ink: #0a0a0a;
    --blog-surface: #111111;
    --blog-elevated: #161616;
    --blog-border: rgba(255, 255, 255, 0.06);
    --blog-border-hover: rgba(247, 147, 26, 0.3);

    /* Bitcoin colors */
    --btc-orange: #f7931a;
    --btc-gold: #ffd700;
    --btc-amber: #ffb347;

    /* Text hierarchy */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-faint: rgba(255, 255, 255, 0.25);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Serif Pro', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 100px;

    /* Base styles */
    background: var(--blog-ink);
    min-height: 100vh;
    position: relative;
}

.blog-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 600px;
    background:
        radial-gradient(ellipse 100% 70% at 50% -20%, rgba(247, 147, 26, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 10%, rgba(255, 215, 0, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === Layout === */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    position: relative;
    z-index: 1;
}

/* === Blog Header === */
.blog-header {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
    position: relative;
}

.blog-masthead {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.blog-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 20px rgba(247, 147, 26, 0.5));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(247, 147, 26, 0.5)); }
    50% { filter: drop-shadow(0 0 30px rgba(247, 147, 26, 0.8)); }
}

.blog-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    background: linear-gradient(135deg, var(--btc-orange) 0%, var(--btc-gold) 50%, var(--btc-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: var(--space-md) auto 0;
    line-height: 1.6;
    font-style: italic;
}

/* === Article Count Bar === */
.blog-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
    border-top: 1px solid var(--blog-border);
    border-bottom: 1px solid var(--blog-border);
}

.blog-stat {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.blog-stat strong {
    color: var(--btc-orange);
    font-weight: 600;
}

/* === Featured Article === */
.featured-article {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.08) 0%, rgba(255, 215, 0, 0.03) 100%);
    border: 1px solid var(--blog-border-hover);
    border-radius: 20px;
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--btc-orange), var(--btc-gold), var(--btc-orange));
    background-size: 200% 100%;
    animation: gradient-flow 3s ease infinite;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(247, 147, 26, 0.1);
    border-color: rgba(247, 147, 26, 0.4);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--btc-orange);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-lg);
}

.featured-badge::before {
    content: '⚡';
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .featured-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}

.featured-main h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 0 0 var(--space-md);
    transition: color 0.3s ease;
}

.featured-article:hover .featured-main h2 {
    color: var(--btc-orange);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.featured-date {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-date::before {
    content: '📅';
    font-size: 0.9em;
}

.featured-excerpt {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.featured-quote {
    background: var(--blog-surface);
    border-left: 3px solid var(--btc-orange);
    padding: var(--space-lg);
    border-radius: 0 12px 12px 0;
    position: relative;
}

.featured-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--btc-orange);
    opacity: 0.3;
    line-height: 1;
}

.featured-quote blockquote {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
    line-height: 1.5;
}

.featured-quote cite {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--btc-orange);
    font-style: normal;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-lg);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--btc-orange);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.featured-cta:hover {
    gap: 14px;
}

.featured-cta svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* === Article Grid === */
.articles-section {
    margin-top: var(--space-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--blog-border);
}

.section-title {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 640px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Article Card === */
.article-card {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    border-color: var(--blog-border-hover);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(247, 147, 26, 0.08);
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-lg);
}

.article-date {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--btc-orange);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-date::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--btc-orange);
    border-radius: 50%;
    opacity: 0.6;
}

.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
    transition: color 0.3s ease;
}

.article-card:hover h3 {
    color: var(--btc-orange);
}

.article-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.article-card-quote {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--blog-border);
    line-height: 1.5;
}

.article-card-quote::before {
    content: '"';
    color: var(--btc-orange);
    font-weight: bold;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-md);
}

.read-time {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-faint);
}

.read-more-icon {
    width: 24px;
    height: 24px;
    background: rgba(247, 147, 26, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.article-card:hover .read-more-icon {
    background: var(--btc-orange);
}

.read-more-icon svg {
    width: 12px;
    height: 12px;
    stroke: var(--btc-orange);
    stroke-width: 2.5;
    fill: none;
    transition: stroke 0.3s ease;
}

.article-card:hover .read-more-icon svg {
    stroke: #000;
}

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

.article-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--blog-border);
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: var(--space-xl);
    transition: color 0.3s ease;
}

.article-back:hover {
    color: var(--btc-orange);
}

.article-back svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.article-page-date {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--btc-orange);
    margin-bottom: var(--space-md);
}

.article-page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

/* Pull Quote */
.article-pullquote {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-left: 4px solid var(--btc-orange);
    border-radius: 0 16px 16px 0;
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    position: relative;
}

.article-pullquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-family: var(--font-display);
    font-size: 6rem;
    color: var(--btc-orange);
    opacity: 0.2;
    line-height: 1;
}

.article-pullquote blockquote {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 var(--space-md);
}

.article-pullquote cite {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--btc-orange);
    font-style: normal;
    font-weight: 500;
}

/* Article Body */
.article-body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.article-body p {
    margin: 0 0 var(--space-lg);
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body a {
    color: var(--btc-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.article-body a:hover {
    color: var(--btc-gold);
}

/* Article Footer */
.article-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--blog-border);
}

.article-share {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.article-share-label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.share-btn {
    width: 40px;
    height: 40px;
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--btc-orange);
    border-color: var(--btc-orange);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.share-btn:hover svg {
    stroke: #000;
}

/* More Articles */
.more-articles {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--blog-border);
}

.more-articles h3 {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin: 0 0 var(--space-lg);
}

.more-articles-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-md);
}

@media (min-width: 640px) {
    .more-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.more-article-link {
    display: block;
    padding: var(--space-md);
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.more-article-link:hover {
    border-color: var(--blog-border-hover);
    transform: translateX(4px);
}

.more-article-link h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.more-article-link:hover h4 {
    color: var(--btc-orange);
}

.more-article-link span {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* === Empty State === */
.blog-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.blog-empty h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
}

.blog-empty p {
    font-family: var(--font-body);
    color: var(--text-muted);
}

/* === Newsletter CTA === */
.blog-newsletter {
    background: linear-gradient(135deg, var(--blog-surface) 0%, var(--blog-elevated) 100%);
    border: 1px solid var(--blog-border);
    border-radius: 20px;
    padding: var(--space-xl);
    margin-top: var(--space-2xl);
    text-align: center;
}

.blog-newsletter h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
}

.blog-newsletter p {
    font-family: var(--font-body);
    color: var(--text-secondary);
    margin: 0 0 var(--space-lg);
}

.blog-newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 400px;
    margin: 0 auto;
}

.blog-newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--blog-ink);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.blog-newsletter-form input:focus {
    border-color: var(--btc-orange);
}

.blog-newsletter-form input::placeholder {
    color: var(--text-muted);
}

.blog-newsletter-form button {
    padding: 12px 24px;
    background: var(--btc-orange);
    border: none;
    border-radius: 10px;
    color: #000;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-newsletter-form button:hover {
    background: var(--btc-gold);
    transform: translateY(-2px);
}

/* === Responsive Adjustments === */
@media (max-width: 640px) {
    .blog-container {
        padding: var(--space-lg) var(--space-md);
    }

    .blog-header {
        padding: var(--space-2xl) 0 var(--space-xl);
    }

    .blog-stats {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .featured-article {
        padding: var(--space-lg);
    }

    .featured-quote {
        margin-top: var(--space-lg);
    }

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

    .article-pullquote {
        padding: var(--space-lg);
    }

    .article-pullquote blockquote {
        font-size: 1.15rem;
    }
}
