/**
 * Blog Styles - Straja.Live
 * Uses CSS variables from main styles.css
 */

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumbs a:hover {
    opacity: 0.8;
}

.breadcrumbs span:not(:last-child) {
    color: var(--text-muted);
}

/* Blog Hero */
.blog-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.5));
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.blog-hero h1 {
    font-size: 32px;
    margin: 0 0 10px;
    color: var(--text-main);
}

.blog-hero p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* Categories Filter */
.blog-categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    scrollbar-width: thin;
}

.cat-link {
    flex-shrink: 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cat-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.cat-link.active {
    background: var(--accent);
    color: #0f172a;
    font-weight: 600;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Blog Card */
.blog-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.blog-card .card-image {
    display: block;
    height: 200px;
    overflow: hidden;
}

.blog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.blog-card .card-content {
    padding: 20px;
}

.blog-card .card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 12px;
}

.blog-card .card-category {
    background: var(--accent);
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
}

.blog-card .card-date,
.blog-card .card-reading-time {
    color: var(--text-muted);
}

.blog-card h2 {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.blog-card h2 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card h2 a:hover {
    color: var(--accent);
}

.blog-card .card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 15px;
}

.blog-card .read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.blog-card .read-more:hover {
    opacity: 0.8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.page-link {
    padding: 10px 20px;
    background: var(--accent);
    color: #0f172a;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.page-link:hover {
    opacity: 0.8;
}

.page-info {
    color: var(--text-muted);
    font-size: 14px;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.no-posts p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.back-home {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   ARTICLE PAGE STYLES
   ============================================ */

.article-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

/* Article Header */
.article-header {
    padding: 40px 30px 30px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.article-category {
    display: inline-block;
    background: var(--accent);
    color: #0f172a;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 32px;
    line-height: 1.3;
    margin: 0 0 20px;
    color: var(--text-main);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.article-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tags .tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tags .tag:hover {
    background: var(--accent);
    color: #0f172a;
}

/* Featured Image */
.article-featured-image {
    margin: 0;
    padding: 0;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

/* Article Body Wrapper */
.article-body-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px;
}

@media (min-width: 900px) {
    .article-body-wrapper {
        grid-template-columns: 250px 1fr;
    }
}

/* Table of Contents */
.article-toc {
    position: sticky;
    top: 20px;
    align-self: start;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

[data-theme="light"] .article-toc {
    background: rgba(0, 0, 0, 0.05);
}

.article-toc h3 {
    font-size: 14px;
    margin: 0 0 15px;
    color: var(--text-main);
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc li {
    margin-bottom: 8px;
}

.article-toc li.toc-level-3 {
    padding-left: 15px;
}

.article-toc a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    transition: color 0.2s, padding-left 0.2s;
}

.article-toc a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Article Content */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
}

.article-content h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    color: var(--accent);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--glass-border);
}

.article-content h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
    color: var(--text-muted);
}

.article-content li {
    margin-bottom: 10px;
}

.article-content a {
    color: var(--accent);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    margin: 20px 0;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.article-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.share-buttons span {
    color: var(--text-muted);
    font-weight: 600;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

/* Related Posts */
.related-posts {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 30px;
}

.related-posts h2 {
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--text-main);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    display: block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--glass-border);
}

[data-theme="light"] .related-card {
    background: rgba(0, 0, 0, 0.05);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-info {
    padding: 15px;
}

.related-category {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
}

.related-card h3 {
    font-size: 15px;
    margin: 8px 0 0;
    color: var(--text-main);
    line-height: 1.4;
}

/* Back to Blog */
.back-to-blog {
    text-align: center;
    padding: 20px;
}

.back-to-blog a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.back-to-blog a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero h1 {
        font-size: 24px;
    }

    .article-header {
        padding: 25px 20px;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .article-body-wrapper {
        padding: 20px;
        grid-template-columns: 1fr;
    }

    .article-toc {
        position: static;
        margin-bottom: 20px;
    }

    .share-buttons {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}