/*
Theme: Recipes - Enhanced Food Blog Theme
Based on Foodior styling patterns
*/

/* Enhanced Sticky Header */
.sticky-top { 
  position: -webkit-sticky !important;
  position: sticky !important; 
  top: 0 !important; 
  z-index: 1060 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* WordPress Admin Bar Adjustments */
@media (min-width: 782px) { 
  body.admin-bar .sticky-top { top: 32px; } 
}
@media (max-width: 781.98px) { 
  body.admin-bar .sticky-top { top: 46px; } 
}

/* Sticky Header Scroll Effects */
.site-header.scrolled .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 236, 243, 0.8);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled {
  box-shadow: var(--recipes-shadow-lg);
}

/* Smooth transitions for scroll effects */
.site-header .navbar {
  transition: all 0.3s ease;
}

/* Keep header always visible - removed hide/show behavior */
/* .site-header.scroll-down {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.site-header.scroll-up {
  transform: translateY(0);
  transition: transform 0.3s ease;
} */

/* Ensure header stays above all content - removed conflicting position */
.site-header {
  z-index: 1070;
}

/* Fixed positioning fallback for older browsers */
@supports not (position: sticky) {
  .sticky-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Enhanced Brand Tokens */
:root {
  --recipes-primary: #ff6b35;
  --recipes-primary-dark: #e55a2b;
  --recipes-primary-light: #ff8557;
  --recipes-accent: #2ec4b6;
  --recipes-accent-light: #5dd0c5;
  --recipes-dark: #0b3038;
  --recipes-light: #f8f9fa;
  --recipes-gray-100: #f5f7fa;
  --recipes-gray-200: #e9ecf3;
  --recipes-gray-300: #d3dae6;
  --recipes-gray-400: #9aa5b1;
  --recipes-gray-500: #7b8794;
  --recipes-gray-600: #616e7c;
  --recipes-gray-700: #52606d;
  --recipes-gray-800: #3e4c59;
  --recipes-gray-900: #323f4b;
  --recipes-white: #ffffff;
  --recipes-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --recipes-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --recipes-border-radius: 12px;
  --recipes-transition: all 0.3s ease;
}

/* Recipe-Perfect Typography */
body {
  font-family: 'Georgia', 'Baskerville', 'Times New Roman', serif;
  color: var(--recipes-gray-800);
  line-height: 1.6;
  font-weight: 400;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--recipes-dark);
  margin-bottom: 1rem;
}

/* Special decorative font for brand and special headings */
.brand-text, .decorative-heading {
  font-family: 'Dancing Script', cursive;
  font-weight: 600;
}

/* Clean sans-serif for UI elements */
.btn, .nav-link, .form-control, .card-text, .small, .meta-item {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
}

p {
  color: var(--recipes-gray-700);
  margin-bottom: 1.25rem;
}

a {
  color: var(--recipes-primary);
  text-decoration: none;
  transition: var(--recipes-transition);
}

a:hover, a:focus {
  color: var(--recipes-primary-dark);
  text-decoration: none;
}

/* helper for background images */
.bg-cover { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* section spacing utility */
.section-spacing { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 992px) { .section-spacing { padding-top: 4rem; padding-bottom: 4rem; } }

/***** Enhanced Logo System *****/
.recipes-logo {
  transition: var(--recipes-transition);
}

.recipes-custom-logo {
  max-width: var(--recipes-logo-width, 240px);
  max-height: var(--recipes-logo-height, 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: var(--recipes-transition);
  display: block;
}

.recipes-custom-logo:hover {
  transform: scale(1.02);
}

.recipes-text-logo {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--recipes-primary);
  text-decoration: none;
  margin: 0;
  transition: var(--recipes-transition);
}

.recipes-text-logo:hover {
  color: var(--recipes-primary-dark);
  transform: scale(1.02);
}

/* Logo alignment variations */
.recipes-logo.text-center {
  justify-content: center;
}

.recipes-logo.text-end {
  justify-content: flex-end;
}

/* Mobile logo sizing */
@media (max-width: 767.98px) {
  .recipes-custom-logo {
    max-width: var(--recipes-logo-mobile-width, 180px);
    max-height: var(--recipes-logo-mobile-height, 60px);
  }
  
  .recipes-text-logo {
    font-size: 1.8rem;
  }
}

/* Very small screens */
@media (max-width: 575.98px) {
  .recipes-custom-logo {
    max-width: calc(var(--recipes-logo-mobile-width, 180px) * 0.9);
    max-height: calc(var(--recipes-logo-mobile-height, 60px) * 0.9);
  }
  
  .recipes-text-logo {
    font-size: 1.6rem;
  }
}

/* Large screens - allow bigger logos */
@media (min-width: 1200px) {
  .recipes-custom-logo {
    max-width: calc(var(--recipes-logo-width, 240px) * 1.1);
    max-height: calc(var(--recipes-logo-height, 80px) * 1.1);
  }
  
  .recipes-text-logo {
    font-size: 2.4rem;
  }
}

/* Logo loading state */
.recipes-custom-logo[loading="eager"] {
  opacity: 0;
  animation: logoFadeIn 0.5s ease-out forwards;
}

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

/* Accessibility and focus states for logo */
.navbar-brand:focus,
.recipes-logo:focus {
  outline: 2px solid var(--recipes-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Dark mode preparation for logo */
@media (prefers-color-scheme: dark) {
  .recipes-text-logo {
    color: var(--recipes-primary-light, var(--recipes-primary));
  }
}

/***** Enhanced Header & Navigation *****/
.site-header {
  background: var(--recipes-white);
  box-shadow: var(--recipes-shadow);
  transition: var(--recipes-transition);
  z-index: 1060;
}

.site-header.scrolled {
  box-shadow: var(--recipes-shadow-lg);
}

.site-header .custom-logo {
  max-height: 56px;
  height: auto;
  width: auto;
  transition: var(--recipes-transition);
}

.site-header .custom-logo:hover {
  transform: scale(1.05);
}

.site-header .navbar {
  border-bottom: 1px solid var(--recipes-gray-200);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-header .navbar-brand {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--recipes-primary);
  text-decoration: none;
}

.site-header .nav-link {
  padding: 0.75rem 1rem;
  color: var(--recipes-gray-700);
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 0;
  margin: 0 0.25rem;
  background: transparent !important;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: var(--recipes-primary);
  background: transparent !important;
}

.site-header .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--recipes-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.site-header .nav-link:hover::after,
.site-header .nav-link:focus::after {
  width: 80%;
}

.site-header .nav-link.active,
.site-header .nav-item.current-menu-item > .nav-link {
  color: var(--recipes-primary);
  background: transparent !important;
}

.site-header .nav-link.active::after,
.site-header .nav-item.current-menu-item > .nav-link::after {
  width: 80%;
}

.site-header .dropdown-menu {
  border-radius: var(--recipes-border-radius);
  border: 1px solid var(--recipes-gray-200);
  box-shadow: var(--recipes-shadow-lg);
  padding: 0.75rem 0;
  margin-top: 0.5rem;
}

.site-header .dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--recipes-gray-700);
  transition: var(--recipes-transition);
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
  color: var(--recipes-white);
  background: linear-gradient(135deg, var(--recipes-primary), var(--recipes-primary-dark));
}

/* Dropdown arrow indicator */
.site-header .dropdown-toggle::after {
  display: none !important; /* Hide Bootstrap's default caret */
}

.site-header .dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
  display: inline-block;
  color: currentColor;
  opacity: 0.7;
}

.site-header .dropdown-toggle:hover .dropdown-arrow,
.site-header .dropdown-toggle:focus .dropdown-arrow {
  opacity: 1;
}

.site-header .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Fallback for when Font Awesome doesn't load */
.site-header .dropdown-arrow:not(.fas):not(.fa):before {
  content: "▼";
  font-family: inherit;
}

/* Dropdown hover functionality - Desktop only */
@media (min-width: 992px) {
  .site-header .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-header .dropdown:hover .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
  }
}

.site-header .dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0;
}

/* Mobile dropdown functionality */
@media (max-width: 991.98px) {
  .site-header .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: rgba(248, 249, 250, 0.95);
    border: none;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: all 0.3s ease;
  }
  
  .site-header .dropdown.show .dropdown-menu,
  .site-header .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    display: block;
  }
  
  .site-header .dropdown-item {
    padding: 0.75rem 2rem;
    color: var(--recipes-gray-700);
    background: transparent;
  }
  
  .site-header .dropdown-item:hover,
  .site-header .dropdown-item:focus {
    background: rgba(255, 107, 53, 0.1);
    color: var(--recipes-primary);
  }
  
  .site-header .dropdown-toggle .dropdown-arrow {
    transition: transform 0.3s ease;
  }
  
  .site-header .dropdown.show .dropdown-toggle .dropdown-arrow,
  .site-header .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
  }
}

/* Hide sidebar search on mobile */
@media (max-width: 991.98px) {
  .sidebar-search {
    display: none !important;
  }
}

/* Mobile menu toggle */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: var(--recipes-transition);
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  background: rgba(255, 107, 53, 0.1);
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff6b35' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/***** Enhanced Footer *****/
.site-footer {
  background: linear-gradient(135deg, var(--recipes-dark) 0%, #083036 100%);
  color: var(--recipes-white);

}

.site-footer .nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 0.5rem 0;
  margin-right: 2rem;
  transition: var(--recipes-transition);
}

.site-footer .nav .nav-link:hover,
.site-footer .nav .nav-link:focus {
  color: var(--recipes-white);
  text-decoration: underline;
  text-decoration-color: var(--recipes-primary);
  text-underline-offset: 4px;
}

.site-footer .footer-brand {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--recipes-white);
  margin-bottom: 1rem;
}

.site-footer .footer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer .copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;

}

.entry-content img { max-width: 100%; height: auto; }

/* Enhanced Button Styles */
.btn {
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: var(--recipes-border-radius);
  transition: var(--recipes-transition);
  box-shadow: none;
  border: 2px solid transparent;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.01em;
}

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

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--recipes-primary-dark) 0%, #d4481f 100%);
  border-color: var(--recipes-primary-dark);
  color: var(--recipes-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--recipes-primary);
  color: var(--recipes-primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: var(--recipes-primary);
  border-color: var(--recipes-primary);
  color: var(--recipes-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: var(--recipes-gray-100);
  border-color: var(--recipes-gray-300);
  color: var(--recipes-gray-700);
}

.btn-secondary:hover, .btn-secondary:focus {
  background: var(--recipes-gray-200);
  border-color: var(--recipes-gray-400);
  color: var(--recipes-gray-800);
}

.btn-show-more {
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--recipes-accent) 0%, #26a69a 100%);
  border: none;
  color: var(--recipes-white);
  box-shadow: 0 4px 12px rgba(46, 196, 182, 0.3);
}

.btn-show-more:hover {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46, 196, 182, 0.4);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Hero and cards */
.recipes-hero .hero-main .ratio, .recipes-hero .hero-side .ratio { background: #f5f5f5; }

.object-fit-cover { object-fit: cover; }
.text-shadow { text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.extra-small { font-size: .72rem; letter-spacing: .02em; }

.recipes-hero .hero-main h2 a, .recipes-hero .hero-side h3 a { color: #000; }

.recipes-popular h2 { margin-top: 0; }
.recipes-popular .card h3 a { color: #000; }
.recipes-popular .card h3 a:hover { color: var(--recipes-primary); }

/* Category avatars */
.category-avatar { width: 220px; height: 220px; background: #f5f5f5; outline: 3px solid rgba(255,107,53,.08); outline-offset: 4px; }

/* Smaller Category Avatar for Browse By Categories */
.category-avatar-small {
  width: 150px;
  height: 150px;
  background: #f5f5f5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.category-link:hover .category-avatar-small {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--recipes-primary);
}

@media (max-width: 768px) { 
  .category-avatar { width: 180px; height: 180px; }
  .category-avatar-small { width: 120px; height: 120px; }
}
@media (max-width: 576px) { 
  .category-avatar { width: 150px; height: 150px; }
  .category-avatar-small { width: 100px; height: 100px; }
}

/* Uniform Section Title Styling */
.section-title, 
.recipes-latest-mosaic h2,
.recipes-popular h2,
.recipes-browse-categories h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--recipes-dark);
  margin-bottom: 2.5rem;
  text-align: left;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after,
.recipes-latest-mosaic h2::after,
.recipes-popular h2::after,
.recipes-browse-categories h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--recipes-primary), var(--recipes-accent));
  border-radius: 2px;
  transition: var(--recipes-transition);
}

/* Responsive section titles */
@media (max-width: 767.98px) {
  .section-title, 
  .recipes-latest-mosaic h2,
  .recipes-popular h2,
  .recipes-browse-categories h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 575.98px) {
  .section-title, 
  .recipes-latest-mosaic h2,
  .recipes-popular h2,
  .recipes-browse-categories h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .section-title::after,
  .recipes-latest-mosaic h2::after,
  .recipes-popular h2::after,
  .recipes-browse-categories h2::after {
    width: 40px;
    height: 2px;
  }
}

/* Enhanced Latest Recipes Mosaic Section */
.recipes-latest-mosaic {
  border-radius: var(--recipes-border-radius);
  padding: 3rem 0;
  margin: 2rem 0;
}



/* Enhanced Image Cards */
.image-card { 
  position: relative; 
  border-radius: var(--recipes-border-radius);
  overflow: hidden;
  box-shadow: var(--recipes-shadow);
  transition: var(--recipes-transition);
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--recipes-shadow-lg);
}

.image-card .image-gradient,
.bg-cover .image-gradient {
  position: absolute; 
  inset: 0; 
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.7) 100%);
  transition: background .3s ease;
}

.image-card:hover .image-gradient,
.bg-cover:hover .image-gradient {
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.8) 100%);
}

.image-card .image-text, 
.bg-cover .image-text {
  position: absolute; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  color: #fff;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

/* Force bottom placement inside Bootstrap .ratio */
.ratio .image-text { top: auto !important; }
.ratio > .image-text { height: auto !important; }

/* Enhanced Typography */
.image-card-lg .image-text .h5 { 
  font-size: 1.4rem; 
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (min-width: 992px) { 
  .image-card-lg .image-text .h5 { 
    font-size: 1.75rem; 
  } 
}

/* Enhanced Meta Line with Clean Categories */
.meta-line {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.meta-line .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-line .icon { 
  display: inline-block; 
  opacity: 0.9;
  width: 14px;
  height: 14px;
}

/* Clean Category Styling */
.meta-line .meta-item:first-child {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

/* Date styling */
.image-text .small {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Hover zoom for both <img> and background-image cards */
.image-card a, .card .ratio, .recipes-hero .ratio { overflow: hidden; }
.image-card a img, .card .ratio img, .recipes-hero .ratio img { transition: transform .45s ease, filter .35s ease; will-change: transform; }
.image-card a:hover img, .image-card a:focus img, .card .ratio:hover img, .card .ratio:focus img, .recipes-hero .ratio:hover img, .recipes-hero .ratio:focus img { transform: scale(1.05); }

/* When using background-image, animate background-size */
.bg-cover { transition: background-size .45s ease; }
.bg-cover:hover, .bg-cover:focus { background-size: 105%; }

/* Slightly stronger overlay on hover while keeping it always visible */
.image-card a:hover .image-gradient, .bg-cover:hover .image-gradient { background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.6) 65%, rgba(0,0,0,0.7) 100%); }

/* Bootstrap Horizontal Cards - Posts List */
.post-list-card {
  border: 1px solid var(--recipes-gray-200);
  border-radius: var(--recipes-border-radius);
  overflow: hidden;
  transition: var(--recipes-transition);
  box-shadow: var(--recipes-shadow);
}

.post-list-card:hover {
  box-shadow: var(--recipes-shadow-lg);
  transform: translateY(-2px);
}

.post-list-card .post-list-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--recipes-transition);
}

.post-list-card:hover .post-list-thumb {
  transform: scale(1.05);
}

/* Fixed equal height for all cards */
.post-list-card .row {
  height: 300px;
  max-height: 300px;
  overflow: hidden;
}

/* Mobile: Stack vertically */
@media (max-width: 767.98px) {
  .post-list-card .row {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  
  .post-list-card .col-12:first-child {
    height: 180px;
    max-height: 180px;
  }
  
  .post-list-card .post-list-thumb {
    height: 180px;
    width: 100%;
    border-radius: var(--recipes-border-radius) var(--recipes-border-radius) 0 0 !important;
  }
}

/* Desktop: Side by side - fixed height for uniform appearance */
@media (min-width: 768px) {
  .post-list-card .row {
    height: 300px;
    max-height: 300px;
  }
  
  .post-list-card .col-md-5 {
    display: flex;
    height: 300px;
  }
  
  .post-list-card .col-md-5 a {
    flex: 1;
    overflow: hidden;
    border-radius: var(--recipes-border-radius) 0 0 var(--recipes-border-radius);
  }
  
  .post-list-card .col-md-7 {
    height: 300px;
    overflow: hidden;
  }
  
  .post-list-card .post-list-thumb {
    height: 300px;
    width: 100%;
  }
}

/* Card body styling with flexbox for bottom alignment */
.post-list-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-list-card .card-text {
  flex-grow: 1;
}

/* Ensure button/date section stays at bottom */
.post-list-card .d-flex.justify-content-between {
  margin-top: auto;
}

.post-list-card .card-title a:hover {
  color: var(--recipes-primary);
}

/* recent widget (right column) - Enhanced with background */
.recent-widget {
  background: var(--recipes-gray-100);
  border-radius: var(--recipes-border-radius);
  box-shadow: var(--recipes-shadow);
  overflow: hidden;
}

.recent-widget .card-body {
  padding: 2rem;
}

.recent-widget h3 {
  color: var(--recipes-dark);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--recipes-primary);
}

.recent-thumb { 
  width: 140px; 
  height: 140px; 
  object-fit: cover; 
  border-radius: 12px;
  transition: var(--recipes-transition);
}

.recent-thumb:hover {
  transform: scale(1.05);
}



/* Bigger titles and better typography */
.recent-meta a {
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--recipes-dark);
  display: block;
  margin-bottom: 0.75rem;
}

.recent-meta a:hover {
  color: var(--recipes-primary);
}

/* Recent meta info styling - date first, read time last */
.recent-meta .meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.recent-meta .post-date {
  font-size: 0.9rem;
  color: var(--recipes-gray-500);
  font-weight: 500;
  flex-shrink: 0;
}

.recent-meta .read-time {
  color: var(--recipes-gray-500);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ensure proper spacing in recent items */
.recent-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--recipes-gray-200);
}

.recent-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Fix recent meta container */
.recent-meta {
  flex: 1;
  min-width: 0;
}


.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 
Z-INDEX HIERARCHY:
- Header (sticky): 1070 (highest - always on top)
- Back to top button: 1050
- Dropdowns/Modals: 1060
- Sidebar widgets (sticky): 1020 (below header)
*/

/* Sticky recent widget only on home/blog; not sticky on single or posts pages */
.home .recent-widget, .blog .recent-widget { position: sticky; top: 90px; z-index: 1020; }
@media (min-width: 782px) { body.admin-bar.home .recent-widget, body.admin-bar.blog .recent-widget { top: 122px; } }
@media (max-width: 781.98px) { body.admin-bar.home .recent-widget, body.admin-bar.blog .recent-widget { top: 136px; } }
@media (max-width: 991.98px) { .home .recent-widget, .blog .recent-widget { position: static; } }
.single .recent-widget { position: static !important; top: auto !important; }
/* Disable sticky on posts pages with category-hero (our custom posts pages) */
.posts-page .recent-widget { position: static !important; top: auto !important; }

/* Enhanced More Posts */
.more-posts { padding: 3rem 0; background: var(--recipes-gray-100); }
.more-posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.more-post-card { background: var(--recipes-white); border-radius: var(--recipes-border-radius); overflow: hidden; box-shadow: var(--recipes-shadow); transition: var(--recipes-transition); }
.more-post-card:hover { box-shadow: var(--recipes-shadow-lg); transform: translateY(-4px); }
.more-post-thumb { width: 100%; height: 200px; object-fit: cover; transition: var(--recipes-transition); }
.more-post-card:hover .more-post-thumb { transform: scale(1.05); }
@media (min-width: 1200px) { .more-post-thumb { height: 215px; } }

/* Related Posts Card Styling */
.section-spacing .card h3 a {
  color: var(--recipes-dark) !important;
  transition: var(--recipes-transition);
}

.section-spacing .card h3 a:hover {
  color: var(--recipes-primary) !important;
}

/* Category Page Post Titles */
.card h2 a,
.more-post-thumb + a {
  color: var(--recipes-dark) !important;
  transition: var(--recipes-transition);
}

.card h2 a:hover,
.more-post-thumb + a:hover {
  color: var(--recipes-primary) !important;
}

/* Category Hero Section */
.category-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.category-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 107, 53, 0.1) 0%, rgba(46, 196, 182, 0.1) 100%);
  z-index: 1;
}

.category-hero .container {
  z-index: 2;
}

.category-hero h1 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.category-hero .lead {
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin: 0 auto;
}

.category-hero .badge {
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive category hero */
@media (max-width: 767.98px) {
  .category-hero {
    margin-bottom: 2rem;
  }
  
  .category-hero h1 {
    font-size: 2.5rem;
  }
  
  .category-hero .lead {
    font-size: 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .category-hero h1 {
    font-size: 2rem;
  }
  
  .category-hero .lead {
    font-size: 1rem;
  }
}

/* Focus & Accessibility */
*:focus { outline: 2px solid var(--recipes-primary); outline-offset: 2px; }
.skip-link { position: absolute; top: -40px; left: 6px; background: var(--recipes-dark); color: var(--recipes-white); padding: 8px; border-radius: 4px; z-index: 9999; }
.skip-link:focus { top: 6px; }

/* Responsive Typography */
@media (max-width: 767.98px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .section-title { font-size: 1.875rem; }
}

/* Enhanced Pagination Styling */
.recipes-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
}

.recipes-pagination .pagination {
  margin: 0;
  gap: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipes-pagination .page-item {
  border: none;
  margin: 0;
}

.recipes-pagination .page-link {
  border: 2px solid var(--recipes-gray-200);
  border-radius: 50px;
  color: var(--recipes-gray-700);
  font-weight: 600;
  padding: 0.6rem 1rem;
  margin: 0;
  transition: var(--recipes-transition);
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
  min-width: 44px;
  height: 44px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--recipes-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recipes-pagination .page-link:hover {
  border-color: var(--recipes-primary);
  background: var(--recipes-primary);
  color: var(--recipes-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
}

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

.recipes-pagination .page-item.active .page-link:hover {
  background: linear-gradient(135deg, var(--recipes-primary-dark) 0%, #d4481f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Circular Pagination Styling */
.recipes-circular-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
}

.recipes-circular-pagination .circular-nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.recipes-circular-pagination .circular-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--recipes-white);
  border: 1px solid #e5e7eb;
  color: var(--recipes-gray-700);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
}

.recipes-circular-pagination .circular-btn:hover {
  border-color: #14b8a6;
  color: #14b8a6;
  transform: translateY(-1px);
}

.recipes-circular-pagination .circular-btn.active {
  background: #14b8a6;
  border-color: #14b8a6;
  color: var(--recipes-white);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.recipes-circular-pagination .circular-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #14b8a6;
  border: 1px solid #14b8a6;
  color: var(--recipes-white);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  margin: 0 0.25rem;
  line-height: 1;
  text-align: center;
}

.recipes-circular-pagination .circular-arrow-btn:hover {
  background: #0f766e;
  border-color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

.recipes-circular-pagination .pagination-dots {
  color: var(--recipes-gray-400);
  font-weight: 600;
  padding: 0 0.25rem;
  display: flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
}

/* Prev/Next Square Pagination Styling */
.recipes-prev-next-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
}

.recipes-prev-next-pagination .prev-next-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.recipes-prev-next-pagination .prev-next-btn {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  line-height: 1;
  text-align: center;
  border: none;
  position: relative;
}

/* Previous button styling */
.recipes-prev-next-pagination .prev-btn.active {
  background: #9ca3af;
  color: var(--recipes-white);
}

.recipes-prev-next-pagination .prev-btn.active:hover {
  background: #6b7280;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

.recipes-prev-next-pagination .prev-btn.disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.recipes-prev-next-pagination .prev-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Next button styling */
.recipes-prev-next-pagination .next-btn.active {
  background: #1e293b;
  color: var(--recipes-white);
}

.recipes-prev-next-pagination .next-btn.active:hover {
  background: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.4);
}

.recipes-prev-next-pagination .next-btn.disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.recipes-prev-next-pagination .next-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Simple Arrow Navigation Styling */
.recipes-pagination-arrows {
  display: flex;
  justify-content: center;
  width: 100%;
}

.recipes-pagination-arrows .arrow-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.recipes-pagination-arrows .arrow-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--recipes-white);
  border: 2px solid var(--recipes-gray-200);
  color: var(--recipes-gray-700);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--recipes-transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.recipes-pagination-arrows .arrow-btn:hover {
  background: var(--recipes-primary);
  border-color: var(--recipes-primary);
  color: var(--recipes-white);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.recipes-pagination-arrows .arrow-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--recipes-gray-100);
  border-color: var(--recipes-gray-200);
  color: var(--recipes-gray-400);
}

.recipes-pagination-arrows .arrow-btn.disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--recipes-gray-100);
  border-color: var(--recipes-gray-200);
  color: var(--recipes-gray-400);
}

.recipes-pagination-arrows .page-counter {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--recipes-gray-700);
  background: var(--recipes-gray-50);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: 2px solid var(--recipes-gray-200);
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Responsive pagination */
@media (max-width: 767.98px) {
  .recipes-pagination .pagination {
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
  }
  
  .recipes-circular-pagination .circular-nav-container {
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  
  .recipes-circular-pagination .circular-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  
  .recipes-circular-pagination .circular-arrow-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    line-height: 1;
    margin: 0 0.2rem;
  }
  
  .recipes-prev-next-pagination .prev-next-container {
    gap: 0.75rem;
  }
  
  .recipes-prev-next-pagination .prev-next-btn {
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
    line-height: 1;
  }
  
  .recipes-pagination .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 38px;
    height: 38px;
    font-weight: 600;
  }
  
  .recipes-pagination-arrows .arrow-navigation {
    gap: 1.5rem;
  }
  
  .recipes-pagination-arrows .arrow-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  
  .recipes-pagination-arrows .page-counter {
    font-size: 1rem;
    padding: 0.65rem 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .recipes-pagination .pagination {
    gap: 0.15rem;
  }
  
  .recipes-circular-pagination .circular-nav-container {
    gap: 0.3rem;
  }
  
  .recipes-circular-pagination .circular-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .recipes-circular-pagination .circular-arrow-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    line-height: 1;
    margin: 0 0.15rem;
  }
  
  .recipes-prev-next-pagination .prev-next-container {
    gap: 0.5rem;
  }
  
  .recipes-prev-next-pagination .prev-next-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
    line-height: 1;
  }
  
  .recipes-pagination .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .recipes-pagination-arrows .arrow-navigation {
    gap: 1rem;
  }
  
  .recipes-pagination-arrows .arrow-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .recipes-pagination-arrows .page-counter {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}

/* More Posts Navigation Styling */
.card-body .recipes-pagination {
  margin-top: 1rem;
  margin-bottom: 0;
}

.card-body .recipes-pagination .pagination {
  gap: 0.2rem;
}

.card-body .recipes-pagination .page-link {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  min-width: 32px;
  height: 32px;
}

.card-body .recipes-circular-pagination .circular-btn {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.card-body .recipes-circular-pagination .circular-arrow-btn {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
  margin: 0 0.15rem;
}

.card-body .recipes-prev-next-pagination .prev-next-btn {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}

.card-body .recipes-prev-next-pagination .prev-next-container {
  gap: 0.5rem;
}

.card-body .recipes-pagination-arrows .arrow-btn {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.card-body .recipes-pagination-arrows .page-counter {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* Animation Utilities */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.hover-lift { transition: var(--recipes-transition); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--recipes-shadow-lg); }

/* Custom Container Width - 80% of screen width */
.container {
  max-width: 1500px !important;
}

/* Enhanced Responsive Design - Mobile First Approach */

/* Base mobile styles (320px+) */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .container {
    max-width: 90% !important;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .category-hero h1 {
    font-size: 2.5rem !important;
  }
  
  .section-spacing {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .container {
    max-width: 95% !important;
  }
  
  .category-hero h1 {
    font-size: 3rem !important;
  }
  
  .section-spacing {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Improve card layouts on tablets */
  .recipes-popular .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Make Most Popular cards smaller */
  .recipes-popular .card .ratio {
    --bs-aspect-ratio: 50%; /* Keep tablet cards moderate size */
  }
  
  .recipes-popular .card .mt-3 {
    margin-top: 0.75rem !important; /* Further reduced spacing */
  }
  
  .recipes-popular .card h3 {
    font-size: 0.85rem; /* Smaller title */
    margin-bottom: 0.5rem;
    line-height: 1.2;
  }
  
  .recipes-popular .card .d-flex.align-items-center {
    font-size: 0.75rem; /* Smaller meta text */
  }
  
  .recipes-popular .card .d-flex.align-items-center span {
    font-size: 0.75rem;
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 100% !important;
  }
  
  /* Ensure 3 Most Popular cards fit in one line on large screens */
  .recipes-popular .card .ratio {
    --bs-aspect-ratio: 60%; /* Much bigger height for large PC screens */
  }
  
  .recipes-popular .card h3 {
    font-size: 0.8rem;
    line-height: 1.1;
  }
  
  .recipes-popular .card .mt-3 {
    margin-top: 0.5rem !important;
  }
  
  /* Force 3 cards per row on large screens - full container width */
  .recipes-popular .col-lg-4 {
    flex: 0 0 33.333333% !important; /* Full third of container */
    max-width: 33.333333% !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .recipes-popular .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
}

/* Extra large screens (1200px and up) - Full container width */
@media (min-width: 1200px) {
  .recipes-popular .col-lg-4 {
    flex: 0 0 33.333333% !important; /* Full third of container */
    max-width: 33.333333% !important;
  }
  
  .recipes-popular .card .ratio {
    --bs-aspect-ratio: 55%; /* Much bigger height for extra large PC screens */
  }
}

@media (min-width: 992px) {
  .section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px !important;
  }
}

/* XXL devices (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px !important;
  }
}

/* Mobile-specific improvements */
@media (max-width: 575.98px) {
  .category-hero {
    min-height: 200px !important;
    height: 30vh !important;
  }
  
  .category-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }
  
  .category-hero .lead {
    font-size: 0.95rem;
  }
  
  .recipes-hero .col-lg-8,
  .recipes-hero .col-lg-4 {
    margin-bottom: 1.5rem;
  }
  
  .hero-main .h3 {
    font-size: 1.25rem;
  }
  
  .hero-side .h5 {
    font-size: 1.1rem;
  }
  
  /* Stack category avatars in single column on very small screens */
  .recipes-browse-categories .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Improve readability */
  .card-body {
    padding: 1rem;
  }
  
  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* Tablet landscape improvements */
@media (min-width: 768px) and (max-width: 991.98px) {
  .recipes-browse-categories .col-lg-2 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  .recipes-popular .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Make Most Popular cards even more compact on mobile */
  .recipes-popular .card .ratio {
    --bs-aspect-ratio: 55%; /* Keep mobile cards smaller */
  }
  
  .recipes-popular .card h3 {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .recipes-popular .card .d-flex.align-items-center {
    font-size: 0.8rem; /* Smaller meta text */
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-muted {
    color: #666 !important;
  }
  
  .card {
    border: 1px solid #ccc !important;
  }
}

/* Breadcrumb Styling */
.breadcrumb-nav {
  margin-top: 1rem;
}

.breadcrumb {
  font-size: 0.875rem;
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  color: var(--recipes-gray-600);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--recipes-gray-400);
  margin: 0 0.5rem;
}

.breadcrumb-item a {
  color: var(--recipes-primary);
  text-decoration: none;
  transition: var(--recipes-transition);
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
  color: var(--recipes-primary-dark);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--recipes-gray-700);
  font-weight: 500;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--recipes-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--recipes-dark);
  color: var(--recipes-white);
  padding: 8px 16px;
  border-radius: 4px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* Improve form accessibility */
.form-control:focus {
  border-color: var(--recipes-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* Dark mode preparation */
/* Enhanced Accessibility Features */
/* Focus indicators for better keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.form-select:focus,
a:focus {
  outline: 2px solid var(--recipes-primary) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.25) !important;
}

/* Skip link improvements */
.skip-link {
  position: absolute !important;
  top: -40px !important;
  left: 6px !important;
  background: var(--recipes-dark) !important;
  color: var(--recipes-white) !important;
  padding: 12px 16px !important;
  border-radius: 4px !important;
  z-index: 99999 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: top 0.3s ease !important;
}

.skip-link:focus {
  top: 6px !important;
  outline: 2px solid var(--recipes-primary) !important;
  outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --recipes-primary: #d63200;
    --recipes-accent: #006b5d;
    --recipes-gray-500: #000000;
    --recipes-gray-600: #000000;
    --recipes-gray-700: #000000;
    --recipes-gray-800: #000000;
  }
  
  .btn-primary {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
  }
  
  .btn-outline-primary {
    border-color: #000000 !important;
    color: #000000 !important;
  }
  
  .text-muted {
    color: #000000 !important;
  }
  
  .border {
    border-color: #000000 !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .site-header .navbar {
    transition: none !important;
  }
  
  .sticky-top {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

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

.sr-only-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: inherit !important;
  margin: inherit !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* Better color contrast for links */
a {
  color: var(--recipes-primary);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--recipes-primary-dark);
  text-decoration-color: currentColor;
}

/* Ensure minimum touch target sizes (44px) */
.btn,
.nav-link,
.pagination .page-link,
.form-control,
.form-select {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Better form accessibility */
.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* .form-control:invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
} */

/* .form-control:valid {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
} */

/* Error and success states */
.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.error-message::before {
  content: "⚠";
  margin-right: 0.5rem;
  font-weight: bold;
}

.success-message {
  color: #198754;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.success-message::before {
  content: "✓";
  margin-right: 0.5rem;
  font-weight: bold;
}

/* Better table accessibility */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background-color: var(--recipes-gray-100);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--recipes-gray-300);
}

td {
  padding: 0.75rem;
  border: 1px solid var(--recipes-gray-300);
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--recipes-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .pagination,
  .btn,
  .skip-link {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: none;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
  
  .entry-content {
    max-width: none;
  }
  
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Plugin Compatibility Styles */

/* Yoast SEO Plugin */
.yoast-seo-analysis {
  background: var(--recipes-gray-100);
  border: 1px solid var(--recipes-gray-300);
  border-radius: var(--recipes-border-radius);
  padding: 1rem;
  margin: 1rem 0;
}

.yoast-seo-analysis .yoast-seo-score {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* RankMath SEO Plugin */
.rank-math-review-snippet {
  background: var(--recipes-gray-100);
  border-left: 4px solid var(--recipes-primary);
  padding: 1rem;
  margin: 1rem 0;
}

/* Contact Form 7 */
.wpcf7-form {
  background: var(--recipes-white);
  padding: 2rem;
  border-radius: var(--recipes-border-radius);
  box-shadow: var(--recipes-shadow);
}

.wpcf7-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--recipes-gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.wpcf7-form-control:focus {
  outline: none;
  border-color: var(--recipes-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.wpcf7-submit {
  background: var(--recipes-primary);
  color: var(--recipes-white);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--recipes-border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.wpcf7-submit:hover {
  background: var(--recipes-primary-dark);
}

.wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.wpcf7-validation-errors {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.wpcf7-mail-sent-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

/* WooCommerce Plugin */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--recipes-primary);
  color: var(--recipes-white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--recipes-border-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--recipes-primary-dark);
  color: var(--recipes-white);
}

.woocommerce .button.alt {
  background: var(--recipes-accent);
}

.woocommerce .button.alt:hover {
  background: var(--recipes-accent-light);
}

.woocommerce .price {
  color: var(--recipes-primary);
  font-weight: 700;
}

.woocommerce .star-rating {
  color: #ffc107;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
  background: var(--recipes-gray-100);
  border-left: 4px solid var(--recipes-primary);
  padding: 1rem;
  margin: 1rem 0;
}

/* Elementor Plugin */
.elementor-widget-container {
  max-width: 100%;
}

.elementor-button {
  background: var(--recipes-primary) !important;
  color: var(--recipes-white) !important;
  border-radius: var(--recipes-border-radius) !important;
  transition: background-color 0.3s ease !important;
}

.elementor-button:hover {
  background: var(--recipes-primary-dark) !important;
}

.elementor-heading-title {
  color: var(--recipes-dark);
}

/* Gutenberg Block Editor */
.wp-block-button__link {
  background: var(--recipes-primary);
  color: var(--recipes-white);
  border-radius: var(--recipes-border-radius);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.wp-block-button__link:hover {
  background: var(--recipes-primary-dark);
  color: var(--recipes-white);
}

.wp-block-quote {
  border-left: 4px solid var(--recipes-primary);
  background: var(--recipes-gray-100);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
}

.wp-block-pullquote {
  border-top: 4px solid var(--recipes-primary);
  border-bottom: 4px solid var(--recipes-primary);
  padding: 2rem 0;
  text-align: center;
}

.wp-block-code {
  background: var(--recipes-gray-100);
  border: 1px solid var(--recipes-gray-300);
  border-radius: 4px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
}

.wp-block-table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table th,
.wp-block-table td {
  border: 1px solid var(--recipes-gray-300);
  padding: 0.75rem;
  text-align: left;
}

.wp-block-table th {
  background: var(--recipes-gray-100);
  font-weight: 600;
}

/* Recipe Card Plugin Compatibility */
.recipe-card {
  background: var(--recipes-white);
  border: 2px solid var(--recipes-gray-200);
  border-radius: var(--recipes-border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--recipes-shadow);
}

.recipe-card-title {
  color: var(--recipes-dark);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.recipe-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.recipe-card-meta-item {
  background: var(--recipes-gray-100);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.recipe-card-ingredients,
.recipe-card-instructions {
  margin-bottom: 1.5rem;
}

.recipe-card-ingredients h3,
.recipe-card-instructions h3 {
  color: var(--recipes-primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.recipe-card-ingredients ul,
.recipe-card-instructions ol {
  padding-left: 1.5rem;
}

.recipe-card-ingredients li,
.recipe-card-instructions li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Social Media Plugin Compatibility */
.social-share-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.social-share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--recipes-border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.social-share-button:hover {
  transform: translateY(-2px);
}

.social-share-button.facebook {
  background: #1877f2;
  color: white;
}

.social-share-button.twitter {
  background: #1da1f2;
  color: white;
}

.social-share-button.pinterest {
  background: #bd081c;
  color: white;
}

.social-share-button.whatsapp {
  background: #25d366;
  color: white;
}

/* Comments Plugin Compatibility */
.comment-form {
  background: var(--recipes-gray-100);
  padding: 2rem;
  border-radius: var(--recipes-border-radius);
  margin-top: 2rem;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--recipes-gray-300);
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  outline: none;
  border-color: var(--recipes-primary);
}

.form-submit input {
  background: var(--recipes-primary);
  color: var(--recipes-white);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--recipes-border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit input:hover {
  background: var(--recipes-primary-dark);
}

/* Breadcrumb Plugin Compatibility */
.breadcrumb-trail {
  background: var(--recipes-gray-100);
  padding: 0.75rem 1rem;
  border-radius: var(--recipes-border-radius);
  margin-bottom: 1rem;
}

.breadcrumb-trail a {
  color: var(--recipes-primary);
  text-decoration: none;
}

.breadcrumb-trail a:hover {
  text-decoration: underline;
}

/* ===== ENHANCED STICKY HEADER ===== */

/* Sticky Header Base */
.sticky-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1070;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Header States */
.site-header {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled State */
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95) !important;
}

.site-header.scrolled .navbar {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Compact Mode for Mobile */
@media (max-width: 991.98px) {
  .site-header.scrolled .navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .site-header.scrolled .navbar-brand {
    font-size: 1.1rem;
  }
  
  .site-header.scrolled .recipes-custom-logo {
    max-height: 35px;
  }
}

/* Logo Animation */
.navbar-brand {
  transition: all 0.3s ease;
}

.recipes-custom-logo {
  transition: all 0.3s ease;
  max-height: 45px;
}

.site-header.scrolled .recipes-custom-logo {
  max-height: 40px;
}

/* Navigation Links Animation - Enhanced */
.navbar-nav .nav-link {
  transition: all 0.2s ease;
  position: relative;
  background: transparent !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background: transparent !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--recipes-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

/* Ensure no background for active items */
.navbar-nav .nav-item.current-menu-item > .nav-link,
.navbar-nav .nav-link.active {
  background: transparent !important;
}

/* Override Bootstrap default nav styles */
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .show > .nav-link {
  background-color: transparent !important;
}

/* Fix mobile menu item spacing */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link::after {
    bottom: 0;
    left: 1rem;
    right: 1rem;
    transform: none;
  }
  
  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    width: auto;
  }
}

/* Body Padding for Fixed Header */
body {
  padding-top: 80px; /* Adjust based on your header height */
}

@media (max-width: 991.98px) {
  body {
    padding-top: 70px;
  }
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Header Shadow Animation - Removed problematic ::before shadow */

/* ===== MODERN HEADER SEARCH DESIGN ===== */

/* Header Search Form */
.header-search-form {
  position: relative;
  width: 100%;
  max-width: 280px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.search-input-wrapper:hover {
  border-color: #ced4da;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-input-wrapper:focus-within {
  border-color: var(--recipes-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  background: #fff;
}

/* Search Input */
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--recipes-dark);
  outline: none;
  min-height: 36px;
}

.search-input::placeholder {
  color: #6c757d;
  opacity: 1;
}

.search-input:focus {
  outline: none;
  box-shadow: none;
}

/* Search Button */
.search-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.search-btn:hover {
  color: var(--recipes-primary);
  background: rgba(255, 107, 53, 0.1);
}

.search-btn:focus {
  outline: none;
  color: var(--recipes-primary);
}

.search-btn svg {
  transition: transform 0.2s ease;
}

.search-btn:hover svg {
  transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
  .header-search-form {
    max-width: 100%;
    margin-top: 1rem;
  }
  
  .search-input-wrapper {
    border-radius: 18px;
  }
  
  .search-input {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
    min-height: 40px;
  }
  
  .search-btn {
    padding: 0.6rem 0.75rem;
    min-height: 40px;
  }
}

@media (max-width: 575.98px) {
  .header-search-form {
    margin-top: 0.75rem;
  }
  
  .search-input {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Search Plugin Compatibility */
.search-form {
  position: relative;
  max-width: 400px;
}

.search-form input[type="search"] {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: 2px solid var(--recipes-gray-300);
  border-radius: 25px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--recipes-primary);
}

.search-form button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--recipes-primary);
  color: var(--recipes-white);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background: var(--recipes-primary-dark);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--recipes-primary) 0%, var(--recipes-primary-dark) 100%);
  color: var(--recipes-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  text-decoration: none;
  overflow: hidden;
}

.back-to-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--recipes-accent) 0%, var(--recipes-accent-light) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.back-to-top:hover::before {
  opacity: 1;
}

.back-to-top .icon {
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.back-to-top:hover .icon {
  transform: translateY(-2px);
}

.back-to-top.visible,
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
  transition: all 0.1s ease;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* Click animation */
.back-to-top.clicked {
  animation: click-bounce 0.4s ease-out;
}

@keyframes click-bounce {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Pulse animation for initial appearance */
.back-to-top.pulse {
  animation: pulse-scale 0.6s ease-out;
}

@keyframes pulse-scale {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}

/* Adjust for WordPress admin bar */
@media (min-width: 782px) {
  body.admin-bar .back-to-top {
    bottom: 30px;
  }
}

@media (max-width: 781.98px) {
  body.admin-bar .back-to-top {
    bottom: 20px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .back-to-top {
    background: #000000 !important;
    border: 2px solid #ffffff !important;
  }
  
  .back-to-top::before {
    background: #333333 !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease !important;
    transform: none !important;
  }
  
  .back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  
  .back-to-top:hover {
    transform: none !important;
  }
  
  .back-to-top:active {
    transform: none !important;
  }
  
  .back-to-top .icon {
    transition: none !important;
  }
  
  .back-to-top:hover .icon {
    transform: none !important;
  }
  
  .back-to-top.pulse {
    animation: none !important;
  }
  
  .back-to-top.clicked {
    animation: none !important;
  }
}

/* ===== MODERN FOOTER STYLES ===== */

.modern-footer {
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
}

.footer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 48, 56, 0.85);
  z-index: 1;
}

/* ===== FOOTER NEWSLETTER SECTION ===== */

.footer-newsletter {
  text-align: center;
}

.newsletter-signup {
  text-align: center;
  max-width: 100%;
  margin: 0 auto;
}

.newsletter-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--recipes-white);
  margin-bottom: 1rem;
  text-align: center;
}

.newsletter-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-align: center;
}

.newsletter-form .input-group {
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}

.newsletter-form .form-control {
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: var(--recipes-white);
  color: var(--recipes-gray-800);
  border-radius: 8px 0 0 8px;
  flex: 1;
  min-width: 0;
}

.newsletter-form .form-control::placeholder {
  color: var(--recipes-gray-500);
  opacity: 1;
}

.newsletter-form .form-control:focus {
  box-shadow: none;
  border-color: transparent;
  outline: none;
  background: var(--recipes-white);
}

.newsletter-form .btn {
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  background: linear-gradient(135deg, var(--recipes-primary) 0%, var(--recipes-primary-dark) 100%);
  font-size: 0.9rem;
  color: var(--recipes-white);
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-form .btn:hover {
  background: linear-gradient(135deg, var(--recipes-primary-dark) 0%, #d4481f 100%);
  transform: translateY(-1px);
  color: var(--recipes-white);
}

.footer-main {
  position: relative;
  z-index: 2;
  padding: 4rem 0 2rem;
}

.footer-widget {
  margin-bottom: 2rem;
}

.footer-widget-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--recipes-white);
  margin-bottom: 1.5rem;
  position: relative;
  text-align: center;
  padding-bottom: 0.75rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  text-align: center;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.75rem;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--recipes-transition);
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

.footer-menu a:hover,
.footer-menu a:focus {
  color: var(--recipes-white);
  text-decoration: none;
  transform: translateX(5px);
}

.footer-menu a::before {
  content: '→';
  margin-right: 0.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.footer-menu a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-categories-list li {
  margin-bottom: 0.75rem;
}

.footer-categories-list a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--recipes-transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.footer-categories-list a:hover,
.footer-categories-list a:focus {
  color: var(--recipes-white);
  text-decoration: none;
}

.category-count {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.footer-contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.contact-item i {
  width: 20px;
  margin-right: 0.75rem;
  color: var(--recipes-primary);
  flex-shrink: 0;
}

.contact-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--recipes-transition);
}

.contact-item a:hover,
.contact-item a:focus {
  color: var(--recipes-white);
  text-decoration: underline;
}

.footer-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--recipes-primary);
  font-family: 'Montserrat', sans-serif;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.footer-bottom {
  position: relative;
  z-index: 2;
  padding: 1.5rem 0;
  background: rgba(0, 0, 0, 0.2);
}

.copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-menu a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--recipes-transition);
}

.footer-bottom-menu a:hover,
.footer-bottom-menu a:focus {
  color: var(--recipes-white);
  text-decoration: underline;
}

/* ===== SOCIAL MEDIA STYLES ===== */

.social-media-icons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Social Icon Sizes */
.social-icon-sm {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

.social-icon-md {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.social-icon-lg {
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

/* Social Icon Styles */
.social-style-colored .social-icon {
  color: var(--recipes-white);
  background: var(--recipes-gray-600);
}

.social-style-colored .social-facebook { background: #1877f2; }
.social-style-colored .social-instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-style-colored .social-twitter { background: #000000; }
.social-style-colored .social-pinterest { background: #bd081c; }
.social-style-colored .social-youtube { background: #ff0000; }
.social-style-colored .social-tiktok { background: #000000; }
.social-style-colored .social-linkedin { background: #0077b5; }
.social-style-colored .social-whatsapp { background: #25d366; }

.social-style-monochrome .social-icon {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-style-monochrome .social-icon:hover {
  background: var(--recipes-white);
  color: var(--recipes-dark);
  transform: translateY(-2px);
}

.social-style-outlined .social-icon {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-style-outlined .social-icon:hover {
  background: var(--recipes-white);
  color: var(--recipes-dark);
  border-color: var(--recipes-white);
  transform: translateY(-2px);
}

.social-style-colored .social-icon:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Header Social Media */
.header-social {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-social .social-media-icons {
  gap: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.header-social .social-icon {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-social .social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Desktop header social positioning */
@media (min-width: 992px) {
  .header-social {
    justify-content: flex-start;
  }
  
  .header-social .social-media-icons {
    justify-content: flex-start;
  }
}

/* Mobile header social styling */
@media (max-width: 991.98px) {
  .header-social {
    padding: 0.75rem 0;
    border-top: 1px solid var(--recipes-gray-200);
    border-bottom: 1px solid var(--recipes-gray-200);
    margin: 0.5rem 0;
  }
  
  .header-social .social-media-icons {
    gap: 0.75rem;
  }
  
  .header-social .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Footer Social Media */
.social-footer {
  margin-top: 1rem;
}

/* ===== SOCIAL SHARING STYLES ===== */

.social-sharing-buttons {
  padding: 2rem 0;
}

.sharing-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--recipes-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

.sharing-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--recipes-border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: var(--recipes-white);
  min-width: 120px;
  justify-content: center;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: var(--recipes-white);
  text-decoration: none;
}

.share-facebook { background: #1877f2; }
.share-facebook:hover { background: #166fe5; }

.share-twitter { background: #000000; }
.share-twitter:hover { background: #333333; }

.share-pinterest { background: #bd081c; }
.share-pinterest:hover { background: #a0070f; }

.share-linkedin { background: #0077b5; }
.share-linkedin:hover { background: #006396; }

.share-whatsapp { background: #25d366; }
.share-whatsapp:hover { background: #20b954; }

/* ===== FOOTER CONNECT SECTION ===== */

.footer-connect {
  text-align: center;
}

.connect-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.footer-connect .social-media-icons {
  justify-content: center;
  gap: 1rem;
}

.footer-connect .social-icon {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

/* ===== RESPONSIVE FOOTER STYLES ===== */

/* Large screens - 3 columns side by side */
@media (min-width: 992px) {
  .footer-main .row {
    align-items: flex-start;
  }
  
  .footer-widget {
    height: 100%;
  }
  
  .footer-connect {
    text-align: center;
  }
}

/* Medium screens - Single column layout */
@media (max-width: 991.98px) {
  .footer-main {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-bottom-nav {
    margin-top: 1rem;
  }
  
  .footer-bottom-menu {
    justify-content: center;
  }
  
  /* All sections stack vertically on medium screens */
  .footer-widget {
    margin-bottom: 2.5rem;
  }
  
  /* Newsletter section mobile adjustments */
  .newsletter-title {
    font-size: 1.2rem;
  }
  
  .newsletter-description {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }
  
  .newsletter-form .input-group {
    flex-direction: column;
    border-radius: 8px;
    max-width: 280px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
  
  .newsletter-form .form-control {
    border-radius: 8px;
    margin-bottom: 0.75rem;
    text-align: center;
    width: 100%;
  }
  
  .newsletter-form .btn {
    border-radius: 8px;
    width: 100%;
  }
}

/* Mobile styles - Single column layout */
@media (max-width: 767.98px) {
  .footer-main {
    padding: 2rem 0 1rem;
  }
  
  /* Mobile footer widgets - all centered */
  .footer-widget {
    margin-bottom: 2.5rem;
    text-align: center;
  }
  
  .footer-widget-title {
    font-size: 1.2rem;
  }
  
  .footer-widget-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* About section mobile */
  .footer-about .footer-description {
    text-align: center;
    max-width: 300px;
    margin: 0 auto 1.5rem;
  }
  
  /* Quick links mobile - horizontal layout */
  .footer-links .footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
  }
  
  .footer-links .footer-menu li {
    margin-bottom: 0.5rem;
  }
  
  .footer-links .footer-menu a {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }
  
  .footer-links .footer-menu a::before {
    display: none;
  }
  
  .footer-links .footer-menu a:hover {
    transform: none;
  }
  
  /* Connect section mobile */
  .footer-connect {
    text-align: center;
  }
  
  .connect-description {
    max-width: 280px;
    margin: 0 auto 1.5rem;
    font-size: 0.95rem;
  }
  
  .footer-connect .social-media-icons {
    justify-content: center;
    gap: 1rem;
  }
  
  .footer-connect .social-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  
  /* Social sharing mobile */
  .sharing-icons {
    gap: 0.75rem;
  }
  
  .share-button {
    min-width: 100px;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Footer bottom mobile */
  .footer-bottom {
    text-align: center;
  }
  
  .footer-bottom .row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-bottom-menu {
    justify-content: center;
    gap: 1rem;
  }
}

/* Extra small screens - optimized for mobile */
@media (max-width: 575.98px) {
  .footer-main {
    padding: 1.5rem 0 1rem;
  }
  
  /* Newsletter mobile styles */
  .newsletter-title {
    font-size: 1.1rem;
  }
  
  .newsletter-description {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  .newsletter-form .input-group {
    max-width: 260px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .newsletter-form .form-control {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  
  .newsletter-form .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  
  .footer-widget {
    margin-bottom: 2rem;
  }
  
  .footer-widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  /* About section - very small screens */
  .footer-about .footer-description {
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.5;
  }
  
  /* Quick links - more compact on small screens */
  .footer-links .footer-menu {
    gap: 0.25rem 1rem;
  }
  
  .footer-links .footer-menu a {
    font-size: 0.85rem;
    padding: 0.25rem 0;
  }
  
  /* Connect section - smaller social icons */
  .connect-description {
    font-size: 0.9rem;
    max-width: 260px;
    margin-bottom: 1rem;
  }
  
  .footer-connect .social-media-icons {
    gap: 0.75rem;
  }
  
  .footer-connect .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  /* Footer bottom - compact */
  .footer-bottom {
    padding: 1rem 0;
  }
  
  .copyright {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .footer-bottom-menu {
    gap: 0.75rem;
  }
  
  .footer-bottom-menu a {
    font-size: 0.8rem;
  }
  
  /* Social sharing - icon only on very small screens */
  .share-button {
    min-width: 90px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .share-button span {
    display: none;
  }
  
  .share-button i {
    font-size: 1.1rem;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

.social-icon:focus,
.share-button:focus,
.footer-menu a:focus,
.footer-categories-list a:focus,
.contact-item a:focus {
  outline: 2px solid var(--recipes-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modern-footer {
    background: #000000 !important;
    color: #ffffff !important;
  }
  
  .footer-widget-title,
  .newsletter-title {
    color: #ffffff !important;
  }
  
  .social-icon,
  .share-button {
    border: 2px solid #ffffff !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .social-icon,
  .share-button,
  .footer-menu a,
  .newsletter-form .btn {
    transition: none !important;
    transform: none !important;
  }
  
  .social-icon:hover,
  .share-button:hover,
  .footer-menu a:hover,
  .newsletter-form .btn:hover {
    transform: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  /* Future dark mode styles can be added here */
}

/* ===== SIMPLE RECIPE RATING SYSTEM STYLES ===== */

/* Rating Section Container */
.recipe-rating-section.simple-rating {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid #e9ecf3;
}

.rating-title {
  color: var(--recipes-dark);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Rating Summary */
.rating-summary {
  margin-bottom: 1.5rem;
}

.average-rating,
.no-ratings {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rating-details {
  color: var(--recipes-text);
  font-size: 0.9rem;
}

.rating-details strong {
  font-size: 1rem;
  color: var(--recipes-dark);
}

/* Star Rating Display */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 1.2rem;
  line-height: 1;
}

.rating-stars .star {
  color: #ddd;
  transition: all 0.2s ease;
  cursor: default;
}

.rating-stars .star.filled {
  color: #ffc107;
}

.rating-stars .star.half {
  background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Interactive Star Rating */
.rating-stars.interactive {
  cursor: pointer;
}

.rating-stars.interactive .star {
  cursor: pointer;
  transition: all 0.15s ease;
  color: #ddd; /* Ensure empty stars are visible */
  font-size: 1.5rem; /* Make stars larger for better interaction */
}

.rating-stars.interactive .star:hover,
.rating-stars.interactive .star.hover {
  color: #ffb400;
  transform: scale(1.1);
}

.rating-stars.interactive .star.filled {
  color: #ffc107;
}

/* Ensure stars are properly spaced and clickable */
.rating-stars.interactive .star {
  padding: 0.2rem;
  margin: 0 0.1rem;
  user-select: none;
}

/* Rating Form */
.rating-form {
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #e9ecf3;
  margin-top: 1rem;
}

.rating-input {
  margin-bottom: 1rem;
}

.rating-input .form-label {
  font-weight: 500;
  color: var(--recipes-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: block;
}

.interactive-rating {
  margin: 0.5rem 0;
}

/* Form Actions */
.form-actions {
  margin-top: 1rem;
}

.form-actions .btn {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 4px;
}

.form-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Rate Limit Message */
.rating-limit-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 0.75rem;
  text-align: center;
  margin-top: 1rem;
}

.rating-limit-message p {
  margin: 0;
  color: #856404;
}


/* Rating Messages */
.rating-messages {
  margin-top: 1rem;
}

.rating-messages .alert {
  border-radius: 4px;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border: none;
}

.alert-success {
  background: #d4edda;
  color: #155724;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
}

/* Rate Limit Message */
.rating-limit-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.rating-limit-message p {
  margin: 0;
  color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
  .recipe-rating-section.simple-rating {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .rating-title {
    font-size: 1rem;
  }
  
  .average-rating,
  .no-ratings {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .rating-stars {
    font-size: 1.1rem;
  }
  
  .rating-form {
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  .recipe-rating-section.simple-rating {
    padding: 0.8rem;
    border-radius: 6px;
  }
  
  .rating-stars {
    font-size: 1rem;
    gap: 0.15rem;
  }
  
  .rating-title {
    font-size: 0.95rem;
  }
  
  .form-actions .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
  }
}

/* Animation for rating submission */
@keyframes ratingSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.rating-success-animation {
  animation: ratingSuccess 0.3s ease;
}

/* Loading state for submit button */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hover effects for better UX */
.user-rating-display:hover {
  border-color: var(--recipes-primary);
  transition: border-color 0.2s ease;
}

.rating-form:hover {
  border-color: #ccc;
  transition: border-color 0.2s ease;
}

/* Focus states for accessibility */
.rating-stars.interactive .star:focus {
  outline: 2px solid var(--recipes-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print styles */
@media print {
  .recipe-rating-section {
    background: none !important;
    border: 1px solid #000 !important;
    page-break-inside: avoid;
  }
  
  .rating-form,
  .form-actions,
  .rating-messages {
    display: none !important;
  }
  
  .rating-stars .star {
    color: #000 !important;
  }
}

/* Compact Rating for Archive/Listing Pages */
.compact-rating {
  margin: 0.25rem 0;
}

.compact-rating .rating-stars {
  font-size: 1rem;
  gap: 0.15rem;
}

.compact-rating .rating-count {
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

/* Rating in card layouts */
.card .compact-rating {
  margin-top: 0.5rem;
}

/* Rating overlay for featured images */
.rating-overlay {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.rating-overlay .rating-stars .star {
  color: #ffc107;
}

.rating-overlay .rating-stars .star:not(.filled) {
  color: rgba(255, 255, 255, 0.3);
}