/* Blog-specific styles for barjaktarov.se */

/* Blog Navigation */
.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 16px 0;
}

.back-link,
.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-link:hover,
.home-link:hover {
    color: var(--accent-primary);
    transform: translateX(-4px);
}

.home-link:hover {
    transform: translateX(4px);
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    border-radius: 24px;
    border: 2px solid var(--border-color);
}

.blog-header h1 {
    font-size: clamp(2.5em, 6vw, 4em);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tag Filter */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-tag {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: lowercase;
}

.filter-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.filter-tag.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
    background: var(--bg-card);
    border-radius: 24px;
    border: 2px solid var(--border-color);
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.blog-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3), 0 20px 60px rgba(0, 0, 0, 0.8);
}

.blog-card:hover::before {
    opacity: 0.3;
    filter: blur(20px);
}

.blog-card.featured {
    border-color: var(--accent-secondary);
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.05), var(--bg-card));
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-secondary);
    color: var(--bg-primary);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.blog-card-content {
    position: relative;
    z-index: 1;
}

.blog-card-meta {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-separator {
    color: var(--accent-primary);
}

.blog-card-title {
    margin-bottom: 16px;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    display: block;
    transition: color 0.3s ease;
}

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

.blog-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: lowercase;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* Blog Post Page */
.blog-post {
    background: var(--bg-card);
    border-radius: 24px;
    border: 2px solid var(--border-color);
    padding: 0;
    margin-bottom: 40px;
    overflow: hidden;
}

.post-header {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.05));
    border-bottom: 2px solid var(--accent-primary);
    padding: 50px;
    text-align: center;
}

.post-meta {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.post-title {
    font-size: clamp(2em, 5vw, 3.5em);
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-excerpt {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 24px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.post-content {
    padding: 50px;
    max-width: 800px;
    margin: 0 auto;
}

.post-content p {
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-content h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-content h2 {
    font-size: 2em;
    color: var(--accent-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.post-content h3 {
    font-size: 1.5em;
    color: var(--accent-primary);
}

.post-content h4 {
    font-size: 1.2em;
}

.post-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 255, 0.3);
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.post-content a:hover {
    text-decoration-color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 30px;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.post-content em {
    color: var(--accent-primary);
    font-style: italic;
}

.post-content code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color-strong);
    border-radius: 6px;
    padding: 3px 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9em;
    color: var(--accent-primary);
}

.post-content pre {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color-strong);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    overflow-x: auto;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.95em;
    color: var(--text-primary);
}

.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 24px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(0, 255, 255, 0.05);
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Image size classes */
.post-content img.img-small {
    max-width: 400px;
}

.post-content img.img-medium {
    max-width: 600px;
}

.post-content img.img-large {
    max-width: 800px;
}

.post-content img.img-full {
    max-width: 100%;
    width: 100%;
}

/* Image alignment classes */
.post-content img.img-left {
    margin-right: auto;
    margin-left: 0;
}

.post-content img.img-center {
    margin-left: auto;
    margin-right: auto;
}

.post-content img.img-right {
    margin-left: auto;
    margin-right: 0;
}

/* Image with caption */
.post-content figure {
    margin: 30px 0;
}

.post-content figure img {
    margin: 0 0 12px 0;
}

.post-content figcaption {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
}

/* Inline images (float) */
.post-content img.img-float-left {
    float: left;
    margin: 10px 24px 24px 0;
    max-width: 300px;
}

.post-content img.img-float-right {
    float: right;
    margin: 10px 0 24px 24px;
    max-width: 300px;
}

.post-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    margin: 40px 0;
}

.post-footer {
    padding: 40px 50px;
    border-top: 2px solid var(--border-color);
    background: rgba(0, 255, 255, 0.02);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.author-details strong {
    color: var(--accent-primary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 6px;
}

.author-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.post-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-header,
    .post-content,
    .post-footer {
        padding: 30px 24px;
    }

    .post-title {
        font-size: 2em;
    }

    .blog-card {
        padding: 24px;
    }

    .author-info {
        flex-direction: column;
        text-align: center;
    }

    .blog-nav {
        flex-direction: column;
        gap: 12px;
    }

    .back-link,
    .home-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 24px 16px;
    }

    .post-content {
        padding: 24px 16px;
    }

    .post-meta {
        flex-direction: column;
        gap: 6px;
    }

    .meta-separator {
        display: none;
    }
}
