/*
Theme Name: נתיבותי – קול התושב
Theme URI: https://sos.netivoti.co.il/
Author: נתיבותי
Author URI: https://netivoti.co.il/
Description: תבנית ייעודית וקלה לפורטל הפניות הציבוריות "נתיבותי – קול התושב". RTL, נגישה, מהירה, בלי ספריות חיצוניות.
Version: 1.2.5
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: nkh
*/

:root {
	--navy: #0b2545;
	--navy-2: #13406f;
	--sky: #1fa2e0;
	--sky-dark: #0a6390;
	--sky-soft: #e7f5fc;
	--ink: #1b2a3a;
	--muted: #4f5f70;
	--line: #d6e2ec;
	--bg: #f4f7fa;
	--red: #c62828;
	--radius: 14px;
	--wrap: 1180px;
	--font: "Rubik", "Heebo", "Assistant", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.7; color: var(--ink); background: #fff; direction: rtl; text-align: right; }
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--sky-dark); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

/* ---------- accessibility ---------- */
.skip-link { position: absolute; top: -60px; right: 12px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 3px solid #f5b54a; outline-offset: 2px; border-radius: 4px; }
.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; }

/* ---------- top strip ---------- */
.topstrip { background: var(--navy); color: #dbe9f5; font-size: 14px; }
.topstrip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.topstrip a { color: #fff; font-weight: 700; text-decoration: none; }
.topstrip a:hover { text-decoration: underline; color: #fff; }
.topstrip .badge-ind { display: inline-flex; align-items: center; gap: 6px; }
.topstrip .badge-ind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); display: inline-block; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(11, 37, 69, .05); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); display: grid; place-items: center; flex: 0 0 48px; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 22px; font-weight: 800; color: var(--navy); }
.brand-name span { color: var(--sky-dark); }
.brand-sub { font-size: 13px; color: var(--muted); font-weight: 500; }

.nav-toggle { display: none; background: var(--sky-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: none; }
.main-nav a:hover { background: var(--sky-soft); color: var(--navy); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

@media (max-width: 1000px) {
	.nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
	.main-nav { position: absolute; top: 100%; right: 0; left: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(11, 37, 69, .12); display: none; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; padding: 10px 14px 16px; }
	.main-nav a { padding: 14px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
	.brand-sub { display: none; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { background: var(--bg); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.crumbs .wrap { padding-top: 10px; padding-bottom: 10px; }
.crumbs a { color: var(--navy-2); text-decoration: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 26px; border-radius: 12px; font: inherit; font-weight: 800; font-size: 18px; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .08s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--sky); color: var(--navy); }
.btn-primary:hover { background: #4bb9eb; color: var(--navy); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(31, 162, 224, .35), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 72px; }
.hero h1 { color: #fff; max-width: 820px; }
.hero .lead { font-size: clamp(18px, 2.2vw, 22px); color: #dceaf6; max-width: 760px; margin-bottom: 26px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .kicker { display: inline-block; background: rgba(255, 255, 255, .12); color: #cfeafa; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero-note { margin-top: 26px; font-size: 15px; color: #b9d4ea; display: flex; gap: 8px; align-items: flex-start; max-width: 760px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 19px; }
.eyebrow { color: var(--sky-dark); font-weight: 800; font-size: 15px; letter-spacing: .3px; margin-bottom: 6px; display: block; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; position: relative; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-top: 5px solid var(--sky); }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 17px; }

.notice { background: var(--sky-soft); border: 1px solid #b9dcf0; border-right: 5px solid var(--sky); border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; }
.notice strong { color: var(--navy); }

/* updates list */
.updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.update { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; }
.update-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 15px; color: var(--muted); }
.tag { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: var(--sky-soft); color: var(--navy); }
.tag-official { background: #dcfce7; color: #14532d; }
.tag-action { background: #fef3c7; color: #78350f; }
.tag-open { background: #dcfce7; color: #14532d; }
.tag-waiting { background: #fef3c7; color: #78350f; }
.tag-closed { background: #e0e7ff; color: #312e81; }
.update h3 { margin: 0; font-size: 19px; }
.update p { margin: 0; white-space: pre-line; }
.empty { background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; color: var(--muted); }

.track-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.track-table th, .track-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.track-table th { background: var(--navy); color: #fff; font-size: 16px; }
@media (max-width: 700px) { .track-table thead { display: none; } .track-table tr { display: block; border-bottom: 1px solid var(--line); } .track-table td { display: block; border: 0; padding: 6px 16px; } .track-table td:first-child { padding-top: 14px; } .track-table td:last-child { padding-bottom: 14px; } }

/* cta band */
.band { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 20px; padding: 34px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0 0 6px; }
.band p { margin: 0; color: #d4e6f5; }

/* ---------- content pages ---------- */
.page-head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 46px 0 40px; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #d4e6f5; margin: 10px 0 0; font-size: 19px; max-width: 760px; }
.content { padding: 46px 0 64px; }
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-right: 1.3em; padding-left: 0; }
.prose li { margin-bottom: .4em; }
.prose details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; }
.prose summary { cursor: pointer; padding: 16px 18px; font-weight: 800; color: var(--navy); font-size: 19px; list-style-position: inside; }
.prose details[open] summary { border-bottom: 1px solid var(--line); }
.prose details > div { padding: 14px 18px 4px; }
.updated-at { color: var(--muted); font-size: 15px; margin-top: 30px; }

/* plugin pages sit inside our layout */
.kh-main { background: var(--bg); padding-bottom: 20px; }

/* ---------- footer ---------- */
.site-footer { background: #071a31; color: #c9d9e8; padding: 46px 0 22px; font-size: 16px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.site-footer h2 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: #9fb6cc; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }

/* 404 / search */
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type="search"] { flex: 1; min-height: 50px; border: 2px solid var(--line); border-radius: 10px; padding: 0 14px; font: inherit; }
.lead-p { font-size: 20px; color: var(--navy); }
.page-intro p { color: #d4e6f5; margin: 10px 0 0; font-size: 19px; }
.kh-wrap .kh-section-title { margin-top: 0; }
.home .kh-wrap { padding: 0; max-width: none; }
.home .kh-archive > .kh-section-title:first-child { display: none; }

/* ---------- v1.0.1: accessibility & mobile polish ---------- */
.brand-name { white-space: nowrap; }
@media (max-width: 420px) { .brand-name { font-size: 18px; } .brand-mark { width: 42px; height: 42px; flex-basis: 42px; } }
/* AA contrast for the plugin's share buttons (white text) */
.kh-wrap .kh-share-wa { background: #0f7a3f; }
.kh-wrap .kh-share-fb { background: #1565c0; }
.kh-wrap .kh-share-copy { background: var(--sky-soft); color: var(--navy) !important; }

/* ---------- v1.1.0: footer with the Netivoti network ---------- */
.site-footer h2 { font-size: 18px; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
.foot-about p { margin: 0 0 10px; max-width: 560px; }
.foot-ind { color: #fff; font-weight: 700; font-size: 15px; }
.foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.network { margin-top: 32px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .12); }
.network h2 { color: #fff; margin-bottom: 14px; }
.net-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.net-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: #fff !important; text-decoration: none !important; transition: background .15s, border-color .15s; }
.net-card:hover { background: rgba(31, 162, 224, .16); border-color: rgba(124, 200, 239, .55); }
.net-icon { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; background: #13406f; color: #7cc8ef; display: grid; place-items: center; }
.net-icon svg { width: 26px; height: 26px; }
.net-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.net-text strong { font-size: 16px; }
.net-text span { font-size: 14px; color: #b9cde0; }
.net-ext { color: #7cc8ef; font-size: 18px; }
.foot-bottom { justify-content: center; text-align: center; color: #b9cde0; }
@media (max-width: 1000px) { .net-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .net-grid { grid-template-columns: 1fr; } }

/* ---------- topics index ---------- */
.more-topics { margin-top: 22px; }
.topics-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.status-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.status-tabs a { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: none; }
.status-tabs a:hover { border-color: var(--sky); }
.status-tabs a.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.status-tabs .count { font-weight: 500; }
.topic-search { display: flex; gap: 8px; flex: 1; max-width: 460px; min-width: 260px; }
.topic-search input { flex: 1; min-height: 50px; border: 2px solid var(--line); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 17px; }
.topic-search input:focus { border-color: var(--sky); }
.results-note { color: var(--muted); font-size: 16px; }
.topics-index .kh-wrap { padding: 0; max-width: none; }
.pager ul { list-style: none; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 0; margin: 30px 0 0; }
.pager a, .pager span { display: inline-block; min-width: 44px; padding: 10px 14px; text-align: center; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; text-decoration: none; }
.pager .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.kh-step h2[tabindex="-1"]:focus,.kh-step h3[tabindex="-1"]:focus{outline:3px solid var(--sky);outline-offset:4px;border-radius:4px}

/* ---------- v1.2.0: promo video (vertical, click-to-load) ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.hero-video { width: 270px; }
.promo-player { margin: 0; }
.promo-frame { position: relative; aspect-ratio: 9 / 16; width: 100%; border-radius: 26px; overflow: hidden; background: #0b2545; border: 6px solid #fff; box-shadow: 0 18px 50px rgba(5, 20, 40, .35); }
.hero .promo-frame { border-color: rgba(255, 255, 255, .9); }
.promo-poster, .promo-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-frame video { background: #000; object-fit: contain; }
.promo-play { position: absolute; inset: 0; width: 100%; border: 0; margin: 0; padding: 0; cursor: pointer; background: linear-gradient(180deg, rgba(11, 37, 69, 0) 40%, rgba(11, 37, 69, .55) 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font: inherit; }
.promo-play-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(31, 162, 224, .28), 0 8px 24px rgba(0, 0, 0, .3); transition: transform .2s; }
.promo-play-icon svg { margin-right: -4px; }
.promo-play-text { background: rgba(11, 37, 69, .82); padding: 4px 14px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.promo-play:hover .promo-play-icon, .promo-play:focus-visible .promo-play-icon { transform: scale(1.08); }
.promo-play:focus-visible { outline: 4px solid #ffd54a; outline-offset: -8px; }
.promo-len { position: absolute; top: 12px; left: 12px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 6px; pointer-events: none; }
.promo-frame.is-playing .promo-play, .promo-frame.is-playing .promo-poster, .promo-frame.is-playing .promo-len { display: none; }
.promo-cap { text-align: center; font-size: 14px; margin-top: 10px; color: var(--muted); }
.hero .promo-cap { color: #b9d4ea; }
.promo-noscript { position: absolute; bottom: 14px; right: 14px; left: 14px; text-align: center; background: #fff; padding: 8px; border-radius: 8px; }
.promo-inline-box { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; align-items: center; background: var(--sky-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 28px 0 34px; }
.promo-inline-box h2 { margin-top: 4px; }
.promo-inline-box .eyebrow { display: inline-block; }
.promo-mini { font-size: 15px; color: var(--muted); margin-bottom: 0; }
@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; gap: 30px; }
	.hero-video { width: min(240px, 64vw); margin: 0 auto; }
	.promo-inline-box { grid-template-columns: 1fr; padding: 22px 18px; }
	.promo-inline-box .promo-player { width: min(240px, 66vw); margin: 0 auto; }
}

/* v1.2.1: keep form steps clear of the sticky header */
.kh-step, .kh-step h2, .kh-step h3 { scroll-margin-top: 96px; }
.admin-bar .kh-step, .admin-bar .kh-step h2, .admin-bar .kh-step h3 { scroll-margin-top: 130px; }

/* v1.2.2: reflow at 320px (400% zoom) – header fits without horizontal scroll */
@media (max-width: 360px) {
	.wrap { padding: 0 12px; }
	.site-header .wrap { gap: 8px; }
	.brand { gap: 8px; min-width: 0; }
	.brand-name { font-size: 16px; }
	.brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
	.brand-mark svg { width: 24px; height: 24px; }
	.nav-toggle { padding: 9px 11px; flex: 0 0 auto; }
	.topic-search { min-width: 0; width: 100%; }
	.topic-search input { min-width: 0; }
	.nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* v1.2.4: email subject / recipient lines wrap between words (no mid-word breaks) */
body .kh-wrap .kh-mailmeta dd, body .kh-wrap .kh-summary dd { word-break: normal; overflow-wrap: anywhere; }
