/* Prevent horizontal layout shift from scrollbar appearing/disappearing */
html {
  scrollbar-gutter: stable;
}

/* Breadcrumb Navigation */
.breadcrumb {
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #6c757d;
  padding: 0 0.5rem;
}

.breadcrumb-item a {
  color: #6ab04c;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #5a9e3c;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #495057;
}

/* Jump to Recipe Link - Subtle Design */
.jump-to-recipe {
  color: #6ab04c;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jump-to-recipe:hover {
  color: #5a9d3d;
  text-decoration: underline;
}

.jump-to-recipe svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.jump-to-recipe:hover svg {
  transform: translateY(2px);
}

/* Recipe page container width - mobile-first approach */
body .container {
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 15px; /* Minimal side padding on mobile */
}

/* Tablet and above: add side margins for ad space */
@media (min-width: 769px) {
  body .container {
    max-width: 80% !important;
    padding: 0 20px;
  }
}

@media (min-width: 1200px) {
  body .container {
    max-width: 900px !important;
  }
}

@media (min-width: 1400px) {
  body .container {
    max-width: 900px !important;
  }
}

/* General heading colors for recipe pages */
h1, h2 {
  color: #1B382E;
}

h3, h4, h5, h6 {
  color: #3D4643;
}

/* Main recipe page title */
h1.recipe-title {
  font-size: 2.5rem !important;
  font-weight: bold;
  text-align: center;
  margin: 2rem 0;
  color: #1B382E;
}

/* Recipe page body text sizing */
.description, .benefits, .ingredient-item, .step p, .step ul li p, .step-description, .step-description p, .section-description, .section-description p, .section-title ~ p, .section-title ~ ul li p, .accordion-body {
  font-size: 1.1rem;
  color: #3D4643;
  line-height: 1.6;
}

/* Tighten bullet spacing in recipe body lists */
.section-title ~ ul li p,
.step ul li p {
  margin-bottom: 0.25rem;
}

/* Internal recipe links in description content areas */
.description a,
.benefits a,
.step p a,
.step ul li p a,
.section-title ~ p a,
.section-title ~ ul li p a,
.tip-description a,
.recipe-card-description a,
.recipe-card-instructions a,
.accordion-body a {
  color: #6ab04c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.description a:hover,
.benefits a:hover,
.step p a:hover,
.step ul li p a:hover,
.section-title ~ p a:hover,
.section-title ~ ul li p a:hover,
.tip-description a:hover,
.recipe-card-description a:hover,
.recipe-card-instructions a:hover,
.accordion-body a:hover {
  color: #5a9e3c;
}

/* Sortable step images */
.sortable-images .step-image {
  transition: opacity 0.3s;
}

.sortable-images .step-image.sortable-ghost {
  opacity: 0.4;
}

.sortable-images .step-image.sortable-drag {
  opacity: 0.8;
  transform: scale(1.05);
}

.sortable-images .step-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.recipe-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 2rem auto;
  border-radius: 8px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 1rem 0 0.5rem 0;
  text-align: center;
  color: #1B382E;
}

/* Remove Bootstrap indentation for recipe subsections on desktop */
body .container > .row > .col {
  padding-left: 0;
  padding-right: 0;
}

.section-steps {
  padding-left: 0;
}

.step-title {
  font-weight: bold;
  font-size: 1.3rem;
  margin: 1.5rem 0 0.5rem 0;
}

/* Multiple step images - centered display */
.step-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.step-image {
  max-width: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin: 0;
}

.step-images img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.section-images {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.section-image {
  max-width: 600px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  margin: 0;
}

/* Multiple section images - centered display */
.section-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.section-image {
  max-width: 630px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-images img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  object-fit: contain;
}

/* Sortable section images for admin */
.sortable-images .section-image {
  transition: opacity 0.3s;
}

.sortable-images .section-image.sortable-ghost {
  opacity: 0.4;
}

.sortable-images .section-image.sortable-drag {
  opacity: 0.8;
  transform: scale(1.05);
}

.sortable-images .section-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ingredient-item {
  margin-bottom: 0.5rem;
  text-align: left;
  width: calc(50% - 0.5rem);
}

/* Higher-specificity overrides for the ingredient grid. On the public recipe
 * page, Bootstrap is preloaded AFTER styles.css (see internal/templates/header.html:114
 * — `rel=preload; onload=…rel=stylesheet`), so Bootstrap's `.col-md-6 { width: 50% }`
 * wins over `.ingredient-item { width: calc(...) }` and stretches each item to a
 * full 50% with no room for the 1rem gap, forcing one-per-row wrapping. Scoping
 * the rule to `.ingredients-container .ingredient-item` raises specificity to
 * (0,2,0) and beats Bootstrap regardless of load order. flex-basis + max-width
 * belt-and-braces the constraint. */
.ingredients-container .ingredient-item {
  flex: 0 0 calc(50% - 0.5rem);
  width: calc(50% - 0.5rem);
  max-width: calc(50% - 0.5rem);
}

/* Center the last item if odd number - only for ingredients-container, not recipe card */
.ingredients-container .ingredient-item:last-child:nth-child(odd) {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.ingredients-container {
  max-width: 865px;
  margin: 0 auto;
  border: 1px solid #000000;
  border-radius: 8px;
  padding: 1.5rem 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Recipe Ingredient Image - Same size as recipe main image */
.recipe-ingredient-image-container {
  max-width: 800px; /* Same as recipe image max-width */
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 0;
  position: relative;
  aspect-ratio: 4/5; /* Same 4:5 ratio as recipe images */
}

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

/* Mobile adjustments for recipe ingredient image */
@media (max-width: 768px) {
  .recipe-ingredient-image-container {
    max-width: 100%; /* Full width on mobile, same as recipe image */
    margin: 1rem auto;
    border-radius: 8px;
  }
}

/* Recipe Secondary Image - Same size as recipe main image */
.recipe-secondary-image-container {
  max-width: 800px; /* Same as recipe image max-width */
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 0;
  position: relative;
  aspect-ratio: 4/5; /* Same 4:5 ratio as recipe images */
}

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

/* Mobile adjustments for recipe secondary image */
@media (max-width: 768px) {
  .recipe-secondary-image-container {
    max-width: 100%; /* Full width on mobile, same as recipe image */
    margin: 1rem auto;
    border-radius: 8px;
  }
}

/* Recipe Image Container - 4:5 Portrait Ratio */
.recipe-image-container {
  max-width: 800px; /* Limit max width on desktop for 4:5 ratio */
  margin: 1.5rem auto 0.5rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  line-height: 0; /* Remove space below image */
  position: relative;
  aspect-ratio: 4/5; /* Reserve space to prevent CLS */
  background: #f5f5f5; /* Background for images that don't fill space */
}

/* Blurred background effect - inherits background from container */
.recipe-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1); /* Prevent blur edge artifacts */
  z-index: 0;
  opacity: 0.6;
}

/* Disable blur effect in admin recipe builder */
.photo-column .recipe-image-container::before {
  content: none;
}

/* Add bottom margin when no metadata is present */
.recipe-image-container.no-metadata {
  margin-bottom: 2rem;
}

.recipe-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* Use contain to show full image without cropping */
  vertical-align: middle; /* Prevents bottom gap */
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1; /* Place image above blurred background */
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 4/5) {
  .recipe-image-container {
    padding-bottom: 125%; /* 4:5 ratio fallback */
    position: relative;
    height: 0;
  }

  .recipe-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Recipe Quick Facts - Clean Modern Design */
.recipe-quick-facts {
  border-bottom: 1px solid #e0e0e0;
  padding: 1.25rem 0;
  margin: 0.5rem 0 2rem;
}

.quick-facts-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.fact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #495057;
}

.fact-icon {
  font-size: 1.25rem;
  opacity: 0.8;
}

.fact-details {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.fact-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 400;
}

.fact-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #212529;
}

/* Recipe Card Metadata (for list views) */
.recipe-card-metadata {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #495057;
  text-align: center;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .recipe-quick-facts {
    padding: 1rem 0;
    margin: 1rem 0 1.5rem;
  }
  
  .quick-facts-grid {
    gap: 1.25rem;
    justify-content: space-around;
  }
  
  .fact-item {
    font-size: 0.875rem;
  }
  
  .fact-icon {
    font-size: 1.125rem;
  }
  
  .recipe-image-container {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    max-width: 100%; /* Full width on mobile */
    max-height: 70vh; /* Prevent image from taking full screen */
  }

  .recipe-image {
    max-height: 70vh; /* Limit height on mobile */
  }
}

/* Drag and drop styling */
.drag-handle,
.section-drag-handle,
.step-drag-handle {
  cursor: move;
  color: #6c757d;
  font-size: 1.2rem;
  padding: 0 10px;
  user-select: none;
  display: inline-block;
}

.drag-handle:hover,
.section-drag-handle:hover,
.step-drag-handle:hover {
  color: #495057;
}

/* Different styling for different drag handles */
.section-drag-handle {
  color: #007bff;
  font-weight: bold;
}

.step-drag-handle {
  color: #28a745;
  font-size: 1rem;
}

.section-drag-handle:hover {
  color: #0056b3;
}

.step-drag-handle:hover {
  color: #1e7e34;
}

/* Sortable sections and steps */
.sortable-sections .step-section {
  transition: opacity 0.3s;
}

.sortable-sections .step-section.sortable-ghost {
  opacity: 0.4;
}

.sortable-sections .step-section.sortable-drag {
  opacity: 0.8;
}

.sortable-steps .step-item {
  transition: opacity 0.3s;
}

.sortable-steps .step-item.sortable-ghost {
  opacity: 0.4;
}

.sortable-steps .step-item.sortable-drag {
  opacity: 0.8;
}

/* Accordion modifications for dragging */
.accordion-button {
  display: flex;
  align-items: center;
}

.section-title {
  flex-grow: 1;
  text-align: left;
}

/* WYSIWYG Editor Styles */
.wysiwyg-wrapper {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  position: relative;
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
}

.wysiwyg-content {
  width: 100% !important;
  min-width: 100% !important;
  display: block !important;
}

.wysiwyg-toolbar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.wysiwyg-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: #495057;
  transition: all 0.15s ease-in-out;
}

.wysiwyg-btn:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.wysiwyg-btn.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

.wysiwyg-separator {
  width: 1px;
  height: 1.5rem;
  background-color: #dee2e6;
  margin: 0 0.25rem;
}

.wysiwyg-content {
  min-height: 4rem;
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 0;
  outline: none;
  cursor: text;
}

.wysiwyg-content:focus {
  box-shadow: none;
  border-color: inherit;
}

.wysiwyg-wrapper:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.wysiwyg-content.wysiwyg-empty:before {
  content: attr(data-placeholder);
  color: #6c757d;
  font-style: italic;
}

.wysiwyg-content.is-invalid {
  border-color: #dc3545;
}

.wysiwyg-wrapper:has(.is-invalid) {
  border-color: #dc3545;
}

/* Ensure proper styling for editor content */
.wysiwyg-content ul {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.wysiwyg-content li {
  margin-bottom: 0.25rem;
}

/* TipTap Editor — Toolbar visibility states */
.wysiwyg-toolbar-visible {
  opacity: 1;
  max-height: 50px;
  padding: 0.5rem;
  overflow: visible;
  transition: all 0.2s ease;
}

.wysiwyg-toolbar-collapsed {
  opacity: 0;
  max-height: 4px;
  padding: 0;
  overflow: hidden;
  border-bottom: 2px solid #e9ecef;
  transition: all 0.2s ease;
}

/* Toolbar buttons — 44px min touch targets */
.wysiwyg-toolbar .wysiwyg-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wysiwyg-toolbar {
  flex-wrap: nowrap;
}

/* TipTap ProseMirror editor area */
.wysiwyg-content .ProseMirror {
  min-height: 4rem;
  padding: 0.375rem 0.75rem;
  outline: none;
}

.wysiwyg-content .ProseMirror p {
  margin-bottom: 0.25rem;
}

.wysiwyg-content .ProseMirror p:last-child {
  margin-bottom: 0;
}

/* Placeholder for empty TipTap editor */
.wysiwyg-content .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: #6c757d;
  font-style: italic;
  float: left;
  height: 0;
  pointer-events: none;
}

/* Internal recipe links in editor */
.wysiwyg-content .ProseMirror a {
  color: #6ab04c;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.wysiwyg-content .ProseMirror a:hover {
  color: #5a9e3c;
}

/* Link Picker Modal Backdrop */
.wysiwyg-link-picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
}

/* Link Picker Modal */
.wysiwyg-link-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 1.25rem;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
}

.wysiwyg-wrapper {
  position: relative;
}

.link-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #212529;
}

.link-picker-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 0.25rem;
}

.link-picker-close:hover {
  color: #212529;
  background: #f8f9fa;
}

.link-picker-search {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.link-picker-search:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.link-picker-results {
  max-height: 300px;
  overflow-y: auto;
}

.link-picker-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.link-picker-item:hover,
.link-picker-item.active {
  background: #f0f7ec;
}

.link-picker-group-header {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5d6d5d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.link-picker-item-title {
  font-size: 0.9rem;
  color: #212529;
  font-weight: 500;
}

.link-picker-item-author {
  font-size: 0.8rem;
  color: #6c757d;
  white-space: nowrap;
}

.link-picker-empty {
  padding: 0.75rem;
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
}

.link-picker-custom {
  border-top: 1px solid #e9ecef;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.link-picker-label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
  display: block;
}

.link-picker-text {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.link-picker-insert {
  width: 100%;
}

/* Responsive image sizing */
@media (max-width: 768px) {
  .section-images img {
    max-width: 100%;
    max-height: 440px;
  }

  .step-images img {
    max-width: 100%;
    max-height: 330px;
  }
  
  .step-images {
    flex-direction: column;
    align-items: center;
  }
  
  .section-images {
    flex-direction: column;
    align-items: center;
  }
}

/* Recipe Card Styles */
.recipe-card-container {
  margin: 3rem 0 2rem 0;
  padding: 2rem 0;
  border-top: 2px solid #e9ecef;
}

.recipe-card {
  max-width: 721px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-card-wrapper {
  padding: 2rem;
}

.recipe-card-header {
  position: relative;
  margin-bottom: 2rem;
}

.recipe-card-title {
  font-size: 2rem;
  font-weight: bold;
  color: #3D4643;
  margin: 0 120px 1rem 0;
}

.recipe-card-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1rem;
}

.recipe-card-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 1rem;
}

.recipe-card-print {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
  position: absolute;
  top: 0;
  right: 0;
}

.recipe-card-print:hover {
  background-color: #f8f9fa;
}

.print-icon {
  font-size: 1.2rem;
}

.recipe-card-main {
  display: block;
}

.recipe-card-content {
  width: 100%;
}

.recipe-card-ingredients h3,
.recipe-card-instructions h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3D4643;
  margin-bottom: 1rem;
}

.recipe-card-ingredients {
  margin-bottom: 2rem;
  text-align: left;
  overflow: hidden;
  margin-right: 0;
}

.recipe-card-ingredients ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.recipe-card-ingredients li {
  padding: 0;
  font-size: 1.05rem;
  position: relative;
  padding-left: 1.5rem;
  text-align: left;
  display: block;
  width: 100%;
}

.recipe-card-ingredients li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #666;
  font-weight: bold;
}

.recipe-card-instructions {
  clear: both;
}

.recipe-card-instructions ol {
  margin: 0;
  padding-left: 1.5rem;
}

.recipe-card-instructions li {
  padding: 0.5rem 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Tighten bullet spacing inside recipe card instruction steps */
.recipe-card-instructions li p {
  margin-bottom: 0.25rem;
}

.recipe-card .recipe-card-image-container {
  float: right;
  width: 120px !important;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.recipe-card .recipe-card-image {
  width: 120px !important;
  height: 120px !important;
  max-width: 120px !important;
  max-height: 120px !important;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .recipe-card-main {
    flex-direction: column;
  }
  
  .recipe-card-image-container {
    flex: none;
    width: 100%;
    margin-top: 2rem;
  }
  
  .recipe-card-actions {
    position: static;
    margin-top: 1rem;
  }
}

/* Print styles for recipe card */
@media print {
  /* Hide everything first */
  * {
    display: none !important;
  }
  
  /* Show the DOM path to recipe card */
  html {
    display: block !important;
  }
  
  body {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Show recipe card and all its children */
  .recipe-card-container {
    display: block !important;
    margin: 0 !important;
    padding: 0.5in !important;
    border: none !important;
    width: 100% !important;
  }
  
  .recipe-card-container * {
    display: initial !important;
  }
  
  /* Specific display overrides */
  .recipe-card {
    display: block !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }
  
  .recipe-card-wrapper {
    display: block !important;
    padding: 1.5rem !important;
  }
  
  .recipe-card-header {
    display: block !important;
    margin-bottom: 1.5rem !important;
  }
  
  .recipe-card-main {
    display: block !important;
    page-break-inside: avoid !important;
  }

  .recipe-card-content {
    display: block !important;
    width: 100% !important;
  }

  .recipe-card-ingredients {
    page-break-inside: avoid !important;
  }
  
  /* Typography adjustments */
  .recipe-card-title {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  
  .recipe-card-description {
    display: block !important;
    clear: both !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
  }
  
  .recipe-card-ingredients h3,
  .recipe-card-instructions h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .recipe-card-instructions {
    clear: none !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
  }

  .recipe-card-instructions h3 {
    page-break-after: avoid !important;
  }

  .recipe-card-instructions ol {
    display: block !important;
    margin: 0 !important;
    padding-left: 1.25rem !important;
    page-break-before: avoid !important;
  }

  .recipe-card-instructions li {
    display: list-item !important;
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    padding: 0.2rem 0 !important;
    page-break-inside: avoid !important;
  }
  
  .recipe-card-ingredients ul {
    display: block !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .recipe-card-ingredients li {
    display: block !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    padding: 0.2rem 0 0.2rem 1rem !important;
    position: relative !important;
  }
  
  .recipe-card-ingredients li::before {
    content: "•" !important;
    position: absolute !important;
    left: 0 !important;
    color: #333 !important;
    font-weight: bold !important;
    display: inline !important;
  }
  
  /* Hide print button */
  .recipe-card-print {
    display: none !important;
  }
  
  /* Hide image in print */
  .recipe-card-image-container {
    display: none !important;
  }
  
  .recipe-card-image {
    display: none !important;
  }
}

/* Cuisine Badge Styles */
.cuisine-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-block;
  margin: 0.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  border: none;
}

.recipe-header .cuisine-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-header .cuisine-badge {
  margin: 0;
}

.recipe-card-cuisines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-card-cuisine-tag {
  font-size: 0.85rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  white-space: nowrap;
}

/* Print styles for cuisine info */
@media print {
  .cuisine-badge {
    display: inline !important;
    background: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    margin-right: 0.25rem !important;
  }
  
  .cuisine-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .recipe-card-cuisine-tag {
    display: inline !important;
    font-size: 0.7rem !important;
    color: #666 !important;
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    margin-right: 0.25rem !important;
  }
  
  .recipe-card-cuisines {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }
}

/* Cuisine Selection Accordion Styles (Admin) */
#cuisineTypesAccordion {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

#cuisineTypesAccordion .accordion-item {
  border: none;
  border-bottom: 1px solid #dee2e6;
}

#cuisineTypesAccordion .accordion-item:last-child {
  border-bottom: none;
}

#cuisineTypesAccordion .accordion-button {
  background-color: #f8f9fa;
  border: none;
  padding: 1rem;
  font-weight: 600;
  color: #495057;
  position: relative;
}

#cuisineTypesAccordion .accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: #0c63e4;
  box-shadow: none;
}

#cuisineTypesAccordion .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: #86b7fe;
}

.category-name {
  flex-grow: 1;
}

.selected-count {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

#cuisineTypesAccordion .accordion-body {
  padding: 1.5rem;
  background-color: #fff;
}

.cuisine-checkbox {
  margin-bottom: 0.25rem;
}

.cuisine-checkbox:checked + .form-check-label {
  font-weight: 500;
  color: #0d6efd;
}

.form-check-label {
  font-size: 0.9rem;
  cursor: pointer;
  padding-left: 0.25rem;
}

/* Animation for smooth accordion transitions */
.accordion-collapse {
  transition: height 0.35s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #cuisineTypesAccordion .accordion-button {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  #cuisineTypesAccordion .accordion-body {
    padding: 1rem;
  }
  
  .selected-count {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Legacy cuisine selection styles for backwards compatibility */
.cuisine-selection {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.cuisine-category {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.cuisine-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cuisine-category-header {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.5rem;
}

.cuisine-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem 1rem;
}

.cuisine-type-checkbox {
  margin-bottom: 0.25rem;
}

.cuisine-type-checkbox .form-check-input {
  margin-top: 0.25rem;
}

.cuisine-type-checkbox .form-check-label {
  font-size: 0.9rem;
  cursor: pointer;
  padding-left: 0.25rem;
}

.cuisine-type-checkbox .form-check-input:checked + .form-check-label {
  font-weight: 500;
  color: #0d6efd;
}

/* Drag handles for sortable elements */
.section-drag-handle,
.step-drag-handle {
  cursor: grab;
  user-select: none;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  color: #6c757d;
  font-size: 1rem;
  line-height: 1;
}

.section-drag-handle:hover,
.step-drag-handle:hover {
  color: #495057;
  background-color: #f8f9fa;
  border-radius: 0.25rem;
}

.section-drag-handle:active,
.step-drag-handle:active {
  cursor: grabbing;
}

/* Sortable placeholder styling */
.sortable-ghost {
  opacity: 0.5;
  background-color: #f8f9fa;
}

.sortable-chosen {
  cursor: grabbing;
}

/* Tips Section Styling */
.tips-container {
  max-width: 865px;
  margin: 1rem auto;
  border: 1px solid #000000;
  border-radius: 8px;
  padding: 0.75rem 9px;
}

.tips-section-wrapper {
  margin-bottom: 1.5rem;
}

.tips-section-wrapper:last-child {
  margin-bottom: 0;
}

.tips-list {
  margin-top: 0.5rem;
}

.tip-item {
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
}

.tip-title {
  font-size: 1rem;
  font-weight: 400;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.tip-description {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.6;
  color: #3D4643;
  margin-bottom: 0;
}

.tip-item:last-child {
  margin-bottom: 0;
}

/* Mobile responsiveness for multiple images */
@media (max-width: 768px) {
  .section-images {
    grid-template-columns: 1fr;
  }
  
  .step-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
  }
  
  .tip-title {
    font-size: 1.125rem;
  }
  
  .tip-description {
    font-size: 1rem;
  }
}

/* ===== HOME PAGE STYLES ===== */

/* Home Page Base Styles */
body.home-page {
  background: #ffffff;
  color: #3e4d3e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* Public Header Styles (matching mock design) */
.header {
  background: rgba(255, 255, 252, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8e5d3;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #6ab04c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #5a9e3c;
}

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

.nav-links a {
  text-decoration: none;
  color: #5d6d5d;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #6ab04c;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #6ab04c;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white !important;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

/* Search Container */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-form {
  background: rgba(255, 255, 252, 0.95);
  border-radius: 50px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
  color: #3e4d3e;
}

.search-input::placeholder {
  color: #8c9c8c;
}

.search-btn {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 176, 76, 0.3);
}

/* Search Loading Indicator */
.search-loading {
  position: absolute;
  top: 50%;
  right: 4rem;
  transform: translateY(-50%);
  display: none;
}

.search-loading.htmx-request {
  display: block;
}

/* Filter Section */
.filter-section {
  padding: 2rem 0;
  background: rgba(255, 255, 252, 0.5);
  border-bottom: 1px solid #e8e5d3;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.filter-tabs::-webkit-scrollbar {
  height: 4px;
}

.filter-tabs::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.filter-tabs::-webkit-scrollbar-thumb {
  background: #6ab04c;
  border-radius: 2px;
}

.filter-tab {
  background: #f8f9fa;
  color: #5d6d5d;
  border: 1px solid #e8e5d3;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.filter-tab:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-tab.active {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  border-color: #6ab04c;
  box-shadow: 0 4px 12px rgba(106, 176, 76, 0.3);
}

.filter-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.filter-loading.htmx-request {
  display: block;
}

/* Recipe Section */
.recipe-section {
  padding: 3rem 0;
  min-height: 60vh;
}

/* Search Results Header */
.search-results-header {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 252, 0.6);
  border-left: 3px solid #6ab04c;
  border-radius: 4px;
}

.results-count {
  margin: 0;
  font-size: 0.95rem;
  color: #5d6d5d;
}

.results-count strong {
  color: #6ab04c;
  font-weight: 600;
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin: 0 auto;
}

/* Recipe Cards */
.recipe-card {
  background: rgba(255, 255, 252, 0.95);
  border: 1px solid #e8e5d3;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  position: relative;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #6ab04c;
}

.recipe-grid .recipe-card .recipe-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Recipe Image Container - Home Page Cards with 4:5 Ratio */
.recipe-grid .recipe-card .recipe-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5; /* Use 4:5 portrait ratio for cards */
  max-height: 280px; /* Limit height on desktop - optimized for Core Web Vitals */
  overflow: hidden;
  margin: 0 !important;
  padding: 0;
  display: block;
  border-radius: 1rem 1rem 0 0;
  background: #f5f5f5;
}

.recipe-grid .recipe-card .recipe-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover for cards to fill space nicely */
  transition: transform 0.3s ease;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 4/5) {
  .recipe-grid .recipe-card .recipe-image-container {
    padding-bottom: 125%; /* 4:5 ratio fallback */
    height: 0;
  }

  .recipe-grid .recipe-card .recipe-image {
    position: absolute;
    top: 0;
    left: 0;
  }
}

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

.recipe-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 2rem;
}

/* Cuisine Badge */
.recipe-grid .cuisine-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #6ab04c 0%, #78e08f 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transform: none;
  transition: none;
  line-height: 1.2;
  display: inline-block;
  white-space: nowrap;
}

/* Recipe Content */
.recipe-content {
  padding: 1rem;
}


.recipe-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #3e4d3e;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-description {
  color: #5d6d5d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Recipe Meta */
.recipe-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.meta-item i {
  font-size: 1rem;
  opacity: 0.8;
  color: #6ab04c;
}

.meta-value {
  font-weight: 500;
  color: #3e4d3e;
}

/* Load More Section */
.load-more-container {
  text-align: center;
  margin-top: 3rem;
}

.load-more-btn {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 176, 76, 0.3);
}

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

.load-more-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.load-more-loading.htmx-request {
  display: block;
}

.load-more-loading.htmx-request + .load-more-btn {
  color: transparent;
}

/* No Recipes State */
.no-recipes-container {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 252, 0.8);
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 600px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 1 / -1; /* Span all grid columns */
}

/* Override grid layout when no-recipes is present */
.recipe-grid:has(.no-recipes-container) {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Fallback for browsers that don't support :has() */
.recipe-grid .no-recipes-container {
  grid-column: 1 / -1;
  justify-self: center;
}

.no-recipes-content i {
  font-size: 3rem;
  color: #adb5bd;
  margin-bottom: 1rem;
}

.no-recipes-content h3 {
  color: #3e4d3e;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.no-recipes-content p {
  color: #5d6d5d;
  margin-bottom: 2rem;
}

.no-recipes-suggestions {
  background: #f8f9fa;
  border: 1px solid #e8e5d3;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.no-recipes-suggestions h4 {
  color: #3e4d3e;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.no-recipes-suggestions ul {
  margin: 0;
  padding-left: 1.5rem;
}

.no-recipes-suggestions li {
  color: #5d6d5d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.btn-clear-filters {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 44px; /* Ensure consistent height */
}

.btn-clear-filters i {
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.btn-clear-filters:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 176, 76, 0.4);
  background: linear-gradient(135deg, #6ab04c 0%, #5a8f42 100%);
}

.btn-clear-filters:hover i {
  color: white;
  transform: rotate(90deg);
}

/* Error States */
.error-container {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 252, 0.8);
  border: 1px solid #e8e5d3;
  border-radius: 1rem;
  margin: 2rem 0;
}

.error-content i {
  font-size: 2.5rem;
  color: #dc3545;
  margin-bottom: 1rem;
}

.error-content h4 {
  color: #3e4d3e;
  margin-bottom: 1rem;
}

.error-content p {
  color: #5d6d5d;
  margin-bottom: 1.5rem;
}

.btn-retry {
  background: #6ab04c;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-retry:hover {
  background: #5a9e3c;
  transform: translateY(-1px);
}

.load-more-error {
  text-align: center;
  padding: 1rem;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.btn-link {
  background: none;
  border: none;
  color: #6ab04c;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.btn-link:hover {
  color: #5a9e3c;
}

/* Loading Skeleton */
.skeleton-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 0 auto;
}

.skeleton {
  background: rgba(255, 255, 252, 0.8);
  border: 1px solid #e8e5d3;
  border-radius: 1rem;
  overflow: hidden;
  animation: skeleton-loading 1.5s ease-in-out infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
}

.skeleton-content {
  padding: 1.5rem;
}

.skeleton-title {
  height: 1.5rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  animation: skeleton-shimmer 2s ease-in-out infinite;
}

.skeleton-description {
  height: 4rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
  animation: skeleton-shimmer 2s ease-in-out infinite;
}

.skeleton-meta {
  display: flex;
  gap: 1rem;
}

.skeleton-meta-item {
  height: 1rem;
  width: 4rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 2s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Spinner Animation */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* HTMX Indicators */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.htmx-indicator.htmx-request {
  opacity: 1;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Mobile Header */
  .header {
    padding: 0.75rem 0;
  }
  
  .nav {
    padding: 0 1rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero {
    padding: 1.5rem 1rem;
  }
  
  .search-container {
    max-width: 100%;
    margin: 0 1rem;
  }
  
  .search-form {
    flex-direction: column;
    padding: 1rem;
    border-radius: 1rem;
  }
  
  .search-input {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e8e5d3;
  }
  
  .search-btn {
    border-radius: 0.5rem;
    justify-content: center;
  }
  
  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .filter-tabs {
    justify-content: flex-start;
    padding: 0 1rem;
  }
  
  .filter-tab {
    padding: 0.75rem 1.2rem;
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  .recipe-content {
    padding: 0.75rem;
  }
  
  .recipe-title {
    font-size: 1.1rem;
  }
  
  .recipe-description {
    font-size: 0.85rem;
  }
  
  .recipe-meta {
    font-size: 0.8rem;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile header */
  .logo {
    font-size: 1.3rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.8rem;
  }
  
  .hero {
    padding: 1.25rem 0.5rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .search-container {
    margin: 0 0.5rem;
  }
  
  .recipe-grid {
    padding: 0 0.5rem;
  }
  
  .filter-tabs {
    padding: 0 0.5rem;
  }
}

/* Override for recipe grid cards - simple layout */
.recipe-grid .recipe-card .recipe-link {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
}

.recipe-grid .recipe-card .recipe-image-container {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.recipe-grid .recipe-card .recipe-content {
  padding: 1rem !important;
  margin: 0 !important;
}

.recipe-grid .recipe-card .recipe-title {
  margin: 0 !important;
}

/* ===========================
   About Page Styles
   =========================== */

.about-page {
  background-color: #fff;
}

.about-hero {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.about-hero h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: white;
}

.about-hero .lead {
  font-size: 1.25rem;
  opacity: 0.95;
  margin: 0;
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

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

.about-section h2 {
  color: #1B382E;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: center;
}

.about-section p {
  color: #495057;
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 3rem;
  color: #6ab04c;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: #1B382E;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* CTA Section */
.about-cta {
  background: #f8f9fa;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-top: 4rem;
}

.about-cta h2 {
  color: #1B382E;
  margin-bottom: 1rem;
}

.about-cta p {
  color: #495057;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-cta .btn {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

/* Custom Green Button Styles - Override Bootstrap Primary */
.btn-green,
.about-cta .btn-primary,
.contact-page .btn-primary {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-green:hover,
.about-cta .btn-primary:hover,
.contact-page .btn-primary:hover {
  background: linear-gradient(135deg, #6ab04c 0%, #5a9e3c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 176, 76, 0.3);
  color: white;
}

.btn-outline-green,
.contact-page .btn-outline-primary {
  background: transparent;
  border: 2px solid #6ab04c;
  color: #6ab04c;
  transition: all 0.3s ease;
}

.btn-outline-green:hover,
.contact-page .btn-outline-primary:hover {
  background: linear-gradient(135deg, #78e08f 0%, #6ab04c 100%);
  border-color: #6ab04c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 176, 76, 0.3);
}

/* Green Text Color - Override Bootstrap Primary */
.text-green,
.contact-page .text-primary {
  color: #6ab04c !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .about-hero {
    padding: 3rem 1rem;
  }

  .about-hero h1 {
    font-size: 2rem;
  }

  .about-hero .lead {
    font-size: 1.1rem;
  }

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

  .about-section h2 {
    font-size: 1.75rem;
  }

  .about-section p {
    font-size: 1rem;
  }
}


/* ===================================================================
   RECIPE TAG SYSTEM STYLES
   ================================================================ */

.recipe-tags {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-tags-center {
  justify-content: center;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.tag-cuisine {
  background: #fef3c7;
  color: #92400e;
}

.tag-dietary {
  background: #dcfce7;
  color: #166534;
}

.tag-meal {
  background: #dbeafe;
  color: #1e40af;
}

.tag-course {
  background: #e0e7ff;
  color: #4338ca;
}

.tag-cooking {
  background: #fce7f3;
  color: #9f1239;
}

/* Mobile responsive tag display */
@media (max-width: 768px) {
  .recipe-tags {
    gap: 0.25rem;
  }
  
  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
}

/* ===================================================================
   TAG-BASED CATEGORY SECTIONS (Homepage)
   ================================================================ */

.category-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rn-border, #e8e5d3);
}

.category-section:last-child {
  border-bottom: none;
}

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

.view-all-link {
  font-size: 1rem;
  color: var(--rn-primary, #4A7C59);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.view-all-link:hover {
  color: var(--rn-primary-dark, #2d5a3f);
  text-decoration: underline;
}

.category-title {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--rn-dark-text, #1B382E);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.category-icon {
  font-size: 2rem;
  line-height: 1;
}

.category-count {
  font-size: 1rem;
  font-weight: normal;
  color: #888;
  margin-left: 0.5rem;
}

/* Responsive category titles */
@media (max-width: 768px) {
  .category-title {
    font-size: 1.5rem;
  }
  
  .category-icon {
    font-size: 1.5rem;
  }
  
  .category-count {
    font-size: 0.875rem;
  }
  
  .category-section {
    margin-bottom: 2rem;
  }
}

/* User Authentication Styles */
.login-link {
  text-decoration: none;
  color: #5d6d5d !important;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.login-link:hover {
  color: #6ab04c !important;
}

.login-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #6ab04c;
  transition: width 0.3s ease;
}

.login-link:hover::after {
  width: 100%;
}

.login-link i {
  font-size: 1rem;
}

/* User Menu Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-menu-trigger {
  text-decoration: none;
  color: #5d6d5d;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
}

.user-menu-trigger:hover {
  color: #6ab04c;
}

.user-menu-trigger i.bi-person-circle {
  font-size: 1.3rem;
}

.user-menu-trigger i.bi-chevron-down {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.user-menu-wrapper:hover .user-menu-trigger i.bi-chevron-down {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  background: white;
  border: 1px solid #e8e5d3;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-menu-wrapper:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: #5d6d5d;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.dropdown-link:hover {
  background: #f8f9fa;
  color: #6ab04c;
}

.dropdown-link i {
  font-size: 1rem;
  width: 1.2rem;
}

.dropdown-divider {
  height: 1px;
  background: #e8e5d3;
  margin: 0.5rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .login-link {
    font-size: 0.9rem;
  }
  
  .user-menu-trigger span {
    display: none;
  }
  
  .user-dropdown {
    right: -1rem;
  }
}

/* ========================================
   Toast Notification System
   ======================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #3D4643;
    font-size: 14px;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #495057;
}

/* Toast Type Variants */
.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
    color: #28a745;
}

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

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ===================================
   Custom Form Validation Styling
   =================================== */

/* Custom validation error message */
.custom-validation-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, #fef9f9 0%, #fdf3f3 100%);
    border-left: 4px solid #e89b9b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(232, 155, 155, 0.12);
}

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

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

.validation-message {
    color: #c97070;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

/* Invalid input styling */
.is-invalid-custom {
    border-color: #e8b5b5 !important;
    background-color: #fefbfb !important;
    box-shadow: 0 0 0 3px rgba(232, 181, 181, 0.08) !important;
}

.is-invalid-custom:focus {
    border-color: #e89b9b !important;
    box-shadow: 0 0 0 4px rgba(232, 155, 155, 0.15) !important;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* Valid input styling (optional - shows when field is valid) */
.is-valid-custom {
    border-color: #6ab04c !important;
    background-color: #f8fef5 !important;
}

.is-valid-custom:focus {
    border-color: #6ab04c !important;
    box-shadow: 0 0 0 4px rgba(106, 176, 76, 0.1) !important;
}

/* Success indicator for valid fields */
.validation-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6ab04c;
    font-size: 14px;
    font-weight: 500;
    margin-top: 6px;
}

.validation-success-icon {
    font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .custom-validation-error {
        padding: 10px 12px;
        font-size: 13px;
    }

    .validation-icon {
        font-size: 18px;
    }

    .validation-message {
        font-size: 13px;
    }
}

/* ===== ARTICLE CALLOUT BLOCK STYLES ===== */

blockquote.callout,
.article-section-body blockquote {
    border-left: 4px solid #6ab04c;
    background: #f0f9ec;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

blockquote.callout p:last-child,
.article-section-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Callout blocks inside WYSIWYG editor */
.wysiwyg-content blockquote.callout,
.wysiwyg-content blockquote {
    border-left: 4px solid #6ab04c;
    background: #f0f9ec;
    padding: 1rem 1.25rem;
    margin: 0.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

/* Article section links */
.wysiwyg-content a {
    color: #6ab04c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wysiwyg-content a:hover {
    color: #5a9e3c;
}

/* Article section headings in editor */
.wysiwyg-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #3D4643;
    margin: 0.75rem 0 0.5rem;
}

/* ============================================
   Article System — Public Pages
   ============================================ */

/* Article Card Grid */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 576px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .article-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .article-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Article Card */
.article-card {
  background: #fff;
  border: 1px solid #e8e5d3;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.article-image-container {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #f8f9fa;
}
.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #ccc;
}
.article-content {
  padding: 1rem;
}
.article-category-badge {
  display: inline-block;
  background: #f0f9ec;
  color: #6ab04c;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}
a.article-category-badge:hover {
  background: #6ab04c;
  color: #fff;
}
.article-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1B382E;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.article-excerpt {
  font-size: 0.85rem;
  color: #5d6d5d;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Category Filter Pills */
.article-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.category-pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3D4643;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  min-height: 44px;
  line-height: 2;
}
.category-pill:hover,
.category-pill.active {
  background: #6ab04c;
  border-color: #6ab04c;
  color: #fff;
}

/* Article Page Layout */
.article-page {
  max-width: 960px;
  margin: 0 auto;
}
.article-hero-container {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.article-hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  max-height: 500px;
  object-fit: cover;
}

/* Article Header */
.article-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1B382E;
  line-height: 1.2;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.article-meta-bar i {
  margin-right: 0.25rem;
}

/* Article Layout — TOC + Body */
.article-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.article-body {
  flex: 1;
  min-width: 0;
}
.article-toc {
  width: 220px;
  flex-shrink: 0;
  display: none;
}
@media (min-width: 992px) {
  .article-toc {
    display: block;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}
.article-toc-toggle {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1rem;
  min-height: 44px;
}
.article-toc-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3D4643;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-toc-list li {
  margin-bottom: 0.5rem;
}
.article-toc-link {
  color: #5d6d5d;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  display: block;
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: color 0.2s, border-color 0.2s;
}
.article-toc-link:hover {
  color: #6ab04c;
  border-left-color: #6ab04c;
}

/* Article Sections */
.article-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 80px;
}
.article-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1B382E;
  margin-bottom: 1rem;
}
.article-section-image-container {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.article-section-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.article-section-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3D4643;
}
.article-section-body p {
  margin-bottom: 1rem;
}
.article-section-body a {
  color: #6ab04c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-section-body a:hover {
  color: #5a9e3c;
}
.article-section-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #3D4643;
  margin: 1.5rem 0 0.75rem;
}
.article-section-body ol,
.article-section-body ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

/* Print-only canonical URL */
.article-print-url {
  display: none;
}

/* Share bar styles (reused from recipe page) */
.article-page .share-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.article-page .share-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 2rem;
  background: #fff;
  color: #3D4643;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.article-page .share-bar-btn:hover {
  background: #f0f9ec;
  border-color: #6ab04c;
  color: #3D4643;
}

.article-page .share-bar-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.article-page .share-bar-btn--native {
  display: none;
}

/* ============================================
   Article Print Styles
   ============================================ */
@media print {
  .article-page header.header,
  .article-page .header,
  .article-page footer,
  .article-page nav[aria-label="breadcrumb"],
  .article-page .share-bar,
  .article-page .article-toc,
  .article-page .article-toc-toggle,
  .article-page .article-featured-recipes,
  .article-page .article-more-articles,
  .article-page [data-pin-do],
  .article-page .cookie-consent-banner,
  #cookieConsentBanner {
    display: none !important;
  }
  /* Also hide global header/footer/nav */
  body > header, body > footer, body > nav,
  .header, .cookie-consent-banner {
    display: none !important;
  }
  /* Override the global * { display: none } from recipe print styles */
  .article-page,
  .article-page *,
  .article-page .container,
  .article-page .article-header,
  .article-page .article-header *,
  .article-page .article-layout,
  .article-page .article-body,
  .article-page .article-body *,
  .article-page .article-section,
  .article-page .article-section *,
  .article-page .article-section-body,
  .article-page .article-section-body *,
  .article-page .article-hero-container,
  .article-page .article-hero-container *,
  .article-page .article-meta-bar,
  .article-page .article-meta-bar *,
  .article-page h1, .article-page h2, .article-page h3,
  .article-page p, .article-page ul, .article-page ol, .article-page li,
  .article-page strong, .article-page em, .article-page a,
  .article-page blockquote, .article-page blockquote *,
  .article-page img,
  .article-page .article-print-url {
    display: revert !important;
  }
  .article-page {
    max-width: 100%;
    padding: 0;
  }
  .article-layout {
    display: block !important;
  }
  .article-body {
    width: 100% !important;
  }
  .article-hero-image {
    max-height: 400px;
    object-fit: contain;
  }
  .article-section-body {
    font-size: 12pt;
    line-height: 1.6;
  }
  blockquote.callout,
  .article-section-body blockquote {
    border-left: 3px solid #333;
    background: #f5f5f5 !important;
  }
  .article-print-url {
    display: block !important;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
    font-size: 10pt;
    color: #666;
  }
}
