/* =================================================
   blog.css — SabaqGuide Blog Styles
   Theme: Navy #0D1B3E + Gold #F5A623
   Font:  Inter (matches main site)
   Used by: blog/index.html + all blog post pages
   ================================================= */

:root {
    --gold:       #F5A623;
    --gold-dark:  #D4891A;
    --gold-light: #FFD780;
    --gold-pale:  #FFF8EC;
    --navy:       #0D1B3E;
    --navy-mid:   #162447;
    --gray-100:   #F8F9FA;
    --gray-200:   #E9ECEF;
    --gray-600:   #6C757D;
    --white:      #FFFFFF;
    --text:       #1E293B;
    --site-w:     1200px;
    --article-w:  760px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--gray-100);
    line-height: 1.7;
}

a { transition: color 0.2s; text-decoration: none; }

/* ─────────────────────────────────────────────
   READING PROGRESS BAR
───────────────────────────────────────────── */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    z-index: 1001;
    transition: width 0.1s linear;
}

/* ─────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────── */
.blog-nav {
    background: var(--navy);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    padding: 14px 0;
    position: sticky;
    top: 3px;
    z-index: 100;
}

.blog-nav .nav-inner {
    max-width: var(--site-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.blog-nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.blog-nav .logo img { width: 32px; height: 32px; border-radius: 8px; }
.blog-nav .logo span { color: var(--gold); }

.blog-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.blog-nav .nav-links a {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    font-weight: 500;
}

.blog-nav .nav-links a:hover        { color: var(--gold); }
.blog-nav .nav-links a.active       { color: var(--gold); font-weight: 600; }

.btn-nav-download {
    background: var(--gold);
    color: var(--navy) !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.btn-nav-download:hover {
    background: var(--gold-dark) !important;
    color: var(--white) !important;
}

/* ─────────────────────────────────────────────
   CONTAINERS
───────────────────────────────────────────── */
.container          { max-width: var(--site-w);   margin: 0 auto; padding: 0 24px; }
.article-container  { max-width: var(--article-w); margin: 0 auto; padding: 0 24px; }

/* ─────────────────────────────────────────────
   AD UNIT PLACEHOLDERS
   When AdSense is approved:
     1. Remove the .ad-placeholder div
     2. Paste your <ins class="adsbygoogle"> tag inside .ad-unit
   Keep the outer .ad-unit wrapper — it controls spacing.
───────────────────────────────────────────── */
.ad-unit { margin: 32px 0; text-align: center; }

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--gray-100);
    border: 1px dashed var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    color: var(--gray-600);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.ad-unit.ad-banner  .ad-placeholder { min-height: 90px; }
.ad-unit.ad-rect    .ad-placeholder { min-height: 250px; max-width: 336px; margin: 0 auto; }
.ad-unit.ad-sidebar .ad-placeholder { min-height: 250px; }
.ad-unit.ad-listing .ad-placeholder { min-height: 100px; }

/* ─────────────────────────────────────────────
   BLOG LISTING — HERO
───────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 65%, #1a3a8a 100%);
    padding: 60px 0 48px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(245,166,35,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.blog-hero .container { position: relative; }

.blog-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.blog-hero h1 span { color: var(--gold); }

.blog-hero p {
    font-size: 17px;
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto 20px;
}

.blog-hero .pill {
    display: inline-block;
    background: rgba(245,166,35,0.15);
    border: 1px solid rgba(245,166,35,0.3);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gold-light);
}

/* ─────────────────────────────────────────────
   CATEGORY TABS
───────────────────────────────────────────── */
.category-tabs {
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 57px;
    z-index: 99;
}

.tabs-inner {
    max-width: var(--site-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 15px 16px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover  { color: var(--gold-dark); }
.tab-btn.active { color: var(--gold-dark); border-bottom-color: var(--gold); font-weight: 600; }

/* ─────────────────────────────────────────────
   POST GRID (LISTING PAGE)
───────────────────────────────────────────── */
.posts-section { padding: 40px 0 80px; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ─────────────────────────────────────────────
   POST CARD
───────────────────────────────────────────── */
.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(245,166,35,0.18);
}

.card-image {
    height: 200px;
    background: #FEFCE8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img { width: 100%; height: 100%; object-fit: contain; background: #FEFCE8; }

.card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Category badge colours */
.category-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 50px;
    background: var(--gold-pale);
    color: var(--gold-dark);
}

.category-badge.mdcat { background: #FFF8EC; color: #D4891A; }
.category-badge.etea  { background: #e8f4fd; color: #1565c0; }
.category-badge.nust  { background: #e8f8ef; color: #2E7D32; }
.category-badge.fsc   { background: #f3e8fd; color: #7B1FA2; }
.category-badge.ai    { background: #e0f7fa; color: #00838F; }
.category-badge.study { background: #fce8e8; color: #C62828; }

.read-time {
    font-size: 12px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-body h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 8px;
}

.card-body h2 a { color: inherit; }
.card-body h2 a:hover { color: var(--gold-dark); }

.card-body p {
    font-size: 13.5px;
    color: var(--gray-600);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
}

.post-date { font-size: 11px; color: var(--gray-600); }

.read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.read-more:hover { gap: 8px; }

.coming-soon-badge {
    display: inline-block;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 50px;
}

/* Featured card — wide, first post */
.post-card.featured {
    grid-column: span 3;
    flex-direction: row;
}

.post-card.featured .card-image {
    width: 400px;
    min-height: 280px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    margin: 12px 0 12px 12px;
}

.post-card.featured .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.post-card.featured .card-body  { padding: 32px; }
.post-card.featured h2          { font-size: 22px; }

/* ─────────────────────────────────────────────
   ARTICLE PAGE — TOP HEADER AREA
───────────────────────────────────────────── */
.article-top {
    background: var(--white);
    padding: 36px 0 0;
    border-bottom: 1px solid var(--gray-200);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.breadcrumb a            { color: var(--gray-600); }
.breadcrumb a:hover      { color: var(--gold-dark); }
.breadcrumb .sep         { color: var(--gray-200); font-size: 16px; }
.breadcrumb .current     { color: var(--navy); font-weight: 500; }

/* Article header */
.article-header { padding-bottom: 24px; }
.article-header .category-badge { display: inline-block; margin-bottom: 14px; }

.article-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 18px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-meta i    { color: var(--gold); }

/* Share buttons */
.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid var(--gray-200);
}

.share-label { font-size: 12px; font-weight: 600; color: var(--gray-600); margin-right: 4px; }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform 0.2s;
}

.share-btn:hover    { transform: translateY(-2px); }
.share-btn.twitter  { background: #e8f5fd; color: #1da1f2; }
.share-btn.facebook { background: #e8eef8; color: #1877f2; }
.share-btn.whatsapp { background: #e8f8ef; color: #25d366; }

/* ─────────────────────────────────────────────
   FEATURED IMAGE
───────────────────────────────────────────── */
.featured-image {
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
}

.featured-image .article-container { max-width: 100%; padding: 0; }
.featured-image img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ─────────────────────────────────────────────
   ARTICLE BODY — 2-COLUMN LAYOUT (content + sidebar)
───────────────────────────────────────────── */
.article-body { padding: 36px 0 60px; }

.article-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Main article column */
.article-main { min-width: 0; }

/* Table of contents */
.toc-box {
    background: var(--gold-pale);
    border-left: 4px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 18px 22px;
    margin-bottom: 30px;
}

.toc-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-box ol {
    margin: 0 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-box ol a {
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
}

.toc-box ol a:hover { color: var(--gold-dark); }

/* Article content typography */
.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-pale);
    line-height: 1.3;
}

.article-content h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--navy);
    margin: 28px 0 12px;
}

.article-content p  { margin-bottom: 20px; }

.article-content ul,
.article-content ol { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 8px; }

.article-content a {
    color: var(--gold-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content strong { color: var(--navy); }

.article-content blockquote {
    border-left: 4px solid var(--gold);
    background: var(--gold-pale);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--navy-mid);
}

/* Info / key-points box */
.info-box {
    background: var(--gold-pale);
    border-left: 4px solid var(--gold);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
}

.info-box strong {
    display: block;
    color: var(--navy);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.info-box ul  { margin: 0 0 0 18px; }
.info-box li  { margin-bottom: 5px; color: var(--text); font-size: 15px; }

/* In-article app CTA */
.sabaq-cta {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid), #1a3a8a);
    border-radius: 16px;
    padding: 28px;
    color: var(--white);
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.sabaq-cta::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,166,35,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.sabaq-cta h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gold);
}

.sabaq-cta p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.6;
}

.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.2s;
}

.cta-btn:hover { transform: translateY(-2px); }
.cta-btn.apple  { background: var(--gold);                    color: var(--navy); }
.cta-btn.google { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.3); }

/* Article tags */
.tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 28px 0;
}

.tag {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 50px;
    background: var(--gold-pale);
    color: var(--gold-dark);
    font-weight: 500;
    border: 1px solid rgba(245,166,35,0.2);
}

.tag:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* FAQ in article */
.faq-in-article { margin-top: 36px; }

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-item h3 {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    margin: 0;
}

.faq-item p {
    padding: 14px 20px;
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.75;
    margin: 0;
}

/* ─────────────────────────────────────────────
   ARTICLE SIDEBAR
───────────────────────────────────────────── */
.article-sidebar {
    position: sticky;
    top: 80px;
}

/* Sidebar app CTA card */
.sidebar-app-cta {
    background: linear-gradient(135deg, var(--navy), #1a3a8a);
    border-radius: 16px;
    padding: 20px;
    color: var(--white);
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-app-cta h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
}

.sidebar-app-cta p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 14px;
}

.sidebar-app-cta .cta-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.sidebar-app-cta .cta-btn.apple  { background: var(--gold);   color: var(--navy); }
.sidebar-app-cta .cta-btn.google { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.3); }

/* Sidebar generic card */
.sidebar-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.sidebar-card h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 14px;
}

/* Sidebar related posts */
.sidebar-related a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-related a:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-related .rel-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.4;
    display: block;
}

.sidebar-related a:hover .rel-title { color: var(--gold-dark); }

.sidebar-related .rel-cat {
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 3px;
    display: block;
}

/* ─────────────────────────────────────────────
   RELATED POSTS SECTION (BELOW ARTICLE)
───────────────────────────────────────────── */
.related-section {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 48px 0;
}

.related-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.blog-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 28px 24px;
    font-size: 13px;
    line-height: 1.8;
}

.blog-footer a       { color: var(--gold-light); }
.blog-footer a:hover { color: var(--white); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .post-card.featured { grid-column: span 2; flex-direction: column; }
    .post-card.featured .card-image { width: 100%; height: 220px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-wrap { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

@media (max-width: 768px) {
    .blog-hero h1          { font-size: 28px; }
    .blog-hero p           { font-size: 15px; }
    .article-header h1     { font-size: 26px; }
    .article-content       { font-size: 16px; }
    .article-content h2    { font-size: 21px; }
    .posts-grid            { grid-template-columns: 1fr; }
    .post-card.featured    { grid-column: span 1; }
    .related-grid          { grid-template-columns: 1fr; }
    .sabaq-cta             { padding: 20px; }
    .blog-nav .nav-links   { display: none; }
    .featured-image img    { max-height: 320px; }
    .article-wrap          { padding: 0 16px; }
}
