/*
Theme Name: PSHI Sleep Health
Theme URI: https://pakistansleephealthinstitute.com
Author: Pakistan Sleep Health Institute
Description: A compact, light, magazine-style blogging theme for Pakistan Sleep Health Institute. Includes medical reviewer bylines, key takeaways, references, automatic table of contents, a Medical Advisory Board, a Ramadan Sleep Hub section, three light colour palettes and starter pages.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
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: pshi
Tags: blog, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ---------- Tokens (palette values are overridden from the Customizer) ---------- */
:root {
	--pshi-hero: #EAF3FB;
	--pshi-soft: #F5F9FD;
	--pshi-line: #DCE7F3;
	--pshi-primary: #1E3A5F;
	--pshi-secondary: #2F6FB2;
	--pshi-button: #2F6FB2;
	--pshi-decor: #F6C667;
	--pshi-tint-1: #D6E7F7;
	--pshi-tint-2: #E3EEF9;
	--pshi-tint-3: #CFE0F2;
	--pshi-text: #1F2937;
	--pshi-body: #374151;
	--pshi-muted: #4B5563;
	--pshi-ok: #0F6B4E;
	--pshi-ok-bg: #E2F2EA;
	--pshi-warn-bg: #FFF8E8;
	--pshi-warn-line: #F0D49A;
	--pshi-warn-text: #5C3D00;
	--pshi-error: #B42318;
	--pshi-serif: "Merriweather", Georgia, "Times New Roman", serif;
	--pshi-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--pshi-radius: 14px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	font-family: var(--pshi-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--pshi-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--pshi-secondary); text-decoration: none; }
a:hover { color: var(--pshi-primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--pshi-secondary);
	outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--pshi-serif); color: var(--pshi-primary); line-height: 1.3; }
.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: #fff; color: var(--pshi-primary); padding: 10px 16px; border-radius: 8px;
	box-shadow: 0 0 0 3px var(--pshi-secondary);
}

/* ---------- Buttons and inputs ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: 10px; border: 0;
	background: var(--pshi-button); color: #fff; font: inherit; font-weight: 600; font-size: 15px;
	cursor: pointer; text-decoration: none;
}
.btn:hover { color: #fff; filter: brightness(0.92); }
.btn-pill { border-radius: 999px; font-size: 14px; }
.btn-ghost { background: #fff; color: var(--pshi-primary); border: 1px solid var(--pshi-line); }
.btn-ghost:hover { color: var(--pshi-primary); background: var(--pshi-soft); filter: none; }
.input, .pshi-form input[type="text"], .pshi-form input[type="email"], .pshi-form select, .pshi-form textarea {
	width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--pshi-line);
	border-radius: 10px; background: var(--pshi-soft); font: inherit; font-size: 15px; color: var(--pshi-text);
}
.pshi-form textarea { padding: 12px 14px; min-height: 150px; resize: vertical; }

/* ---------- Top bar and header ---------- */
.topbar { background: var(--pshi-soft); color: var(--pshi-primary); font-size: 13px; border-bottom: 1px solid var(--pshi-line); }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 8px; }
.topbar-check { display: inline-flex; align-items: center; gap: 6px; }
.topbar-check svg { color: var(--pshi-secondary); }
@media (max-width: 600px) { .topbar-check { display: none; } .hero-grid { padding-block: 32px; } }

.site-header { background: #fff; border-bottom: 1px solid var(--pshi-line); }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--pshi-primary); }
.brand:hover { color: var(--pshi-primary); }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--pshi-hero); display: flex; align-items: center; justify-content: center; color: var(--pshi-secondary); flex-shrink: 0; }
.brand .custom-logo { max-height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--pshi-serif); font-weight: 900; font-size: 17px; line-height: 1.2; }
.brand-tag { font-size: 12px; color: var(--pshi-muted); letter-spacing: 0.02em; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; border: 1px solid var(--pshi-line); border-radius: 999px; background: var(--pshi-soft); color: var(--pshi-muted); }
.header-search input { border: 0; background: transparent; font: inherit; font-size: 14px; width: 220px; color: var(--pshi-text); }
.header-search input:focus { outline: none; }
.header-search:focus-within { box-shadow: 0 0 0 3px var(--pshi-tint-1); }
.header-search button { border: 0; background: transparent; padding: 6px; color: var(--pshi-muted); cursor: pointer; display: flex; }

.nav-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--pshi-line); border-radius: 10px; background: #fff; color: var(--pshi-primary); font: inherit; font-weight: 600; cursor: pointer; }
.main-nav { border-top: 1px solid var(--pshi-line); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav a { display: block; padding: 12px; font-size: 14px; font-weight: 500; color: var(--pshi-body); border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--pshi-primary); }
.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current-cat > a, .main-nav .current_page_item > a {
	color: var(--pshi-primary); border-bottom-color: var(--pshi-secondary);
}
.main-nav .sub-menu { display: none; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.header-search { flex: 1 1 100%; order: 3; }
	.header-search input { width: 100%; }
	.main-nav { display: none; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding-block: 8px; }
	.main-nav a { border-bottom: 0; border-left: 3px solid transparent; }
	.main-nav .current-menu-item > a, .main-nav .current-cat > a, .main-nav .current_page_item > a { border-left-color: var(--pshi-secondary); }
}

/* ---------- Shared post pieces ---------- */
.post-cat { font-size: 12px; font-weight: 600; color: var(--pshi-secondary); }
.post-cat a { color: inherit; }
.reviewed-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--pshi-ok); font-weight: 500; }
.thumb { display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--pshi-tint-1); color: var(--pshi-secondary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.tint-2 { background: var(--pshi-tint-2); }
.thumb.tint-3 { background: var(--pshi-tint-3); }

/* ---------- Home: hero ---------- */
.hero { background: var(--pshi-hero); }
.hero-grid { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; padding-block: 44px; }
.hero-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-badge { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--pshi-secondary); background: #fff; padding: 6px 12px; border-radius: 999px; }
.hero-title { margin: 0; font-weight: 900; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.15; }
.hero-text { margin: 0; font-size: 17px; color: var(--pshi-body); max-width: 520px; }
.hero-search { display: flex; gap: 8px; flex-wrap: wrap; max-width: 520px; }
.hero-search input { flex: 1 1 240px; min-height: 48px; border: 1px solid var(--pshi-line); border-radius: 10px; padding: 0 16px; font: inherit; font-size: 15px; background: #fff; }
.hero-search .btn { min-height: 48px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--pshi-muted); }
.tag-chip { color: var(--pshi-primary); background: #fff; border: 1px solid var(--pshi-line); padding: 5px 12px; border-radius: 999px; }

.feature-card { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pshi-line); border-radius: 16px; overflow: hidden; color: var(--pshi-text); }
.feature-card:hover { color: var(--pshi-text); border-color: var(--pshi-tint-3); }
.feature-card .thumb { height: 230px; position: relative; }
.feature-flag { position: absolute; left: 16px; top: 16px; font-size: 12px; font-weight: 600; background: var(--pshi-decor); color: #3A2A00; padding: 5px 10px; border-radius: 999px; }
.feature-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.feature-title { font-family: var(--pshi-serif); font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--pshi-primary); }
.feature-excerpt { font-size: 14px; color: var(--pshi-muted); }
.meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--pshi-muted); }

/* ---------- Home: small featured ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; padding-top: 28px; }
.mini-card { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); background: #fff; color: var(--pshi-text); }
.mini-card:hover { color: var(--pshi-text); border-color: var(--pshi-tint-3); }
.mini-card .thumb { width: 84px; height: 84px; border-radius: 10px; flex-shrink: 0; }
.mini-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-title { font-family: var(--pshi-serif); font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--pshi-primary); }
.mini-meta { font-size: 12px; color: var(--pshi-muted); }

/* ---------- Sections ---------- */
.section { padding-block: 32px 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title { margin: 0; font-weight: 900; font-size: 24px; }
.section-link { font-size: 14px; font-weight: 500; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.topic-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--pshi-radius); background: var(--pshi-soft); border: 1px solid var(--pshi-line); color: var(--pshi-text); }
.topic-card:hover { color: var(--pshi-text); border-color: var(--pshi-tint-3); }
.topic-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--pshi-secondary); }
.topic-name { font-weight: 600; font-size: 15px; color: var(--pshi-primary); }
.topic-desc { font-size: 13px; line-height: 1.45; color: var(--pshi-muted); }

/* ---------- Content + sidebar layout ---------- */
.content-layout { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-block: 36px 48px; }
.content-main { flex: 999 1 560px; min-width: 0; }
.content-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); overflow: hidden; background: #fff; }
.card:hover { border-color: var(--pshi-tint-3); }
.card .thumb { height: 140px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.35; }
.card-title a { color: var(--pshi-primary); }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card .post-cat a { position: relative; z-index: 1; }
.card-excerpt { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pshi-muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--pshi-muted); }

/* ---------- Sidebar widgets ---------- */
.widget { border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 18px; }
.widget-title { margin: 0 0 12px; font-size: 17px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { border-top: 1px solid var(--pshi-line); }
.widget li a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; font-size: 14px; color: var(--pshi-body); }
.widget li a:hover { color: var(--pshi-primary); }
.rank-list li a { justify-content: flex-start; gap: 12px; font-weight: 500; color: var(--pshi-text); line-height: 1.45; }
.rank-num { font-family: var(--pshi-serif); font-weight: 900; font-size: 18px; color: var(--pshi-secondary); width: 22px; flex-shrink: 0; }
.widget-soft { background: var(--pshi-hero); border-color: transparent; display: flex; flex-direction: column; gap: 10px; }
.widget-soft p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pshi-body); }
.widget-warn { background: var(--pshi-warn-bg); border-color: var(--pshi-warn-line); font-size: 13px; line-height: 1.55; color: var(--pshi-warn-text); }
.newsletter-mini { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Ramadan banner ---------- */
.ramadan { padding-bottom: 36px; }
.ramadan-box { position: relative; overflow: hidden; background: var(--pshi-hero); border-radius: 18px; padding: 32px; display: flex; gap: 32px; flex-wrap: wrap; align-items: center; }
.ramadan-moon { position: absolute; right: -40px; top: -50px; color: var(--pshi-tint-3); pointer-events: none; }
.ramadan-copy { position: relative; flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ramadan-kicker { font-size: 13px; font-weight: 600; color: var(--pshi-secondary); }
.ramadan-title { margin: 0; font-weight: 900; font-size: 30px; }
.ramadan-text { margin: 0; font-size: 15px; color: var(--pshi-body); max-width: 460px; }
.ramadan-links { position: relative; flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ramadan-links a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; color: var(--pshi-primary); font-size: 15px; font-weight: 500; }
.ramadan-links a span { color: var(--pshi-secondary); }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--pshi-line); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; padding-block: 32px; }
.trust-item { display: flex; gap: 14px; }
.trust-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--pshi-hero); display: flex; align-items: center; justify-content: center; color: var(--pshi-secondary); }
.trust-item strong { display: block; color: var(--pshi-primary); margin-bottom: 4px; }
.trust-item p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pshi-muted); }

/* ---------- Newsletter strip ---------- */
.newsletter { background: var(--pshi-soft); border-top: 1px solid var(--pshi-line); }
.newsletter .container { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 28px; }
.newsletter-copy { flex: 1 1 360px; min-width: 0; }
.newsletter-title { font-family: var(--pshi-serif); font-weight: 900; font-size: 20px; color: var(--pshi-primary); }
.newsletter-copy p { margin: 4px 0 0; font-size: 14px; color: var(--pshi-muted); }
.newsletter-form { display: flex; gap: 8px; flex: 1 1 380px; flex-wrap: wrap; }
.newsletter-form input[type="email"] { flex: 1 1 220px; min-height: 46px; border: 1px solid var(--pshi-line); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 15px; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--pshi-line); color: var(--pshi-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; padding-block: 40px 24px; }
.footer-brand { font-family: var(--pshi-serif); font-weight: 900; font-size: 17px; color: var(--pshi-primary); display: block; margin-bottom: 10px; }
.footer-about { margin: 0; font-size: 14px; line-height: 1.6; }
.footer-col h2 { font-family: var(--pshi-sans); font-size: 14px; font-weight: 600; margin: 0 0 10px; color: var(--pshi-primary); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-col a { color: var(--pshi-muted); }
.footer-col a:hover { color: var(--pshi-primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 16px 28px; border-top: 1px solid var(--pshi-line); font-size: 13px; }

/* ---------- Page hero / breadcrumbs ---------- */
.page-hero { background: var(--pshi-hero); }
.page-hero .container { padding-block: 36px; display: flex; flex-direction: column; gap: 14px; }
.page-hero.is-narrow .container { max-width: 820px; }
.page-title { margin: 0; font-weight: 900; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.2; max-width: 860px; }
.page-lead { margin: 0; max-width: 720px; font-size: 18px; line-height: 1.6; color: var(--pshi-body); }
.page-lead p { margin: 0; }
.breadcrumb { font-size: 13px; color: var(--pshi-muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: var(--pshi-muted); }
.updated-note { font-size: 13px; color: var(--pshi-muted); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pshi-line); background: #fff; color: var(--pshi-primary); font-size: 14px; font-weight: 500; }
.chip.is-active, .chip:hover { background: var(--pshi-button); border-color: var(--pshi-button); color: #fff; }

/* ---------- Single article ---------- */
.byline { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.byline-box { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--pshi-line); border-radius: 12px; padding: 10px 14px; }
.byline-label { display: block; font-size: 12px; color: var(--pshi-muted); }
.byline-name { display: block; font-size: 14px; font-weight: 600; color: var(--pshi-primary); }
.avatar-initials { width: 40px; height: 40px; border-radius: 999px; background: var(--pshi-tint-1); color: var(--pshi-primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.avatar-initials img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ok { background: var(--pshi-ok-bg); color: var(--pshi-ok); }
.byline-meta { display: flex; gap: 8px; font-size: 13px; color: var(--pshi-muted); padding-inline: 6px; }

.article-hero-img { padding-top: 32px; }
.article-hero-img .thumb { height: clamp(220px, 30vw, 380px); border-radius: 18px; }
.article-hero-img figcaption { font-size: 13px; color: var(--pshi-muted); margin-top: 8px; }

.article-layout { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; padding-block: 36px 48px; }
.article-aside { flex: 1 1 240px; max-width: 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.article-main { flex: 999 1 560px; min-width: 0; max-width: 760px; }
@media (max-width: 900px) { .article-aside { position: static; max-width: none; } }

.toc { border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 18px; }
.toc-title { font-size: 13px; font-weight: 600; color: var(--pshi-muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.toc a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--pshi-body); }
.toc a:hover, .toc a.is-active { background: var(--pshi-hero); color: var(--pshi-primary); font-weight: 600; }

.key-takeaways { background: var(--pshi-soft); border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 20px 22px; margin-bottom: 28px; }
.key-takeaways h2 { font-family: var(--pshi-sans); font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.key-takeaways ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; }
.key-takeaways li { display: flex; gap: 10px; }
.key-takeaways svg { flex-shrink: 0; margin-top: 2px; color: var(--pshi-secondary); }

/* Article body typography */
.entry-content { font-size: 17px; line-height: 1.75; color: var(--pshi-text); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-weight: 900; font-size: 26px; margin: 36px 0 12px; scroll-margin-top: 24px; }
.entry-content h3 { font-weight: 700; font-size: 20px; margin: 28px 0 10px; scroll-margin-top: 24px; }
.entry-content p { margin: 0 0 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-inline-start: 22px; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 24px 0; padding: 16px 20px; background: var(--pshi-soft); border-radius: 12px; font-family: var(--pshi-serif); color: var(--pshi-primary); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 18px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--pshi-line); padding: 10px 12px; text-align: start; }
.entry-content th { background: var(--pshi-soft); color: var(--pshi-primary); }
.entry-content img { border-radius: 12px; }
.entry-content .wp-block-button__link { background: var(--pshi-button); color: #fff; border-radius: 10px; text-decoration: none; font-weight: 600; }
.entry-content .alignwide { margin-inline: -40px; }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); }

/* Block styles registered in functions.php */
.is-style-pshi-callout { background: var(--pshi-warn-bg); border: 1px solid var(--pshi-warn-line); border-radius: var(--pshi-radius); padding: 18px 20px; color: var(--pshi-warn-text); margin: 28px 0; }
.is-style-pshi-callout > *:last-child { margin-bottom: 0; }
.is-style-pshi-callout h2, .is-style-pshi-callout h3, .is-style-pshi-callout h4 { color: var(--pshi-warn-text); font-family: var(--pshi-sans); font-size: 16px; margin: 0 0 4px; }
.is-style-pshi-soft-box { background: var(--pshi-soft); border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 20px 22px; margin: 28px 0; }
.is-style-pshi-soft-box > *:last-child { margin-bottom: 0; }

.references { margin-top: 36px; }
.references h2 { font-size: 22px; margin: 0 0 12px; }
.references ol { margin: 0; padding-inline-start: 22px; font-size: 14px; line-height: 1.6; color: var(--pshi-muted); display: flex; flex-direction: column; gap: 6px; word-break: break-word; }
.disclaimer-note { border-top: 1px solid var(--pshi-line); padding-top: 16px; margin-top: 24px; font-size: 13px; line-height: 1.6; color: var(--pshi-muted); }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.post-tags a { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--pshi-soft); border: 1px solid var(--pshi-line); color: var(--pshi-primary); }

.author-box { display: flex; gap: 16px; margin-top: 28px; padding: 18px; border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); }
.author-box p { margin: 4px 0 0; font-size: 14px; color: var(--pshi-muted); }

.related { background: var(--pshi-soft); border-top: 1px solid var(--pshi-line); }
.related .container { padding-block: 36px 44px; }
.related h2 { margin: 0 0 16px; font-weight: 900; font-size: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.related .mini-card { background: #fff; }

/* ---------- Page builder (Elementor) pages ---------- */
.pshi-builder-content { width: 100%; }
.pshi-builder-content .post-grid, .pshi-builder-content .topic-grid, .pshi-builder-content .mini-grid { margin: 0; }
.pshi-builder-content .elementor-widget-shortcode .widget + .widget { margin-top: 20px; }
.pshi-builder-content .hero-search { max-width: none; }
.pshi-builder-content .ramadan-links { flex: none; }
.pshi-builder-content .elementor-widget-text-editor p:last-child, .pshi-builder-content .elementor-widget-text-editor ul:last-child { margin-bottom: 0; }
.pshi-builder-content::after { content: ""; display: table; clear: both; }

/* ---------- Pagination ---------- */
.pagination, .posts-navigation { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--pshi-line); color: var(--pshi-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; }
.page-numbers.current { background: var(--pshi-button); border-color: var(--pshi-button); color: #fff; }
.page-numbers.dots { border: 0; }

/* ---------- Generic pages ---------- */
.page-layout { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; padding-block: 40px 56px; }
.page-layout .article-main { max-width: 780px; }
.page-narrow { max-width: 820px; margin-inline: auto; padding: 36px 24px 56px; }

/* Advisory board */
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding-block: 40px; }
.board-card { border: 1px solid var(--pshi-line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; background: #fff; scroll-margin-top: 24px; }
.board-head { display: flex; align-items: center; gap: 14px; }
.board-photo { width: 64px; height: 64px; border-radius: 999px; background: var(--pshi-hero); color: var(--pshi-secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.board-photo img { width: 100%; height: 100%; object-fit: cover; }
.board-name { margin: 0; font-size: 17px; }
.board-role { font-size: 14px; font-weight: 600; color: var(--pshi-secondary); }
.board-bio { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pshi-muted); }
.board-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--pshi-body); border-top: 1px solid var(--pshi-line); padding-top: 12px; }
.steps-band { background: var(--pshi-soft); border-block: 1px solid var(--pshi-line); }
.steps-band .container { padding-block: 44px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; counter-increment: step; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 999px; background: var(--pshi-button); color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.steps strong { color: var(--pshi-primary); }
.steps p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--pshi-muted); }
.cta-band { background: var(--pshi-hero); border-radius: 18px; padding: 28px 32px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-block: 44px 48px; }
.cta-band h2 { margin: 0; font-weight: 900; font-size: 22px; }
.cta-band p { margin: 6px 0 0; font-size: 15px; color: var(--pshi-body); }
.admin-hint { background: var(--pshi-warn-bg); border: 1px solid var(--pshi-warn-line); color: var(--pshi-warn-text); border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-top: 24px; }

/* Contact */
.contact-layout { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-block: 40px 56px; }
.contact-form-box { flex: 999 1 520px; min-width: 0; border: 1px solid var(--pshi-line); border-radius: 16px; padding: 28px; }
.contact-form-box h2 { margin: 0 0 18px; font-size: 22px; font-weight: 900; }
.pshi-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--pshi-primary); }
.hp-field { position: absolute; left: -9999px; }
.notice { border-radius: 12px; padding: 14px 16px; font-size: 15px; margin-bottom: 18px; }
.notice-ok { background: var(--pshi-ok-bg); color: var(--pshi-ok); }
.notice-error { background: #FDECEA; color: var(--pshi-error); }
.contact-aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.info-card { background: var(--pshi-soft); border: 1px solid var(--pshi-line); border-radius: var(--pshi-radius); padding: 18px; display: flex; gap: 14px; }
.info-card .trust-icon { background: #fff; }
.info-card strong { display: block; color: var(--pshi-primary); }
.info-card span { font-size: 14px; color: var(--pshi-muted); word-break: break-word; }

/* Search / 404 / empty */
.empty-state { text-align: center; padding: 56px 24px; max-width: 560px; margin-inline: auto; }
.empty-state h2 { font-size: 26px; margin: 0 0 10px; }
.empty-state p { color: var(--pshi-muted); }
.empty-state .hero-search { margin: 20px auto 0; }

/* Comments */
.comments-area { margin-top: 36px; border-top: 1px solid var(--pshi-line); padding-top: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border: 1px solid var(--pshi-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1px solid var(--pshi-line); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--pshi-soft); }
.comment-form .submit { background: var(--pshi-button); color: #fff; border: 0; border-radius: 10px; min-height: 44px; padding: 0 20px; font: inherit; font-weight: 600; cursor: pointer; }

/* Print */
@media print {
	.topbar, .site-header, .site-footer, .newsletter, .article-aside, .related { display: none; }
	.article-main { max-width: none; }
}
