/*
Theme Name: hesed
Theme URI: https://hesed.evhost.co.il
Author: EvolutionVIP
Description: תבנית אילני חסד – RTL, מהירה, תואמת Elementor (כולל Theme Builder). נבנתה על בסיס עיצוב Figma.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hesed
Tags: rtl-language-support, custom-logo, elementor
*/

/* אילני חסד – style.css | RTL, mobile-first, ללא תלות בספריות */
:root {
  --green-900: #3b6a2c;
  --green-800: #4a7a38;
  --green-700: #5f9a45;
  --green-btn: #2f7d32;
  --lime: #c0d93a;
  --lime-dark: #a9c22a;
  --mint: #e6f0dc;
  --sand: #f1efe9;
  --tan: #d9cfb8;
  --cream: #faf0da;
  --ink: #1b1b1b;
  --muted: #555;
  --line: #dbe6d0;
  --white: #fff;
  --radius: 16px;
  --container: 1240px;
  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--green-800); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lime-dark); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-block-start: -60px; inset-inline-start: 10px; z-index: 100; background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { inset-block-start: 10px; }

/* ---------- כפתורים ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .6em 1.4em; border-radius: 12px; border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn-donate { background: var(--green-btn); color: #fff; font-size: 1.25rem; padding-inline: 1.2em; }
.btn-donate .ico { color: var(--lime); }
.btn-donate:hover { background: var(--green-900); }
.btn-lime { background: var(--lime); color: #1d2b0f; }
.btn-lime:hover { background: var(--lime-dark); }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--green-900); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- כותרת עליונה ---------- */
.site-header { position: sticky; inset-block-start: 0; z-index: 50; background: var(--white); }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.logo img { width: 150px; }
.lang-link { font-size: .85rem; font-weight: 700; text-decoration: none; margin-inline-start: auto; order: 5; }
.btn-donate { order: 3; min-height: 44px; font-size: 1.05rem; }
.nav-toggle { order: 6; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 26px; height: 3px; background: var(--green-900); border-radius: 2px; content: ""; position: relative; }
.nav-toggle .bars::before { position: absolute; inset-block-start: -8px; }
.nav-toggle .bars::after { position: absolute; inset-block-start: 8px; }
.primary-nav { background: var(--mint); display: none; }
.primary-nav.is-open { display: block; }
.primary-nav ul { display: flex; flex-direction: column; padding-block: 8px; }
.primary-nav a { display: block; padding: 12px 4px; font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--green-900); }
.primary-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.primary-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--green-700); color: #fff; overflow: hidden; display: grid; }
.hero-media { position: relative; min-height: 220px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-body { padding: 28px 20px 36px; position: relative; }
.eyebrow { color: var(--lime); font-weight: 700; font-size: .9rem; margin: 0 0 .5em; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 800; margin-bottom: .35em; }
.hero-lead { font-size: clamp(1.05rem, 2.6vw, 1.45rem); font-weight: 500; max-width: 24ch; margin-bottom: 1.2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-hero { position: relative; background: var(--green-700); color: #fff; overflow: hidden; isolation: isolate; }
.page-hero.is-dark { background: var(--green-800); }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; z-index: -1; }
.page-hero .container { padding-block: 44px; }
.page-hero h1 { font-size: clamp(1.8rem, 5.5vw, 3.2rem); font-weight: 800; margin: 0; }
.page-hero .sub { color: var(--lime); font-size: clamp(1.05rem, 2.6vw, 1.5rem); font-weight: 500; margin: .3em 0 0; }

.tagline { background: var(--green-800); color: #fff; text-align: center; font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.6rem); padding: 14px 20px; margin: 0; }

/* ---------- סקציות ---------- */
.section { padding-block: 48px; }
.section-title { font-size: clamp(1.4rem, 3.4vw, 2rem); color: var(--green-800); font-weight: 700; text-align: start; }
.section-title.center { text-align: center; }
.section.alt { background: var(--sand); }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-weight: 700; line-height: 1.5; max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.split { display: grid; gap: 24px; align-items: center; }
.split img { border-radius: 4px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prose { color: #444; font-size: .98rem; max-width: 70ch; }
.prose h2 { color: var(--ink); font-size: clamp(1.25rem, 3vw, 1.8rem); }

/* ---------- כרטיסים ---------- */
.card-grid { display: grid; gap: 16px; }
.card { background: var(--mint); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.card h3 { color: var(--green-800); font-size: 1.2rem; font-weight: 700; margin: 0; }
.card p { font-size: .9rem; color: #444; margin: 0 0 auto; }
.card .text-link { font-size: .85rem; margin-top: 12px; }
.card-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; margin-inline-start: auto; }
.card-ico img { width: 26px; height: 26px; }
.card.outline { background: #fff; border: 1px solid var(--line); }
.card.cream { background: var(--cream); flex-direction: row; align-items: center; gap: 16px; }
.card.cream img { width: 120px; height: 120px; object-fit: contain; flex: none; }
.card.cream h3 { font-size: 1.15rem; }
.card .thumb { width: 100%; max-width: 220px; margin-inline: auto; aspect-ratio: 3/2; object-fit: contain; }

/* קרוסלה עם scroll-snap – ללא JS חובה */
.carousel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.carousel-nav { display: none; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; }
.carousel-nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.carousel > li { flex: 0 0 78%; scroll-snap-align: start; display: flex; }
.carousel .card { width: 100%; }
.js .carousel-nav { display: flex; }

/* ---------- וידאו (facade) ---------- */
.video-grid { display: grid; gap: 16px; margin-bottom: 24px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 4px; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.video .play { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.video .play::after { content: ""; border-inline-start: 0; border-block: 10px solid transparent; border-inline-end: 16px solid var(--green-800); margin-inline-end: 4px; }

/* ---------- גמ״חים ---------- */
.gemach { background: var(--mint); border-radius: var(--radius); padding: 24px; }
.gemach-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.gemach-list { display: grid; gap: 0 32px; }
.gemach details { border-bottom: 1px solid #cddcc0; }
.gemach summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; font-weight: 700; list-style: none; }
.gemach summary::-webkit-details-marker { display: none; }
.gemach summary::after { content: "⌄"; margin-inline-start: auto; color: var(--green-800); }
.gemach details[open] summary::after { content: "⌃"; }
.gemach summary img { width: 36px; height: 36px; flex: none; }
.gemach details p { margin: 0 0 14px; font-size: .92rem; color: #444; padding-inline-start: 48px; }

/* ---------- באנרים ירוקים ---------- */
.banner { display: grid; background: var(--green-800); color: #fff; border-radius: var(--radius); overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; }
.banner-body { padding: 28px; }
.banner h2, .banner h3 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: .4em; }
.banner .accent { color: var(--lime); font-weight: 700; font-size: 1.2rem; }
.banner p { font-size: .95rem; }
.banner.has-person { grid-template-columns: 1fr; text-align: center; }
.banner.has-person .banner-body { padding-bottom: 8px; }
.banner.has-person h2 { color: var(--lime); }
.banner.has-person img { object-fit: contain; object-position: bottom; max-height: 260px; min-height: 0; margin-inline: auto; }
.banner-soft { background: var(--mint); color: var(--ink); }
.banner-soft h2 { color: var(--green-800); }

.values { display: grid; gap: 16px; }
.value { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: #fff; }
.value h3 { color: var(--green-800); font-size: 1.2rem; margin-bottom: .2em; }
.value p { font-size: .88rem; color: #444; margin: 0; }
.band { background: var(--tan); text-align: center; font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: var(--green-900); padding: 22px 20px; }
.band span { display: inline-block; }

/* ---------- תרומות ---------- */
.card.pay h3 { font-size: 1.3rem; }
.card.pay { background: #fff; border: 1px solid var(--line); }
.card.pay .card-ico { margin-inline-start: 0; margin-inline-end: auto; }
.card.pay strong { color: var(--ink); }
.promise img { height: 110px; width: auto; margin-inline: auto; object-fit: contain; }
.promise { text-align: start; }
.promise h3 { margin-top: 8px; }

/* ---------- יצירת קשר + טופס ---------- */
.form-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 920px; margin-inline: auto; }
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #cfd8c4; border-radius: 10px; background: #fff; }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.form-foot small { color: var(--muted); }
.hp { position: absolute; inset-inline-start: -9999px; }
.note { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 12px; }

/* ---------- פוטר ---------- */
.site-footer { background: var(--mint); padding-block: 40px 0; margin-top: 0; }
.footer-grid { display: grid; gap: 28px; }
.footer-tag { font-weight: 800; margin: 6px 0 10px; }
.footer-title { font-size: .95rem; color: var(--green-800); margin-bottom: .6em; }
.footer-col { font-style: normal; font-size: .85rem; color: #444; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #444; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid #c9dbb9; margin-top: 28px; padding-block: 16px; text-align: center; font-size: .75rem; color: #555; }

.whatsapp { position: fixed; inset-block-end: 18px; inset-inline-end: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .card-grid.cols-2, .values { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .carousel > li { flex-basis: calc((100% - 16px) / 2); }
  .gemach-list { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .full { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .logo img { width: 190px; }
  .header-top { display: grid; grid-template-columns: 1fr auto 1fr; padding-block: 12px; }
  .logo, .btn-donate, .lang-link { grid-row: 1; }
  .logo { grid-column: 2; justify-self: center; }
  .btn-donate { grid-column: 3; justify-self: end; order: 0; font-size: 1.3rem; min-height: 52px; }
  .lang-link { grid-column: 1; justify-self: start; margin: 0; order: 0; }
  /* RTL: עמודה 1 = ימין. הלוגו במרכז לפי העיצוב, EN בימין, תרומה בשמאל */
  .nav-toggle { display: none; }
  .primary-nav { display: block; }
  .primary-nav ul { flex-direction: row; justify-content: center; gap: 36px; padding-block: 0; }
  .primary-nav a { padding: 10px 4px; font-size: .9rem; }

  .hero { grid-template-columns: 1fr 1fr; min-height: 520px; }
  .hero-body { display: flex; flex-direction: column; justify-content: center; padding: 56px max(20px, calc((100vw - var(--container)) / 2 + 20px)); order: -1; }
  .hero-media { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
  .section { padding-block: 72px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.img-first > :first-child { order: 0; }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .carousel > li { flex-basis: calc((100% - 48px) / 4); }
  .banner { grid-template-columns: 1fr 1.7fr; }
  .banner.has-person { grid-template-columns: 1fr 1fr; text-align: start; align-items: center; }
  .banner.has-person img { max-height: 220px; margin: 0; }
  .banner-body { padding: 40px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
