/* ═══════════════════════════════════════════
   EVORIA BLOG — Styles
   Extends main styles.css
   ═══════════════════════════════════════════ */

/* ─── Blog Hero ─── */
.blog-hero {
    position: relative;
    padding: 10rem 0 4rem;
    text-align: center;
    background: var(--bg);
    overflow: hidden;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.blog-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white) 40%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text);
    line-height: 1.75;
}


/* ═══════════════════════════════════════════
   BLOG LISTING — Card Grid
   ═══════════════════════════════════════════ */
.blog-listing {
    background: var(--bg);
    padding-top: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ─── Card ─── */
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    animation: cardFadeIn 0.5s ease both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #FFB347);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
}

.blog-card:hover::after {
    opacity: 1;
}

/* Card Top — Category + Date */
.blog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.blog-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0.35em 0.9em;
    border-radius: 100px;
    border: 1px solid rgba(255, 140, 0, 0.12);
}

.blog-card-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Card Title */
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

/* Card Excerpt */
.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Card Bottom — Read time + Arrow */
.blog-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.blog-card-read {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}

.blog-card-read svg {
    width: 14px;
    height: 14px;
}

.blog-card-arrow {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    transition: gap 0.3s ease;
}

.blog-card-arrow svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-arrow svg {
    transform: translateX(4px);
}


/* ═══════════════════════════════════════════
   ARTICLE PAGE
   ═══════════════════════════════════════════ */

/* ─── Article Hero ─── */
.article-hero {
    position: relative;
    padding: 10rem 0 3.5rem;
    background: var(--bg);
    overflow: hidden;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

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

.article-back svg {
    width: 18px;
    height: 18px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.article-category {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0.35em 0.9em;
    border-radius: 100px;
    border: 1px solid rgba(255, 140, 0, 0.12);
}

.article-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-readtime {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-readtime svg {
    width: 15px;
    height: 15px;
}

.article-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.03em;
}


/* ─── Article Body ─── */
.article-body {
    background: var(--bg);
    padding-bottom: var(--section-py);
}

.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--container-px);
}


/* ─── Markdown Content ─── */
.article-content {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.85;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content strong {
    color: var(--white);
    font-weight: 700;
}

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

.article-content a:hover {
    color: var(--accent-dark);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.article-content li::marker {
    color: var(--accent);
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    background: rgba(255, 140, 0, 0.04);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text);
}

.article-content blockquote strong {
    font-style: normal;
}

.article-content code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--accent);
}

.article-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: var(--text);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.article-content table th {
    background: var(--bg-card);
    color: var(--white);
    font-weight: 700;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
}

.article-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    color: var(--text);
}

.article-content table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.article-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2.5rem 0;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}


/* ─── Article Footer ─── */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-share span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.article-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.article-share a:hover {
    background: var(--accent-glow);
    border-color: var(--border-accent);
    color: var(--accent);
}

.article-share a svg {
    width: 16px;
    height: 16px;
}


/* ═══════════════════════════════════════════
   BLOG CTA
   ═══════════════════════════════════════════ */
.blog-cta {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.blog-cta-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta-card h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.blog-cta-card p {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.75rem;
    line-height: 1.7;
}


/* ═══════════════════════════════════════════
   LOADING & ERROR STATES
   ═══════════════════════════════════════════ */
.blog-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.blog-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.blog-loading p {
    font-size: 0.85rem;
}

.blog-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.blog-error h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.blog-error p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* ═══════════════════════════════════════════
   NAV ACTIVE STATE
   ═══════════════════════════════════════════ */
.nav-active {
    color: var(--accent) !important;
}


/* ═══════════════════════════════════════════
   RESPONSIVE — Blog
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .blog-hero {
        padding: 8rem 0 3rem;
    }

    .article-hero {
        padding: 8rem 0 2.5rem;
    }

    .article-meta {
        gap: 0.75rem;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-card {
        padding: 1.5rem 1.25rem;
    }

    .blog-card-title {
        font-size: 1.05rem;
    }

    .article-title {
        font-size: 1.5rem;
    }
}