:root {
  --primary: #27ae60;
  --primary-light: #2ecc71;
  --background: #f9fdfb;
  --text: #2d3436;
  --soft-gray: #ecf0f1;
  --white: #ffffff;
  --dark-bg: #121212;
  --dark-card: #1e1e1e;
  --dark-text: #e5e5e5;
}

/* Reset and smooth transitions */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.4s ease, color 0.4s ease, transform 0.3s ease;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background);
  color: var(--text);
}

/* Header */
header {
  background-color: var(--primary);
  color: var(--white);
  padding: 15px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--white);
  bottom: -4px;
  left: 0;
}

.menu-toggle {
  display: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('../images/healthy-food.jpg') center/cover no-repeat;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-content {
  color: var(--white);
  background: rgba(0, 0, 0, 0.4);
  padding: 30px;
  border-radius: 10px;
  animation: fadeInUp 1.2s ease-in-out forwards;
}

.btn {
  background-color: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
}

/* Feature Section */
.features {
  display: flex;
  justify-content: space-around;
  padding: 60px 20px;
  gap: 20px;
}

.feature {
  background-color: var(--white);
  border: 1px solid var(--soft-gray);
  border-radius: 10px;
  width: 30%;
  text-align: center;
  padding: 25px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Page Header */
.page-header {
  text-align: center;
  padding: 60px 20px 30px;
  background-color: var(--soft-gray);
  border-bottom: 2px solid var(--primary);
}

.page-header h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Recipe Cards */
.recipes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  padding: 40px 20px;
}

.recipe-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe-card h3 {
  color: var(--primary);
  margin: 10px;
}

.recipe-card p {
  margin: 5px 10px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--soft-gray);
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form button {
  align-self: flex-start;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 15px 0;
  margin-top: 50px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode */
body.dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

body.dark header,
body.dark footer {
  background-color: var(--dark-card);
}

body.dark .feature,
body.dark .recipe-card,
body.dark .contact-form input,
body.dark .contact-form textarea {
  background-color: var(--dark-card);
  color: var(--dark-text);
  border-color: #333;
}

body.dark .btn {
  background-color: var(--primary-light);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.6rem;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  color: var(--primary-light);
}
