/* ════════════════════════════════════════════════════════════════════════
   blog-components.css — shared, reusable blog-post component library.

   Load AFTER /css/blog.css. Provides canonical `.blog-*` component classes
   so individual posts no longer carry duplicated inline <style> blocks.
   Values mirror the components used across the admission/guide posts.

   Components:
     .featured-image.full   — hero whose headline lives in the image (no crop)
     .blog-figure           — captioned inline photo
     .blog-banner           — info/status banner  (+ --info / --success / --alert)
     .blog-table            — data table           (+ .compact, .row-em)
     .blog-cards / .blog-card — card grid          (+ --3 for three columns)
     .blog-bars / .blog-bar — labelled stat bars
     .blog-steps            — numbered step list
     .blog-links            — resource / link grid
     .blog-formula          — highlighted formula / equation box
   ════════════════════════════════════════════════════════════════════════ */

/* ── Hero with a baked-in headline: show the whole image, never crop ── */
.featured-image.full img {
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
}

/* ── Captioned figure (campus / inline photos) ── */
.blog-figure { margin: 22px 0; }
.blog-figure img {
    width: 100%; height: auto; border-radius: 14px; display: block;
    box-shadow: 0 8px 24px rgba(13,27,62,0.14);
}
.blog-figure figcaption { font-size: 0.8rem; color: #6b7280; text-align: center; margin-top: 8px; }

/* ── Info / status banner ── */
.blog-banner {
    display: flex; align-items: center; gap: 16px;
    color: #fff; border-radius: 16px; padding: 18px 22px; margin: 22px 0;
}
.blog-banner i { font-size: 1.9rem; color: #fde68a; flex-shrink: 0; }
.blog-banner .bb-title { font-weight: 800; font-size: 1.02rem; margin: 0 0 2px; }
.blog-banner .bb-text  { font-size: 0.88rem; color: rgba(255,255,255,0.92); margin: 0; line-height: 1.55; }
.blog-banner .bb-text a { color: #fde68a; font-weight: 700; }
.blog-banner .bb-text strong { color: #fff; }
.blog-banner--info    { background: linear-gradient(135deg,#0D1B3E,#1a3a6e); }
.blog-banner--info i  { color: #F5A623; }
.blog-banner--info .bb-text a { color: #F5A623; }
.blog-banner--success { background: linear-gradient(135deg,#065f46,#047857); }
.blog-banner--alert   { background: linear-gradient(135deg,#7f1d1d,#b91c1c); }

/* ── Data table ── */
.blog-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin: 18px 0; }
.blog-table th { background: #0D1B3E; color: #F5A623; padding: 10px 13px; text-align: left; font-weight: 700; }
.blog-table td { padding: 9px 13px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: top; }
.blog-table tr:nth-child(even) td { background: #f9fafb; }
.blog-table tr:hover td { background: #eff6ff; }
.blog-table .row-em td { background: #fff7ed !important; font-weight: 600; }
.blog-table.compact th, .blog-table.compact td { padding: 7px 11px; font-size: 0.82rem; }

/* ── Card grid ── */
.blog-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.blog-cards--3 { grid-template-columns: repeat(3, 1fr); }
.blog-card { background: #f8faff; border: 1.5px solid #c7d2fe; border-radius: 12px; padding: 16px 18px; }
.blog-card h4 { font-size: 0.9rem; font-weight: 800; color: #0D1B3E; margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.blog-card h4 i { color: #F5A623; }
.blog-card ul { list-style: none; padding: 0; margin: 0; }
.blog-card li { font-size: 0.82rem; color: #4b5563; padding: 3px 0 3px 16px; position: relative; }
.blog-card li::before { content: "\203A"; position: absolute; left: 2px; color: #F5A623; font-weight: 700; }

/* ── Labelled stat bars ── */
.blog-bars { margin: 18px 0; }
.blog-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.blog-bar-label { width: 150px; flex-shrink: 0; font-size: 0.88rem; font-weight: 600; color: #1f2937; }
.blog-bar-track { flex: 1; height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.blog-bar-fill { height: 100%; border-radius: 99px; }
.blog-bar-count { font-size: 0.8rem; font-weight: 700; color: #374151; white-space: nowrap; }

/* ── Numbered steps ── */
.blog-steps { counter-reset: blog-step; list-style: none; padding: 0; margin: 16px 0; }
.blog-steps li { counter-increment: blog-step; display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.blog-steps li::before {
    content: counter(blog-step); min-width: 30px; height: 30px; border-radius: 50%;
    background: #0D1B3E; color: #F5A623; font-weight: 800; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.blog-steps li strong { display: block; margin-bottom: 3px; color: #111827; }
.blog-steps li p { margin: 0; font-size: 0.9rem; color: #4b5563; }

/* ── Resource / link grid ── */
.blog-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.blog-links a {
    display: flex; align-items: center; gap: 10px; background: #fafafa;
    border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px;
    font-size: 0.85rem; color: #1f2937; text-decoration: none;
    transition: border-color .2s, background .2s;
}
.blog-links a:hover { background: #f0f4ff; border-color: #c7d2fe; }
.blog-links a i { color: #F5A623; width: 18px; text-align: center; flex-shrink: 0; }
.blog-links a span { line-height: 1.35; }
.blog-links a small { display: block; color: #6b7280; font-size: 0.72rem; font-weight: 400; }

/* ── Highlighted formula / equation box ── */
.blog-formula { background: linear-gradient(135deg,#0D1B3E,#1a3a6e); color: #fff; border-radius: 16px; padding: 24px 28px; margin: 24px 0; text-align: center; }
.blog-formula .bf-title { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #F5A623; font-weight: 700; margin-bottom: 14px; }
.blog-formula .bf-eq { font-size: 1.05rem; font-weight: 700; line-height: 1.7; color: #fff; }
.blog-formula .bf-hl { color: #F5A623; }
.blog-formula .bf-note { margin-top: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.65); }

/* ── Competitiveness / status badges ── */
.cbadge { display: inline-block; font-size: 0.7rem; font-weight: 700; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.cb-xh { background: #fee2e2; color: #b91c1c; }
.cb-h  { background: #ffedd5; color: #c2410c; }
.cb-m  { background: #dbeafe; color: #1d4ed8; }
.cb-a  { background: #dcfce7; color: #15803d; }

/* ── "NEW" badge on a card list item ── */
.blog-card li.new::after { content: "NEW"; font-size: 0.6rem; font-weight: 800; background: #16a34a; color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }

/* ── Section / track header with status tag ── */
.blog-track { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #0D1B3E; font-size: 1rem; margin: 18px 0 4px; }
.blog-track i { color: #F5A623; }
.blog-track .tag { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; border-radius: 5px; padding: 2px 7px; }
.blog-track .tag-open { background: #dcfce7; color: #15803d; }
.blog-track .tag-closed { background: #f3f4f6; color: #6b7280; }

/* ── Checklist (tick / cross) ── */
.blog-checklist { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.blog-checklist li { font-size: 0.9rem; color: #374151; padding-left: 26px; position: relative; }
.blog-checklist li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #16a34a; position: absolute; left: 0; top: 1px; }
.blog-checklist li.no::before { content: "\f00d"; color: #dc2626; }

/* ── Narrow stat-bar label variant ── */
.blog-bars--narrow .blog-bar-label { width: 120px; }

/* ── Mobile ── */
@media (max-width: 640px) {
    .blog-cards, .blog-cards--3, .blog-links, .blog-checklist { grid-template-columns: 1fr; }
    .blog-banner { flex-direction: column; text-align: center; }
    .blog-table { font-size: 0.78rem; }
    .blog-bar-label { width: 110px; }
}
