/* css/find-a-chef.css - Find a Chef Browse/Discovery Page */

/* ============================================
   ROOT VARIABLES & BASE STYLES
   ============================================ */

:root {
  /* Colors */
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --primary-light: #ff8c5a;
  --secondary: #2c3e50;
  --success: #48bb78;
  --warning: #ed8936;
  --error: #f56565;
  --info: #4299e1;

  /* Text Colors */
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --text-light: #a0aec0;

  /* Background Colors */
  --background: #FFF9F5;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

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

.logo:hover {
  transform: translateY(-2px);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.back-link:hover {
  color: var(--primary);
  background-color: var(--background);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--primary);
  background: rgba(255, 107, 53, 0.15);
  font-weight: 600;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  background: linear-gradient(135deg, #FF6B35 0%, #FF9E71 50%, #FFB347 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInDown 0.8s ease-out;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  min-height: calc(100vh - 80px);
  background: var(--background);
}

.main-content > .container {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* ============================================
   COMMUNITY STATS
   ============================================ */

.community-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  color: var(--primary);
  font-size: 1.25rem;
  min-width: 20px;
}

.stat-value {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ============================================
   FILTERS & SEARCH SECTION
   ============================================ */

.filters-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.8s ease-out 0.2s both;
  border: 1px solid var(--border);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-always-visible {
  flex: 1;
  min-width: 200px;
}

.filters-toggle-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filters-toggle-btn:hover,
.filters-toggle-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 107, 53, 0.05);
}

.filters-toggle-btn.active i {
  transform: rotate(180deg);
}

.clear-filters {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-filters:hover {
  background: rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--background);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1rem;
  pointer-events: none;
}

.filter-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--background);
  transition: var(--transition);
  cursor: pointer;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

/* ============================================
   RESULTS SECTION
   ============================================ */

.results-section {
  margin-bottom: 3rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.results-count {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.view-toggle {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.view-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.view-btn.active {
  background: var(--background);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.view-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   RECIPES GRID
   ============================================ */

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.recipes-grid.list-view {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ============================================
   RECIPE CARD
   ============================================ */

.recipe-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  animation: fadeInUp 0.6s ease-out;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.recipe-card:nth-child(odd) {
  animation-delay: 0.1s;
}

.recipe-card:nth-child(even) {
  animation-delay: 0.2s;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

/* Recipe Image */
.recipe-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

/* Image Overlay Badges */
.image-overlay-badges {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

/* Chef Type Badges */
.chef-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.3px;
}

.chef-type-badge.professional {
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.9), rgba(49, 130, 206, 0.9));
  color: #ffffff;
}

.chef-type-badge.amateur {
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.9), rgba(56, 161, 105, 0.9));
  color: #ffffff;
}

/* Slots Badge */
.slots-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slots-badge.no-slots {
  background: rgba(245, 101, 101, 0.9);
  color: #ffffff;
}

/* Recipe Content */
.recipe-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.recipe-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Chef Info Row */
.chef-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.chef-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.chef-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.chef-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.chef-type-small {
  font-size: 0.75rem;
  font-weight: 500;
}

.chef-type-small.professional {
  color: var(--info);
}

.chef-type-small.amateur {
  color: var(--success);
}

/* Recipe Description */
.recipe-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Recipe Meta Row */
.recipe-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.meta-item i {
  color: var(--primary);
  font-size: 0.85rem;
}

/* Difficulty Badges */
.difficulty-badge {
  font-weight: 600;
  font-size: 0.8rem;
}

.difficulty-badge.beginner {
  color: var(--success);
}

.difficulty-badge.intermediate {
  color: var(--warning);
}

.difficulty-badge.advanced {
  color: var(--error);
}

/* Recipe Stats Row */
.recipe-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: var(--radius-lg);
  margin: 0.25rem 0;
}

.price-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.price-tag i {
  font-size: 0.85rem;
}

/* Cuisine Badge */
.cuisine-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(66, 153, 225, 0.1);
  color: var(--info);
  border: 1px solid rgba(66, 153, 225, 0.2);
}

.cuisine-badge i {
  font-size: 0.7rem;
}

/* Recipe Actions */
.recipe-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  font-size: 0.9rem;
  flex: 1;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--text-secondary) 0%, #2d3748 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 85, 104, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 85, 104, 0.4);
}

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

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled::before {
  display: none;
}

/* ============================================
   LIST VIEW STYLES
   ============================================ */

.recipe-card.list-view {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  flex-direction: row;
}

.recipe-card.list-view .recipe-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.recipe-card.list-view .recipe-content {
  padding: 1.5rem;
  gap: 0.75rem;
}

.recipe-card.list-view .recipe-actions {
  margin-top: auto;
}

/* ============================================
   STATES (LOADING, EMPTY, ERROR)
   ============================================ */

.loading-state,
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 300px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 2px dashed var(--border);
  grid-column: 1 / -1;
}

.loading-state {
  color: var(--text-secondary);
}

.loading-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  animation: spin 1s linear infinite;
}

.loading-state p {
  font-size: 1.1rem;
  margin: 0;
}

.empty-state {
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--text-tertiary);
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.empty-state .btn {
  flex: none;
}

.error-state {
  color: var(--error);
  border-color: rgba(245, 101, 101, 0.3);
  background: rgba(245, 101, 101, 0.02);
}

.error-state i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--error);
}

.error-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.error-state p {
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.error-state .btn {
  flex: none;
}

.retry-btn {
  margin-top: 1rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-tooltip);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 400px;
  font-weight: 500;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
  display: flex;
  transform: translateX(0);
}

.toast.toast-error {
  background: var(--error);
}

.toast.toast-warning {
  background: var(--warning);
}

.toast.toast-info {
  background: var(--info);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
  .recipes-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

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

  .recipes-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Hero compact */
  .hero-section {
    padding: 2.5rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Stats compact */
  .community-stats {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
  }

  .stat-item {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    gap: 0.4rem;
    border-radius: 50px;
  }

  .stat-icon {
    font-size: 0.9rem;
  }

  /* Filters collapsible */
  .filters-section {
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .filters-header {
    margin-bottom: 0;
  }

  .filters-toggle-btn {
    display: flex;
  }

  .filters-collapsible {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
  }

  .filters-collapsible.filters-open {
    display: grid;
  }

  .clear-filters {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Results header */
  .results-header {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
  }

  .results-count {
    font-size: 0.9rem;
    flex: 1;
  }

  .view-toggle {
    display: none;
  }

  /* Grid: 1 column on phones */
  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Cards compact */
  .recipe-image {
    height: 150px;
  }

  .recipe-content {
    padding: 1rem;
    gap: 0.6rem;
  }

  .recipe-title {
    font-size: 1.1rem;
  }

  .recipe-description {
    font-size: 0.85rem;
  }

  .recipe-stats {
    padding: 0.6rem 0.75rem;
    margin: 0;
  }

  .chef-avatar {
    width: 32px;
    height: 32px;
  }

  .chef-name {
    font-size: 0.85rem;
  }

  /* Actions side by side */
  .recipe-actions {
    flex-direction: row;
    gap: 0.5rem;
  }

  .recipe-actions .btn {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  /* List view stack on mobile */
  .recipe-card.list-view {
    grid-template-columns: 1fr;
  }

  .recipe-card.list-view .recipe-image {
    height: 150px;
    min-height: auto;
  }

  /* Misc */
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-120%);
  }

  .toast.show {
    transform: translateY(0);
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn-lg {
    width: 100%;
    max-width: 280px;
  }

  .community-stats {
    gap: 0.4rem;
  }

  .stat-item {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  .filters-section {
    padding: 0.6rem;
    margin-bottom: 1rem;
  }

  .filters-collapsible {
    grid-template-columns: 1fr;
  }

  .search-input {
    padding: 0.7rem 0.75rem 0.7rem 2.25rem;
    font-size: 0.9rem;
  }

  .filter-select {
    padding: 0.7rem 0.75rem;
    font-size: 0.9rem;
  }

  .recipe-image {
    height: 130px;
  }

  .recipe-content {
    padding: 0.75rem;
  }

  .recipe-title {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }

  .main-content > .container {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #a0aec0;
    --text-light: #718096;

    --background: #1a202c;
    --surface: #2d3748;
    --surface-hover: #4a5568;
    --border: #4a5568;
    --border-light: #2d3748;
  }
}


/* ============================================
   RATING DISPLAY ON CARDS
   ============================================ */

.rating-display {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.15rem;
}

.rating-star {
  font-size: 0.75rem;
  color: var(--border, #E2E8F0);
}

.rating-star.filled {
  color: var(--gold, #FFD700);
}

.rating-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 0.3rem;
  font-weight: 500;
}
