/*
 * Blog archive redesign — card look modeled on factutpv.es/blog.
 * Loaded on all pages (tiny file); selectors only match archive markup.
 */

/* --- Uniform grid (neutralize enhanced-grid featured spans) --- */
.entries[data-layout="enhanced-grid"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.entries[data-layout="enhanced-grid"] > .entry-card {
    grid-column: auto / span 1 !important;
    grid-row: auto !important;
}

/* --- Card --- */
.entries[data-cards="boxed"] .entry-card {
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: none;
    transition: border-color .3s, box-shadow .3s, transform .3s;
}
.entries[data-cards="boxed"] .entry-card:hover {
    border-color: #bfdbfe;
    transform: scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, .07),
                0 8px 10px -6px rgba(37, 99, 235, .05);
}

/* Image first, 16:9, zoom on hover */
.entry-card .ct-media-container {
    order: -1;
    display: block;
    overflow: hidden;
}
.entry-card .ct-media-container img {
    aspect-ratio: 16 / 9 !important;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .5s;
}
.entry-card:hover .ct-media-container img {
    transform: scale(1.05);
}

/* Category chip — overlaid on image when there is one */
.entry-card .entry-meta[data-id="meta_1"] {
    margin: 0;
}
.entry-card .entry-meta[data-id="meta_1"] a {
    display: inline-block;
    background: rgba(37, 99, 235, .9);
    color: #fff !important;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    padding: .35rem .8rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.entry-card.has-post-thumbnail .entry-meta[data-id="meta_1"] {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 2;
}

/* Title */
.entry-card .entry-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}
.entry-card .entry-title a {
    transition: color .2s;
}
.entry-card .entry-title a:hover {
    color: var(--factusync-color-primary, #2563eb);
}

/* Excerpt — 3-line clamp */
.entry-card .entry-excerpt {
    flex: 1;
}
.entry-card .entry-excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #6b7280;
    font-size: .9rem;
    line-height: 1.6;
}

/* Footer meta: author + date */
.entry-card .entry-meta[data-id="meta_2"] {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid #f3f4f6;
    font-size: .78rem;
    color: #9ca3af;
}
.entry-card .entry-meta[data-id="meta_2"] a {
    color: #9ca3af;
}

/* --- Blog hero (posts page only, printed from inc/blog-archive.php) --- */
.fs-blog-hero {
    text-align: center;
    padding: 1.5rem 1rem 1.75rem;
}
.fs-blog-hero .fs-badge {
    display: inline-block;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .85rem;
    font-weight: 500;
    padding: .35rem 1rem;
    border-radius: 999px;
}
.fs-blog-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 1rem 0 0;
}
.fs-blog-hero p {
    color: #6b7280;
    max-width: 36rem;
    margin: 1rem auto 0;
    line-height: 1.6;
}

/* --- Category pill bar --- */
.fs-blog-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
    padding-bottom: 2rem;
}
.fs-blog-cats a {
    white-space: nowrap;
    border-radius: 999px;
    padding: .45rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    color: #4b5563;
    transition: background .2s, color .2s;
}
.fs-blog-cats a:hover {
    background: #f3f4f6;
    color: #111827;
}
.fs-blog-cats a.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}
