/*
Theme Name: Yad Shniya
Description: ערכת עיצוב מקורית ללוח מודעות יד שנייה. עובדת יחד עם התוסף "לוח מודעות יד שנייה".
Version: 1.0.5
Author: ya-shniya
Text Domain: yad-theme
Requires PHP: 7.4
*/

:root {
	--yt-header-h: 72px;
	--yt-font: 'Heebo', 'Segoe UI', Arial, sans-serif;
	--yt-fs: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--yt-fs); scroll-padding-top: calc(var(--yt-header-h) + 12px); }
body { margin: 0; font-family: var(--yt-font); background: var(--yb-bg, #f5f6f8); color: var(--yb-ink, #1c2330); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--yb-primary, #0f5f70); }
h1, h2, h3 { line-height: 1.25; }
:focus-visible { outline: 3px solid var(--yb-accent, #f5b400); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.yt-skip { position: absolute; top: -60px; inset-inline-start: 12px; background: #1c2330; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 1000; }
.yt-skip:focus { top: 10px; }

/* Header */
.yt-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--yb-line, #e3e6eb); box-shadow: 0 2px 10px rgba(16, 24, 40, .04); }
.yt-header-in { width: min(1320px, 100% - 32px); margin-inline: auto; height: var(--yt-header-h); display: flex; align-items: center; gap: 18px; }
.yt-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--yb-ink, #1c2330); flex: none; }
.yt-brand-txt { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.yt-brand-light { color: #fff; }
.yt-custom-logo { max-height: 48px; width: auto; }
.yt-nav { flex: 1; min-width: 0; }
.yt-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.yt-nav-item { position: relative; }
.yt-nav-item > a { display: block; padding: 24px 12px; text-decoration: none; color: var(--yb-ink, #1c2330); font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.yt-nav-item:hover > a, .yt-nav-item:focus-within > a { color: var(--yb-primary, #0f5f70); border-bottom-color: var(--yb-accent, #f5b400); }
.yt-mega { position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; background: #fff; border: 1px solid var(--yb-line, #e3e6eb); border-radius: 0 0 14px 14px; box-shadow: 0 16px 40px rgba(16, 24, 40, .14); padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.yt-nav-item:hover .yt-mega, .yt-nav-item:focus-within .yt-mega { opacity: 1; visibility: visible; transform: none; }
.yt-mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.yt-mega a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--yb-ink, #1c2330); text-decoration: none; }
.yt-mega a:hover { background: var(--yb-primary-soft, #e3f1f3); color: var(--yb-primary-dark, #0a4552); }
.yt-mega-all a { font-weight: 700; color: var(--yb-primary, #0f5f70); }
.yt-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex: none; }
.yt-icon-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; min-width: 42px; justify-content: center; padding: 0 10px; border-radius: 999px; color: var(--yb-ink, #1c2330); text-decoration: none; font-weight: 600; }
.yt-icon-btn:hover { background: #f1f3f6; }
.yt-user { border: 1px solid var(--yb-line, #e3e6eb); }
.yt-user span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-post-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: var(--yb-accent, #f5b400); color: var(--yb-accent-ink, #2a2100); font-weight: 700; text-decoration: none; white-space: nowrap; }
.yt-post-btn:hover { background: var(--yb-accent-dark, #d99a00); }
.yt-burger { display: none; border: 0; background: none; padding: 8px; cursor: pointer; color: var(--yb-ink, #1c2330); }
.yt-burger .yb-ico { width: 26px; height: 26px; }

/* Drawer (mobile) */
.yt-drawer { position: fixed; inset: 0; z-index: 200; background: rgba(15, 20, 30, .45); }
.yt-drawer-panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(340px, 88%); background: #fff; padding: 16px; overflow-y: auto; display: grid; align-content: start; gap: 14px; }
.yt-drawer-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; }
.yt-drawer-close { border: 0; background: none; cursor: pointer; padding: 6px; }
.yt-drawer-list { list-style: none; margin: 0; padding: 0; }
.yt-quick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yt-quick a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--yb-line, #e3e6eb); border-radius: 12px; background: #f7f9fb; color: var(--yb-ink, #1c2330); text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.yt-quick li:first-child { grid-column: 1 / -1; }
.yt-quick li:first-child a { background: #E6F6EC; border-color: #bfe6cc; justify-content: center; font-size: 1.05rem; }
.yt-drawer-sub { font-size: .9rem; color: var(--yb-muted, #5b6472); margin-bottom: -8px; }
.yt-drawer-list > li > a, .yt-drawer-list summary { display: block; padding: 13px 4px; border-bottom: 1px solid var(--yb-line, #e3e6eb); text-decoration: none; color: var(--yb-ink, #1c2330); font-weight: 600; cursor: pointer; }
.yt-drawer-list details ul { list-style: none; padding: 4px 18px 10px; margin: 0; }
.yt-drawer-list details a { display: block; padding: 8px 0; color: var(--yb-ink, #1c2330); text-decoration: none; }

/* Hero */
.yt-hero { background: radial-gradient(1200px 400px at 85% -10%, #fff3cc 0%, transparent 60%), linear-gradient(135deg, #0f5f70 0%, #0d7487 55%, #129a9e 100%); color: #fff; padding: clamp(36px, 6vw, 72px) 0 clamp(60px, 7vw, 90px); }
.yt-hero-in { width: min(1000px, 100% - 32px); margin-inline: auto; text-align: center; }
.yt-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em; }
.yt-hero h1 span { color: var(--yb-accent, #f5b400); }
.yt-hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); opacity: .92; margin: 0 0 26px; }
.yt-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 190px) minmax(0, 170px) auto; background: #fff; border-radius: 18px; padding: 8px; gap: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.yt-search input, .yt-search select { border: 0; min-height: 52px; padding: 0 14px; font: inherit; font-size: 1.02rem; color: var(--yb-ink, #1c2330); background: transparent; border-radius: 12px; min-width: 0; }
.yt-search select { border-inline-start: 1px solid var(--yb-line, #e3e6eb); border-radius: 0; }
.yt-search input:focus, .yt-search select:focus { outline: 2px solid var(--yb-primary, #0f5f70); outline-offset: -2px; }
.yt-search button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; background: var(--yb-accent, #f5b400); color: var(--yb-accent-ink, #2a2100); font: inherit; font-weight: 800; font-size: 1.05rem; padding: 0 26px; cursor: pointer; }
.yt-search button:hover { background: var(--yb-accent-dark, #d99a00); }

/* Category circles */
.yt-cats { margin-top: -46px; position: relative; }
.yt-cat-row { list-style: none; margin: 0; padding: 18px 12px; display: flex; gap: 6px; justify-content: space-between; overflow-x: auto; background: #fff; border-radius: 20px; box-shadow: 0 8px 26px rgba(16, 24, 40, .09); scrollbar-width: thin; }
.yt-cat-row li { flex: 1 0 92px; }
.yt-cat-row a { display: grid; justify-items: center; gap: 8px; text-decoration: none; color: var(--yb-ink, #1c2330); padding: 6px 2px; border-radius: 14px; }
.yt-cat-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--cat-bg, #f2f2f2); display: grid; place-items: center; font-size: 2rem; transition: transform .15s; }
.yt-cat-row a:hover .yt-cat-circle { transform: scale(1.07); }
.yt-cat-name { font-weight: 600; font-size: .93rem; text-align: center; }

/* Rows */
.yt-row { margin: 38px 0 0; }
.yt-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.yt-row-head h2 { margin: 0; font-size: 1.45rem; }
.yt-row-head a { font-weight: 600; text-decoration: none; }
.yt-promo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 44px 0 0; }
.yt-promo-card { border-radius: 20px; padding: 26px; display: grid; gap: 8px; align-content: start; }
.yt-promo-card h2 { margin: 0; font-size: 1.35rem; }
.yt-promo-card p { margin: 0 0 10px; }
.yt-promo-card .yb-btn { justify-self: start; }
.yt-promo-post { background: #fff4cf; }
.yt-promo-jobs { background: #dff1f3; }
.yt-promo-biz { background: #eef0ff; }
.yt-why { margin: 46px 0 0; text-align: center; }
.yt-why h2 { font-size: 1.6rem; margin: 0 0 18px; }
.yt-why ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.yt-why li { background: #fff; border: 1px solid var(--yb-line, #e3e6eb); border-radius: 18px; padding: 22px 18px; display: grid; gap: 6px; justify-items: center; }
.yt-why li > span { font-size: 2rem; }
.yt-why p { margin: 0; color: var(--yb-muted, #5f6878); font-size: .95rem; }
.yt-seo { max-width: 900px; margin: 46px auto 50px; text-align: center; }
.yt-seo h2 { color: var(--yb-ink, #1c2330); }

/* Pages */
.yt-page { padding: 24px 0 50px; }
.yt-text-page { padding: clamp(20px, 4vw, 44px); max-width: 900px; margin: 0 auto; }
.yt-content { line-height: 1.8; font-size: 1.04rem; }
.yt-content h2 { margin-top: 1.6em; }

/* Footer */
.yt-footer { background: #13252c; color: #cfd8dc; margin-top: 40px; }
.yt-footer-in { width: min(1240px, 100% - 32px); margin-inline: auto; padding: 46px 0 26px; display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 26px; }
.yt-footer-brand p { margin: 12px 0 16px; line-height: 1.7; }
.yt-footer-col h2 { font-size: 1rem; margin: 0 0 10px; }
.yt-footer-col h2 a { color: #fff; text-decoration: none; }
.yt-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.yt-footer a { color: #cfd8dc; text-decoration: none; }
.yt-footer a:hover { color: #fff; text-decoration: underline; }
.yt-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); width: min(1240px, 100% - 32px); margin-inline: auto; padding: 16px 0 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .9rem; }
.yt-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.yt-footer-bottom p { margin: 0; }

/* Accessibility widget */
.yt-a11y { position: fixed; bottom: 18px; left: 18px; z-index: 300; }
.yt-a11y-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #1e3a8a; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.yt-a11y-btn .yb-ico { width: 28px; height: 28px; }
.yt-a11y-panel { position: absolute; bottom: 62px; left: 0; width: 230px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22); padding: 12px; display: grid; gap: 6px; }
.yt-a11y-panel button { text-align: start; padding: 10px 12px; border: 1px solid var(--yb-line, #e3e6eb); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; color: #1c2330; }
.yt-a11y-panel button[aria-pressed="true"] { background: #1e3a8a; color: #fff; }
.yt-a11y-panel a { padding: 6px 4px; font-size: .9rem; }

html.a11y-contrast body { background: #000 !important; color: #fff !important; }
html.a11y-contrast .yb-card, html.a11y-contrast .yt-header, html.a11y-contrast .yb-ad-card, html.a11y-contrast .yt-cat-row, html.a11y-contrast .yt-why li, html.a11y-contrast .yb-input, html.a11y-contrast .yt-mega, html.a11y-contrast .yt-promo-card { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast .yt-nav-item > a, html.a11y-contrast .yb-muted, html.a11y-contrast .yb-ad-foot { color: #ffeb3b !important; }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-font body, html.a11y-font .yb-input, html.a11y-font button { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: .02em; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; }

@media (max-width: 1100px) {
	.yt-nav { display: none; }
	.yt-burger { display: inline-flex; }
	.yt-footer-in { grid-template-columns: 1fr 1fr 1fr; }
	.yt-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.yt-search { grid-template-columns: 1fr 1fr; }
	.yt-search input { grid-column: 1 / -1; border-bottom: 1px solid var(--yb-line, #e3e6eb); border-radius: 0; }
	.yt-search select:first-of-type { border-inline-start: 0; }
	.yt-search button { grid-column: 1 / -1; min-height: 50px; justify-content: center; }
	.yt-promo, .yt-why ul { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	:root { --yt-header-h: 62px; }
	.yt-header-in { gap: 8px; width: calc(100% - 20px); }
	.yt-brand-txt { font-size: 1.15rem; }
	.yt-mark { width: 34px; height: 34px; }
	.yt-hide-sm { display: none; }
	.yt-post-btn { padding: 9px 12px; }
	.yt-post-btn span { display: none; }
	.yt-cat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; overflow: visible; border-radius: 16px; padding: 14px 8px; }
	.yt-cat-row li { flex: none; }
	.yt-cat-name { font-size: .8rem; }
	.yt-cat-circle { width: 60px; height: 60px; font-size: 1.6rem; }
	.yt-footer-in { grid-template-columns: 1fr 1fr; }
	.yt-a11y { bottom: 12px; left: 12px; }
	.yt-a11y-btn { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* Write-an-article call to action */
.yt-write-cta { display: flex; align-items: center; gap: 18px; margin: 40px 0 0; padding: 22px 24px; background: linear-gradient(90deg, var(--yb-primary-soft, #e3f1f3), #fff); }
.yt-write-ico { flex: 0 0 auto; width: 60px; height: 60px; display: grid; place-items: center; font-size: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.yt-write-txt { flex: 1 1 auto; }
.yt-write-txt h2 { margin: 0 0 4px; font-size: 1.3rem; }
.yt-write-txt p { margin: 0; color: var(--yb-muted, #5f6878); }
@media (max-width: 680px) { .yt-write-cta { flex-direction: column; text-align: center; } .yt-write-cta .yb-btn { width: 100%; } }
