/*
Theme Name: ZBox
Theme URI: https://bd-ordss.pw
Author: Zahir
Description: Boxed layout theme: white header with logo, blue menu bar, grey content box and copyright text on a textured navy background. Every color, width and text can be changed in Appearance > Customize > ZBox Theme Options. Works with Elementor.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zbox
*/

/* ---------- 1. Variables (Customize থেকে এগুলোই বদলায়) ---------- */
:root {
	--zb-container-width: 980px;
	--zb-header-bg: #ffffff;
	--zb-nav-bg: #174775;
	--zb-nav-text: #ffffff;
	--zb-nav-hover-bg: #0f3358;
	--zb-nav-font-size: 12px;
	--zb-logo-height: 60px;
	--zb-content-bg: #e2e1df;
	--zb-text: #222222;
	--zb-link: #174775;
	--zb-footer-text: #ffffff;
	--zb-font: Arial, "Helvetica Neue", Helvetica, "Noto Sans Bengali", "SolaimanLipi", sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background-color: #1f2a5c;
	color: var(--zb-text);
	font-family: var(--zb-font);
	font-size: 15px;
	line-height: 1.6;
}
/* কাঠের মতো টেক্সচার (Customize থেকে বন্ধ করা যায়) */
body.zb-texture {
	background-image:
		repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px, rgba(0,0,0,.06) 7px 9px, transparent 9px 23px),
		repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,.02) 60px 62px, transparent 62px 140px),
		linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.10));
}
img { max-width: 100%; height: auto; }
a { color: var(--zb-link); }
a:hover { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin: 0 0 .6em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; z-index: 100000;
	top: 8px; left: 8px; padding: 10px 16px; background: #fff; color: #000;
}

/* ---------- 3. Boxed container ---------- */
.zb-site {
	width: min(var(--zb-container-width), 100% - 32px);
	margin: 0 auto;
	background: var(--zb-content-bg);
	box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 10px 30px rgba(0,0,0,.35);
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 50px);
}

/* ---------- 4. Header ---------- */
.zb-header { background: var(--zb-header-bg); }
/* Sticky: header + menu bar স্ক্রল করলেও উপরে আটকে থাকে */
.zb-sticky .zb-header {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.zb-sticky.admin-bar .zb-header { top: 32px; }
.zb-branding {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; min-height: 64px;
}
.zb-logo-box {
	display: flex; align-items: center; justify-content: center;
	min-width: 220px; min-height: 60px; padding: 8px 16px;
}
.zb-logo-border .zb-logo-box { border-right: 1px solid #d0d0d0; border-bottom: 1px solid #d0d0d0; }
.zb-logo-box .custom-logo { display: block; height: var(--zb-logo-height); max-height: none; width: auto; }
.zb-site-title { font-size: 20px; font-weight: 700; color: #000; text-decoration: none; }
.zb-site-desc { margin: 0; font-size: 12px; color: #666; }
.zb-header-right { padding: 8px 16px; }
.zb-header-right .widget { background: transparent; padding: 0; margin: 0; }

/* ---------- 5. Menu bar ---------- */
.zb-nav { background: var(--zb-nav-bg); position: relative; }
.zb-menu, .zb-menu ul { list-style: none; margin: 0; padding: 0; }
.zb-menu { display: flex; flex-wrap: wrap; padding: 0 4px; }
.zb-menu li { position: relative; }
.zb-menu a {
	display: block; padding: 8px 10px;
	color: var(--zb-nav-text); font-size: var(--zb-nav-font-size);
	line-height: 1.4; text-decoration: none;
}
.zb-menu a:hover, .zb-menu a:focus,
.zb-menu .current-menu-item > a, .zb-menu .current_page_item > a,
.zb-menu .current-menu-ancestor > a { background: var(--zb-nav-hover-bg); }
/* dropdown */
.zb-menu ul {
	display: none; position: absolute; top: 100%; left: 0; z-index: 50;
	min-width: 190px; background: var(--zb-nav-bg); box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.zb-menu ul ul { top: 0; left: 100%; }
.zb-menu li:hover > ul, .zb-menu li:focus-within > ul { display: block; }
.zb-menu .menu-item-has-children > a::after,
.zb-menu .page_item_has_children > a::after { content: " ▾"; }


/* ---------- 6. Content ---------- */
.zb-content { flex: 1; padding: 24px; }
.zb-full-width .zb-content { padding: 0; }
.zb-layout.has-sidebar {
	display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px;
}
.zb-page-title { font-size: 26px; }
.zb-archive-desc { margin-bottom: 20px; }

.zb-card { background: #fff; padding: 20px; margin-bottom: 20px; }
.zb-card-thumb img, .zb-single-thumb img { display: block; width: 100%; height: auto; margin-bottom: 14px; }
.entry-title { font-size: 24px; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--zb-link); }
.entry-meta { font-size: 13px; color: #666; margin-bottom: 12px; }
.entry-meta a { color: #666; }
.zb-read-more, .search-submit, .comment-form .submit {
	display: inline-block; margin-top: 6px; padding: 7px 16px; border: 0; cursor: pointer;
	background: var(--zb-nav-bg); color: var(--zb-nav-text); font: inherit; font-size: 13px; text-decoration: none;
}
.zb-read-more:hover, .search-submit:hover, .comment-form .submit:hover { background: var(--zb-nav-hover-bg); }
.tag-links { margin-top: 16px; font-size: 13px; }

/* WordPress core alignments */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 13px; color: #666; }
.entry-content::after { content: ""; display: table; clear: both; }

/* Pagination & post navigation */
.pagination .nav-links, .post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.pagination .nav-links { justify-content: flex-start; }
.page-numbers { display: inline-block; padding: 6px 12px; background: #fff; text-decoration: none; }
.page-numbers.current { background: var(--zb-nav-bg); color: var(--zb-nav-text); }
.post-navigation { margin-bottom: 20px; }
.post-navigation a { display: inline-block; padding: 8px 12px; background: #fff; text-decoration: none; }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #c8c8c8; font: inherit; background: #fff;
}
.search-form { display: flex; gap: 6px; }
.search-form label { flex: 1; }
.search-form .search-submit { margin-top: 0; }

/* Comments */
.comments-area { background: #fff; padding: 20px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 12px 0; border-bottom: 1px solid #eee; }

/* ---------- 7. Widgets / Sidebar ---------- */
.widget { background: #fff; padding: 16px; margin-bottom: 20px; }
.widget-title { font-size: 16px; padding-bottom: 6px; border-bottom: 2px solid var(--zb-nav-bg); }
.widget ul { margin: 0; padding-left: 18px; }

/* ---------- 8. Footer ---------- */
.zb-footer {
	width: min(var(--zb-container-width), 100% - 32px);
	margin: 0 auto; padding: 10px 16px 18px;
	color: var(--zb-footer-text); text-align: center; font-size: 12px;
}
.zb-footer a { color: var(--zb-footer-text); }
.zb-footer-widgets {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px; padding: 20px 0 10px; text-align: left; font-size: 14px;
}
.zb-footer .widget { background: transparent; padding: 0; color: inherit; }
.zb-footer .widget-title { border-color: var(--zb-footer-text); }
.zb-footer-menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 0 6px; padding: 0; }
.zb-copyright { margin: 0; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 900px) {
	.zb-layout.has-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
	.zb-site, .zb-footer { width: 100%; }
	.zb-site { min-height: 0; }
	.zb-sticky.admin-bar .zb-header { top: 46px; }
	.zb-branding { flex-direction: column; align-items: stretch; min-height: 0; }
	.zb-logo-box { min-width: 0; min-height: 52px; padding: 6px 12px; }
	.zb-logo-box .custom-logo { height: auto; max-height: var(--zb-logo-height); }
	.zb-header-right { display: none; }
	/* মোবাইলে Home, Apply... সরাসরি দেখাবে; বেশি হলে পাশে সোয়াইপ করা যাবে */
	.zb-menu {
		flex-wrap: nowrap; overflow-x: auto; padding: 0;
		-webkit-overflow-scrolling: touch; scrollbar-width: none;
	}
	.zb-menu::-webkit-scrollbar { display: none; }
	.zb-menu > li { flex: 0 0 auto; }
	.zb-menu a { font-size: 14px; padding: 11px 12px; white-space: nowrap; }
	.zb-menu ul { display: none !important; }
	.zb-menu .menu-item-has-children > a::after,
	.zb-menu .page_item_has_children > a::after { content: none; }
	.zb-content { padding: 16px; }
}
/* ছোট ফোনে WordPress admin bar উপরে আটকে থাকে না */
@media (max-width: 600px) {
	.zb-sticky.admin-bar .zb-header { top: 0; }
}
