/* ===== Global Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: #f9faf7;
  color: #1f2937;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #a3e635, #facc15);
  padding: 15px 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
}

nav a {
  text-decoration: none;
  color: #1f2937;
  margin: 0 15px;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #16a34a;
}

/* ===== Main ===== */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ===== Hero Section ===== */
.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  background: linear-gradient(135deg, #a3e635, #facc15);
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.hero-text {
  flex: 1 1 300px;
}

.hero-text h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #1f2937;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #1f2937;
}

.hero-text .btn {
  display: inline-block;
  background: #16a34a;
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.hero-text .btn:hover {
  background: #15803d;
  transform: translateY(-2px);
}

.hero-image img {
  max-width: 400px;
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

/* ===== Features Section ===== */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.feature {
  flex: 1 1 250px;
  background: #fff;
  border-radius: 15px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature h3 {
  color: #16a34a;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.feature p {
  color: #475569;
  font-size: 1rem;
}

/* ===== Search Header ===== */
.content-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
}

.content-header h2 {
  font-size: 2rem;
  color: #1f2937;
}

#search {
  flex: 1 1 300px;
  max-width: 400px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid #d1d5db;
  font-size: 16px;
  transition: all 0.3s ease;
}

#search:hover {
  border-color: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

#search:focus {
  border-color: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
  background-color: #f0fdf4;
}

/* ===== Recipe Grid ===== */
.recipes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.recipe-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe-card h3 {
  font-size: 1.2rem;
  margin: 15px 0 10px;
  color: #166534;
  text-align: center;
}

.recipe-card button {
  margin: 10px auto 15px;
  background: linear-gradient(135deg, #16a34a, #22c553);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.recipe-card button:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  transform: translateY(-2px);
}

/* ===== Modal ===== */
#modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 15px;
  padding: 30px 25px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
  border-top: 6px solid #16a34a;
}

.modal-content h3 {
  font-size: 1.6rem;
  color: #166534;
  margin-bottom: 15px;
}

.modal-content p,
.modal-content ul {
  font-size: 1rem;
  color: #444;
  margin-bottom: 10px;
}

.modal-content li {
  margin-bottom: 5px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #f97316;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.close-btn:hover {
  background: #ea580c;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #64748b;
  background: #ecfccb;
  margin-top: auto;
}
