/* ============================================
   Astra AI — Blog Styles
   Premium dark-first astrology blog design
   ============================================ */

/* ── Reading Progress Bar ── */
.blog-progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
    background: linear-gradient(90deg, var(--pg-grad1), var(--pg-accent), var(--pg-grad2));
    width: 0%; transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--pg-glow);
}

/* ── Blog Listing Page ── */
.blog-listing-grid {
    position: relative; z-index: 2; max-width: 1100px; margin: 0 auto;
    padding: 40px 24px 80px; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px;
}
.blog-card {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 20px; overflow: hidden; cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
    text-decoration: none; color: var(--pg-text); display: flex; flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-8px); border-color: rgba(255,215,0,0.25);
    box-shadow: 0 20px 60px var(--pg-shadow);
}
.blog-card-hero {
    height: 200px; position: relative; overflow: hidden;
}
.blog-card-hero img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.blog-card:hover .blog-card-hero img { transform: scale(1.08); }

/* CSS gradient hero fallbacks */
.blog-card-hero-gradient {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 56px; position: relative; overflow: hidden;
}
.blog-card-hero-gradient::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--pg-surface), transparent 60%);
}
.blog-hero-grad-1 { background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); }
.blog-hero-grad-2 { background: linear-gradient(135deg, #1a0530, #3d1a6e, #0d0d2b); }
.blog-hero-grad-3 { background: linear-gradient(135deg, #0d1b2a, #1b3a4b, #2d5f5f); }
.blog-hero-grad-4 { background: linear-gradient(135deg, #1a0a2e, #16213e, #0f3460); }
.blog-hero-grad-5 { background: linear-gradient(135deg, #2d1b40, #44216b, #1a0a2e); }

.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.blog-card-tag {
    background: var(--pg-accent-soft); border: 1px solid var(--pg-border);
    color: var(--pg-accent); padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
}
.blog-card-date { font-size: 12px; color: var(--pg-text3); }
.blog-card-title {
    font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 10px;
    transition: color 0.3s;
}
.blog-card:hover .blog-card-title { color: var(--pg-accent); }
.blog-card-excerpt {
    font-size: 14px; color: var(--pg-text2); line-height: 1.65; flex: 1; margin-bottom: 16px;
}
.blog-card-read {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--pg-accent); font-size: 13px; font-weight: 600;
    transition: gap 0.3s;
}
.blog-card:hover .blog-card-read { gap: 10px; }

/* ── Blog Post Layout ── */
.blog-article-wrapper {
    position: relative; z-index: 2; max-width: 800px; margin: 0 auto;
    padding: 0 24px 80px;
}

/* Article Hero */
.blog-article-hero {
    position: relative; z-index: 2; height: 400px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: -40px;
}
.blog-article-hero img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; inset: 0;
}
.blog-article-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--pg-bg) 0%, transparent 50%, rgba(0,0,0,0.3) 100%);
}
.blog-article-hero-gradient {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 80px; position: absolute; inset: 0;
}

/* Article Header */
.blog-article-header {
    position: relative; z-index: 3; margin-bottom: 40px;
}
.blog-article-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.blog-article-tag {
    background: var(--pg-accent-soft); border: 1px solid var(--pg-border);
    color: var(--pg-accent); padding: 4px 12px; border-radius: 14px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
}
.blog-article-title {
    font-size: 40px; font-weight: 800; line-height: 1.2; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--pg-text), var(--pg-text2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.blog-article-subtitle {
    font-size: 18px; color: var(--pg-text2); line-height: 1.65; margin-bottom: 20px;
}
.blog-article-info {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid var(--pg-border);
}
.blog-author-pill {
    display: flex; align-items: center; gap: 8px;
}
.blog-author-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pg-grad1), var(--pg-grad2));
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff; font-weight: 700;
}
.blog-author-name { font-size: 14px; font-weight: 600; }
.blog-article-date { font-size: 13px; color: var(--pg-text3); }
.blog-article-readtime {
    font-size: 13px; color: var(--pg-text3);
    display: flex; align-items: center; gap: 4px;
}

/* ── Table of Contents ── */
.blog-toc {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 16px; padding: 24px 28px; margin-bottom: 40px;
    backdrop-filter: blur(10px);
}
.blog-toc-title {
    font-size: 14px; font-weight: 700; color: var(--pg-accent);
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 1px;
}
.blog-toc-list { list-style: none; padding: 0; margin: 0; }
.blog-toc-list li { margin-bottom: 8px; }
.blog-toc-list a {
    color: var(--pg-text2); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: color 0.2s, padding-left 0.3s; display: flex; align-items: center; gap: 8px;
    padding: 4px 0;
}
.blog-toc-list a::before {
    content: '→'; color: var(--pg-accent); font-size: 12px; opacity: 0;
    transition: opacity 0.2s;
}
.blog-toc-list a:hover { color: var(--pg-accent); padding-left: 8px; }
.blog-toc-list a:hover::before { opacity: 1; }
.blog-toc-list a.active { color: var(--pg-accent); font-weight: 600; }

/* ── Article Content ── */
.blog-article-content {
    font-size: 17px; color: var(--pg-text2); line-height: 1.85;
}
.blog-article-content h2 {
    font-size: 28px; font-weight: 700; color: var(--pg-text); margin: 48px 0 16px;
    padding-top: 16px;
}
.blog-article-content h3 {
    font-size: 22px; font-weight: 600; color: var(--pg-text); margin: 32px 0 12px;
}
.blog-article-content p { margin-bottom: 20px; }
.blog-article-content strong { color: var(--pg-text); font-weight: 600; }
.blog-article-content a {
    color: var(--pg-accent); text-decoration: underline;
    text-decoration-color: rgba(255,215,0,0.3);
    text-underline-offset: 3px; transition: text-decoration-color 0.3s;
}
.blog-article-content a:hover { text-decoration-color: var(--pg-accent); }
.blog-article-content ul, .blog-article-content ol {
    padding-left: 24px; margin-bottom: 20px;
}
.blog-article-content li { margin-bottom: 8px; }
.blog-article-content blockquote {
    border-left: 3px solid var(--pg-accent); margin: 28px 0;
    padding: 16px 24px; background: var(--pg-accent-soft); border-radius: 0 12px 12px 0;
    font-style: italic; color: var(--pg-text);
}

/* ── Inline Diagrams ── */
.blog-diagram {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 16px; padding: 32px; margin: 32px 0;
    text-align: center; overflow: hidden;
}
.blog-diagram-title {
    font-size: 14px; font-weight: 700; color: var(--pg-accent);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
}

/* Animated Flow Diagram */
.blog-flow {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; flex-wrap: wrap; padding: 16px 0;
}
.blog-flow-step {
    background: var(--pg-glass); border: 1px solid var(--pg-glass-border);
    border-radius: 12px; padding: 16px 20px; text-align: center;
    min-width: 120px; opacity: 0; transform: translateY(20px);
    animation: flowStepIn 0.6s ease forwards;
}
.blog-flow-step:nth-child(1) { animation-delay: 0.1s; }
.blog-flow-step:nth-child(2) { animation-delay: 0.3s; }
.blog-flow-step:nth-child(3) { animation-delay: 0.5s; }
.blog-flow-step:nth-child(4) { animation-delay: 0.7s; }
.blog-flow-step:nth-child(5) { animation-delay: 0.9s; }
.blog-flow-step .step-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.blog-flow-step .step-label { font-size: 12px; font-weight: 600; color: var(--pg-text); }
.blog-flow-arrow {
    color: var(--pg-accent); font-size: 18px; opacity: 0;
    animation: flowArrowIn 0.4s ease forwards;
}
.blog-flow-arrow:nth-of-type(1) { animation-delay: 0.2s; }
.blog-flow-arrow:nth-of-type(2) { animation-delay: 0.4s; }
.blog-flow-arrow:nth-of-type(3) { animation-delay: 0.6s; }
.blog-flow-arrow:nth-of-type(4) { animation-delay: 0.8s; }

@keyframes flowStepIn { to { opacity: 1; transform: translateY(0); } }
@keyframes flowArrowIn { to { opacity: 1; } }

/* Comparison Table */
.blog-compare-table {
    width: 100%; border-collapse: collapse; margin: 24px 0;
    font-size: 14px; text-align: left;
}
.blog-compare-table thead th {
    background: var(--pg-accent-soft); color: var(--pg-accent);
    padding: 14px 18px; font-weight: 700; font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--pg-border);
}
.blog-compare-table tbody td {
    padding: 14px 18px; border-bottom: 1px solid var(--pg-border);
    color: var(--pg-text2); vertical-align: top;
}
.blog-compare-table tbody tr:hover td {
    background: var(--pg-glass); color: var(--pg-text);
}
.blog-compare-table .table-emoji { font-size: 18px; }

/* Stat Cards */
.blog-stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px; margin: 24px 0;
}
.blog-stat-card {
    background: var(--pg-glass); border: 1px solid var(--pg-glass-border);
    border-radius: 12px; padding: 20px 16px; text-align: center;
    transition: all 0.3s ease;
}
.blog-stat-card:hover { border-color: var(--pg-accent); transform: translateY(-4px); }
.blog-stat-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.blog-stat-value {
    font-size: 24px; font-weight: 800; color: var(--pg-accent);
    margin-bottom: 4px; display: block;
}
.blog-stat-label { font-size: 11px; color: var(--pg-text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Zodiac Wheel Diagram */
.blog-zodiac-wheel {
    width: 280px; height: 280px; border-radius: 50%; margin: 0 auto;
    border: 2px solid var(--pg-border); position: relative;
    animation: wheelSpin 60s linear infinite;
}
.blog-zodiac-wheel-sign {
    position: absolute; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; border-radius: 50%;
    background: var(--pg-surface-solid); border: 1px solid var(--pg-border);
    transform: translate(-50%, -50%);
    animation: wheelSignCounterSpin 60s linear infinite;
}
@keyframes wheelSpin { to { transform: rotate(360deg); } }
@keyframes wheelSignCounterSpin { to { transform: translate(-50%, -50%) rotate(-360deg); } }

/* Planet Orbit Diagram */
.blog-orbit-diagram {
    width: 300px; height: 300px; margin: 0 auto; position: relative;
}
.blog-orbit-ring {
    position: absolute; border: 1px solid var(--pg-border); border-radius: 50%;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.blog-orbit-planet {
    position: absolute; width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; top: -12px; left: calc(50% - 12px);
    animation: orbitSpin var(--orbit-speed, 10s) linear infinite;
    transform-origin: 12px calc(var(--orbit-radius, 60px) + 12px);
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* ── FAQ Section ── */
.blog-faq-section {
    margin: 48px 0;
}
.blog-faq-title {
    font-size: 24px; font-weight: 700; color: var(--pg-text); margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
}
.blog-faq-item {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 12px; margin-bottom: 12px; overflow: hidden;
    transition: border-color 0.3s;
}
.blog-faq-item:hover { border-color: rgba(255,215,0,0.2); }
.blog-faq-question {
    width: 100%; padding: 18px 24px; background: none; border: none;
    color: var(--pg-text); font-size: 16px; font-weight: 600;
    font-family: var(--pg-font); cursor: pointer; text-align: left;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.blog-faq-question:hover { color: var(--pg-accent); }
.blog-faq-chevron {
    font-size: 14px; color: var(--pg-accent); transition: transform 0.3s;
    flex-shrink: 0;
}
.blog-faq-item.open .blog-faq-chevron { transform: rotate(180deg); }
.blog-faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1);
}
.blog-faq-item.open .blog-faq-answer { max-height: 500px; }
.blog-faq-answer-inner {
    padding: 0 24px 20px; font-size: 15px; color: var(--pg-text2); line-height: 1.75;
}

/* ── Key Takeaway Box ── */
.blog-takeaway {
    background: linear-gradient(135deg, rgba(212,165,116,0.08), rgba(139,105,20,0.05));
    border: 1px solid rgba(212,165,116,0.2); border-radius: 16px;
    padding: 24px 28px; margin: 32px 0;
}
.blog-takeaway-title {
    font-size: 14px; font-weight: 700; color: var(--pg-accent);
    margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.blog-takeaway p { font-size: 15px; color: var(--pg-text2); line-height: 1.7; margin-bottom: 0; }

/* ── CTA inside blog ── */
.blog-inline-cta {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 16px; padding: 32px; margin: 40px 0; text-align: center;
}
.blog-inline-cta h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.blog-inline-cta p { font-size: 15px; color: var(--pg-text2); margin-bottom: 20px; }
.blog-inline-cta .pg-cta-btn { font-size: 15px; }

/* ── Related Posts ── */
.blog-related {
    margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--pg-border);
}
.blog-related-title {
    font-size: 22px; font-weight: 700; margin-bottom: 24px;
    display: flex; align-items: center; gap: 8px;
}
.blog-related-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
.blog-related-card {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: 14px; padding: 20px; text-decoration: none;
    color: var(--pg-text); transition: all 0.3s ease;
}
.blog-related-card:hover {
    transform: translateY(-4px); border-color: rgba(255,215,0,0.2);
    box-shadow: 0 12px 40px var(--pg-shadow);
}
.blog-related-card-emoji { font-size: 32px; margin-bottom: 12px; display: block; }
.blog-related-card-title { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.blog-related-card:hover .blog-related-card-title { color: var(--pg-accent); }
.blog-related-card-date { font-size: 12px; color: var(--pg-text3); }

/* ── Animated Section Dividers ── */
.blog-divider {
    text-align: center; margin: 40px 0; color: var(--pg-accent); font-size: 16px;
    letter-spacing: 12px; opacity: 0.5;
}

/* ── Share Bar ── */
.blog-share-bar {
    display: flex; align-items: center; gap: 12px; margin: 32px 0;
    padding: 16px 0; border-top: 1px solid var(--pg-border);
    border-bottom: 1px solid var(--pg-border);
}
.blog-share-label { font-size: 13px; font-weight: 600; color: var(--pg-text3); }
.blog-share-btn {
    width: 38px; height: 38px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; font-size: 16px;
    background: var(--pg-glass); border: 1px solid var(--pg-glass-border);
    color: var(--pg-text2); cursor: pointer; transition: all 0.3s;
    text-decoration: none;
}
.blog-share-btn:hover {
    background: var(--pg-accent-soft); border-color: var(--pg-accent);
    color: var(--pg-accent); transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .blog-listing-grid { grid-template-columns: 1fr; padding: 24px 16px 60px; }
    .blog-article-title { font-size: 30px; }
    .blog-article-subtitle { font-size: 16px; }
    .blog-article-hero { height: 260px; }
    .blog-article-content { font-size: 16px; }
    .blog-article-content h2 { font-size: 24px; }
    .blog-article-content h3 { font-size: 19px; }
    .blog-flow { gap: 8px; }
    .blog-flow-step { min-width: 90px; padding: 12px 14px; }
    .blog-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-compare-table { font-size: 13px; }
    .blog-compare-table thead th, .blog-compare-table tbody td { padding: 10px 12px; }
    .blog-article-wrapper { padding: 0 16px 60px; }
    .blog-zodiac-wheel { width: 220px; height: 220px; }
}
@media (max-width: 480px) {
    .blog-article-title { font-size: 26px; }
    .blog-stat-grid { grid-template-columns: 1fr 1fr; }
    .blog-flow { flex-direction: column; }
    .blog-flow-arrow { transform: rotate(90deg); }
}
