/* ==========================================================================
   МАМИНЫ РЕЦЕПТЫ — СЕМЕЙНАЯ КУЛИНАРНАЯ КНИГА
   Стили веб-приложения (Уютный теплый дизайн)
   ========================================================================== */

:root {
  --primary: #d9532f;
  --primary-hover: #b83e1d;
  --primary-light: #fef3ef;
  --accent: #e67e22;
  --accent-gold: #f39c12;
  --bg-main: #fbf9f5;
  --bg-card: #ffffff;
  --bg-subtle: #f5f0e8;
  --border-color: #ebe4d8;
  --border-focus: #d9532f;
  --text-main: #2c2523;
  --text-muted: #756a63;
  --text-subtle: #9c8e85;
  
  --cat-soup: #e74c3c;
  --cat-main: #c0392b;
  --cat-baking: #d35400;
  --cat-salad: #27ae60;
  --cat-breakfast: #f39c12;
  --cat-drink: #2980b9;

  --shadow-sm: 0 2px 6px rgba(44, 37, 35, 0.05);
  --shadow-md: 0 8px 20px rgba(44, 37, 35, 0.08);
  --shadow-lg: 0 16px 36px rgba(44, 37, 35, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----------------- Header & Navigation ----------------- */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  font-size: 32px;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-search-bar {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-bar .search-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: var(--text-subtle);
  pointer-events: none;
}

.nav-search-bar input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  font-size: 14px;
  color: var(--text-main);
  transition: var(--transition-fast);
  outline: none;
}

.nav-search-bar input:focus {
  background-color: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(217, 83, 47, 0.12);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

/* ----------------- Buttons ----------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 83, 47, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 83, 47, 0.32);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background-color: #e74c3c;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-icon {
  font-size: 16px;
  font-weight: bold;
}

/* ----------------- Hero Section ----------------- */
.hero-section {
  padding: 44px 0 24px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  max-width: 760px;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ----------------- Filters & Categories ----------------- */
.filters-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-main);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.cat-tab.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(217, 83, 47, 0.22);
}

.sub-filters {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-select {
  padding: 7px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary);
}

.sort-group {
  margin-left: auto;
}

/* ----------------- Recipe Grid & Cards ----------------- */
.main-content {
  padding: 36px 0 60px;
  min-height: 50vh;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}

.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  cursor: pointer;
}

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

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card:hover .card-img {
  transform: scale(1.05);
}

.card-badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-cat-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
}

.card-diff-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

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

.card-meta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.35;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-ingredients-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.ing-chip {
  font-size: 11px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.card-manage-btns {
  display: flex;
  gap: 6px;
}

.btn-icon-only {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 15px;
  border-radius: var(--radius-pill);
  color: var(--text-subtle);
  transition: var(--transition-fast);
}

.btn-icon-only:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-icon-delete:hover {
  background: #fde8e8;
  color: #e74c3c;
}

/* ----------------- Loading & Empty States ----------------- */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 20px;
}

/* ----------------- Modals ----------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 37, 35, 0.65);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  width: 100%;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-subtle);
}

/* View Modal */
.modal-view-card {
  max-width: 820px;
}

.modal-view-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
}

.modal-view-image-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 240px;
}

.modal-view-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-view-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.25;
}

.modal-view-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-view-body {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 32px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: normal;
  color: var(--text-subtle);
}

.ingredients-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.ingredient-item:hover {
  background: var(--border-color);
}

.ingredient-item.checked {
  opacity: 0.55;
  text-decoration: line-through;
  background: #f0ebe4;
}

.ingredient-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-card {
  display: flex;
  gap: 14px;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.step-num {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  min-width: 24px;
}

.step-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
}

.chef-tip-box {
  margin-top: 24px;
  background: #fff8e7;
  border: 1px solid #fae1a0;
  border-radius: var(--radius-md);
  padding: 16px;
}

.tip-badge {
  font-size: 12px;
  font-weight: 700;
  color: #b7791f;
  margin-bottom: 6px;
}

.tip-content {
  font-size: 13px;
  color: #744210;
  line-height: 1.5;
  font-style: italic;
}

.modal-view-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-subtle);
}

/* Edit / Add Modal */
.modal-edit-card {
  max-width: 720px;
  padding: 32px;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.recipe-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group label.required::after {
  content: ' *';
  color: var(--primary);
}

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(217, 83, 47, 0.12);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Delete Modal */
.modal-delete-card {
  max-width: 440px;
  padding: 32px 24px;
  text-align: center;
}

.delete-icon {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}

.delete-title-preview {
  font-weight: 700;
  color: var(--text-main);
  margin: 10px 0;
  font-size: 16px;
}

.delete-warning {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-footer-centered {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ----------------- Toast Notifications ----------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #2c2523;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success {
  border-left: 4px solid #27ae60;
}

.toast-error {
  border-left: 4px solid #e74c3c;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ----------------- Footer ----------------- */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.footer-note {
  font-size: 12px;
  color: var(--text-subtle);
}

.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-subtle);
  cursor: pointer;
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-decoration-color: transparent;
}

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

.footer-sep {
  font-size: 12px;
  color: var(--border-color);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-subtle);
}

.footer-legal-bar {
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
  padding-top: 18px;
}

.footer-legal-text {
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-subtle);
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════
   COOKIE CONSENT BANNER (152-ФЗ / 242-ФЗ)
   ══════════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 980px;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(44, 37, 35, 0.15);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  z-index: 9999;
  animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCookie {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 540px;
}

.cookie-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-banner-text p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0;
}

.cookie-banner-text strong {
  color: var(--text-main);
}

.cookie-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.cookie-link-btn:hover {
  color: var(--primary-hover);
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-cookie-accept:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-cookie-decline {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cookie-decline:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* ══════════════════════════════════════════════════════
   LEGAL MODALS (ПОЛИТИКА, СОГЛАШЕНИЕ)
   ══════════════════════════════════════════════════════ */
.legal-modal-card {
  max-width: 780px;
  width: 94%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.legal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-main);
}

.legal-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--text-main);
  margin: 0;
}

.legal-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-main);
}

.legal-updated {
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 18px;
  font-style: italic;
}

.legal-modal-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 22px 0 8px 0;
  font-family: 'Inter', sans-serif;
}

.legal-modal-body h3:first-of-type {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: 12px;
  color: #3f3633;
}

.legal-modal-body ul {
  margin: 0 0 16px 20px;
  color: #3f3633;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

.legal-modal-body code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.legal-law-ref {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--text-main);
  margin-top: 24px;
  line-height: 1.55;
}

.legal-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 28px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}


/* ----------------- Responsive ----------------- */
@media (max-width: 860px) {
  .modal-view-header {
    grid-template-columns: 1fr;
  }
  .modal-view-image-container {
    height: 180px;
  }
  .modal-view-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .nav-search-bar {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .nav-search-bar {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 8px;
  }
  .hero-title {
    font-size: 28px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
}
