/* שמונה בערב — עיצוב קרם־זהב, RTL */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

:root {
  --cream: #faf6ec;
  --cream-2: #f4ecda;
  --cream-3: #efe3c8;
  --gold: #c9a24b;
  --gold-light: #e6c877;
  --gold-deep: #a5762a;
  --gold-pale: #f3e6c3;
  --brown: #4a3521;
  --brown-soft: #6b543a;
  --white: #fffdf8;
  --shadow: 0 10px 30px rgba(166, 118, 42, 0.15);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { direction: rtl; }

body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--cream);
  color: var(--brown);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(201,162,75,0.06) 0, transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(201,162,75,0.06) 0, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* נצנוצי זהב */
.sparkle {
  position: fixed;
  width: 6px; height: 6px;
  background: radial-gradient(circle, #fff 0%, var(--gold-light) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: sparkle-float linear infinite;
  opacity: 0;
}
@keyframes sparkle-float {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(-110vh) scale(1.1); opacity: 0; }
}

/* ---------- כותרת עליונה ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold-pale);
  box-shadow: 0 2px 20px rgba(166,118,42,0.08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo-link img {
  height: 64px;
  filter: drop-shadow(0 2px 6px rgba(166,118,42,0.35));
  transition: transform 0.3s ease;
}
.logo-link img:hover { transform: scale(1.05); }
nav.main-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
nav.main-nav a {
  color: var(--brown);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.25s ease;
  font-size: 15px;
}
nav.main-nav a:hover, nav.main-nav a.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  box-shadow: 0 4px 12px rgba(166,118,42,0.3);
}
.btn-gold {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  color: #fff !important;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(166,118,42,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(166,118,42,0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-gold:active { transform: translateY(0); }
.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--gold-deep);
  border: 2px solid var(--gold);
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  text-align: center;
}
.btn-ghost:hover { background: var(--gold-pale); }

/* ---------- הירו ---------- */
.hero {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-bottom: 2px solid var(--gold-pale);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/img/hero-couple-dark.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(250,246,236,0.96) 30%, rgba(250,246,236,0.75) 60%, rgba(250,246,236,0.25) 100%);
}
.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 20px 60px;
  text-align: center;
}
.hero-logo img {
  height: 110px;
  filter: drop-shadow(0 4px 12px rgba(166,118,42,0.4));
  animation: fade-in-down 0.9s ease both;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  margin: 14px 0 6px;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold) 60%, var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fade-in-up 0.9s 0.15s ease both;
}
.hero p.subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--brown-soft);
  margin-bottom: 26px;
  animation: fade-in-up 0.9s 0.3s ease both;
}

/* טיימר */
.timer-wrap { animation: fade-in-up 0.9s 0.45s ease both; }
.timer-label { font-weight: 600; color: var(--brown-soft); margin-bottom: 10px; font-size: 16px; }
.timer { display: flex; gap: 12px; justify-content: center; direction: ltr; }
.timer-box {
  background: var(--white);
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold-pale);
  outline-offset: 3px;
  border-radius: 14px;
  min-width: 92px;
  padding: 12px 8px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.timer-box::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer { 0% { left: -60%; } 60%, 100% { left: 130%; } }
.timer-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.timer-unit { font-size: 12px; color: var(--brown-soft); font-weight: 600; margin-top: 4px; }

/* ---------- תוכן ---------- */
main { position: relative; z-index: 2; }
.section { max-width: 1200px; margin: 0 auto; padding: 46px 20px; }
.section-title {
  text-align: center;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--brown);
}
.section-sub { text-align: center; color: var(--brown-soft); margin-bottom: 30px; font-size: 16px; }
.gold-divider {
  width: 120px; height: 3px; margin: 0 auto 26px;
  background: linear-gradient(to left, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* ---------- כרטיסי מועמדים ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.candidate-card {
  background: var(--white);
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold-pale);
  outline-offset: 5px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: fade-in-up 0.7s ease both;
  display: flex;
  flex-direction: column;
}
.candidate-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 44px rgba(166,118,42,0.28);
}
.candidate-card:nth-child(2) { animation-delay: 0.1s; }
.candidate-card:nth-child(3) { animation-delay: 0.2s; }
.candidate-card:nth-child(4) { animation-delay: 0.3s; }
.card-photo { position: relative; aspect-ratio: 4/4.6; overflow: hidden; background: var(--cream-2); }
.card-photo img.photo {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.candidate-card:hover .card-photo img.photo { transform: scale(1.06); }
.card-photo .photo-logo {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)) drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  pointer-events: none;
}
.card-photo .no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 54px; color: var(--gold);
  background: linear-gradient(135deg, var(--cream-2), var(--gold-pale));
}
.card-body { padding: 16px 16px 18px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.card-meta { color: var(--brown-soft); font-size: 14.5px; margin-bottom: 2px; }
.card-bio {
  font-size: 13.5px; color: var(--brown-soft);
  margin: 8px 0 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-body .btn-gold { width: 100%; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  background: var(--white);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  color: var(--brown-soft);
  font-size: 17px;
}
.empty-state .big { font-size: 44px; margin-bottom: 10px; }

/* ---------- איך זה עובד ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 10px; }
.step {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  animation: fade-in-up 0.7s ease both;
}
.step:hover { transform: translateY(-5px); }
.step .num {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: #fff; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(166,118,42,0.35);
}
.step h3 { margin-bottom: 8px; font-size: 18px; }
.step p { color: var(--brown-soft); font-size: 14.5px; }

/* ---------- טפסים ---------- */
.form-wrap {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold-pale);
  outline-offset: 5px;
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
  animation: fade-in-up 0.6s ease both;
}
.form-wrap h2 { text-align: center; margin-bottom: 6px; font-size: 26px; }
.form-wrap .form-sub { text-align: center; color: var(--brown-soft); margin-bottom: 22px; font-size: 14.5px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14.5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gold-pale);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  background: var(--cream);
  color: var(--brown);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.18);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error {
  background: #fdecea; color: #b3261e;
  border: 1px solid #f5c6c0;
  padding: 10px 14px; border-radius: 12px;
  margin-bottom: 16px; font-size: 14px; display: none;
}
.form-error.show { display: block; animation: fade-in-up 0.3s ease; }
.form-wrap .btn-gold { width: 100%; padding: 13px; font-size: 17px; margin-top: 6px; }
.form-link { text-align: center; margin-top: 16px; font-size: 14.5px; color: var(--brown-soft); }
.form-link a { color: var(--gold-deep); font-weight: 700; }

/* ---------- אזור אישי ---------- */
.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }
.profile-card {
  background: var(--white);
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold-pale); outline-offset: 5px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fade-in-up 0.6s ease both;
}
.profile-card .card-photo { aspect-ratio: 1/1.05; }
.profile-card .card-body h2 { font-size: 24px; }
.status-pill {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}
.status-pending { background: #fff4d6; color: #8a6d1a; border: 1px solid #e6c877; }
.status-approved { background: #e6f6e6; color: #1e7e34; border: 1px solid #a3d9a3; }
.status-rejected { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c0; }
.status-active { background: #e6f6e6; color: #1e7e34; border: 1px solid #a3d9a3; }
.status-inactive { background: #eee; color: #777; border: 1px solid #ccc; }

.panel {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fade-in-up 0.6s 0.1s ease both;
}
.panel h3 { margin-bottom: 14px; font-size: 19px; }
.proposal-row {
  border: 1px solid var(--gold-pale);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--cream);
}
.proposal-row .who { font-weight: 700; }
.proposal-row .meta { font-size: 13px; color: var(--brown-soft); }

/* ---------- אדמין ---------- */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.admin-tab.active, .admin-tab:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  box-shadow: 0 4px 12px rgba(166,118,42,0.3);
}
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"], .toolbar select {
  padding: 10px 14px;
  border: 1.5px solid var(--gold-pale);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--white);
  color: var(--brown);
}
.toolbar input[type="search"] { min-width: 220px; }
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-box {
  background: var(--white);
  border: 1px solid var(--gold-pale);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box .n { font-size: 30px; font-weight: 800; color: var(--gold-deep); }
.stat-box .l { font-size: 13px; color: var(--brown-soft); }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--gold-pale); }
table.admin-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 14px; }
.admin-table th {
  background: linear-gradient(135deg, var(--gold-pale), var(--cream-3));
  padding: 12px 10px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid var(--gold);
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--cream-3); vertical-align: middle; }
.admin-table tr:hover td { background: var(--cream); }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold-pale); }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.btn-small {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-edit { background: var(--gold-pale); color: var(--gold-deep); }
.btn-edit:hover { background: var(--gold-light); color: #fff; }
.btn-del { background: #fdecea; color: #b3261e; }
.btn-del:hover { background: #b3261e; color: #fff; }
.btn-ok { background: #e6f6e6; color: #1e7e34; }
.btn-ok:hover { background: #1e7e34; color: #fff; }

/* מודאל */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(74, 53, 33, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  animation: fade-in 0.25s ease;
}
.modal {
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: pop-in 0.3s ease;
}
@keyframes pop-in { from { transform: scale(0.94) translateY(10px); opacity: 0; } }
.modal h3 { margin-bottom: 18px; font-size: 21px; text-align: center; }
.modal .form-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .form-actions .btn-gold, .modal .form-actions .btn-ghost { flex: 1; }

/* ---------- פוטר ---------- */
footer {
  margin-top: 30px;
  border-top: 2px solid var(--gold-pale);
  background: var(--cream-2);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-inner img { height: 52px; }
.footer-inner .copy { color: var(--brown-soft); font-size: 13.5px; }

/* ---------- אנימציות ---------- */
@keyframes fade-in-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade-in-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- רספונסיבי ---------- */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; }
  .hero-inner { padding: 46px 16px 40px; }
  .timer-box { min-width: 74px; }
  .timer-num { font-size: 30px; }
  .field-row { grid-template-columns: 1fr; }
  .proposal-row { flex-direction: column; align-items: stretch; text-align: center; }
}
