/* =====================================================================
   BLOG PAGES (listing + single post) — magazine-style layout
   Reuses existing design tokens from style.css :root (brand colors,
   radii, shadows, transitions) so it matches the rest of the site.
   The grid card reuses .article-card / .articles-grid from style.css;
   this file adds the section wrapper, the featured/hero post, the
   category filter row, and the full single-post reading layout.
   ===================================================================== */

.blog-section {
    padding: 90px 0 100px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 360px);
}

/* ---------------------------------------------------------------------
   CATEGORY FILTERS
--------------------------------------------------------------------- */
.gallery-filters {
    margin-bottom: 40px;
}

/* ---------------------------------------------------------------------
   FEATURED POST — shown as the first, larger item on page 1 of the
   listing so the newest story reads like a magazine cover story
   instead of just another grid tile.
--------------------------------------------------------------------- */
.blog-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    margin-bottom: 46px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
    transition: var(--transition-normal);
}

.blog-featured:hover {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.15);
}

.blog-featured-image {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

.blog-featured-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.blog-featured:hover .blog-featured-image img {
    transform: scale(1.05);
}

.blog-featured-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    border-radius: 999px;
    background: var(--brand-primary);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blog-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.blog-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-featured-meta i {
    color: var(--brand-primary);
}

.blog-featured-body h2 {
    margin-bottom: 14px;
    font-size: 30px;
    line-height: 1.28;
    color: #183754;
}

.blog-featured-body h2 a {
    color: inherit;
    transition: color .2s ease;
}

.blog-featured-body h2 a:hover {
    color: var(--brand-primary-dark);
}

.blog-featured-body p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 15.5px;
    line-height: 1.75;
}

@media (max-width: 767px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }
    .blog-featured-image { min-height: 220px; }
    .blog-featured-body { padding: 28px 24px; }
    .blog-featured-body h2 { font-size: 24px; }
}

/* ---------------------------------------------------------------------
   LISTING GRID — same card as the homepage (.article-card), just laid
   out at a comfortable reading width for a dedicated listing page.
--------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 10px;
}

.blog-card-category {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bg-gold-light);
    color: var(--brand-primary-dark);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

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

/* =======================================================================
   SINGLE POST — professional magazine-article reading layout
   page-hero-book (from books.css) supplies the banner height.
   ======================================================================= */
.blog-detail-section {
    padding: 60px 0 30px;
    background: var(--bg-white);
}

.blog-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

@media (max-width: 991px) {
    .blog-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- Byline / meta bar -------------------------------------------------- */
.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 14px;
}

.blog-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.blog-detail-meta i {
    color: var(--brand-primary);
}

.blog-author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-gold-light);
    color: var(--brand-primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* --- Article typography -------------------------------------------------- */
.blog-detail-content {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.9;
}

.blog-detail-content p {
    margin-bottom: 1.25em;
}

.blog-detail-content p:first-of-type::first-letter {
    float: left;
    padding: 4px 10px 0 0;
    font-family: var(--font-secondary, Georgia, serif);
    font-size: 64px;
    font-weight: 700;
    line-height: 0.8;
    color: var(--brand-primary);
}

/* --- Excerpt / standfirst, shown as a styled lede above the body --- */
.blog-detail-excerpt {
    margin-bottom: 28px;
    padding: 18px 22px;
    border-left: 4px solid var(--brand-primary);
    background: var(--bg-gold-light);
    border-radius: 0 var(--radius-md, 10px) var(--radius-md, 10px) 0;
    color: #183754;
    font-size: 17px;
    font-style: italic;
    line-height: 1.65;
}

/* --- Tag row under the article body --- */
.blog-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
}

.blog-detail-tags a {
    padding: 6px 15px;
    border-radius: 999px;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.blog-detail-tags a:hover {
    background: var(--brand-primary);
    color: var(--text-white);
}

/* --- Share row --- */
.blog-detail-share {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--border-light);
}

.blog-detail-share span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.blog-detail-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.blog-detail-share a:hover {
    background: var(--brand-primary);
    color: var(--text-white);
    transform: translateY(-3px);
}

/* --- Author bio card, closes out the article --- */
.blog-author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 36px;
    padding: 26px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.blog-author-box .blog-author-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.blog-author-box h4 {
    margin-bottom: 4px;
    font-size: 15px;
    color: #183754;
}

.blog-author-box p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

/* =======================================================================
   SIDEBAR
   ======================================================================= */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 100px;
}

.blog-sidebar-card {
    padding: 26px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.blog-sidebar-card h4 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    font-size: 16px;
    color: #183754;
}

.blog-sidebar-card h4 i {
    color: var(--brand-primary);
}

/* Recent posts list */
.blog-sidebar-post {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.blog-sidebar-post + .blog-sidebar-post {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.blog-sidebar-post img {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-sidebar-post-content span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.blog-sidebar-post-content h5 {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.4;
}

.blog-sidebar-post-content h5 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #183754;
    font-weight: 600;
    transition: color .2s ease;
}

.blog-sidebar-post-content h5 a:hover {
    color: var(--brand-primary-dark);
}

/* Category list */
.blog-sidebar-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: color .2s ease;
}

.blog-sidebar-categories a:last-child {
    border-bottom: none;
}

.blog-sidebar-categories a:hover {
    color: var(--brand-primary-dark);
}

.blog-sidebar-categories a i {
    font-size: 12px;
    color: var(--brand-primary);
}

/* Newsletter / CTA card in the sidebar */
.blog-sidebar-cta {
    padding: 30px 26px;
    background: linear-gradient(150deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: var(--text-white);
    text-align: center;
}

.blog-sidebar-cta h4 {
    color: var(--text-white);
    justify-content: center;
}

.blog-sidebar-cta p {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    line-height: 1.6;
}

.blog-sidebar-cta .btn-primary {
    background: var(--text-white);
    color: var(--brand-primary-dark);
}

.blog-sidebar-cta .btn-primary:hover {
    background: var(--bg-black);
    color: var(--text-white);
}

@media (max-width: 991px) {
    .blog-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .blog-sidebar-card { flex: 1 1 280px; }
}

@media (max-width: 575px) {
    .blog-detail-meta { gap: 14px; font-size: 13px; }
    .blog-detail-content { font-size: 15.5px; }
    .blog-detail-content p:first-of-type::first-letter { font-size: 46px; }
    .blog-author-box { flex-direction: column; }
}
