/* ═══════════════════════════════════════════════════════════
   Blog & Blog Details — Bouwen Legacy Limited
═══════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────── */
.blog-main {
    margin-top: 140px;
    min-height: 60vh;
}
.blog-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 36px 20px 60px;
}

/* ── Page header ─────────────────────────────────────────── */
.page-header-banner {
    background: linear-gradient(135deg, #042240 0%, #024f9c 100%);
    color: #fff;
    padding: 60px 24px 50px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}
.page-header-banner h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 10px;
}
.page-header-banner p {
    margin: 0;
    font-size: 1.05rem;
    opacity: 0.9;
}

/* ── Department filter ───────────────────────────────────── */
.dept-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.dept-tag {
    padding: 7px 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.dept-tag:hover {
    border-color: #024f9c;
    color: #024f9c;
    background: #eef3fb;
}
.dept-tag.active {
    background: linear-gradient(135deg, #042240, #024f9c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(2,79,156,.25);
}

/* ── Count ───────────────────────────────────────────────── */
.article-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* ── Articles grid ───────────────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ── Article card ────────────────────────────────────────── */
.article-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.article-card:hover {
    box-shadow: 0 8px 30px rgba(2, 79, 156, 0.15);
    transform: none;
}

/* Thumbnail */
.article-thumb-link {
    display: block;
    overflow: hidden;
    height: 200px;
    background: #eef2f8;
}
.article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.article-card:hover .article-thumb {
    transform: scale(1.04);
}
.article-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aab;
    font-size: 2.5rem;
    background: #eef2f8;
}

/* Department badge */
.dept-badge {
    display: inline-block;
    margin: 12px 16px 0;
    padding: 3px 11px;
    background: #e8f0fe;
    color: #0055b3;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card body */
.article-card-body {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px;
}
.article-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}
.article-title a:hover {
    color: #024f9c;
}
.article-summary {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

/* Author */
.article-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #024f9c;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(2,79,156,.15);
}
.author-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #042240, #024f9c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.author-info {
    display: flex;
    flex-direction: column;
}
.author-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a2e;
}
.author-pos {
    font-size: 0.78rem;
    color: #888;
}

/* Meta */
.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 14px;
}
.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Read more */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #024f9c;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.3s ease;
}
.read-more-btn:hover {
    gap: 10px;
    color: #042240;
}

/* ── No articles ─────────────────────────────────────────── */
.no-articles {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}
.no-articles p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.btn-back-all {
    display: inline-block;
    padding: 10px 24px;
    background: #024f9c;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-back-all:hover {
    background: #042240;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #dde3ee;
    border-radius: 6px;
    color: #024f9c;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}
.page-btn:hover,
.page-btn.active {
    background: #024f9c;
    color: #fff;
    border-color: #024f9c;
}

/* ═══════════════════════════════════════════════════════════
   Blog Details
═══════════════════════════════════════════════════════════ */
.blog-details-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* Featured image */
.blog-featured-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 28px;
    display: block;
}

/* Article header */
.blog-dept-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(2, 79, 156, 0.08);
    color: #024f9c;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}
.blog-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a2e;
    margin: 0 0 20px;
}

/* ── Blog details article header ────────────────────────── */
.blog-article-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 0 24px;
    margin-bottom: 28px;
    border-bottom: 2px solid #e2e8f0;
}
.blog-author-circle {
    flex-shrink: 0;
}
.blog-author-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #024f9c;
    box-shadow: 0 4px 16px rgba(2,79,156,.2);
    display: block;
}
.blog-author-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #042240, #024f9c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}
.blog-article-meta { flex: 1; min-width: 0; }
.blog-title {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a2e;
    margin: 0 0 10px;
}
.blog-author-name {
    font-size: 1rem;
    font-weight: 700;
    color: #042240;
    display: block;
}
.blog-author-pos {
    font-size: 0.88rem;
    color: #024f9c;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}
.blog-meta-row {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
/* Article body card */
.blog-body-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 28px 32px;
    margin-bottom: 32px;
}
@media (max-width: 600px) {
    .blog-article-header { flex-direction: column; align-items: center; text-align: center; }
    .blog-meta-row { justify-content: center; }
    .blog-body-card { padding: 18px 16px; }
}

/* Article body */
.blog-body {
    font-size: 1rem;
    line-height: 1.85;
    color: #333;
}
.blog-body h2,
.blog-body h3 {
    color: #1a1a2e;
    margin-top: 32px;
    margin-bottom: 12px;
}
.blog-body h2 { font-size: 1.4rem; }
.blog-body h3 { font-size: 1.15rem; }
.blog-body p  { margin: 0 0 16px; }
.blog-body ul,
.blog-body ol {
    padding-left: 24px;
    margin: 0 0 16px;
    line-height: 2;
}
.blog-body a {
    color: #024f9c;
    text-decoration: underline;
    transition: color 0.3s ease;
}
.blog-body a:hover {
    color: #042240;
}
.blog-body blockquote {
    border-left: 4px solid #024f9c;
    margin: 24px 0;
    padding: 14px 20px;
    background: rgba(2, 79, 156, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #444;
}
.blog-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

/* Back link */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #024f9c;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 28px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.blog-back-link:hover { 
    color: #042240;
    gap: 12px;
}

/* Related articles */
.related-section { margin-top: 60px; }
.related-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.related-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}
.related-card:hover {
    box-shadow: 0 6px 20px rgba(2, 79, 156, 0.15);
    transform: none;
}
.related-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
}
.related-thumb-ph {
    width: 100%;
    height: 130px;
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aab;
    font-size: 2rem;
}
.related-card-body {
    padding: 12px 14px 14px;
}
.related-card-body h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    line-height: 1.4;
}
.related-card-body span {
    font-size: 0.78rem;
    color: #888;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .blog-main { margin-top: 100px; }
    .blog-container { padding: 20px 16px 40px; }
    .dept-tag { padding: 6px 14px; font-size: 0.84rem; }
    .articles-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
}
@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .blog-author-block { flex-direction: column; text-align: center; }
    .blog-meta-row { justify-content: center; }
}
@media (max-width: 480px) {
    .blog-main { margin-top: 95px; }
    .blog-container { padding: 14px 12px 28px; }
    .dept-filter { gap: 6px; }
    .dept-tag { padding: 5px 11px; font-size: 0.8rem; }
    .article-count { font-size: 0.82rem; }
    .article-card-body { padding: 12px 14px 16px; }
    .article-title { font-size: 0.97rem; }
    .read-more-btn { font-size: 0.85rem; }
    .pagination { gap: 5px; margin-top: 32px; }
    .page-btn { min-width: 34px; height: 34px; font-size: 0.82rem; }
}
