/* ================================================
   GovtJobsTN  -  Complete Custom UI
   Bootstrap 5 base + custom layer
   ================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary:      #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light:#3b82f6;
    --success:      #059669;
    --warning:      #d97706;
    --danger:       #dc2626;
    --saffron:      #f59e0b;
    --navy:         #0f172a;
    --text-main:    #1e293b;
    --text-muted:   #64748b;
    --bg-light:     #f8fafc;
    --border:       #e2e8f0;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
    --shadow-lg:    0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);
    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    16px;
    --font:         'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text-main);
    background: #fff;
    font-size: 15px;
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- Top Bar ---------- */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    padding: 6px 0;
    font-size: .8rem;
}

/* ---------- Navbar ---------- */
#mainNav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0;
    transition: box-shadow .2s;
    z-index: 1030;
}
#mainNav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.1);
}
#mainNav .container { padding-top: 8px; padding-bottom: 8px; }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -.02em;
}
.brand-logo i { color: var(--saffron); font-size: 1.4rem; }
.brand-accent { color: var(--saffron); }

.navbar-nav .nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-main) !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: #eff6ff;
    color: var(--primary) !important;
}
.navbar-nav .nav-link.active { font-weight: 600; }

.btn-search {
    background: var(--primary);
    color: #fff !important;
    border-radius: 999px;
    padding: 7px 18px;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    transition: background .15s;
}
.btn-search:hover { background: var(--primary-dark); color: #fff !important; }

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}
.breadcrumb {
    font-size: .8rem;
    margin: 0;
    background: transparent;
}
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ---------- Hero Section ---------- */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    color: #fff;
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59,130,246,.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245,158,11,.1) 0%, transparent 40%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: .8rem;
    font-weight: 500;
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: .5rem;
}
.hero-highlight {
    background: linear-gradient(135deg, var(--saffron), #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    color: rgba(255,255,255,.75);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: .03em;
}

/* Hero Search */
.hero-search-form { max-width: 640px; margin: 0 auto; }
.hero-search-inner {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    gap: 8px;
}
.search-icon { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: .95rem;
    color: var(--text-main);
    background: transparent;
    padding: 6px 0;
}
.hero-search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.hero-search-btn:hover { background: var(--primary-dark); }

.quick-searches { font-size: .82rem; }
.quick-label { color: rgba(255,255,255,.6); margin-right: 4px; }
.quick-tag {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.85);
    border-radius: 999px;
    padding: 3px 12px;
    margin: 2px;
    font-size: .78rem;
    transition: background .15s;
}
.quick-tag:hover {
    background: rgba(255,255,255,.22);
    color: #fff;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.stat-item {
    padding: 18px 16px;
    border-right: 1px solid var(--border);
    text-align: center;
}
/* FIX: 2-col layout on mobile  -  remove right border on even columns */
.stats-bar .row > .col-6:nth-child(2n) .stat-item { border-right: none; }
.stats-bar .row > .col-6:nth-child(1) .stat-item,
.stats-bar .row > .col-6:nth-child(2) .stat-item { border-bottom: 1px solid var(--border); }
.stat-number { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin: 4px 0; }
.stat-link { font-size: .78rem; font-weight: 600; color: var(--primary); }
.stat-link:hover { text-decoration: underline; }

/* ---------- Section Helpers ---------- */
.section-padded { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.section-subtitle { color: var(--text-muted); margin-top: 4px; }

/* ---------- Category Grid ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-main);
    transition: all .2s;
    box-shadow: var(--shadow-sm);
}
.category-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(30,64,175,.15);
    transform: translateY(-2px);
    color: var(--primary);
}
.category-icon {
    width: 48px; height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}
.category-card:hover .category-icon { background: var(--primary); color: #fff; }
.category-name { font-size: .82rem; font-weight: 600; }
.category-count { font-size: .72rem; color: var(--text-muted); }

/* ---------- Qual Filter Chips ---------- */
.qual-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.qual-chip {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    background: #fff;
    transition: all .15s;
}
.qual-chip:hover, .qual-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- Job Cards (Home) ---------- */
.job-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
}
.job-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.job-card-new { border-color: #86efac; }
.job-card-urgent { border-color: #fcd34d; }

.job-ribbon {
    position: absolute;
    top: 46px;
    right: -2px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 3px 8px 3px 12px;
    border-radius: 4px 0 0 4px;
    z-index: 1;
}
.ribbon-new { background: #16a34a; color: #fff; }
.ribbon-urgent { background: #d97706; color: #fff; }

.job-card-header {
    padding: 14px 16px 12px;
    color: #fff;
}
.header-tn { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.header-central { background: linear-gradient(135deg, #065f46, #059669); }

.job-type-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
}
.post-count {
    font-size: .72rem;
    font-weight: 600;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 3px 10px;
}
.job-org { font-size: .95rem; font-weight: 700; color: #fff; }

.job-card-body { padding: 16px; flex: 1; }
.job-title { font-size: .9rem; font-weight: 600; color: var(--text-main); margin-bottom: 10px; line-height: 1.4; }
.job-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.job-meta-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); }
.job-meta-item i { color: var(--primary-light); flex-shrink: 0; }

.deadline-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 500;
}
.deadline-safe { background: #f0fdf4; color: #166534; }
.deadline-warning { background: #fffbeb; color: #92400e; }
.deadline-urgent { background: #fef2f2; color: #991b1b; }

.deadline-info { display: flex; align-items: center; }
.days-left-badge { font-weight: 700; font-size: .75rem; }

.job-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--bg-light);
}
.btn-view-job {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s;
}
.btn-view-job:hover { background: var(--primary-dark); color: #fff; }
.btn-apply-quick {
    padding: 8px 12px;
    background: #dcfce7;
    color: var(--success);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s;
}
.btn-apply-quick:hover { background: var(--success); color: #fff; }

/* ---------- Info Strip ---------- */
.info-strip {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    padding: 40px 0;
}
.info-strip .col-md-3,
.info-strip .col-6 {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.info-strip-icon {
    font-size: 2rem;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

/* ---------- List Page Header ---------- */
.list-page-header {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #fff;
    padding: 36px 0 28px;
}
.list-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 4px; }
.list-subtitle { color: rgba(255,255,255,.75); font-size: .9rem; margin: 0; }

/* ---------- Filter Panel ---------- */
.filter-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.filter-panel-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 18px;
    font-weight: 600;
    font-size: .9rem;
}
.filter-group { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.filter-group:last-of-type { border-bottom: none; }
.filter-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); display: block; margin-bottom: 8px; }
.filter-radio-group { display: flex; flex-direction: column; gap: 6px; }
.filter-radio { font-size: .875rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.filter-radio input { accent-color: var(--primary); }

/* View toggle */
.view-toggle { display: flex; gap: 4px; }
.view-btn {
    width: 34px; height: 34px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted); font-size: .9rem;
    transition: all .15s;
}
.view-btn.active, .view-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.results-count { font-size: .875rem; color: var(--text-muted); }
.results-count strong { color: var(--text-main); }

/* ---------- Job Cards (List page) ---------- */
.job-card-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: box-shadow .2s, transform .2s;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.job-card-list:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.state-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
}
.pill-tn { background: #eff6ff; color: var(--primary); }
.pill-central { background: #f0fdf4; color: var(--success); }
.post-count-sm { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.job-card-list-title { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.job-card-list-title a { color: var(--text-main); }
.job-card-list-title a:hover { color: var(--primary); }
.job-card-list-org { font-size: .82rem; color: var(--text-muted); }
.info-chip {
    display: inline-flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .75rem;
    color: var(--text-muted);
}
.deadline-text { font-size: .8rem; }

/* Table */
.jobs-table { font-size: .875rem; }
.jobs-table thead th { background: #f1f5f9; font-weight: 600; border-bottom: 2px solid var(--border); color: var(--text-main); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.jobs-table tbody tr:hover td { background: #f8fafc; }

/* ---------- Detail Page ---------- */
.detail-header-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.detail-header-top { margin-bottom: 4px; }
.detail-title { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 4px; }
.detail-org { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 16px; }

.detail-quickstats {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 16px;
    flex-wrap: wrap;
}
.qstat {
    flex: 1 1 auto;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
    text-align: center;
}
.qstat:last-child { border-right: none; }
.qstat i { font-size: 1.1rem; color: var(--primary); margin-bottom: 4px; }
.qstat-val {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}
.qstat-label { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.detail-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.detail-section-title {
    background: var(--bg-light);
    padding: 14px 20px;
    margin: 0;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}
.detail-section-title i { color: var(--primary); }
.detail-section-body { padding: 20px; }
.prose-content p { margin-bottom: .75em; }
.prose-content ul, .prose-content ol { padding-left: 1.25rem; margin-bottom: .75em; }
/* Prevent oversized images inside job description/prose areas */
.prose-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 6px;
}
.prose-content img[src=""],
.prose-content img:not([src]) { display: none; }

.apply-steps { padding-left: 1.2rem; }
.apply-steps li { padding: 6px 0; font-size: .9rem; }

/* Deadline Hero card */
.detail-action-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.deadline-hero { text-align: center; padding: 20px; }
.deadline-hero-safe { background: linear-gradient(135deg, #065f46, #059669); color: #fff; }
.deadline-hero-warning { background: linear-gradient(135deg, #92400e, #d97706); color: #fff; }
.deadline-hero-urgent { background: linear-gradient(135deg, #7f1d1d, #dc2626); color: #fff; }
.deadline-hero-expired { background: var(--bg-light); }
.deadline-hero-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.85); margin-bottom: 4px; }
.deadline-hero-date { font-size: 1.2rem; font-weight: 800; color: #fff; }
.deadline-hero-count { font-size: .85rem; font-weight: 600; margin-top: 4px; color: rgba(255,255,255,.9); }
.action-buttons { border-top: 1px solid var(--border); }

/* Share buttons */
.share-row { display: flex; align-items: center; gap: 8px; }
.share-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.share-btn:hover { opacity: .85; }
.share-whatsapp { background: #25d366; color: #fff; }
.share-telegram { background: #0088cc; color: #fff; }
.share-copy { background: var(--bg-light); color: var(--text-main); border: 1px solid var(--border); }

/* Important dates */
.dates-list { padding: 4px 0; }
.date-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
    flex-wrap: wrap;
}
.date-row:last-child { border-bottom: none; }
.date-row.highlight { background: #fff7ed; margin: 0 -4px; padding: 10px 4px; border-radius: 6px; }
.date-row span { color: var(--text-muted); }

/* Related job cards */
.related-job-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
}
.related-job-card:hover { box-shadow: var(--shadow-md); }
.related-job-org { font-size: .85rem; font-weight: 700; margin: 6px 0 4px; color: var(--text-main); }
.related-job-title { font-size: .8rem; color: var(--text-muted); flex: 1; }

/* ---------- Blog ---------- */
.blog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-body { padding: 24px; }
.blog-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.blog-category { background: #eff6ff; color: var(--primary); border-radius: 999px; padding: 3px 12px; font-size: .72rem; font-weight: 700; }
.blog-date { font-size: .78rem; color: var(--text-muted); }
.blog-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.blog-title a { color: var(--text-main); }
.blog-title a:hover { color: var(--primary); }
.blog-excerpt { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 4rem; display: block; margin-bottom: 16px; opacity: .3; }
.empty-state h4 { font-weight: 700; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); }
.footer-top { padding: 56px 0 40px; }
.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand i { color: var(--saffron); }
.footer-brand span { color: var(--saffron); }
.footer-heading { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .875rem; transition: color .15s; }
.footer-links a:hover { color: var(--saffron); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--saffron); color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 16px 0;
}

/* ---------- Pagination ---------- */
.page-link { border-radius: var(--radius-sm) !important; margin: 0 2px; font-size: .875rem; color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:hover { background: #eff6ff; color: var(--primary-dark); }

/* ---------- Utilities ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.card { border-radius: var(--radius); }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--border); font-size: .875rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hero-section { padding: 48px 0 40px; }
    /* FIX: detail action card  -  not sticky on tablet/mobile, it blocks scrolling */
    .detail-action-card { position: static !important; }
    #mainNav .navbar-collapse { padding: 12px 0; }
    .navbar-nav .nav-link { padding: 10px 14px !important; }
    .filter-panel { margin-bottom: 24px; }
}
@media (max-width: 767px) {
    .hero-title { font-size: 1.75rem; }
    .hero-search-btn { padding: 10px 14px; font-size: .8rem; }
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    /* FIX: quickstats 2-per-row on mobile */
    .qstat { flex: 1 1 45%; }
    .qstat:nth-child(2n) { border-right: none; }
    .qual-filters { display: none; }
    .section-title { font-size: 1.25rem; }
    .list-title { font-size: 1.4rem; }
    /* FIX: deadline bar stacks on mobile */
    .deadline-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
    .days-left-badge { align-self: flex-end; }
    /* FIX: job card footer wraps on small screens */
    .job-card-footer { flex-wrap: wrap; }
    /* FIX: stats bar 2-col  -  clean border management */
    .stats-bar .stat-item { border-right: 1px solid var(--border); padding: 14px 10px; }
    .stats-bar .row > .col-6:nth-child(2n) .stat-item { border-right: none; }
    .stats-bar .row > .col-6:nth-last-child(-n+2) .stat-item { border-bottom: none; }
}
@media (max-width: 480px) {
    .hero-search-inner { flex-direction: column; padding: 12px; border-radius: var(--radius-lg); }
    .hero-search-input { width: 100%; }
    .hero-search-btn { width: 100%; border-radius: var(--radius-sm); }
    .hero-search-form .search-icon { display: none; }
    /* FIX: smaller stat numbers on very small screens */
    .stat-number { font-size: 1.4rem; }
    .detail-title { font-size: 1.3rem; }
    .share-row { flex-wrap: wrap; }
}

/* ================================================
   SEO & Alignment Improvements  -  TNCareerHub 2026
   ================================================ */

/* ------ Exam Links Bar ------ */
.exam-links-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    overflow: hidden;
}
.exam-links-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: wrap;
}
.exam-links-scroll::-webkit-scrollbar { display: none; }
.exam-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    transition: all .15s;
    text-decoration: none;
}
.exam-link-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.exam-link-chip i { font-size: .85rem; }

/* ------ Qualification Blocks ------ */
.qual-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-main);
    transition: all .2s;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.qual-block:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(30,64,175,.12);
    transform: translateY(-2px);
    color: var(--primary);
}
.qual-block-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.qual-block-title { font-size: .9rem; font-weight: 700; }
.qual-block-sub { font-size: .75rem; color: var(--text-muted); }

/* ------ Blog Content Improvements ------ */
.blog-content {
    font-size: .95rem;
    line-height: 1.8;
    color: var(--text-main);
}
.blog-content p { margin-bottom: 1rem; }
.blog-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin: 1.5rem 0 .75rem;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}
.blog-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 1.2rem 0 .5rem;
}
.blog-content strong { color: var(--navy); }
.blog-content ul, .blog-content ol {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}
.blog-content li { margin-bottom: .4rem; }
.blog-content a { color: var(--primary); text-decoration: underline; }
.blog-content a:hover { color: var(--primary-dark); }

/* ------ Detail page alignment fixes ------ */
.detail-wrap { max-width: 1100px; margin: 0 auto; }

/* Fix info table alignment */
.info-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.info-table tr { border-bottom: 1px solid #f0f4f8; }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 10px 14px; vertical-align: top; line-height: 1.5; }
.info-table td:first-child {
    font-weight: 600;
    color: #4a5568;
    width: 40%;
    background: #f8fafc;
    white-space: nowrap;
}
.info-table td:last-child { color: var(--text-main); }

/* Fix elig table */
.elig-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.elig-table th {
    background: #f1f5f9;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4a5568;
    padding: 10px 14px;
}
.elig-table td { padding: 10px 14px; border-bottom: 1px solid #f0f4f8; }
.elig-table tr:last-child td { border-bottom: none; }

/* Fix apply steps */
.apply-steps-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}
.apply-steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: .9rem;
}
.apply-steps-list li:last-child { border-bottom: none; }
.step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.apply-steps-list li strong { display: block; font-weight: 600; margin-bottom: 2px; }
.apply-steps-list li span { color: var(--text-muted); font-size: .83rem; }

/* Fix detail alert boxes */
.detail-alert {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .87rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
}
.detail-alert i { flex-shrink: 0; margin-top: 2px; }
.detail-alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.detail-alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.detail-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }

/* Fix deadline hero in detail page for dark bg */
.deadline-hero-safe    { background: linear-gradient(135deg, #065f46, #059669); color: #fff; }
.deadline-hero-warning { background: linear-gradient(135deg, #92400e, #d97706); color: #fff; }
.deadline-hero-urgent  { background: linear-gradient(135deg, #7f1d1d, #dc2626); color: #fff; }
.deadline-hero-expired { background: linear-gradient(135deg, #374151, #6b7280); color: #fff; }
.deadline-hero-label   { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.deadline-hero-date    { font-size: 1.35rem; font-weight: 800; margin: 4px 0; }
.deadline-hero-count   { font-size: .85rem; opacity: .9; }

/* Fix sidebar quick info */
.quick-info-list { padding: 0; }
.quick-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.quick-info-row:last-child { border-bottom: none; }
.quick-info-row i { color: var(--primary); font-size: 1rem; width: 18px; flex-shrink: 0; }
.qi-label { color: var(--text-muted); font-size: .76rem; display: block; }
.qi-val { color: var(--text-main); font-weight: 600; }

/* Fix dates list alignment */
.dates-list { padding: 0; }
.date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    font-size: .855rem;
    flex-wrap: wrap;
    gap: 4px;
}
.date-row:last-child { border-bottom: none; }
.date-row span { color: var(--text-muted); }
.date-row.highlight { background: #fff5f5; }
.date-row.highlight strong { color: #dc2626; }

/* Apply buttons */
.btn-apply {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .95rem;
    text-align: center;
    text-decoration: none;
    margin-bottom: 10px;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.btn-apply:hover { opacity: .9; }
.btn-apply-primary { background: #16a34a; color: #fff; }
.btn-apply-primary:hover { background: #15803d; color: #fff; }
.btn-apply-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-apply-outline:hover { background: #eff6ff; color: var(--primary); }

/* fw-600 fw-700 utility */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ------ Mobile fixes ------ */
@media (max-width: 767px) {
    .exam-links-scroll { flex-wrap: nowrap; }
    .qual-block { padding: 12px 14px; gap: 10px; }
    .qual-block-icon { width: 38px; height: 38px; font-size: 1rem; }
    .qual-block-title { font-size: .82rem; }
    .info-table td:first-child { width: 45%; font-size: .8rem; }
    .blog-content { font-size: .9rem; }
    .detail-action-card { position: static !important; }
}


/* ================================================
   SEO & Alignment Improvements - TNCareerHub 2026
   ================================================ */

/* Exam Links Bar */
.exam-links-bar { background:#fff; border-bottom:1px solid var(--border); padding:10px 0; overflow:hidden; }
.exam-links-scroll { display:flex; gap:8px; overflow-x:auto; padding:2px 4px; scrollbar-width:none; -ms-overflow-style:none; flex-wrap:wrap; }
.exam-links-scroll::-webkit-scrollbar { display:none; }
.exam-link-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; background:#f8fafc; border:1px solid var(--border); border-radius:999px; font-size:.78rem; font-weight:600; color:var(--text-main); white-space:nowrap; transition:all .15s; text-decoration:none; }
.exam-link-chip:hover { background:var(--primary); border-color:var(--primary); color:#fff; }
.exam-link-chip i { font-size:.85rem; }

/* Qualification Blocks */
.qual-block { display:flex; align-items:center; gap:14px; padding:16px 18px; background:#fff; border:1px solid var(--border); border-radius:var(--radius); text-decoration:none; color:var(--text-main); transition:all .2s; box-shadow:var(--shadow-sm); height:100%; }
.qual-block:hover { border-color:var(--primary-light); box-shadow:0 4px 16px rgba(30,64,175,.12); transform:translateY(-2px); color:var(--primary); }
.qual-block-icon { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0; }
.qual-block-title { font-size:.9rem; font-weight:700; }
.qual-block-sub { font-size:.75rem; color:var(--text-muted); }

/* Blog Content */
.blog-content { font-size:.95rem; line-height:1.8; color:var(--text-main); }
.blog-content p { margin-bottom:1rem; }
.blog-content h2 { font-size:1.2rem; font-weight:700; color:var(--navy); margin:1.5rem 0 .75rem; padding-bottom:6px; border-bottom:2px solid var(--border); }
.blog-content h3 { font-size:1rem; font-weight:700; color:var(--primary-dark); margin:1.2rem 0 .5rem; }
.blog-content strong { color:var(--navy); }
.blog-content ul, .blog-content ol { padding-left:1.4rem; margin-bottom:1rem; }
.blog-content li { margin-bottom:.4rem; }

/* Info table */
.info-table { width:100%; border-collapse:collapse; font-size:.875rem; }
.info-table tr { border-bottom:1px solid #f0f4f8; }
.info-table tr:last-child { border-bottom:none; }
.info-table td { padding:10px 14px; vertical-align:top; line-height:1.5; }
.info-table td:first-child { font-weight:600; color:#4a5568; width:40%; background:#f8fafc; }
.info-table td:last-child { color:var(--text-main); }

/* Elig table */
.elig-table { width:100%; border-collapse:collapse; font-size:.875rem; }
.elig-table th { background:#f1f5f9; font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#4a5568; padding:10px 14px; }
.elig-table td { padding:10px 14px; border-bottom:1px solid #f0f4f8; }
.elig-table tr:last-child td { border-bottom:none; }

/* Apply steps */
.apply-steps-list { list-style:none !important; padding:0 !important; margin:0; }
.apply-steps-list li { display:flex; align-items:flex-start; gap:14px; padding:12px 0; border-bottom:1px solid #f0f4f8; font-size:.9rem; }
.apply-steps-list li:last-child { border-bottom:none; }
.step-num { width:28px; height:28px; min-width:28px; border-radius:50%; background:var(--primary); color:#fff; font-weight:700; font-size:.8rem; display:flex; align-items:center; justify-content:center; }
.apply-steps-list li strong { display:block; font-weight:600; margin-bottom:2px; }
.apply-steps-list li span { color:var(--text-muted); font-size:.83rem; }

/* Detail alerts */
.detail-alert { border-radius:8px; padding:12px 16px; font-size:.87rem; display:flex; align-items:flex-start; gap:10px; margin-top:14px; }
.detail-alert i { flex-shrink:0; margin-top:2px; }
.detail-alert-warning { background:#fffbeb; border:1px solid #fde68a; color:#78350f; }
.detail-alert-info    { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; }
.detail-alert-success { background:#f0fdf4; border:1px solid #bbf7d0; color:#14532d; }

/* Deadline hero dark */
.deadline-hero-safe    { background:linear-gradient(135deg,#065f46,#059669); color:#fff; }
.deadline-hero-warning { background:linear-gradient(135deg,#92400e,#d97706); color:#fff; }
.deadline-hero-urgent  { background:linear-gradient(135deg,#7f1d1d,#dc2626); color:#fff; }
.deadline-hero-expired { background:linear-gradient(135deg,#374151,#6b7280); color:#fff; }
.deadline-hero-label   { font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; opacity:.85; }
.deadline-hero-date    { font-size:1.35rem; font-weight:800; margin:4px 0; }
.deadline-hero-count   { font-size:.85rem; opacity:.9; }

/* Quick info sidebar */
.quick-info-list { padding:0; }
.quick-info-row { display:flex; align-items:center; gap:12px; padding:10px 20px; border-bottom:1px solid var(--border); font-size:.85rem; }
.quick-info-row:last-child { border-bottom:none; }
.quick-info-row i { color:var(--primary); font-size:1rem; width:18px; flex-shrink:0; }
.qi-label { color:var(--text-muted); font-size:.76rem; display:block; }
.qi-val { color:var(--text-main); font-weight:600; }

/* Dates list */
.dates-list { padding:0; }
.date-row { display:flex; justify-content:space-between; align-items:center; padding:10px 20px; border-bottom:1px solid var(--border); font-size:.855rem; flex-wrap:wrap; gap:4px; }
.date-row:last-child { border-bottom:none; }
.date-row span { color:var(--text-muted); }
.date-row.highlight { background:#fff5f5; }
.date-row.highlight strong { color:#dc2626; }

/* Apply buttons */
.btn-apply { display:block; width:100%; padding:12px; border-radius:8px; font-weight:700; font-size:.95rem; text-align:center; text-decoration:none; margin-bottom:10px; border:none; cursor:pointer; transition:opacity .15s; }
.btn-apply:hover { opacity:.9; }
.btn-apply-primary { background:#16a34a; color:#fff; }
.btn-apply-primary:hover { background:#15803d; color:#fff; }
.btn-apply-outline { background:#fff; color:var(--primary); border:2px solid var(--primary); }
.btn-apply-outline:hover { background:#eff6ff; color:var(--primary); }

/* Mobile */
@media (max-width:767px) {
    .exam-links-scroll { flex-wrap:nowrap; }
    .qual-block { padding:12px 14px; gap:10px; }
    .qual-block-icon { width:38px; height:38px; font-size:1rem; }
    .qual-block-title { font-size:.82rem; }
    .info-table td:first-child { width:45%; font-size:.8rem; }
    .blog-content { font-size:.9rem; }
    .detail-action-card { position:static !important; }
}

/* ================================================
   Result & Admit Card Cards - Fix Alignment & BG
   ================================================ */

/* Result / Admit Card page cards */
.result-card, .admit-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.result-card:hover, .admit-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Result card header */
.result-card-header {
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, #065f46, #059669);
    color: #fff;
}
.admit-card-header {
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, #92400e, #d97706);
    color: #fff;
}
.result-card-header.header-tn,
.admit-card-header.header-tn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* Card badge */
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
    margin-bottom: 8px;
}

/* Card body */
.result-card-body, .admit-card-body {
    padding: 16px;
    flex: 1;
}
.result-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}
.result-card-org {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.result-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.result-meta-row i { color: var(--primary-light); flex-shrink: 0; }
.result-meta-row strong { color: var(--text-main); }

/* Card footer */
.result-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-check-result {
    display: block;
    text-align: center;
    padding: 9px 12px;
    background: #059669;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 700;
    transition: background .15s;
    text-decoration: none;
}
.btn-check-result:hover { background: #047857; color: #fff; }
.btn-download-merit {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s;
    text-decoration: none;
}
.btn-download-merit:hover { background: #eff6ff; color: var(--primary); }
.btn-full-details {
    display: block;
    text-align: center;
    padding: 7px 12px;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 500;
    transition: background .15s;
    text-decoration: none;
}
.btn-full-details:hover { background: var(--bg-light); color: var(--text-main); }

/* Admit card download button */
.btn-download-admit {
    display: block;
    text-align: center;
    padding: 9px 12px;
    background: #d97706;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 700;
    transition: background .15s;
    text-decoration: none;
}
.btn-download-admit:hover { background: #b45309; color: #fff; }

/* Page header for results/admit cards */
.results-page-header {
    background: linear-gradient(135deg, #065f46, #047857);
    color: #fff;
    padding: 36px 0 28px;
}
.admit-page-header {
    background: linear-gradient(135deg, #92400e, #b45309);
    color: #fff;
    padding: 36px 0 28px;
}

/* Exam Landing Page Header */
.exam-page-header {
    color: #fff;
    padding: 36px 0 28px;
}

/* Blog Content Styling */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: .88rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.blog-content table thead th {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    padding: 12px 16px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
}
.blog-content table tbody tr {
    border-bottom: 1px solid #f0f4f8;
    transition: background .15s;
}
.blog-content table tbody tr:hover { background: #f0f7ff; }
.blog-content table tbody tr:last-child { border-bottom: none; }
.blog-content table tbody td {
    padding: 12px 16px;
    color: #1e293b;
    vertical-align: top;
    line-height: 1.6;
}
.blog-content table tbody td:first-child {
    font-weight: 600;
    color: #374151;
    background: #f8fafc;
    width: 35%;
}
.blog-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}
.blog-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 24px 0 10px;
}
.blog-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin: 20px 0 8px;
}
.blog-content p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: #374151;
    font-size: .95rem;
}
.blog-content ul, .blog-content ol {
    margin: 12px 0 16px 20px;
    line-height: 1.8;
    color: #374151;
    font-size: .95rem;
}
.blog-content li { margin-bottom: 6px; }
.blog-content strong { color: #1e293b; }
.blog-content blockquote {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-size: .92rem;
    color: #1e40af;
}
.blog-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 32px 0;
}
@media(max-width:767px) {
    .blog-content table { font-size: .8rem; }
    .blog-content table thead th,
    .blog-content table tbody td { padding: 8px 10px; }
    .blog-content table tbody td:first-child { width: auto; }
}

/* ============================================================
   TNCareerHub — Design System v2 (Reference alignment)
   Matches reference homepage: Sora font, navy primary palette
   ============================================================ */

/* ── Design tokens matching reference ── */
:root {
  --tnc-primary:       #1a3a6e;
  --tnc-primary-light: #2651a3;
  --tnc-accent:        #e8431a;
  --tnc-accent-soft:   #fff0ec;
  --tnc-gold:          #d4930a;
  --tnc-gold-light:    #fef9ec;
  --tnc-green:         #0e7c4a;
  --tnc-green-light:   #edfaf3;
  --tnc-surface:       #f5f7fc;
  --tnc-surface2:      #eef1f8;
  --tnc-border:        #dde2ef;
  --tnc-text:          #111827;
  --tnc-text-muted:    #64748b;
  --tnc-text-light:    #94a3b8;
  --tnc-radius:        12px;
  --tnc-radius-sm:     8px;
  --tnc-shadow-sm:     0 1px 4px rgba(26,58,110,0.08);
  --tnc-shadow:        0 4px 16px rgba(26,58,110,0.10);
  --tnc-shadow-lg:     0 8px 32px rgba(26,58,110,0.14);
}

/* ── Font stack — load Sora for headings ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Noto+Sans+Tamil:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
}

/* ── TNPSC Quick-Nav Bar (reference design) ── */
.tnpsc-subnav {
  background: var(--tnc-primary-light);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.tnpsc-subnav::-webkit-scrollbar { display: none; }
.tnpsc-subnav-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: 16px;
  padding: 10px 0;
  flex-shrink: 0;
}
.tnpsc-subnav a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  display: block;
}
.tnpsc-subnav a:hover,
.tnpsc-subnav a.active {
  color: #fff;
  border-bottom-color: #f9a825;
}

/* ── Section layout helpers ── */
.tnc-section { padding: 48px 0; }
.tnc-section-alt { background: var(--tnc-surface); }

.tnc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.tnc-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--tnc-text);
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.tnc-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.tnc-pill-red   { background: #fee2e2; color: #b91c1c; }
.tnc-pill-blue  { background: #dbeafe; color: #1d4ed8; }
.tnc-pill-green { background: #dcfce7; color: #15803d; }
.tnc-pill-gold  { background: #fef9c3; color: #854d0e; }

.tnc-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--tnc-primary-light);
  text-decoration: none;
  white-space: nowrap;
}
.tnc-see-all:hover { text-decoration: underline; color: var(--tnc-primary-light); }

.tnc-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tnc-border), transparent);
  margin: 0 20px;
}

/* ── TNPSC Cards (Section 1) ── */
.tnc-exam-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tnc-exam-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 20px 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  color: var(--tnc-text);
}
.tnc-exam-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.tnc-exam-card.g1::before { background: linear-gradient(90deg,#1a3a6e,#2651a3); }
.tnc-exam-card.g2::before { background: linear-gradient(90deg,#0e7c4a,#15a062); }
.tnc-exam-card.g4::before { background: linear-gradient(90deg,#d4930a,#f59e0b); }
.tnc-exam-card.vao::before { background: linear-gradient(90deg,#7c3aed,#a855f7); }
.tnc-exam-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-2px);
  border-color: transparent;
  color: var(--tnc-text);
}
.tnc-exam-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.g1 .tnc-exam-icon { background: #eff2fc; }
.g2 .tnc-exam-icon { background: #edfaf3; }
.g4 .tnc-exam-icon { background: #fef9ec; }
.vao .tnc-exam-icon { background: #f5f3ff; }
.tnc-exam-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--tnc-text);
}
.tnc-exam-card-sub {
  font-size: 12px;
  color: var(--tnc-text-muted);
  margin-top: 2px;
}
.tnc-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tnc-chip {
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--tnc-text-muted);
  background: var(--tnc-surface);
  text-decoration: none;
  transition: all .15s;
  border: 1px solid var(--tnc-border);
}
.tnc-chip:hover {
  background: var(--tnc-primary);
  color: #fff;
  border-color: var(--tnc-primary);
}
.tnc-exam-notify {
  font-size: 12px;
  font-weight: 600;
  color: var(--tnc-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Current Affairs Grid (Section 2) ── */
.tnc-ca-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
}
.tnc-ca-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  overflow: hidden;
  text-decoration: none;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  color: var(--tnc-text);
}
.tnc-ca-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-2px);
  border-color: transparent;
  color: var(--tnc-text);
}
.tnc-ca-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}
.tnc-ca-card:first-child .tnc-ca-img { height: 200px; }
.tnc-ca-img-blue  { background: linear-gradient(135deg,#dbeafe,#bfdbfe); }
.tnc-ca-img-green { background: linear-gradient(135deg,#dcfce7,#bbf7d0); }
.tnc-ca-img-gold  { background: linear-gradient(135deg,#fef9c3,#fde68a); }
.tnc-ca-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tnc-ca-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tnc-ca-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.tnc-ca-date { font-size: 11.5px; color: var(--tnc-text-muted); font-family: 'JetBrains Mono', monospace; }
.tnc-ca-title { font-size: 14px; font-weight: 600; color: var(--tnc-text); line-height: 1.4; }
.tnc-ca-card:first-child .tnc-ca-title { font-size: 16px; }
.tnc-ca-excerpt { font-size: 12.5px; color: var(--tnc-text-muted); line-height: 1.5; }
.tnc-ca-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--tnc-border);
}
.tnc-ca-read { font-size: 12px; font-weight: 600; color: var(--tnc-primary-light); }
.tnc-ca-exam-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tnc-ca-exam-tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }

/* ── Quiz Banner (Section 3) ── */
.tnc-quiz-banner {
  background: linear-gradient(135deg,#0d2550 0%,#1e4a8a 60%,#1a3a6e 100%);
  border-radius: var(--tnc-radius);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.tnc-quiz-banner::before {
  content: '';
  position: absolute;
  right: -20px; top: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(249,168,37,.12);
  pointer-events: none;
}
.tnc-quiz-icon { font-size: 64px; flex-shrink: 0; }
.tnc-quiz-content { flex: 1; }
.tnc-quiz-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f9d058;
  margin-bottom: 8px;
}
.tnc-quiz-title { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -.3px; }
.tnc-quiz-sub { font-size: 14px; color: rgba(255,255,255,.68); margin-bottom: 20px; }
.tnc-quiz-stats { display: flex; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.tnc-quiz-stat-val { font-size: 22px; font-weight: 800; color: #f9a825; }
.tnc-quiz-stat-label { font-size: 11.5px; color: rgba(255,255,255,.6); }
.tnc-quiz-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Updates / Announcements (Section 4) ── */
.tnc-updates-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}
.tnc-updates-list {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  overflow: hidden;
}
.tnc-update-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--tnc-surface2);
  text-decoration: none;
  transition: background .15s;
  color: var(--tnc-text);
}
.tnc-update-item:last-child { border-bottom: none; }
.tnc-update-item:hover { background: var(--tnc-surface); }
.tnc-update-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.dot-red   { background: var(--tnc-accent); }
.dot-blue  { background: var(--tnc-primary-light); }
.dot-green { background: var(--tnc-green); }
.dot-gold  { background: var(--tnc-gold); }
.tnc-update-title { font-size: 13.5px; font-weight: 600; color: var(--tnc-text); line-height: 1.4; margin-bottom: 4px; }
.tnc-update-meta { font-size: 11.5px; color: var(--tnc-text-muted); display: flex; gap: 10px; align-items: center; }
.tnc-update-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--tnc-accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: .5px;
}

/* Countdown card */
.tnc-countdown-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tnc-countdown-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tnc-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tnc-countdown-item {
  border-bottom: 1px solid var(--tnc-surface2);
  padding-bottom: 12px;
}
.tnc-countdown-item:last-child { border-bottom: none; padding-bottom: 0; }
.tnc-countdown-exam { font-size: 14px; font-weight: 700; color: var(--tnc-text); margin-bottom: 6px; }
.tnc-countdown-timer { display: flex; gap: 8px; align-items: center; }
.tnc-timer-unit { text-align: center; }
.tnc-timer-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--tnc-primary);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  display: block;
}
.tnc-timer-label { font-size: 10px; color: var(--tnc-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.tnc-timer-sep { font-size: 20px; font-weight: 700; color: var(--tnc-border); line-height: 1; }

/* ── Job Cards (Section 5) ── */
.tnc-jobs-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
.tnc-job-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
  color: var(--tnc-text);
}
.tnc-job-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-1px);
  border-color: transparent;
  color: var(--tnc-text);
}
.tnc-job-card-top { display: flex; gap: 12px; align-items: flex-start; }
.tnc-job-logo {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: var(--tnc-surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--tnc-border);
}
.tnc-job-org { font-size: 12px; color: var(--tnc-text-muted); font-weight: 500; margin-bottom: 2px; }
.tnc-job-title { font-size: 14px; font-weight: 700; color: var(--tnc-text); line-height: 1.3; }
.tnc-job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tnc-job-tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 500;
  background: var(--tnc-surface);
  color: var(--tnc-text-muted);
  border: 1px solid var(--tnc-border);
}
.tnc-job-tag.posts    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tnc-job-tag.deadline { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tnc-job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--tnc-surface2);
}
.tnc-job-date { font-size: 11.5px; color: var(--tnc-text-light); font-family: 'JetBrains Mono', monospace; }
.tnc-job-apply { font-size: 12px; font-weight: 700; color: var(--tnc-accent); }

/* ── Materials / PYQ+Notes (Section 6) ── */
.tnc-materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tnc-materials-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  overflow: hidden;
}
.tnc-materials-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--tnc-surface2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tnc-materials-header-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tnc-text);
}
.tnc-material-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--tnc-surface2);
  transition: background .15s;
  color: var(--tnc-text);
}
.tnc-material-item:last-child { border-bottom: none; }
.tnc-material-item:hover { background: var(--tnc-surface); }
.tnc-material-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tnc-material-icon.pdf  { background: #fee2e2; }
.tnc-material-icon.note { background: #dbeafe; }
.tnc-material-title { font-size: 13.5px; font-weight: 600; color: var(--tnc-text); }
.tnc-material-sub   { font-size: 11.5px; color: var(--tnc-text-muted); }
.tnc-material-action {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--tnc-border);
  color: var(--tnc-text-muted);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.tnc-material-action:hover { background: var(--tnc-primary); color: #fff; border-color: var(--tnc-primary); }

/* ── Hall Tickets (Section 7) ── */
.tnc-tickets-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.tnc-ticket-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 16px;
  text-decoration: none;
  text-align: center;
  transition: all .2s;
  color: var(--tnc-text);
}
.tnc-ticket-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-2px);
  border-color: var(--tnc-primary-light);
  color: var(--tnc-text);
}
.tnc-ticket-icon { font-size: 32px; margin-bottom: 10px; }
.tnc-ticket-exam { font-size: 14px; font-weight: 700; color: var(--tnc-text); margin-bottom: 4px; }
.tnc-ticket-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 10px;
}
.tnc-status-live   { background: #dcfce7; color: #15803d; }
.tnc-status-soon   { background: #fff7ed; color: #c2410c; }
.tnc-status-result { background: #dbeafe; color: #1d4ed8; }
.tnc-ticket-date   { font-size: 11.5px; color: var(--tnc-text-muted); }
.tnc-ticket-btn {
  display: block;
  margin-top: 12px;
  padding: 7px;
  background: var(--tnc-surface);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tnc-primary);
  transition: all .15s;
}
.tnc-ticket-card:hover .tnc-ticket-btn { background: var(--tnc-primary); color: #fff; }

/* ── CTA Buttons (shared) ── */
.tnc-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .18s;
  border: none;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
}
.tnc-btn-primary { background: var(--tnc-accent); color: #fff; }
.tnc-btn-primary:hover { background: #c73515; transform: translateY(-1px); color: #fff; }
.tnc-btn-gold { background: #f9a825; color: #1a2a00; }
.tnc-btn-gold:hover { background: #e8971a; color: #1a2a00; }
.tnc-btn-outline {
  background: transparent;
  border: 1.5px solid var(--tnc-border);
  color: var(--tnc-text-muted);
}
.tnc-btn-outline:hover { background: var(--tnc-primary); color: #fff; border-color: var(--tnc-primary); }

/* ── Inner-page hero (consistent across all section pages) ── */
.tnc-page-hero {
  background: linear-gradient(135deg, #0d2550 0%, #1a3a6e 60%, #1e4a8a 100%);
  padding: 36px 0 32px;
  position: relative;
  overflow: hidden;
}
.tnc-page-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,168,37,.1) 0%, transparent 70%);
  pointer-events: none;
}
.tnc-page-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f9d058;
  margin-bottom: 8px;
}
.tnc-page-hero h1 {
  font-size: clamp(22px,4vw,32px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.tnc-page-hero-sub { font-size: 15px; color: rgba(255,255,255,.68); margin-bottom: 0; }
.tnc-breadcrumb-hero {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
}
.tnc-breadcrumb-hero a { color: rgba(255,255,255,.7); text-decoration: none; }
.tnc-breadcrumb-hero a:hover { color: #fff; }
.tnc-breadcrumb-sep { color: rgba(255,255,255,.35); }

/* ── Chip tabs (used in inner pages for filtering) ── */
.tnc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tnc-filter-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--tnc-border);
  background: #fff;
  color: var(--tnc-text-muted);
  text-decoration: none;
  transition: all .15s;
}
.tnc-filter-chip:hover,
.tnc-filter-chip.active {
  background: var(--tnc-primary);
  border-color: var(--tnc-primary);
  color: #fff;
}

/* ── Article / content cards used across CA, Blog, Notes ── */
.tnc-article-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
  color: var(--tnc-text);
  height: 100%;
}
.tnc-article-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-2px);
  border-color: transparent;
  color: var(--tnc-text);
}
.tnc-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tnc-article-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: #dbeafe;
  color: #1d4ed8;
}
.tnc-article-date {
  font-size: 11.5px;
  color: var(--tnc-text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.tnc-article-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--tnc-text);
  line-height: 1.4;
}
.tnc-article-excerpt {
  font-size: 13px;
  color: var(--tnc-text-muted);
  line-height: 1.6;
}
.tnc-article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--tnc-surface2);
}
.tnc-read-more { font-size: 12.5px; font-weight: 600; color: var(--tnc-primary-light); }

/* ── Pagination ── */
.tnc-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 0;
}
.tnc-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--tnc-border);
  background: #fff;
  color: var(--tnc-text-muted);
  text-decoration: none;
  transition: all .15s;
}
.tnc-page-btn.active,
.tnc-page-btn:hover { background: var(--tnc-primary); border-color: var(--tnc-primary); color: #fff; }
.tnc-page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Sidebar ── */
.tnc-sidebar-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.tnc-sidebar-card-header {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tnc-text);
  border-bottom: 1px solid var(--tnc-surface2);
  background: var(--tnc-surface);
}
.tnc-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--tnc-surface2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--tnc-text);
  transition: background .15s;
}
.tnc-sidebar-link:last-child { border-bottom: none; }
.tnc-sidebar-link:hover { background: var(--tnc-surface); }
.tnc-sidebar-cta {
  display: block;
  margin: 8px 12px 12px;
  padding: 9px;
  text-align: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--tnc-primary);
  color: #fff;
  transition: background .15s;
}
.tnc-sidebar-cta:hover { background: var(--tnc-primary-light); color: #fff; }
.tnc-sidebar-cta.gold { background: #f9a825; color: #1a2a00; }
.tnc-sidebar-cta.gold:hover { background: #e8971a; }
.tnc-sidebar-cta.outline {
  background: transparent;
  border: 1.5px solid var(--tnc-border);
  color: var(--tnc-text-muted);
}
.tnc-sidebar-cta.outline:hover { background: var(--tnc-primary); border-color: var(--tnc-primary); color: #fff; }

/* ── Rich Content (Syllabus / Article body) ── */
.tnc-rich-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--tnc-text);
}
.tnc-rich-content h1,
.tnc-rich-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tnc-primary);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tnc-border);
}
.tnc-rich-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tnc-primary-light);
  margin: 24px 0 10px;
}
.tnc-rich-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tnc-text);
  margin: 18px 0 8px;
}
.tnc-rich-content p { margin-bottom: 16px; }
.tnc-rich-content ul,
.tnc-rich-content ol {
  margin: 8px 0 16px 24px;
  line-height: 1.8;
}
.tnc-rich-content li { margin-bottom: 6px; }
.tnc-rich-content strong { color: var(--tnc-text); font-weight: 700; }
.tnc-rich-content blockquote {
  border-left: 4px solid var(--tnc-primary-light);
  background: var(--tnc-surface);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  font-size: .93rem;
  color: var(--tnc-primary);
}
.tnc-rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .88rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tnc-rich-content table th {
  background: var(--tnc-primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  font-size: .84rem;
  white-space: nowrap;
}
.tnc-rich-content table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--tnc-border);
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 100px;
}
.tnc-rich-content table tr:nth-child(even) td { background: var(--tnc-surface); }
.tnc-rich-content table tr:hover td { background: #e0e7ff; }
.tnc-rich-content hr {
  border: none;
  border-top: 2px solid var(--tnc-border);
  margin: 32px 0;
}
/* CRITICAL: Prevent giant images inside rich content */
.tnc-rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: var(--tnc-radius-sm);
  border: 1px solid var(--tnc-border);
}
/* Hide empty/broken images that show as large empty boxes */
.tnc-rich-content img[src=""],
.tnc-rich-content img:not([src]) {
  display: none;
}

/* Tamil content rendering */
.tnc-tamil-summary {
  font-family: 'Noto Sans Tamil', 'Sora', sans-serif;
  background: linear-gradient(135deg, var(--tnc-surface), #eef6ff);
  border-left: 4px solid var(--tnc-primary-light);
  border-radius: 0 var(--tnc-radius-sm) var(--tnc-radius-sm) 0;
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--tnc-text);
}
.tnc-tamil-summary strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--tnc-primary-light);
  letter-spacing: .5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  font-family: 'Sora', sans-serif;
}
/* ── Tamil summary rich content — headings, tables, lists ── */
.tnc-tamil-summary h1,
.tnc-tamil-summary h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tnc-primary);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--tnc-border);
  font-family: 'Noto Sans Tamil', 'Sora', sans-serif;
}
.tnc-tamil-summary h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tnc-primary-light);
  margin: 18px 0 8px;
}
.tnc-tamil-summary h4 {
  font-size: .94rem;
  font-weight: 700;
  color: var(--tnc-text);
  margin: 14px 0 6px;
}
.tnc-tamil-summary p {
  margin-bottom: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
}
.tnc-tamil-summary ul,
.tnc-tamil-summary ol {
  margin: 8px 0 14px 20px;
  line-height: 1.9;
  padding-left: 4px;
}
.tnc-tamil-summary li {
  margin-bottom: 5px;
  word-break: break-word;
}
.tnc-tamil-summary strong {
  font-weight: 700;
}
/* Tamil tables — scrollable on mobile, properly styled */
.tnc-tamil-summary table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .86rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: normal;
}
.tnc-tamil-summary table th {
  background: var(--tnc-primary);
  color: #fff;
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
  font-family: 'Noto Sans Tamil', 'Sora', sans-serif;
}
.tnc-tamil-summary table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--tnc-border);
  vertical-align: top;
  min-width: 120px;
}
.tnc-tamil-summary table tr:nth-child(even) td { background: #f0f4ff; }
.tnc-tamil-summary table tr:hover td { background: #e0e7ff; }
.tnc-tamil-summary hr {
  border: none;
  border-top: 2px solid var(--tnc-border);
  margin: 24px 0;
}
.tnc-tamil-summary blockquote {
  border-left: 4px solid var(--tnc-primary-light);
  background: rgba(59,130,246,.07);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
  font-size: .92rem;
  font-style: italic;
}

/* ── Cluster page sub-nav chips ── */
.tnc-cluster-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--tnc-border);
}

/* ── Exam pillar quick-access cards ── */
.tnc-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.tnc-cluster-card {
  background: #fff;
  border: 1.5px solid var(--tnc-border);
  border-radius: var(--tnc-radius);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  transition: all .2s;
  color: var(--tnc-text);
}
.tnc-cluster-card:hover {
  box-shadow: var(--tnc-shadow);
  transform: translateY(-2px);
  border-color: var(--tnc-primary-light);
  color: var(--tnc-text);
}
.tnc-cluster-card-icon { font-size: 28px; margin-bottom: 8px; }
.tnc-cluster-card-label { font-size: 13.5px; font-weight: 700; color: var(--tnc-text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .tnc-exam-grid       { grid-template-columns: 1fr 1fr; }
  .tnc-ca-grid         { grid-template-columns: 1fr; }
  .tnc-updates-grid    { grid-template-columns: 1fr; }
  .tnc-jobs-grid       { grid-template-columns: 1fr 1fr; }
  .tnc-materials-grid  { grid-template-columns: 1fr; }
  .tnc-tickets-grid    { grid-template-columns: 1fr 1fr; }
  .tnc-quiz-banner     { flex-direction: column; gap: 24px; padding: 28px 24px; }
  .tnc-cluster-grid    { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .tnc-exam-grid    { grid-template-columns: 1fr; }
  .tnc-jobs-grid    { grid-template-columns: 1fr; }
  .tnc-tickets-grid { grid-template-columns: 1fr 1fr; }
  .tnc-cluster-grid { grid-template-columns: 1fr 1fr; }
  .tnc-page-hero    { padding: 28px 0 24px; }
}

/* ── Global: cap oversized images inside ANY rich content area ─────────────
   Covers: note-body, blog-content, tnc-rich-content, prose-content,
   cluster page body, and any future rich-text wrapper. This is a safety net
   so that even without per-template JS, images never overflow their container. */
.note-body img,
.blog-content img,
.tnc-rich-content img,
.prose-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 12px auto;
  border-radius: 6px;
}
.note-body img[src=""],
.blog-content img[src=""],
.tnc-rich-content img[src=""],
.prose-content img[src=""],
.note-body img:not([src]),
.blog-content img:not([src]),
.tnc-rich-content img:not([src]),
.prose-content img:not([src]) {
  display: none !important;
}

/* ── note-body: full rich content styling (tables, headings, lists, code) ──
   The note-body class wraps CKEditor/Markdown HTML in notes/detail.html.
   Without these rules Bootstrap resets strip all formatting. */
.note-body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--tnc-text);
}
.note-body h1,
.note-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tnc-primary);
  margin: 28px 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--tnc-border);
}
.note-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tnc-primary-light);
  margin: 22px 0 8px;
}
.note-body h4 {
  font-size: .97rem;
  font-weight: 700;
  color: var(--tnc-text);
  margin: 16px 0 6px;
}
.note-body p { margin-bottom: 14px; }
.note-body ul,
.note-body ol {
  margin: 8px 0 14px 24px;
  line-height: 1.85;
  padding-left: 0;
}
.note-body li { margin-bottom: 5px; }
.note-body strong { font-weight: 700; color: var(--tnc-text); }
.note-body em { font-style: italic; }
.note-body hr {
  border: none;
  border-top: 2px solid var(--tnc-border);
  margin: 28px 0;
}
.note-body blockquote {
  border-left: 4px solid var(--tnc-primary-light);
  background: var(--tnc-surface);
  padding: 12px 16px;
  margin: 18px 0;
  border-radius: 0 8px 8px 0;
  font-size: .93rem;
  color: var(--tnc-primary);
}
/* Tables — styled like tnc-rich-content for consistency */
.note-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: .87rem;
  overflow-x: auto;
  display: block;
}
.note-body table th {
  background: var(--tnc-primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 13px;
  text-align: left;
  font-size: .83rem;
  white-space: nowrap;
}
.note-body table td {
  padding: 8px 13px;
  border-bottom: 1px solid var(--tnc-border);
  vertical-align: top;
}
.note-body table tr:nth-child(even) td { background: var(--tnc-surface); }
.note-body table tr:hover td { background: #e0e7ff; }
/* Inline code */
.note-body code {
  background: #f1f5f9;
  border: 1px solid var(--tnc-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .87em;
  font-family: 'JetBrains Mono', monospace;
}
/* Tamil font support inside notes */
.note-body {
  font-family: 'Inter', 'Noto Sans Tamil', system-ui, sans-serif;
}
