/* =========================================================
   NewPoseh — main theme stylesheet
   Palette: dark blue + orange + (yellow accent)
   ========================================================= */

:root {
	/* Color palette (Customizer overrides via inline <style>). */
	--np-primary:        #0a2540;   /* dark navy        */
	--np-primary-2:      #1a3a6c;   /* mid blue         */
	--np-primary-3:      #3b6fb6;   /* lighter blue     */
	--np-primary-soft:   #e9eef7;   /* tinted bg        */
	--np-accent:         #f47b20;   /* orange CTA       */
	--np-accent-hover:   #d96710;
	--np-accent-alt:     #f4c430;   /* yellow detail    */
	--np-text:           #1a1a1a;
	--np-text-muted:     #4a5568;
	--np-bg:             #ffffff;
	--np-bg-soft:        #f5f7fa;
	--np-border:         #e2e8f0;
	--np-success:        #2f855a;
	--np-error:          #c53030;

	/* Spacing */
	--np-radius:         8px;
	--np-radius-lg:      14px;
	--np-shadow-sm:      0 2px 6px rgba(10, 37, 64, .06);
	--np-shadow-md:      0 8px 24px rgba(10, 37, 64, .10);
	--np-container:      1200px;
	--np-gap:            24px;

	/* Typography */
	--np-font-body:      "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--np-font-heading:   "Noto Sans", var(--np-font-body);
	--np-font-serif:     "Noto Serif", Georgia, serif;
}

/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--np-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--np-text);
	background: var(--np-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a {
	color: var(--np-primary-2);
	text-decoration: none;
	transition: color .15s ease;
}
a:hover, a:focus { color: var(--np-accent); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--np-font-heading);
	color: var(--np-primary);
	line-height: 1.25;
	margin: 0 0 .6em;
	font-weight: 700;
}
h1 { font-size: clamp(1.85rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container {
	width: 100%;
	max-width: var(--np-container);
	margin-inline: auto;
	padding-inline: 16px;
}
.skip-link {
	position: absolute; left: -9999px;
	background: var(--np-accent); color: #fff;
	padding: 8px 12px; z-index: 9999;
}
.skip-link:focus { left: 16px; top: 16px; }
.screen-reader-text {
	position: absolute !important; clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px; overflow: hidden; word-wrap: normal !important;
}

/* ---------- Top bar ---------- */
.top-bar {
	background: var(--np-primary);
	color: #cfe1ff;
	font-size: .875rem;
}
.top-bar__inner {
	display: flex; justify-content: flex-end; align-items: center;
	min-height: 36px;
}
.top-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; }
.top-menu a { color: #cfe1ff; }
.top-menu a:hover { color: var(--np-accent-alt); }

/* ---------- Header ---------- */
.site-header {
	background: var(--np-bg);
	border-bottom: 4px solid var(--np-accent);
	box-shadow: var(--np-shadow-sm);
	position: relative;
	z-index: 50;
}
.header-main__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--np-gap); min-height: 96px;
}
.site-branding {
	display: flex; align-items: center; gap: 14px; min-width: 0;
}
.custom-logo, .site-logo-fallback img {
	max-height: 64px; width: auto; display: block;
}
.site-description {
	margin: 0; color: var(--np-text-muted); font-size: .9rem;
}

/* ---------- Main navigation ---------- */
.main-navigation { flex: 1; display: flex; justify-content: flex-end; }
.main-navigation ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; gap: 4px; align-items: center;
}
.main-navigation li { position: relative; }
.main-navigation a {
	display: block; padding: 14px 14px;
	color: var(--np-primary);
	font-weight: 600;
	border-radius: var(--np-radius);
	transition: background .15s ease, color .15s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	background: var(--np-primary-soft);
	color: var(--np-primary-2);
}
.main-navigation li:last-child > a {
	background: var(--np-accent); color: #fff;
}
.main-navigation li:last-child > a:hover { background: var(--np-accent-hover); }

/* Submenu */
.main-navigation .sub-menu {
	display: none; position: absolute; top: 100%; left: 0;
	background: #fff; min-width: 220px; padding: 8px;
	box-shadow: var(--np-shadow-md); border-radius: var(--np-radius);
	border-top: 3px solid var(--np-accent-alt);
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: block; }
.main-navigation .sub-menu li { display: block; }
.main-navigation .sub-menu a { padding: 10px 12px; }

/* Mobile toggle */
.menu-toggle {
	display: none;
	background: var(--np-primary);
	border: 0; padding: 12px;
	border-radius: var(--np-radius);
	cursor: pointer;
}
.menu-toggle__bar {
	display: block; width: 22px; height: 2px;
	background: #fff; margin: 4px 0;
	transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Site content layout ---------- */
.site-content-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--np-gap);
	padding-block: 36px;
}
.site-main.has-sidebar + .widget-area,
.site-main.has-sidebar { /* placeholder for grid below */ }

@media (min-width: 960px) {
	.site-content-wrap:has(.site-main.has-sidebar.sidebar-right) {
		grid-template-columns: minmax(0, 1fr) 320px;
	}
	.site-content-wrap:has(.site-main.has-sidebar.sidebar-left) {
		grid-template-columns: 320px minmax(0, 1fr);
	}
	.site-content-wrap:has(.site-main.has-sidebar.sidebar-left) .site-main { order: 2; }
	.site-content-wrap:has(.site-main.has-sidebar.sidebar-left) .widget-area { order: 1; }
}

/* Fallback for browsers without :has() */
@supports not (selector(:has(*))) {
	.site-content-wrap { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ---------- Page header / archive ---------- */
.page-header {
	border-left: 6px solid var(--np-accent);
	padding: 8px 0 8px 18px;
	margin-bottom: 28px;
}
.page-title { margin: 0; }
.page-subtitle { color: var(--np-text-muted); margin: 4px 0 0; }

/* ---------- Posts ---------- */
.post-card,
.page-article,
.search-result,
.faq-entry {
	background: #fff;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-lg);
	padding: 24px;
	box-shadow: var(--np-shadow-sm);
	margin-bottom: 24px;
}
.post-card__thumb { display: block; margin: -24px -24px 16px; overflow: hidden; border-radius: var(--np-radius-lg) var(--np-radius-lg) 0 0; }
.post-card__thumb img { display: block; width: 100%; height: auto; }
.entry-title { margin-top: 0; }
.entry-title a { color: var(--np-primary); }
.entry-title a:hover { color: var(--np-accent); }
.entry-meta { color: var(--np-text-muted); font-size: .9rem; margin-bottom: 12px; }
.read-more {
	display: inline-block; margin-top: 12px;
	color: var(--np-accent); font-weight: 600;
}
.read-more::after { content: ""; }

/* ---------- Buttons ---------- */
.button, button.search-submit, .wp-block-button__link, input[type="submit"] {
	display: inline-block;
	background: var(--np-accent);
	color: #fff !important;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--np-radius);
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, transform .05s ease;
}
.button:hover, button.search-submit:hover, .wp-block-button__link:hover, input[type="submit"]:hover {
	background: var(--np-accent-hover);
}
.button:active { transform: translateY(1px); }

/* ---------- Search ---------- */
.search-form {
	display: flex; gap: 8px;
	background: #fff; border: 1px solid var(--np-border);
	border-radius: var(--np-radius); padding: 4px;
}
.search-form .search-field {
	flex: 1; border: 0; padding: 10px 12px; font-size: 1rem;
	background: transparent; outline: none;
}

/* ---------- Sidebar ---------- */
.widget-area .widget {
	background: #fff; padding: 20px; border-radius: var(--np-radius-lg);
	border: 1px solid var(--np-border); margin-bottom: 24px;
	box-shadow: var(--np-shadow-sm);
}
.widget-title {
	margin: 0 0 12px; font-size: 1.05rem;
	color: var(--np-primary);
	border-bottom: 3px solid var(--np-accent-alt);
	display: inline-block; padding-bottom: 4px;
}
.widget ul { padding-left: 1.1em; margin: 0; }
.widget a { color: var(--np-primary-2); }

/* ---------- FAQ accordion ---------- */
.faq-accordion { margin: 24px 0; }
.faq-group-title {
	margin: 28px 0 10px;
	color: var(--np-primary);
	border-bottom: 2px solid var(--np-primary-soft);
	padding-bottom: 6px;
}
.faq-list { margin: 0; padding: 0; }
.faq-item {
	background: #fff;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius);
	margin-bottom: 10px;
	overflow: hidden;
}
.faq-item + .faq-item { margin-top: 10px; }
.faq-question { margin: 0; }
.faq-toggle {
	width: 100%; text-align: left;
	background: transparent; border: 0;
	padding: 16px 56px 16px 18px;
	font-size: 1.05rem; font-weight: 600;
	color: var(--np-primary);
	display: flex; justify-content: space-between; align-items: center; gap: 14px;
	cursor: pointer; position: relative;
	transition: background .15s ease, color .15s ease;
}
.faq-toggle:hover, .faq-toggle:focus { background: var(--np-primary-soft); color: var(--np-primary-2); }
.faq-toggle__icon {
	width: 20px; height: 20px; flex: 0 0 20px;
	background: var(--np-accent); border-radius: 50%;
	position: relative; transition: transform .2s ease, background .2s ease;
}
.faq-toggle__icon::before, .faq-toggle__icon::after {
	content: ""; position: absolute; left: 50%; top: 50%;
	background: #fff; transform: translate(-50%, -50%);
}
.faq-toggle__icon::before { width: 10px; height: 2px; }
.faq-toggle__icon::after  { width: 2px;  height: 10px; transition: opacity .2s ease; }
.faq-toggle[aria-expanded="true"] .faq-toggle__icon { background: var(--np-accent-alt); }
.faq-toggle[aria-expanded="true"] .faq-toggle__icon::after { opacity: 0; }
.faq-answer {
	padding: 0 18px 18px;
	color: var(--np-text);
	background: #fbfcfe;
	border-top: 1px solid var(--np-border);
}
.faq-answer[hidden] { display: none; }
.faq-answer__inner > *:first-child { margin-top: 0; }
.faq-answer__inner > *:last-child  { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
	margin-top: 60px;
	background: linear-gradient(180deg, var(--np-primary) 0%, #061a30 100%);
	color: #cfe1ff;
}
.footer-top { padding: 50px 0 20px; }
.footer-top__inner {
	display: grid; gap: var(--np-gap);
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-col .widget { background: transparent; border: 0; box-shadow: none; padding: 0; }
.footer-col .widget-title {
	color: #fff; border-bottom-color: var(--np-accent);
}
.footer-col a { color: #cfe1ff; }
.footer-col a:hover { color: var(--np-accent-alt); }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 18px 0; font-size: .9rem;
}
.footer-bottom__inner {
	display: flex; flex-wrap: wrap; gap: 12px;
	justify-content: space-between; align-items: center;
}
.footer-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; }
.footer-menu a { color: #cfe1ff; }

/* ---------- Comments ---------- */
.comments-area {
	background: #fff; padding: 24px; border-radius: var(--np-radius-lg);
	border: 1px solid var(--np-border); margin-top: 24px;
}

/* ---------- Pagination ---------- */
.pagination, .nav-links {
	display: flex; gap: 6px; flex-wrap: wrap;
	margin: 24px 0;
}
.page-numbers {
	display: inline-block; padding: 8px 12px;
	border: 1px solid var(--np-border); border-radius: var(--np-radius);
	color: var(--np-primary-2); background: #fff;
}
.page-numbers.current { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }
.page-numbers:hover { background: var(--np-accent); color: #fff; border-color: var(--np-accent); }

/* ---------- Announcement list shortcode ---------- */
.announcement-list {
	list-style: none; padding: 0; margin: 0;
	background: #fff; border: 1px solid var(--np-border); border-radius: var(--np-radius-lg);
	overflow: hidden;
}
.announcement-list li {
	padding: 14px 18px; display: flex; gap: 14px; align-items: baseline;
	border-bottom: 1px solid var(--np-border);
}
.announcement-list li:last-child { border-bottom: 0; }
.announcement-list time {
	color: var(--np-accent); font-weight: 600; font-size: .9rem;
	min-width: 110px;
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"],
textarea, select {
	width: 100%; padding: 10px 12px;
	border: 1px solid var(--np-border); border-radius: var(--np-radius);
	font-family: inherit; font-size: 1rem; background: #fff; color: var(--np-text);
}
input:focus, textarea:focus, select:focus {
	outline: 2px solid var(--np-primary-3); outline-offset: 1px; border-color: var(--np-primary-3);
}

/* ---------- Tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--np-border); text-align: left; }
th { background: var(--np-bg-soft); }

/* ---------- WordPress alignment helpers ---------- */
.alignwide  { max-width: 1100px; margin-inline: auto; }
.alignfull  { max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignleft  { float: left;  margin: 4px 16px 8px 0; }
.alignright { float: right; margin: 4px 0 8px 16px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--np-text-muted); font-size: .85rem; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
	.menu-toggle { display: inline-flex; align-items: center; }
	.main-navigation {
		position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; border-top: 1px solid var(--np-border);
		max-height: 0; overflow: hidden; transition: max-height .25s ease;
	}
	.main-navigation.is-open { max-height: 80vh; overflow: auto; padding: 12px; box-shadow: var(--np-shadow-md); }
	.main-navigation ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.main-navigation a { padding: 14px 16px; border-radius: 8px; }
	.main-navigation .sub-menu {
		position: static; box-shadow: none; padding: 4px 0 4px 16px;
		border-top: 0; border-left: 3px solid var(--np-accent-alt);
		border-radius: 0; display: block;
	}
	.header-main__inner { min-height: 72px; }
	.site-content-wrap { grid-template-columns: 1fr !important; }
	.widget-area { order: 99; }
	.faq-toggle { font-size: 1rem; padding-right: 50px; }
}

@media (max-width: 600px) {
	.post-card, .page-article, .search-result, .faq-entry { padding: 18px; }
	.post-card__thumb { margin: -18px -18px 14px; }
	.announcement-list li { flex-direction: column; gap: 4px; }
	.announcement-list time { min-width: 0; }
	.footer-bottom__inner { justify-content: center; text-align: center; }
}

/* ---------- Print ---------- */
@media print {
	.site-header, .site-footer, .widget-area, .menu-toggle, .nav-links { display: none !important; }
	a { color: #000; }
}
