/*
Theme Name: Gov Portal BD
Theme URI: https://example.com/gov-portal-bd
Author: Your Name
Description: Government office portal theme with notices, tenders, officer directory, Bangla support and Customizer-based office information.
Version: 1.0.0
License: GPL v2 or later
Text Domain: gov-portal-bd
*/

/* ---------- Variables ---------- */
:root {
	--gpb-green: #006a4e;
	--gpb-green-dark: #004d38;
	--gpb-red: #f42a41;
	--gpb-bg: #f4f6f5;
	--gpb-text: #222;
	--gpb-muted: #666;
	--gpb-border: #dde3e0;
	--gpb-white: #fff;
	--gpb-radius: 6px;
	--gpb-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Noto Sans Bengali', 'Noto Sans', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: var(--gpb-text);
	background: var(--gpb-bg);
}
a { color: var(--gpb-green); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--gpb-green-dark); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
ul { margin: 0; }

.container { width: min(1180px, 92%); margin: 0 auto; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: #111;
	height: auto; left: 5px; top: 5px; width: auto; padding: 10px; z-index: 100000;
}

/* ---------- Top bar ---------- */
.top-bar { background: var(--gpb-green-dark); color: #fff; font-size: 14px; }
.top-bar a { color: #fff; }
.top-bar-inner {
	display: flex; justify-content: space-between; flex-wrap: wrap;
	gap: 8px; padding: 6px 0;
}

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--gpb-red); }
.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 20px; padding: 14px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--gpb-green-dark); }
.brand:hover { text-decoration: none; }
.custom-logo { width: 80px; height: auto; }
.emblem {
	width: 72px; height: 72px; border-radius: 50%;
	background: var(--gpb-green); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 20px; border: 4px solid var(--gpb-red);
	flex-shrink: 0;
}
.emblem.big { width: 120px; height: 120px; font-size: 36px; }
.office-bn { display: block; font-size: 22px; font-weight: 700; line-height: 1.3; }
.office-en { display: block; font-size: 15px; color: var(--gpb-muted); }

.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-form { display: flex; margin: 0; }
.search-form label { margin: 0; }
.search-field {
	padding: 8px 12px; border: 1px solid var(--gpb-border);
	border-radius: var(--gpb-radius) 0 0 var(--gpb-radius);
	font: inherit; width: 200px; max-width: 100%;
}
.search-submit {
	padding: 8px 14px; border: 0; background: var(--gpb-green); color: #fff;
	border-radius: 0 var(--gpb-radius) var(--gpb-radius) 0; cursor: pointer; font: inherit;
}

.btn {
	display: inline-block; padding: 8px 16px; border-radius: var(--gpb-radius);
	background: var(--gpb-green); color: #fff; border: 1px solid var(--gpb-green);
	cursor: pointer; font: inherit;
}
.btn:hover, .btn:focus { background: var(--gpb-green-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--gpb-green); }
.btn-outline:hover, .btn-outline:focus { background: var(--gpb-green); color: #fff; }

/* ---------- Navigation ---------- */
.main-nav { background: var(--gpb-green); }
.main-nav .container { position: relative; }
.menu-toggle {
	display: none; background: none; border: 0; color: #fff;
	font: inherit; font-weight: 700; padding: 12px 0; cursor: pointer;
}
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu a { display: block; padding: 12px 16px; color: #fff; font-weight: 600; }
.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	background: var(--gpb-green-dark); text-decoration: none;
}
.nav-menu .sub-menu,
.nav-menu .children {
	display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #fff; list-style: none; margin: 0; padding: 6px 0;
	box-shadow: var(--gpb-shadow); z-index: 50;
}
.nav-menu .sub-menu a,
.nav-menu .children a { color: var(--gpb-text); padding: 8px 16px; font-weight: 400; }
.nav-menu .sub-menu a:hover,
.nav-menu .children a:hover { background: var(--gpb-bg); color: var(--gpb-green); }
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu,
.nav-menu li:hover > .children,
.nav-menu li:focus-within > .children { display: block; }

/* ---------- Notice ticker ---------- */
.notice-ticker { background: #fff8e1; border-bottom: 1px solid var(--gpb-border); }
.ticker-inner { display: flex; align-items: center; gap: 14px; padding: 8px 0; overflow: hidden; }
.ticker-label {
	background: var(--gpb-red); color: #fff; padding: 4px 12px;
	border-radius: 4px; white-space: nowrap;
}
.ticker-wrap { overflow: hidden; flex: 1; position: relative; }
.ticker {
	list-style: none; margin: 0; padding: 0; display: flex; gap: 60px;
	width: max-content; animation: gpb-ticker 40s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
.ticker a { color: var(--gpb-text); white-space: nowrap; }
@keyframes gpb-ticker {
	from { transform: translateX(100%); }
	to   { transform: translateX(-100%); }
}

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(135deg, var(--gpb-green) 0%, var(--gpb-green-dark) 100%);
	color: #fff; padding: 40px 0 70px;
}
.hero h1 { color: #fff; font-size: 32px; }
.hero p { color: #e6f2ee; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.hero-msg {
	background: rgba(255, 255, 255, .08); border-left: 4px solid var(--gpb-red);
	padding: 18px; border-radius: var(--gpb-radius);
}
.hero-msg h3 { color: #fff; margin-bottom: 4px; }
.hero-msg p { color: #fff; }
.hero-image img {
	width: 100%; height: 260px; object-fit: cover;
	border-radius: var(--gpb-radius); box-shadow: var(--gpb-shadow);
}
.hero-placeholder {
	height: 260px; border-radius: var(--gpb-radius);
	background: rgba(255, 255, 255, .1);
	display: flex; align-items: center; justify-content: center;
}

/* ---------- Quick links ---------- */
.quick-links { margin-top: -40px; position: relative; z-index: 2; }
.quick-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
}
.quick-card {
	background: #fff; border-radius: var(--gpb-radius); box-shadow: var(--gpb-shadow);
	padding: 18px; text-align: center; color: var(--gpb-green-dark); font-weight: 600;
	border-bottom: 3px solid var(--gpb-green); transition: transform .15s;
}
.quick-card:hover, .quick-card:focus {
	border-color: var(--gpb-red); text-decoration: none; transform: translateY(-2px);
}
.quick-icon { font-size: 28px; display: block; margin-bottom: 6px; }

/* ---------- Sections & cards ---------- */
.section { padding: 40px 0; }
.section-title {
	font-size: 24px; border-bottom: 2px solid var(--gpb-red);
	display: inline-block; padding-bottom: 4px; margin-bottom: 20px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card {
	background: #fff; border-radius: var(--gpb-radius);
	box-shadow: var(--gpb-shadow); padding: 22px;
}
.card-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px;
}

/* ---------- Document lists ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-item {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 12px 0; border-bottom: 1px dashed var(--gpb-border);
}
.doc-item:last-child { border-bottom: 0; }
.doc-date {
	min-width: 84px; text-align: center; background: var(--gpb-green); color: #fff;
	border-radius: 4px; padding: 6px 4px; font-size: 13px; line-height: 1.3;
}
.doc-date strong { display: block; font-size: 20px; }
.doc-title { font-size: 18px; margin: 0 0 4px; }
.doc-title a { color: var(--gpb-text); font-weight: 600; }
.doc-title a:hover { color: var(--gpb-green); }
.doc-meta { font-size: 13px; color: var(--gpb-muted); }

/* ---------- News cards ---------- */
.news-card { background: #fff; border-radius: var(--gpb-radius); overflow: hidden; box-shadow: var(--gpb-shadow); }
.news-card img, .news-placeholder { width: 100%; height: 180px; object-fit: cover; }
.news-placeholder { background: linear-gradient(135deg, #cfe5dd, #eaf3ef); }
.news-card-body { padding: 16px; }
.news-card h3 { font-size: 18px; }
.news-card h3 a { color: var(--gpb-green-dark); }

/* ---------- Officers ---------- */
.officer-card { text-align: center; padding: 22px 16px; }
.officer-card h3 { font-size: 18px; margin-bottom: 4px; }
.officer-photo, .officer-placeholder {
	width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
	margin: 0 auto 12px; border: 4px solid var(--gpb-bg);
}
.officer-placeholder {
	background: var(--gpb-bg); display: flex; align-items: center;
	justify-content: center; font-size: 40px;
}
.officer-designation { color: var(--gpb-red); font-weight: 600; font-size: 14px; }

/* ---------- Layout & sidebar ---------- */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 30px 0; }
.content { min-width: 0; }
.sidebar .widget {
	background: #fff; padding: 18px; border-radius: var(--gpb-radius);
	box-shadow: var(--gpb-shadow); margin-bottom: 20px;
}
.sidebar .widget ul { list-style: none; padding: 0; }
.sidebar .widget li { padding: 6px 0; border-bottom: 1px solid var(--gpb-border); }
.widget-title {
	font-size: 18px; color: var(--gpb-green-dark); border-left: 4px solid var(--gpb-red);
	padding-left: 10px; margin-top: 0;
}
.breadcrumb { font-size: 14px; color: var(--gpb-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--gpb-green); }

/* ---------- Entry content ---------- */
.entry-title, .page-title { font-size: 28px; }
.entry-meta { color: var(--gpb-muted); font-size: 14px; margin-bottom: 16px; }
.entry-thumb { margin-bottom: 16px; border-radius: var(--gpb-radius); }
.entry-content img { margin: 1em 0; border-radius: var(--gpb-radius); }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.entry-content th, .entry-content td { border: 1px solid var(--gpb-border); padding: 8px; text-align: left; }
.archive-desc { color: var(--gpb-muted); margin-bottom: 20px; }

.details-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; }
.details-table th, .details-table td {
	text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gpb-border); vertical-align: top;
}
.details-table th { width: 40%; background: var(--gpb-bg); }

.post-navigation .nav-links {
	display: flex; justify-content: space-between; gap: 10px;
	flex-wrap: wrap; margin-top: 24px;
}

.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 64px; color: var(--gpb-red); }

/* ---------- Pagination ---------- */
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.page-numbers {
	padding: 6px 12px; background: #fff; border: 1px solid var(--gpb-border);
	border-radius: 4px; color: var(--gpb-green);
}
.page-numbers.current { background: var(--gpb-green); color: #fff; border-color: var(--gpb-green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--gpb-green-dark); color: #d9e7e2; margin-top: 40px; }
.site-footer h3 {
	color: #fff; font-size: 18px; border-bottom: 2px solid var(--gpb-red);
	display: inline-block; padding-bottom: 4px;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 40px 0; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { padding: 4px 0; }
.footer-bottom { background: #003b2b; padding: 14px 0; font-size: 14px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.menu-toggle { display: block; }
	.nav-menu { display: none; flex-direction: column; }
	.nav-menu.is-open { display: flex; }
	.nav-menu .sub-menu,
	.nav-menu .children {
		position: static; box-shadow: none; min-width: 0;
		background: var(--gpb-green-dark);
	}
	.nav-menu .sub-menu a,
	.nav-menu .children a { color: #fff; }
	.layout, .two-col, .hero-grid, .footer-grid { grid-template-columns: 1fr; }
	.hero h1 { font-size: 26px; }
	.quick-links { margin-top: -30px; }
}

@media (max-width: 600px) {
	.office-bn { font-size: 18px; }
	.emblem { width: 56px; height: 56px; font-size: 16px; }
	.search-field { width: 140px; }
	.top-bar { font-size: 12px; }
	.doc-date { min-width: 70px; }
}