/* =====================================================
   SARKARI CENTRAL THEME STYLES
   Based on the 3-column notice-board prototype.
   Includes prototype styles + single-post / archive styles
   that the prototype did not cover.
   ===================================================== */

:root {
	--ink: #1a1a1a;
	--ink-2: #333;
	--ink-3: #666;
	--ink-4: #999;
	--line: #ddd;
	--line-2: #eee;
	--bg: #fff;
	--bg-alt: #f8f8f8;

	--red: #c0392b;
	--red-dark: #a02818;
	--red-bg: #fdf2f0;
	--blue: #1b55b2;
	--green: #2d7d3f;
	--orange: #d97706;

	--ad-bg: #fafafa;
	--ad-border: #d4d4d4;

	--max: 1200px;
	--gutter: 14px;
}

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

html { scroll-behavior: smooth; }

body {
	background: var(--bg);
	color: var(--ink);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color .1s; }
a:hover { color: var(--red); text-decoration: underline; }

ul, ol { list-style: none; }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px;
	overflow: hidden;
}
.skip-link:focus {
	position: absolute; top: 8px; left: 8px; z-index: 9999;
	background: var(--ink); color: #fff;
	padding: 6px 12px; clip: auto !important; width: auto; height: auto;
}

/* ===== UTILITY BAR ===== */
.utility-bar { background: var(--ink); color: #d4d4d4; font-size: 13px; border-bottom: 3px solid var(--red); }
.util-row { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.util-left { display: flex; align-items: center; gap: 8px; }
.util-left strong { color: #fff; }
.util-sep { color: #555; }
.live-dot { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.util-right { display: flex; gap: 16px; align-items: center; }
.util-right a { color: #d4d4d4; }
.util-right a:hover { color: #fff; text-decoration: none; }
.util-cta { background: var(--red); color: #fff !important; padding: 4px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.util-cta:hover { background: var(--red-dark); }

/* ===== MASTHEAD ===== */
.masthead { background: var(--bg); border-bottom: 1px solid var(--line); }
.masthead-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding: 18px var(--gutter); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none !important; }
.brand:hover { text-decoration: none !important; }
.brand-mark { width: 52px; height: 52px; background: var(--red); color: #fff; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; letter-spacing: -0.5px; }
.brand-name { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.8px; line-height: 1; }
.brand-name span { color: var(--red); }
.tagline { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 6px; font-weight: 500; }
.search-wrap { display: flex; border: 2px solid var(--ink); max-width: 540px; margin-left: auto; width: 100%; }
.search-wrap input { flex: 1; border: none; padding: 11px 14px; font: inherit; font-size: 15px; outline: none; background: #fff; }
.search-wrap input::placeholder { color: var(--ink-4); }
.search-wrap button { background: var(--ink); color: #fff; border: none; padding: 0 24px; font: inherit; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; }
.search-wrap button:hover { background: var(--red); }

/* ===== PRIMARY NAV ===== */
.primary-nav { background: var(--ink); border-top: 1px solid #333; }
.nav-row { display: flex; align-items: center; height: 46px; overflow-x: auto; scrollbar-width: none; }
.nav-row::-webkit-scrollbar { display: none; }
.nav-row a { color: #e0e0e0; font-size: 14px; font-weight: 500; padding: 0 18px; height: 100%; display: flex; align-items: center; white-space: nowrap; text-decoration: none; border-right: 1px solid rgba(255,255,255,.07); }
.nav-row a:hover { background: var(--red-dark); color: #fff; text-decoration: none; }
.nav-active { background: var(--red) !important; color: #fff !important; }

/* ===== AD SLOTS ===== */
.ad-slot {
	margin: 14px 0;
	background: var(--ad-bg);
	min-height: 90px;
	display: flex; align-items: center; justify-content: center;
	position: relative;
	overflow: hidden;
}
.ad-slot--empty { border: 1px dashed var(--ad-border); }
.ad-tag { position: absolute; top: 3px; left: 6px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-4); font-weight: 600; }
.ad-fill { color: var(--ink-4); font-size: 13px; letter-spacing: 1px; font-weight: 500; }
.mobile-sticky-wrap { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); display: none; }
@media (max-width: 640px) {
	.mobile-sticky-wrap { display: block; }
	body { padding-bottom: 60px; }
}

/* ===== WELCOME STRIP ===== */
.welcome-strip { text-align: center; padding: 18px var(--gutter) 12px; }
.welcome-title { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.4px; line-height: 1.25; }
.welcome-sub { font-size: 14px; color: var(--ink-3); margin-top: 6px; }

/* ===== HOT LINKS ROWS ===== */
.hot-row { text-align: center; padding: 10px var(--gutter); background: var(--red-bg); border-top: 1px solid #f5d5cf; border-bottom: 1px solid #f5d5cf; font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
.hot-row a { color: var(--red); font-weight: 700; padding: 0 8px; }
.hot-row a:hover { color: var(--red-dark); }
.hot-row .sep { color: var(--ink-4); font-weight: 400; }
.hot-row-2 { margin-bottom: 14px; }

/* ===== HOT GRID ===== */
.hot-grid { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); margin-bottom: 14px; font-size: 15px; }
.hot-grid td { padding: 12px 14px; border: 1px solid var(--line); text-align: center; width: 25%; }
.hot-grid a { color: var(--blue); font-weight: 600; }
.hot-grid a:hover { color: var(--red); }

/* ===== MAIN 3-COLUMN INDEX ===== */
.main-index { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); }
.main-index .col { vertical-align: top; border-right: 1px solid var(--line); width: 33.33%; padding: 0; }
.main-index .col:last-child { border-right: none; }

.section-head { background: var(--red); color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--red-dark); }
.section-head:first-child { border-top: none; }
.section-head h2 { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; }
.view-more { color: #fff !important; font-size: 12px; font-weight: 500; text-decoration: none; padding: 3px 10px; background: rgba(0,0,0,.15); border-radius: 2px; }
.view-more:hover { background: rgba(0,0,0,.3); text-decoration: none; }
.section-head.full { margin-top: 0; }

.link-list { padding: 6px 0; }
.link-list li { padding: 8px 14px; border-bottom: 1px dashed var(--line-2); font-size: 16px; line-height: 1.45; }
.link-list li:last-child { border-bottom: none; }
.link-list li:hover { background: var(--bg-alt); }
.link-list a { color: var(--blue); font-weight: 500; display: inline; }
.link-list a:hover { color: var(--red); }

.tag-declared, .tag-updated { display: inline-block; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; text-transform: uppercase; letter-spacing: 0.4px; margin-left: 4px; vertical-align: middle; border-radius: 2px; }
.tag-updated { background: var(--orange); }

.link-list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
.link-list-grid li { border-right: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.link-list-grid li:nth-child(3n) { border-right: none; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs { padding: 10px 0; font-size: 13px; color: var(--ink-3); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-4); }
.breadcrumbs a { color: var(--blue); }
.breadcrumbs li:last-child span { color: var(--ink-2); font-weight: 600; }

/* ===== SINGLE PAGE ===== */
.single .post-heading { padding: 10px 0 16px; border-bottom: 2px solid var(--red); margin-bottom: 14px; }
.single .post-heading h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); margin-bottom: 6px; }
.single .post-meta { font-size: 13px; color: var(--ink-3); }
.single .post-meta strong { color: var(--ink-2); }
.single .post-body { padding: 14px 0; font-size: 16px; line-height: 1.65; }
.single .post-body p { margin-bottom: 12px; }
.single .post-body h2, .single .post-body h3 { margin: 16px 0 8px; color: var(--ink); }
.single .post-body h2 { font-size: 20px; }
.single .post-body h3 { font-size: 18px; }
.single .post-body ul, .single .post-body ol { padding-left: 20px; margin-bottom: 12px; list-style: disc outside; }
.single .post-body ol { list-style: decimal outside; }

/* Info tables used on single pages */
.info-table-wrap { margin: 14px 0; border: 1px solid var(--line); background: #fff; }
.info-title { background: var(--red); color: #fff; font-size: 16px; padding: 10px 14px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.info-table th { width: 36%; background: var(--bg-alt); font-weight: 600; color: var(--ink-2); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.info-table-striped thead th { background: var(--ink); color: #fff; text-align: left; }
.info-table-striped tbody tr:nth-child(even) { background: var(--bg-alt); }
.info-total { padding: 10px 14px; font-size: 15px; border-top: 1px solid var(--line-2); }

/* "Some Useful Important Links" table */
.useful-links .info-table th { width: 50%; }
.btn-apply {
	display: inline-block;
	background: linear-gradient(180deg, #f59e0b, #d97706);
	color: #fff !important;
	padding: 10px 22px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 3px;
	text-decoration: none !important;
	box-shadow: 0 2px 0 #b45309;
}
.btn-apply:hover { background: linear-gradient(180deg, #fbbf24, #f59e0b); }

/* Related strip */
.related-strip { margin: 24px 0; border: 1px solid var(--line); background: #fff; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.related-group { border-right: 1px solid var(--line); padding: 10px 0; }
.related-group:last-child { border-right: none; }
.related-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-2); padding: 6px 14px 10px; border-bottom: 1px solid var(--line-2); }

/* ===== ARCHIVE TABLES ===== */
.archive-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 15px; margin-top: 8px; }
.archive-table th, .archive-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
.archive-table thead th { background: var(--ink); color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; font-size: 13px; }
.archive-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.archive-table tbody tr:hover { background: var(--red-bg); }

.pagination { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); color: var(--blue); font-weight: 600; font-size: 14px; }
.pagination .page-numbers.current { background: var(--red); color: #fff; border-color: var(--red); }
.pagination .page-numbers:hover { background: var(--red-bg); text-decoration: none; }

/* ===== FOOTER ===== */
.site-footer { background: var(--ink); color: #a8a8a8; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 36px var(--gutter) 28px; }
.foot-brand .brand-name { color: #fff; font-size: 24px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.foot-brand .brand-name span { color: var(--red); }
.brand-mark-sm { background: var(--red); color: #fff !important; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.foot-brand p { font-size: 14px; line-height: 1.6; max-width: 360px; }
.site-footer h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 14px; font-weight: 700; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: #a8a8a8; font-size: 14px; }
.site-footer ul a:hover { color: #fff; text-decoration: none; }
.foot-bottom { border-top: 1px solid #333; padding: 16px 0; font-size: 12px; color: #777; }
.foot-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
	.masthead-grid { grid-template-columns: 1fr; gap: 14px; }
	.search-wrap { margin-left: 0; max-width: 100%; }
	.main-index, .main-index tbody, .main-index tr { display: block; width: 100%; }
	.main-index .col { display: block; width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
	.main-index .col:last-child { border-bottom: none; }
	.hot-grid, .hot-grid tbody, .hot-grid tr { display: block; width: 100%; }
	.hot-grid tr { display: grid; grid-template-columns: 1fr 1fr; }
	.hot-grid td { width: 100%; }
	.link-list-grid { grid-template-columns: repeat(2, 1fr); }
	.link-list-grid li:nth-child(3n) { border-right: 1px dashed var(--line-2); }
	.link-list-grid li:nth-child(2n) { border-right: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.related-grid { grid-template-columns: 1fr; }
	.related-group { border-right: none; border-bottom: 1px solid var(--line); }
	.related-group:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
	.welcome-title { font-size: 20px; }
	.hot-row { font-size: 14px; padding: 10px var(--gutter); }
	.hot-row .sep { display: none; }
	.hot-row a { display: block; padding: 4px 0; }
	.hot-grid tr { grid-template-columns: 1fr; }
	.link-list-grid { grid-template-columns: 1fr; }
	.link-list-grid li { border-right: none !important; }
	.link-list li { font-size: 15px; padding: 10px 14px; }
	.section-head h2 { font-size: 15px; }
	.footer-grid { grid-template-columns: 1fr; }
	.util-right { display: none; }
	.brand-name { font-size: 24px; }
	.brand-mark { width: 44px; height: 44px; font-size: 18px; }

	.archive-table thead { display: none; }
	.archive-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.archive-table td { display: block; padding: 4px 12px; border: none; }

	.info-table th, .info-table td { padding: 8px 10px; font-size: 14px; }
	.single .post-heading h1 { font-size: 22px; }
}
