/* ============================================================
   HONESTIA CONNECT — BLOG.CSS
   Styles for blog.html page
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --radius-card: 20px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.07);
}

body { font-family: 'Outfit', sans-serif; background: #f8fafc; }
.dark body { background: #0a0a0f; }

/* ── Hero ── */
.blog-hero {
    background: #ffffff;
    padding: 120px 1.5rem 50px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}
.dark .blog-hero {
    background: #0a0a0b;
    border-bottom-color: #1c1c1e;
}
.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #1d1d1f;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    line-height: 1.15;
}
.dark .blog-hero h1 {
    color: #f5f5f7;
}
.blog-hero p {
    font-size: 1.1rem;
    color: #86868b;
    max-width: 600px;
    margin: 0 auto 1rem;
    font-weight: 400;
    line-height: 1.6;
}
.dark .blog-hero p {
    color: #86868b;
}

/* ── Search + Filters ── */
.blog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: var(--header-offset, 80px);
    z-index: 100;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark .blog-controls { background: #111114; border-color: #27272a; }

.blog-search {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 400px;
}
.blog-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 999px;
    font-size: 0.875rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.2s;
}
.blog-search input:focus { border-color: #2563eb; }
.dark .blog-search input { background: #18181b; border-color: #3f3f46; color: #e4e4e7; }
.blog-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.tag-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tag-chip {
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tag-chip:hover, .tag-chip.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.dark .tag-chip { background: #27272a; border-color: #3f3f46; color: #a1a1aa; }

/* ── Grid ── */
.blog-grid-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* ── Card ── */
.blog-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37,99,235,0.12);
}
.dark .blog-card { background: #18181b; border-color: #27272a; }

.blog-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}
.blog-card-cover-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
}
.dark .blog-card-cover-placeholder { background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%); }

.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}
.blog-card-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
}
.dark .blog-card-tag { background: #1e3a5f; color: #93c5fd; }

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark .blog-card-title { color: #f1f5f9; }

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark .blog-card-excerpt { color: #94a3b8; }

.blog-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}
.dark .blog-card-footer { border-color: #27272a; }

.blog-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #4f46e5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.blog-card-meta { flex: 1; min-width: 0; }
.blog-card-author {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark .blog-card-author { color: #cbd5e1; }
.blog-card-date { font-size: 0.7rem; color: #94a3b8; }

.blog-card-views {
    font-size: 0.7rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ── Empty & Loading ── */
.blog-empty {
    text-align: center;
    padding: 5rem 1rem;
    color: #94a3b8;
}
.blog-empty svg { margin: 0 auto 1.5rem; color: #cbd5e1; }

.blog-skeleton {
    background: #f1f5f9;
    border-radius: var(--radius-card);
    overflow: hidden;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.dark .blog-skeleton { background: #27272a; }
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Pagination ── */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.blog-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}
.blog-page-btn:hover, .blog-page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.dark .blog-page-btn { background: #18181b; border-color: #3f3f46; color: #a1a1aa; }
