/*
Theme Name: TELAM – יחידת תל"מ
Theme URI: https://telem77.co.il
Author: יחידת תל"מ
Description: את הבלתי אפשרי תשאירו לנו. Trauma-informed, RTL-first theme for the Tal"m unit public hub. Navy / Olive / Bronze / Sand design system, Calm Mode, WCAG 2.2 AA. Requires the TELAM Core plugin.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 8.2
Text Domain: telam
*/

:root {
  --telam-navy: #0c2340; --telam-navy-700: #163559; --telam-navy-900: #061528;
  --telam-olive: #4b5320; --telam-olive-2: #3a4b35; --telam-olive-100: #e6e9d9;
  --telam-bronze: #c5a059; --telam-bronze-600: #a8873f;
  --telam-sand: #f4f1ea; --telam-white: #fff;
  --telam-fg: var(--telam-navy); --telam-muted: #4a5568; --telam-border: #d9d4c7;
  --telam-font-scale: 1;
  --telam-font: "Heebo", "Assistant", "Segoe UI", system-ui, -apple-system, sans-serif;
}
html[data-calm="on"] { --telam-fg: #061528; --telam-muted: #1f2937; --telam-border: #061528; --telam-sand: #fff; }

* { box-sizing: border-box; }
html { direction: rtl; font-family: var(--telam-font); font-size: calc(100% * var(--telam-font-scale)); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--telam-sand); color: var(--telam-fg); line-height: 1.6; min-height: 100dvh; text-rendering: optimizeLegibility; }
a { color: var(--telam-olive); text-underline-offset: .16em; }
h1, h2, h3 { color: var(--telam-navy); font-weight: 700; line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
img { max-width: 100%; height: auto; }
button, [role="button"], input, select, textarea { min-height: 2.75rem; font: inherit; }
:focus-visible { outline: 3px solid var(--telam-bronze-600); outline-offset: 3px; border-radius: .25rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -100px; right: 1rem; z-index: 100; background: #fff; color: var(--telam-navy); padding: .75rem 1rem; border: 2px solid var(--telam-navy); border-radius: .75rem; font-weight: 700; }
.skip-link:focus { top: .5rem; }

.telam-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }

/* Header */
.site-header { background: var(--telam-navy); color: #fff; border-bottom: 4px solid var(--telam-bronze); }
.site-header a { color: #fff; }
.war-banner { background: var(--telam-bronze); color: var(--telam-navy); text-align: center; font-weight: 700; padding: .5rem 1rem; }
.site-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.site-brand > * { min-width: 0; max-width: 100%; }
.site-brand .brand { text-decoration: none; display: flex; flex-direction: column; }
.site-brand .brand-name { font-size: 1.5rem; font-weight: 700; overflow-wrap: anywhere; }
html[data-calm="on"] .site-brand .brand-name { font-size: 1.25rem; }
.site-brand .brand-slogan { font-size: .9rem; color: var(--telam-sand); }
.site-brand .brand-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-nav { background: var(--telam-navy-900); border-top: 1px solid rgb(255 255 255 / .15); }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: .95rem; display: inline-block; padding: .5rem 0; }
.site-nav a:hover, .site-nav .current-menu-item > a { text-decoration: underline; }
.site-nav .menu-item-emergency > a { color: var(--telam-bronze); }
html[data-calm="on"] .site-nav .menu-item-nonessential { display: none; }
html[data-calm="on"] .site-nav .menu-item-emergency > a { color: #fff; }

/* Main */
.site-main { padding: 2rem 0 3rem; }
.page-title { margin-top: 0; }
.entry-content > p:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2rem; }

/* Footer */
.site-footer { background: var(--telam-navy); color: #fff; border-top: 4px solid var(--telam-olive); margin-top: 3rem; }
.site-footer a { color: var(--telam-sand); }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h2 { color: #fff; font-size: 1.125rem; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem 0; font-size: .95rem; }
.site-footer .fine { font-size: .8rem; color: rgb(244 241 234 / .8); }

/* Content width for long text */
.entry-content > p, .entry-content > ul, .entry-content > ol { max-width: 68ch; }
.telam-hero { max-width: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
