/* מתכונים של אילן – ערכת נושא שחור ואדום, נוחה למבוגרים */
:root {
  --black: #0d0d0d;
  --black-soft: #1a1a1a;
  --red: #c41e3a;
  --red-light: #e63950;
  --red-dark: #9a1830;
  --white: #f5f5f5;
  --gray: #888;
  --gray-light: #444;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --font: 'Segoe UI', 'Heebo', 'Assistant', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

html.font-size-small { font-size: 16px; }
html.font-size-large { font-size: 20px; }
html.font-size-xlarge { font-size: 22px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* שער כניסה – תמונה ומילות פתיחה */
.site-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.site-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-gate-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--black) 0%, var(--red-dark) 50%, var(--black-soft) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.site-gate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.site-gate-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
}

.site-gate-icon {
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 12px var(--red));
  opacity: 0.95;
}

.site-gate-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1.2;
}

.site-gate-subtitle {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  line-height: 1.5;
}

.site-gate-btn {
  font-size: 1.1rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
}

.site-gate-btn:hover {
  transform: scale(1.03);
}

/* Header */
.site-header {
  background: var(--black-soft);
  border-bottom: 3px solid var(--red);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo:hover { color: var(--red-light); }

.logo-icon {
  filter: drop-shadow(0 0 2px var(--red));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--gray);
  text-decoration: none;
  padding: 0.6rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover, .nav-link.active { color: var(--red-light); }
.nav-link.active { background: rgba(196, 30, 58, 0.2); }

.chef-link { color: var(--red); }
.chef-link:hover { color: var(--red-light); }

/* מנעול כניסת שף – קטן בראש הדף */
.header-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--gray);
  transition: color 0.2s, background 0.2s;
  margin-right: auto;
}

.header-lock:hover {
  color: var(--red-light);
  background: rgba(196, 30, 58, 0.15);
}

.header-lock img {
  display: block;
  opacity: 0.8;
}

.header-lock:hover img { opacity: 1; }

.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

/* Main */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
  .main-content { padding: 2rem 1.5rem; }
}

/* Hero – אזור מזמין למבקרים */
.hero {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-bottom: 1.5rem;
}

.hero-welcome {
  padding: 2.75rem 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--white);
  line-height: 1.25;
}

.hero p {
  margin: 0;
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* Filters */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

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

.filter-group label {
  display: block;
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 0.35rem;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  min-height: 48px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black-soft);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--red);
}

/* Menu section */
.menu-section {
  margin-bottom: 2.5rem;
}

.menu-section h2,
.gallery-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--white);
}

.menu-section h2 img,
.gallery-section h2 img { opacity: 0.9; }

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  min-height: 52px;
  background: var(--black-soft);
  border-radius: var(--radius);
  border-right: 4px solid var(--red);
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s;
}

.menu-item:hover { background: var(--gray-light); }

.menu-num {
  min-width: 2rem;
  font-weight: 700;
  color: var(--red);
}

.menu-title { flex: 1; }

.menu-color {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--food-color, #666);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.no-recipes { color: var(--gray); padding: 1rem; }

/* Share code entry */
.share-code-entry {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--black-soft);
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
}

.share-code-entry label { display: block; margin-bottom: 0.5rem; color: var(--gray); }
.code-input-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.code-input-wrap input {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  font: inherit;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.recipe-card {
  background: var(--black-soft);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--gray-light);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: var(--shadow);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--black);
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
}

.card-placeholder img { opacity: 0.5; }

.card-color-dot {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }

.card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.card-category {
  font-size: 0.85rem;
  color: var(--red-light);
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--gray);
}

.likes-count { display: flex; align-items: center; gap: 0.25rem; }
.share-code-badge {
  font-family: monospace;
  font-size: 0.75rem;
  background: var(--gray-light);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* גלריה – מצב דפדוף (טאצ' גרירה + לחיצה כפולה ללייק) */
.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.view-toggle {
  display: flex;
  background: var(--black-soft);
  border-radius: var(--radius);
  padding: 3px;
  border: 1px solid var(--gray-light);
}

.view-toggle-btn {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--gray);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.view-toggle-btn.active {
  background: var(--red);
  color: #fff;
}

.view-toggle-btn:hover:not(.active) { color: var(--white); }

.swipe-hint {
  display: none;
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0 0 1rem;
}

.gallery-swipe-wrap {
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--red);
  background: var(--black);
  min-height: 70vh;
  touch-action: pan-y pinch-zoom;
}

.gallery-swipe {
  width: 100%;
  height: 70vh;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.gallery-swipe-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

[dir="rtl"] .gallery-swipe-track { flex-direction: row; }

.gallery-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-swipe-slide .swipe-slide-bg {
  position: absolute;
  inset: 0;
  background: var(--black-soft);
}

.gallery-swipe-slide .swipe-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swipe-slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
}

.swipe-slide-placeholder img { opacity: 0.5; }

.swipe-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: var(--white);
}

.swipe-slide-overlay h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.swipe-likes {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--red-light);
  font-weight: 600;
}

.swipe-tap-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.35rem;
}

.swipe-heart-pop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition: none;
  z-index: 5;
}

.swipe-heart-pop img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px var(--red));
  color: var(--red);
}

.swipe-heart-pop.show {
  animation: heartPop 0.8s ease-out forwards;
}

@keyframes heartPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.swipe-nav-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--black-soft);
  flex-wrap: wrap;
}

.swipe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--gray-light);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.swipe-dot:hover { background: var(--gray); }
.swipe-dot.active { background: var(--red); transform: scale(1.2); }

/* Recipe detail page */
.recipe-page { padding-bottom: 3rem; }

.recipe-detail { max-width: 700px; margin: 0 auto; }

.recipe-header { margin-bottom: 1.5rem; }

.recipe-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--white);
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.badge.category { background: var(--red); color: #fff; }
.badge.color-badge { background: var(--food-color, #666); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.3); }

.share-code-display { color: var(--gray); font-size: 0.9rem; }

.recipe-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.recipe-image-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--black-soft);
  aspect-ratio: 1;
}

.recipe-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-image-item.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-image-item.placeholder img { opacity: 0.4; }

.recipe-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  min-height: 48px;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover { background: var(--red-light); }

.btn-secondary {
  background: var(--gray-light);
  color: var(--white);
}

.btn-secondary:hover { background: var(--gray); }

.btn-like {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-like:hover { background: rgba(196, 30, 58, 0.2); }

.btn-like.liked {
  background: rgba(196, 30, 58, 0.15);
  cursor: default;
}
.btn-like.liked:hover { background: rgba(196, 30, 58, 0.15); }

.btn-like .heart-icon-filled { color: var(--red); }

.swipe-likes .heart-icon-outline,
.swipe-likes .heart-icon-filled { vertical-align: middle; }
.swipe-likes .heart-icon-filled { color: var(--red); }

.recipe-instructions {
  background: var(--black-soft);
  padding: 1.25rem;
  border-radius: var(--radius);
  border-right: 4px solid var(--red);
  margin-bottom: 1.5rem;
}

.recipe-instructions h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--white);
}

.instructions-text {
  white-space: pre-wrap;
  color: var(--white);
  line-height: 1.7;
}

.recipe-footer-actions { margin-top: 1.5rem; }

/* Chef login */
.chef-content { max-width: 480px; margin: 0 auto; padding-top: 2rem; }

.chef-login { text-align: center; }

.login-card {
  background: var(--black-soft);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
  box-shadow: var(--shadow);
}

.login-icon { margin-bottom: 1rem; opacity: 0.9; }

.login-card h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.login-card p { margin: 0 0 1rem; color: var(--gray); }

.error-msg { color: var(--red-light); margin-bottom: 0.5rem !important; }

.pin-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pin-form input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  font-size: 1.25rem;
  text-align: center;
  letter-spacing: 0.3em;
}

.pin-form input:focus {
  outline: none;
  border-color: var(--red);
}

/* Chef panel – upload form */
/* לשוניות פאנל שף */
.chef-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--gray-light);
  padding-bottom: 0;
}

.chef-tab {
  padding: 0.6rem 1.25rem;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--gray);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.chef-tab:hover { color: var(--white); }
.chef-tab.active { color: var(--red); border-bottom-color: var(--red); }

.chef-tab-panel { max-width: 600px; }

.panel-desc {
  color: var(--gray);
  margin: -0.5rem 0 1.25rem;
  font-size: 0.95rem;
}

/* עריכת הפתיח */
.gate-image-zone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gate-image-preview {
  min-height: 120px;
  background: var(--black-soft);
  border: 1px dashed var(--gray-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.gate-image-preview img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.gate-no-image {
  color: var(--gray);
  font-size: 0.9rem;
}

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.9rem; }

.gate-saved-msg {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0,128,0,0.2);
  border: 1px solid rgba(0,128,0,0.4);
  border-radius: var(--radius);
  color: #8f8;
}

.chef-panel h1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
}

.recipe-form { max-width: 600px; }

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--white);
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black-soft);
  color: var(--white);
  font: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.hint { font-size: 0.85rem; color: var(--gray); margin-top: 0.35rem; }

.upload-zone {
  border: 2px dashed var(--gray-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--red);
  background: rgba(196, 30, 58, 0.08);
}

.upload-placeholder p { margin: 0.5rem 0 0; color: var(--gray); font-size: 0.9rem; }

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-color {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #fff;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* כפתורים בפאנל ניהול – עיצוב מודגש */
.chef-panel .form-actions {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
  gap: 1rem;
}

.chef-panel .form-actions .btn-primary {
  background: linear-gradient(180deg, var(--red-light) 0%, var(--red) 100%);
  color: #fff;
  padding: 0.85rem 1.75rem;
  min-height: 52px;
  border-radius: 999px;
  font-size: 1.05rem;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.35);
  border: 1px solid var(--red-dark);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.chef-panel .form-actions .btn-primary:hover {
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.45);
  transform: translateY(-1px);
}

.chef-panel .form-actions .btn-secondary {
  background: transparent;
  color: var(--gray);
  border: 2px solid var(--gray-light);
  padding: 0.85rem 1.5rem;
  min-height: 52px;
  border-radius: 999px;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.chef-panel .form-actions .btn-secondary:hover {
  border-color: var(--gray);
  color: var(--white);
  background: var(--gray-light);
}

/* כפתורי עריכת הפתיח – העלה תמונה / הסר תמונה */
.chef-panel .gate-image-zone {
  flex-direction: column;
  gap: 0.85rem;
}

.chef-panel .gate-image-zone .btn-sm {
  align-self: flex-start;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid var(--gray-light);
  background: var(--black-soft);
  color: var(--white);
}

.chef-panel .gate-image-zone .btn-sm:hover {
  border-color: var(--red);
  color: var(--red-light);
  background: rgba(196, 30, 58, 0.1);
}

.chef-panel .gate-image-zone .gate-remove-img {
  border-color: var(--gray-light);
  color: var(--gray);
}

.chef-panel .gate-image-zone .gate-remove-img:hover {
  border-color: var(--red-dark);
  color: var(--red-light);
}

/* תצוגת הצלחה – כפתורי לגלריה / הוסף מתכון נוסף */
.chef-success {
  text-align: center;
  padding: 2rem;
  background: var(--black-soft);
  border-radius: var(--radius);
  border: 1px solid var(--red);
}

.chef-success h2 { margin: 1rem 0 0.5rem; }
.chef-success p { color: var(--gray); margin-bottom: 1rem; }

.chef-success .btn {
  margin: 0.35rem 0.35rem 0.35rem 0;
  padding: 0.8rem 1.5rem;
  min-height: 50px;
  border-radius: 999px;
  font-size: 1rem;
}

.chef-success .btn-primary {
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.3);
}

.chef-success .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(196, 30, 58, 0.4);
}

.chef-success .btn-secondary {
  background: transparent;
  border: 2px solid var(--gray-light);
  color: var(--white);
}

.chef-success .btn-secondary:hover {
  background: var(--gray-light);
  border-color: var(--gray);
}

/* עריכת מתכונים – רשימה + טופס */
.recipe-list-wrap {
  margin-bottom: 1.5rem;
}

.recipe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-list-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--black-soft);
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
}

.recipe-list-title {
  flex: 1;
  font-weight: 600;
  color: var(--white);
  min-width: 0;
}

.recipe-list-cat {
  font-size: 0.9rem;
  color: var(--gray);
}

.recipe-list-item .recipe-edit-btn {
  flex-shrink: 0;
}

.no-recipes-msg {
  color: var(--gray);
  padding: 1rem;
  margin: 0;
}

.recipe-edit-form-wrap h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--white);
}

.edit-existing-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.edit-existing-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  flex-shrink: 0;
}

.edit-existing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-remove-img {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.edit-remove-img:hover {
  background: var(--red-light);
  opacity: 1;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1rem;
  background: var(--black-soft);
  border-top: 1px solid var(--gray-light);
  color: var(--gray);
  font-size: 0.9rem;
}

.site-footer p { margin: 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-link {
  color: var(--red-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.footer-link:hover { text-decoration: underline; color: var(--white); }

/* עורך לינקים בפאנל */
.footer-links-editor { max-width: 520px; }

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer-link-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-link-row .link-label {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black-soft);
  color: var(--white);
  font: inherit;
}

.footer-link-row .link-url {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--black-soft);
  color: var(--white);
  font: inherit;
}

.footer-link-row .footer-link-remove {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.footer-link-row .footer-link-remove:hover { background: var(--red); }

/* כפתור נגישות וגילוי נאות */
.a11y-wrap {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 999;
}

.a11y-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--black-soft);
  color: var(--red-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s;
}

.a11y-btn:hover {
  background: var(--red);
  color: #fff;
}

.a11y-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.5rem;
  padding: 1rem;
  background: var(--black-soft);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
}

.a11y-panel-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.a11y-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.a11y-panel-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  text-align: right;
}

.a11y-panel-btn:hover {
  border-color: var(--red);
  color: var(--red-light);
}

.a11y-disclosure-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--red-light);
  text-decoration: none;
  font-size: 0.95rem;
}

.a11y-disclosure-link:hover { text-decoration: underline; }

/* עמוד גילוי נאות */
.disclosure-page { max-width: 700px; margin: 0 auto; }
.disclosure-page h1 { margin: 0 0 1.5rem; font-size: 1.5rem; color: var(--white); }
.disclosure-section { margin-bottom: 2rem; }
.disclosure-section h2 { margin: 0 0 0.75rem; font-size: 1.2rem; color: var(--red-light); }
.disclosure-section ul { margin: 0.75rem 0; padding-right: 1.5rem; }
.disclosure-section li { margin-bottom: 0.5rem; }
.disclosure-section p { margin: 0.5rem 0; color: var(--white); line-height: 1.7; }

/* ========== התאמה למובייל ========== */
@media (max-width: 768px) {
  html { font-size: 17px; }
  html.font-size-small { font-size: 15px; }
  html.font-size-large { font-size: 19px; }
  html.font-size-xlarge { font-size: 21px; }

  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .site-header {
    padding: 0.5rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .header-inner { gap: 0.5rem; }

  .logo {
    font-size: 1.1rem;
  }

  .logo-icon { width: 34px; height: 34px; }

  .nav-link {
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    font-size: 0.95rem;
  }

  .header-lock {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .header-lock img { width: 22px; height: 22px; }

  .main-content {
    padding: 1rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }

  .hero {
    padding: 1.75rem 0.75rem;
  }

  .hero-welcome { padding: 2rem 0.75rem; }

  .hero h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .hero p { font-size: 1rem; }

  .filters {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .filter-group select,
  .filter-group input {
    min-height: 48px;
    font-size: 16px; /* מונע זום אוטומטי ב-iOS */
  }

  .menu-section h2,
  .gallery-section h2 { font-size: 1.2rem; }

  .gallery-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .view-toggle { justify-content: center; }

  .view-toggle-btn {
    padding: 0.5rem 1rem;
    min-height: 44px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-swipe-wrap {
    min-height: 60vh;
    min-height: 60dvh;
    border-radius: 8px;
  }

  .gallery-swipe {
    height: 60vh;
    height: 60dvh;
    min-height: 280px;
  }

  .swipe-slide-overlay { padding: 1.25rem 1rem; }
  .swipe-slide-overlay h3 { font-size: 1.15rem; }
  .swipe-tap-hint { font-size: 0.75rem; }

  .swipe-heart-pop img { width: 64px; height: 64px; }

  .swipe-nav-dots { padding: 0.5rem; }
  .swipe-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
  }

  .recipe-detail { padding: 0; }
  .recipe-header h1 { font-size: clamp(1.35rem, 5vw, 1.75rem); }
  .recipe-images {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .recipe-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .recipe-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .recipe-footer-actions .btn { width: 100%; justify-content: center; }
  .btn { min-height: 48px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }

  .site-footer {
    padding: 1rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .a11y-wrap {
    left: max(0.75rem, env(safe-area-inset-left));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .a11y-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .a11y-panel {
    min-width: 260px;
    padding: 1rem;
  }

  .a11y-panel-btn { min-height: 44px; }

  .site-gate {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .site-gate-content { max-width: 100%; }
  .site-gate-btn {
    width: 100%;
    max-width: 280px;
    min-height: 52px;
  }

  .disclosure-page { padding: 0 0.75rem; }
}

@media (max-width: 480px) {
  .site-header { padding: 0.5rem 0.5rem; }
  .logo span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-content { padding: 0.75rem 0.5rem; }
  .hero { padding: 1.5rem 0.5rem; }
  .hero-welcome { padding: 1.75rem 0.5rem; }
  .menu-item { padding: 0.85rem 0.75rem; }
  .card-body { padding: 0.85rem; }
  .card-body h3 { font-size: 1.05rem; }
  .chef-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .chef-tab { white-space: nowrap; flex-shrink: 0; }
  .recipe-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .recipe-list-item .recipe-edit-btn { align-self: stretch; }
  .footer-link-row {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-link-row .link-label,
  .footer-link-row .link-url { min-width: 0; }
}
