/* =====================================================================
   הבית של כולנו - עיצוב בסיסי (CSS פשוט, ללא תלות בפריימוורק)
   ===================================================================== */

:root {
  --primary: #0f2a52;
  --primary-2: #173a6e;
  --primary-foreground: #ffffff;

  --accent-1: #f5c451;
  --accent-2: #e08b2e;
  --accent-foreground: #241905;

  --background: #ffffff;
  --foreground: #1a2233;
  --muted-foreground: #5b6478;

  --card: #ffffff;
  --border: #e4e7ee;
  --secondary: #f3f5fa;
  --secondary-foreground: #313a4d;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-soft: 0 1px 2px rgba(15, 27, 51, .04), 0 4px 12px rgba(15, 27, 51, .06);
  --shadow-elegant: 0 10px 15px -3px rgba(15, 27, 51, .12), 0 4px 6px -4px rgba(15, 27, 51, .1);

  --hero-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --gold-gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
}
.container-narrow { max-width: 880px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  border-radius: var(--radius-sm);
  transition: transform .15s ease, background-color .15s ease, opacity .15s ease;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 1rem; border-radius: 10px; }

.btn-gold {
  background: var(--gold-gradient);
  color: var(--accent-foreground);
  box-shadow: var(--shadow-elegant);
}
.btn-gold:hover { transform: scale(1.03); }

.btn-outline {
  background: transparent;
  color: var(--primary-foreground);
  border: 2px solid rgba(255, 255, 255, .4);
}
.btn-outline:hover { background: rgba(255, 255, 255, .1); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover { background: var(--primary-2); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
  background: var(--primary);
  box-shadow: var(--shadow-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.brand {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-width: 0;
}
.brand-badge {
    background: #fff;
    display: grid;
    place-items: center;
    height: 80px;
    width: 90px;
    flex-shrink: 0;
    border-radius: 12px;
    color: var(--accent-foreground);
    font-weight: 900;
    font-size: 1.125rem;
    padding: 4px;
}
.brand-text { min-width: 0; }
.brand-name {
  display: block;
  font-weight: 900;
  color: var(--primary-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .8);
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .9);
  transition: background-color .15s ease, color .15s ease;
}
.nav-links a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-links .btn { margin-inline-start: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-foreground);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .site-header { background: var(--primary); }
  .nav-links {
    position: fixed;
    top: 64px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--primary);
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-soft);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px; }
  .nav-links .btn { margin: 8px 0 0; text-align: center; }
  .nav-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-gradient);
  padding: 130px 0 90px;
}
.hero-blob {
  position: absolute;
  inset-inline-start: -96px;
  top: 40px;
  height: 300px;
  width: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  filter: blur(60px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: 1.15fr .85fr;
}
.hero-copy { color: var(--primary-foreground); }
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  padding: 7px 18px;
  font-size: 1.2rem; 
  font-weight: 700;
}
.hero h1 {
  margin: 20px 0 0;
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 900;
}
.lead {
  margin: 18px 0 0;
  max-width: 34rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 32rem;
  margin: 38px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.hero-stats dt { font-size: 1.75rem; font-weight: 900; color: var(--accent-1); }
.hero-stats dd { margin: 0; font-size: .8rem; font-weight: 500; color: rgba(255, 255, 255, .8); }

.hero-portrait { position: relative; margin: 0 auto; max-width: 24rem; }
.portrait-frame {
  position: absolute;
  inset: 0;
  transform: translate(14px, 14px);
  border-radius: 24px;
  background: var(--gold-gradient);
}
.portrait-img {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: var(--shadow-elegant);
  object-fit: cover;
}
.portrait-caption {
  position: relative;
  margin: -32px 16px 0;
  display: inline-block;
  border-radius: 16px;
  background: var(--background);
  padding: 12px 20px;
  box-shadow: var(--shadow-elegant);
}
.portrait-caption .name { margin: 0; font-weight: 900; }
.portrait-caption .list-name { margin: 2px 0 0; font-size: .875rem; color: var(--muted-foreground); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: 80px 0; }
.section-muted { background: var(--secondary); }
.eyebrow {
  margin: 0;
  font-size: .85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-2);
}
.eyebrow-onhero { color: var(--accent-1); }
h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 900;
}
h2.onhero { color: var(--primary-foreground); }
.section-intro {
  max-width: 46rem;
  margin: 16px 0 0;
  color: var(--muted-foreground);
}
.section-subtitle { margin: 56px 0 0; font-size: 1.5rem; font-weight: 900; }

blockquote {
  margin: 20px 0 0;
  padding-inline-start: 16px;
  border-inline-start: 4px solid var(--accent-2);
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(26, 34, 51, .8);
}

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.card h3, .card h4 { margin: 16px 0 0; font-weight: 900; }
.card p { margin: 10px 0 0; color: var(--muted-foreground); }

.about-grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
  grid-template-columns: 2fr 1fr;
}
.card-highlight {
  background: var(--hero-gradient);
  color: var(--primary-foreground);
  border: none;
  box-shadow: var(--shadow-elegant);
}
.card-highlight h3 { color: var(--primary-foreground); }
.card-highlight p { color: rgba(255, 255, 255, .85); }

.cards-grid-4 {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  grid-template-columns: repeat(4, 1fr);
}
.cards-grid-2 {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) { .about-grid, .cards-grid-4, .cards-grid-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .about-grid, .cards-grid-4, .cards-grid-2 { grid-template-columns: 1fr; } }

.icon-badge {
  display: grid;
  place-items: center;
  height: 44px;
  width: 44px;
  border-radius: 12px;
  background: var(--secondary);
  font-size: 1.25rem;
}
.card-accent {
  border-inline-start: 4px solid var(--accent-2);
  background: rgba(243, 245, 250, .6);
}
.icon-badge-light { background: var(--background); }

/* ---------------------------------------------------------------- accordion */
.accordion { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.accordion-header { margin: 0; }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 20px;
  cursor: pointer;
  text-align: start;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--foreground);
}
.accordion-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.accordion-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  height: 34px;
  width: 34px;
  border-radius: 10px;
  background: var(--gold-gradient);
  color: var(--accent-foreground);
  font-size: .9rem;
  font-weight: 900;
}
.chev { flex-shrink: 0; color: var(--muted-foreground); transition: transform .2s ease; }
.accordion-item[data-open="true"] .chev { transform: rotate(180deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
  height:0px;
}
.accordion-panel > * { overflow: hidden; }
.accordion-item[data-open="true"] .accordion-panel { grid-template-rows: 1fr;  height:auto;}
.accordion-panel ul { padding: 0 52px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.accordion-panel li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--muted-foreground);
  line-height: 1.6;
}
.accordion-panel li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .55em;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ---------------------------------------------------------------- join */
.join-section { background: var(--hero-gradient); }
.join-grid {
  display: grid;
  gap: 40px;
  align-items: start;
  grid-template-columns: 1fr 1fr;
}
.lead-onhero { margin: 16px 0 0; color: rgba(255, 255, 255, .85); }
.counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  padding: 16px 20px;
  color: rgba(255, 255, 255, .85);
  font-weight: 700;
  font-size: .9rem;
}
.counter-num { font-size: 1.75rem; font-weight: 900; color: var(--accent-1); }

@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; } }


.signature-wrapper {
  position: relative;
  margin-top: 4px;
}
.signature-wrapper canvas {
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #ddd;
  touch-action: none;
  width: 100%;
  height: 150px;
}
.signature-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}
.signature-hint {
  font-size: 0.8em;
  color: #777;
}
.btn-sm {
  padding: 4px 12px;
  font-size: 0.85em;
}
.btn-secondary {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #ddd;
}

.field.has-error input,
.field.has-error canvas {
  border-color: #dc3545 !important;
  background-color: #fff8f8;
}

.field-error {
  color: #dc3545;
  font-size: 0.85em;
  margin-top: 4px;
  margin-bottom: 0;
}

.form-status.is-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
}

.form-status.is-success {
  background-color: #d4edda;
  color: #155724;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #c3e6cb;
}

/* --- תמונות מצורפות בפניות --- */
.issue-attachment {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.issue-attachment .attachment-thumb {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: transform 0.2s;
}

.issue-attachment .attachment-thumb:hover {
    transform: scale(1.02);
}

.issue-attachment .attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #dee2e6;
}

.issue-attachment .attachment-link:hover {
    background: #e9ecef;
    text-decoration: underline;
}

/* --- Modal לתמונה מוגדלת (אופציונלי) --- */
.attachment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.attachment-modal.active {
    display: flex;
}

.attachment-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.attachment-modal .close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.attachment-modal .close-modal:hover {
    opacity: 1;
}
/* ---------------------------------------------------------------- forms */
.form-card { border-radius: 24px; padding: 28px; }
.form-card h3 { margin: 0 0 4px; font-size: 1.25rem; }
.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .95rem;
  font-family: inherit;
  background: transparent;
  color: var(--foreground);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(23, 58, 110, .12);
}
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.field-error { margin: 6px 0 0; font-size: .8rem; color: #c0392b; }

.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.form-status { margin-top: 14px; font-size: .9rem; font-weight: 700; min-height: 0; }
.form-status.is-success { color: #1e7e34; }
.form-status.is-error { color: #c0392b; }

.form-card .btn-block { margin-top: 20px; }
.form-note { margin: 12px 0 0; text-align: center; font-size: .75rem; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- issues / tracker */
.issues-grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  grid-template-columns: .9fr 1.1fr;
  align-items: start;
}
@media (max-width: 900px) { .issues-grid { grid-template-columns: 1fr; } }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .9rem;
  font-weight: 700;
  background: var(--secondary);
  color: var(--secondary-foreground);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.tab:hover { background: var(--border); }
.tab.is-active { background: var(--primary); color: var(--primary-foreground); }
.tab-count { margin-inline-start: 6px; opacity: .7; }

.issues-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--muted-foreground);
}
.issue-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.issue-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.issue-address { font-weight: 800; }
.issue-status-badge {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.issue-status-badge.pending { background: #fdf1d6; color: #8a6116; }
.issue-status-badge.in_progress { background: #dbe8fc; color: #1e4c8a; }
.issue-status-badge.resolved { background: #dcf3e2; color: #1e7e34; }
.issue-desc { margin: 10px 0 0; color: var(--muted-foreground); }
.issue-meta { margin: 10px 0 0; font-size: .78rem; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--foreground); color: var(--background); padding: 64px 0 32px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); }
.site-footer h2 { font-size: 1.5rem; }
.site-footer h3 { font-size: 1.1rem; font-weight: 900; margin: 0; }
.site-footer p { color: rgba(255, 255, 255, .7); }
.social-row { display: flex; gap: 12px; margin-top: 20px; }
.social-btn {
  display: grid;
  place-items: center;
  height: 44px;
  width: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  transition: background-color .15s ease, color .15s ease;
}
.social-btn:hover { background: var(--accent-1); color: var(--accent-foreground); }

.footer-contact-info { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-info a, .footer-contact-info .address-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, .8);
}
.footer-contact-info a:hover { color: var(--accent-1); }

.footer-cta { border-radius: 16px; background: rgba(255, 255, 255, .05); padding: 24px; }
.footer-cta .btn { margin-top: 16px; }

.footer-copy {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  text-align: center;
  font-size: .875rem;
  color: rgba(255, 255, 255, .6);
}

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
