body::before {
  display: none !important;
}

body::after {
  display: none !important;
}

.recipes-section {
  padding: 40px 32px;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}

.recipes-section h1 {
  font-size: 42px;
  font-weight: 800;

  color: #1dbc57;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipes-section h3 {
  font-size: 18px;
  color: #64748b;
  margin-bottom: 40px;
  margin-top: 5px;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

#searchBar {
  width: 500px;
  max-width: 90%;
  padding: 16px 24px;
  padding-left: 50px;
  margin-bottom: 25px;
  margin-top: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
}

#searchBar::before {
  content: "🔍";
  position: absolute;
  left: 20px;
  top: 50%;
  font-size: 18px;
}

.search-container {
  position: relative;
  display: inline-block;
}

#searchBar:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1),
    0 8px 25px rgba(34, 197, 94, 0.15);
  transform: translateY(-2px);
}

#searchBar::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.filter-container {
  margin: 0 0 40px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid #e2e8f0;
  background: white;
  color: #64748b;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn:hover {
  border-color: #22c55e;
  color: #22c55e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.filter-btn.active {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.filter-btn.active:hover {
  background: #16a34a;
  border-color: #16a34a;
}

/* Recipe Tags */
.recipe-tags {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.tag {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: lowercase;
}

/* No Results Styling */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-results h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #1a202c;
}

.no-results p {
  font-size: 16px;
  margin: 0;
}

.recipes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.recipe-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;

  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: all 0.3s ease;
  filter: brightness(1) saturate(1);
}

.recipe-card:hover img {
  filter: brightness(1.1) saturate(1.2);
  transform: scale(1.05);
}

.recipe-card .card-content {
  padding: 25px 20px;
  position: relative;
}

.category-badge {
  position: absolute;
  top: -30px;
  right: 15px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
  border: 2px solid white;
  z-index: 10;
}

.category-badge::first-letter {
  text-transform: uppercase;
}

.recipe-card h3 {
  margin: 0 0 12px 0;
  font-size: 22px;
  color: #1a202c;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.recipe-card:hover h3 {
  color: #22c55e;
}

.recipe-card p {
  margin: 0 0 15px 0;
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.recipe-card:hover p {
  color: #475569;
}

.recipe-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.recipe-card .difficulty {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-card .time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.recipe-card .time::before {
  content: "⏱️";
  font-size: 14px;
}

/*Animation for Cards */
.recipe-card {
  animation: slideInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.recipe-card:nth-child(1) {
  animation-delay: 0.1s;
}
.recipe-card:nth-child(2) {
  animation-delay: 0.2s;
}
.recipe-card:nth-child(3) {
  animation-delay: 0.3s;
}
.recipe-card:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #fff;
  margin: 3% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

/* Modal Header */
.modal-content .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  z-index: 10;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.close:hover {
  background: #f0f0f0;
  color: #333;
  transform: scale(1.1);
}

/* Modal Title */
.modal-content h2 {
  font-size: 28px;
  color: #2d3748;
  margin: 0;
  padding: 25px 25px 15px 25px;
  font-weight: 700;
  line-height: 1.3;
}

/* Modal Image */
.modal-content img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0;
}

/* Modal Description */
.modal-content p {
  padding: 20px 25px;
  font-size: 16px;
  line-height: 1.6;
  color: #4a5568;
  margin: 0;
  background: #f8fafc;
}

/* Section Headers */
.modal-content h3 {
  font-size: 20px;
  color: #2d3748;
  margin: 0;
  padding: 20px 25px 15px 25px;
  font-weight: 600;
  background: #22c55e;
  color: white;
  position: relative;
}

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

/* Ingredients List */
.modal-content ul {
  padding: 0 25px 20px 45px;
  margin: 0;
  background: #fff;
}

.modal-content li {
  padding: 8px 0;
  font-size: 15px;
  color: #4a5568;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}

.modal-content li:last-child {
  border-bottom: none;
}

.modal-content li::marker {
  color: #22c55e;
  font-weight: bold;
}

/* Steps List */
.modal-content ol {
  padding: 0 25px 20px 45px;
  margin: 0;
  background: #fff;
  counter-reset: step-counter;
}

.modal-content ol li {
  padding: 12px 0;
  font-size: 15px;
  color: #4a5568;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.5;
  counter-increment: step-counter;
}

/* Nutrition Table */
.modal-content table {
  width: 100%;
  margin: 0 25px 25px 25px;
  width: calc(100% - 50px);
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-content th,
.modal-content td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.modal-content th {
  background: #f8fafc;
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content td {
  color: #4a5568;
  font-size: 15px;
}

.modal-content tr:last-child td {
  border-bottom: none;
}

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

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .recipes-section {
    padding: 24px 16px;
  }
  .recipes-section h1 {
    font-size: 34px;
  }
  .recipes-section h3 {
    font-size: 16px;
    margin-bottom: 24px;
  }
  #searchBar {
    width: 100%;
    max-width: 100%;
  }
  .recipe-card img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .recipes-section h1 {
    font-size: 28px;
  }
  .recipes-section h3 {
    font-size: 14px;
  }
  .filter-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .recipe-card .card-content {
    padding: 16px;
  }
  .modal-content {
    margin: 8% auto;
    width: 94%;
  }
  .modal-content img {
    height: 180px;
  }
}
