html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom Navigation Styles */
.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-icon-btn {
  background: transparent;
  border: none;
  padding: 0;
}

.search-icon-btn:hover {
  opacity: 0.7;
}

.brand-text {
  color: #6C63FF;
  font-size: 1.25rem;
  font-weight: 600;
}

.nav-link-custom {
  color: #4A5568;
  font-weight: 500;
  padding: 0.625rem 1.25rem !important;
  margin: 0 0.25rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.nav-link-custom:hover {
  color: #6C63FF;
  background-color: #F7F7FF;
}

.nav-link-custom.active {
  color: white !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.language-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #E5E5E5;
  background: white;
  color: #4A5568;
  font-weight: 600;
  transition: all 0.3s ease;
}

.language-btn:hover {
  border-color: #6C63FF;
  color: #6C63FF;
}

.language-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

/* Hero Gradient Section */
.hero-gradient-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

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

.min-vh-70 {
  min-height: 70vh;
}

/* Hero Title Styles */
.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-highlight {
  background: rgba(255, 255, 255, 0.2);
  padding: 0 15px;
  border-radius: 10px;
  color: #2D3748;
  font-weight: 800;
}

.hero-main {
  display: inline-block;
  animation: fadeInUp 0.6s ease-out;
}

.hero-description {
  font-size: 1.125rem;
  opacity: 0.95;
  line-height: 1.6;
}

/* Hero Action Buttons */
.btn-hero-search {
  background: white;
  color: #2D3748;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #6C63FF;
}

.btn-hero-filter {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-hero-filter:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
}

/* Recipe Stats Card */
.recipe-stats-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 3rem 2.5rem;
  text-align: center;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  transition: all 0.3s ease;
}

.recipe-stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.stats-number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stats-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.stats-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* Content Section Spacing */
.container {
  max-width: 1200px;
}

section {
  margin-bottom: 4rem;
}

/* Responsive Design */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .stats-number {
    font-size: 3rem;
  }
  
  .recipe-stats-card {
    padding: 2rem 2rem;
    min-width: 240px;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .btn-hero-search,
  .btn-hero-filter {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-hero-filter {
    margin-top: 0.5rem;
    margin-left: 0 !important;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-actions .btn {
    width: 100%;
    margin: 0.25rem 0 !important;
  }
  
  .min-vh-70 {
    min-height: auto;
  }
  
  .stats-number {
    font-size: 2.5rem;
  }
  
  .stats-title {
    font-size: 1.1rem;
  }
  
  .recipe-stats-card {
    padding: 2rem 1.5rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Modern Card Design - Category Cards */
.category-card {
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  height: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.category-card-img-container {
  height: 240px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.category-card:hover .category-card-img-container img {
  transform: scale(1.08);
}

.category-card-icon {
  font-size: 5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.95;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.category-card-body {
  padding: 2rem 1.75rem;
}

.category-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 1rem;
  text-align: center;
}

.category-card-description {
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1.5rem;
  min-height: 48px;
}

.category-card-stats {
  display: flex;
  justify-content: space-around;
  padding: 1.25rem 0;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 1.5rem;
}

.category-stat-item {
  text-align: center;
  flex: 1;
}

.category-stat-label {
  display: block;
  font-size: 0.8rem;
  color: #A0AEC0;
  margin-bottom: 0.5rem;
}

.category-stat-number-alt {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
}

.category-stat-stars {
  display: block;
  color: #F59E0B;
  font-size: 1.2rem;
}

.category-stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  line-height: 1.2;
}

.category-card-rating {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.category-card-rating .stars {
  color: #F59E0B;
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.category-card-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.category-card-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* Recipe Card Design */
.recipe-card {
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.recipe-card-img-container {
  height: 220px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

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

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

.recipe-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: white;
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.recipe-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  min-height: 2.8rem;
}

.recipe-card-description {
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.85rem;
  flex-shrink: 0;
}

.recipe-card-meta {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid #E2E8F0;
  margin-bottom: auto;
  gap: 0.5rem;
  flex-shrink: 0;
}

.recipe-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  flex: 1;
}

.recipe-meta-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  transition: all 0.3s ease;
}

.recipe-card:hover .recipe-meta-icon-circle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.1);
}

.recipe-meta-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: #2D3748;
  line-height: 1;
}

.recipe-meta-label {
  display: block;
  font-size: 0.8rem;
  color: #A0AEC0;
  font-weight: 500;
  text-transform: lowercase;
}

.recipe-card-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  padding: 0.75rem 2rem;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-shrink: 0;
}

.recipe-card-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* Section Headers */
.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #718096;
  font-size: 1.1rem;
}

/* Category Hero Banner */
.category-hero-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 5rem 0;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

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

/* Recipe Hero Banner */
.recipe-hero-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

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

.recipe-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  margin-bottom: 0;
}

.category-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.category-hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .category-hero-banner {
    padding: 3rem 0;
    margin-bottom: 2rem;
  }
  
  .category-hero-title {
    font-size: 2rem;
  }
  
  .category-hero-subtitle {
    font-size: 1rem;
  }
  
  .recipe-hero-banner {
    padding: 2.5rem 0;
    margin-bottom: 2rem;
  }
  
  .recipe-hero-title {
    font-size: 1.75rem;
  }
  
  .recipe-hero-subtitle {
    font-size: 1rem;
  }
}

/* Category Header */
.category-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
}

/* View All Button */
.btn-outline-primary {
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Modern Pagination Styles */
.pagination-modern {
  gap: 0.5rem;
}

.pagination-modern .page-item {
  margin: 0;
}

.pagination-modern .page-link {
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  color: #4A5568;
  font-weight: 600;
  padding: 0.625rem 1rem;
  min-width: 45px;
  text-align: center;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination-modern .page-link:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-modern .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.pagination-modern .page-item.disabled .page-link {
  background: #F7FAFC;
  border-color: #E2E8F0;
  color: #CBD5E0;
  cursor: not-allowed;
  box-shadow: none;
}

.pagination-modern .page-item.disabled .page-link:hover {
  background: #F7FAFC;
  color: #CBD5E0;
  transform: none;
}

/* Pagination responsive */
@media (max-width: 576px) {
  .pagination-modern {
    gap: 0.25rem;
  }
  
  .pagination-modern .page-link {
    padding: 0.5rem 0.75rem;
    min-width: 40px;
    font-size: 0.875rem;
  }
}

/* Modern Search Form Styles */
.search-form {
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.search-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.search-container:focus-within {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.search-icon {
  color: #667eea;
  margin: 0 0.75rem 0 0.5rem;
  flex-shrink: 0;
}

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

.search-input::placeholder {
  color: #A0AEC0;
}

.search-clear {
  background: #F7FAFC;
  border: none;
  color: #718096;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.search-clear:hover {
  background: #FED7D7;
  color: #C53030;
  transform: rotate(90deg);
}

.search-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-button:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Modern Breadcrumb Styles */
.breadcrumb-modern {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-list-item {
  display: flex;
  align-items: center;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.breadcrumb-link:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.breadcrumb-link svg {
  flex-shrink: 0;
}

.breadcrumb-separator {
  color: #A0AEC0;
  display: flex;
  align-items: center;
}

.breadcrumb-current {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Breadcrumb Responsive */
@media (max-width: 576px) {
  .breadcrumb-modern {
    padding: 0.75rem 0;
  }
  
  .breadcrumb-list {
    gap: 0.35rem;
  }
  
  .breadcrumb-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .breadcrumb-link span {
    display: none;
  }
  
  .breadcrumb-link svg {
    width: 18px;
    height: 18px;
  }
  
  .breadcrumb-current {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .breadcrumb-separator svg {
    width: 14px;
    height: 14px;
  }
}

/* Search Results Alert */
.alert {
  border-radius: 12px;
}

/* Responsive Search */
@media (max-width: 767px) {
  .search-form {
    margin-top: 1.5rem;
  }
  
  .search-container {
    padding: 0.4rem 0.5rem;
  }
  
  .search-icon {
    margin: 0 0.5rem 0 0.25rem;
  }
  
  .search-input {
    padding: 0.65rem 0.25rem;
    font-size: 0.9rem;
  }
  
  .search-input::placeholder {
    font-size: 0.85rem;
  }
  
  .search-button {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .search-clear {
    width: 32px;
    height: 32px;
    margin-right: 0.25rem;
  }
}

@media (max-width: 480px) {
  .search-container {
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 0.75rem;
  }
  
  .search-icon {
    order: 1;
  }
  
  .search-input {
    order: 2;
    flex: 1;
    min-width: 0;
  }
  
  .search-clear {
    order: 3;
  }
  
  .search-button {
    order: 4;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
  }
}