/* --- Mixed Blog Layouts Grid --- */

.blog-grid-mixed {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 3rem;
}

/* Mixed Layout Assignments */
/* Mixed Layout Assignments */
.featured-grid-wrapper {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.featured-col-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.featured-col-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-item-standard {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

/* Horizontal List Card Specifics */
.blog-card.blog-list-horizontal {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    overflow: hidden;
    height: 100%;
    align-items: stretch;
}

.blog-card {
    padding: 0;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #111;
    /* Dark theme background base */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--color-text-main);
    position: relative;
    width: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.blog-list-horizontal .post-thumbnail-left {
    flex: 0 0 240px;
    height: 100%;
    min-height: 240px;
    /* Full height of card */
    position: relative;
    border-radius: 0;
    overflow: hidden;
    margin-right: 0;
    /* Let flex gap handle spacing */
}

.blog-list-horizontal .post-thumbnail-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.blog-list-horizontal .post-content-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem;
}

/* Vertical Model Specifics (Card) */


.post-thumbnail {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16/10;
    height: auto;
    margin-bottom: 0;
    margin-left: 0;
    /* Override components.css */
    margin-right: 0;
    /* Override components.css */
    margin-top: 0;
    /* Override components.css */
    width: 100%;
}

.post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge Aesthetics */
.post-category-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    /* Glassy tag */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    background: var(--color-primary);
    color: #000;
    transform: scale(1.05);
    box-shadow: var(--glow-primary);
}

.blog-list-horizontal .post-category-badge {
    top: 0.8rem;
    left: 0.8rem;
}

.blog-card:not(.blog-list-horizontal) .post-category-badge {
    bottom: 0.8rem;
    left: 0.8rem;
}

/* Content Typography */
.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-title a {
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-text-main);
    text-decoration: none;
    display: block;
    margin-bottom: 0.1rem;
}

.grid-item-featured .post-title a {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.grid-item-featured .post-excerpt {
    -webkit-line-clamp: 6;
    line-clamp: 6;
    margin-bottom: 2rem;
}

.post-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #bbb;
    /* Slightly lighter for better fill */
    margin-bottom: 0.7rem;
    opacity: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Data & Footer Grid */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    margin-top: auto;
}

/* Author Layout for Card (Horizontal) */
.post-author-meta-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Author Layout for List (Horizontal) */
.author-meta-horizontal {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.post-author-avatar img,
.author-meta-horizontal img {
    width: 28px;
    height: 28px;
    border-radius: 50% !important;
    display: block;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.author-details-inline {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.by-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.meta-info {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* Premium Buttons */
.post-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn svg {
    stroke: var(--color-text-main) !important;
    display: block;
}

.share-btn {
    background: #5d3eff;
    /* Vivid Purple */
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(93, 62, 255, 0.3);
}

.action-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.action-btn:hover svg {
    stroke: #000 !important;
}

.share-btn:hover {
    background: #4a3aff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 62, 255, 0.4);
}

.more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Theme Awareness Override for reference match */
/* Assuming user wants dark mode reference match regardless of system theme for this section, 
   or adjusting light mode to still look good */
body.light-mode .blog-card {
    background: #fff;
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .post-title a {
    color: #1a1a1a;
}

body.light-mode .post-excerpt {
    color: rgba(0, 0, 0, 0.6);
}

body.light-mode .by-name {
    color: #1a1a1a;
}

body.light-mode .meta-info {
    color: rgba(0, 0, 0, 0.5);
}


/* Responsive */
@media (max-width: 1200px) {
    .blog-grid-mixed {
        grid-template-columns: repeat(2, 1fr);
        /* Fallback to 2 columns */
    }

    .featured-grid-wrapper {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    .featured-col-right .blog-card {
        height: auto;
        /* Reset height */
        min-height: 400px;
    }

    .grid-item-list {
        grid-column: span 2;
        /* Full width on tablet */
    }

    .grid-item-tall {
        grid-column: span 2;
        /* Full width on tablet */
        grid-row: span 1;
        /* Reset row span */
    }

    .grid-item-standard {
        grid-column: span 1;
        /* Half width */
    }
}

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

    .featured-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .grid-item-list,
    .grid-item-tall,
    .grid-item-standard {
        grid-column: span 1;
    }

    .grid-item-featured,
    .grid-item-standard {
        grid-column: span 1;
    }

    .blog-card.blog-list-horizontal {
        flex-direction: column;
    }

    .blog-list-horizontal .post-thumbnail-left {
        flex: 0 0 200px;
        width: 100%;
    }
}

/* --- Archive & Category Styles --- */
.archive-header {
    margin-bottom: 3rem;
    text-align: center;
}

.archive-header-inner {
    padding: 1.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.02);
}

.archive-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.archive-header .breadcrumbs {
    margin-bottom: 1rem;
    justify-content: center;
}

.archive-description {
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.blog-standard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}



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

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

body.light-mode .archive-header-inner {
    background: rgba(0, 0, 0, 0.02);
}

body.light-mode .archive-title {
    color: var(--color-text-main);
}