/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::selection {
  background-color: var(--primary-gold);
  color: var(--dark-navy);
}
:root {
  /* Food-inspired Smooth Palette */
  --primary-gold: #f4a261; /* warm apricot */
  --deep-purple: #2f5233; /* moss green used for headings */
  --royal-blue: #2a9d8f; /* muted teal accent */
  --rich-burgundy: #c04a3a; /* tomato/brick for hearts & accents */
  --cream-white: #fff7f0; /* warm cream background */
  --dark-navy: #3a2e2a; /* cocoa brown for text */
  --light-gold: #ffe5c4; /* light peach gradient stop */
  --silver: #d9d9d9;

  /* Typography */
  --font-primary: "Playfair Display", serif;
  --font-secondary: "Inter", sans-serif;

  /* Spacing */
  --section-padding: 80px 0;
  --container-padding: 0 20px;

  /* Shadows */
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--dark-navy);
  background-color: var(--cream-white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--deep-purple);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-gold), var(--light-gold));
  border-radius: 2px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
  color: var(--dark-navy);
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  color: var(--dark-navy);
  border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
  background: var(--primary-gold);
  color: var(--dark-navy);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: var(--shadow-light);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--deep-purple);
  transition: all ease-in-out 0.35s;
}

.nav-logo:hover {
  color: #2a9d8f;
  transform: scale(1.05);
  cursor: pointer;
}

.nav-logo i {
  color: var(--primary-gold);
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--dark-navy);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-gold);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.auth-buttons {
  display: flex;
  gap: 1rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--dark-navy);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
    url("https://images.unsplash.com/photo-1711570810963-2a1554410c2b?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mzh8fHJlY2lwZXxlbnwwfDB8MHx8fDA%3D");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(47, 82, 51, 0.28),
    /* moss green tint */ rgba(58, 46, 42, 0.35) /* cocoa brown tint */
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-cta .btn {
  padding: 15px 30px;
  font-size: 16px;
  min-width: 150px;
}

/* Search and Filters */
.search-filters {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.search-container {
  display: flex;
  max-width: 400px;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  flex: 1;
  min-width: 300px;
}

#searchInput {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--dark-navy);
}

.search-btn {
  padding: 15px 20px;
  background: var(--primary-gold);
  border: none;
  color: var(--dark-navy);
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: var(--light-gold);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters select {
  padding: 12px 15px;
  border: 2px solid #eee;
  border-radius: 8px;
  background: white;
  color: var(--dark-navy);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s ease;
  min-width: 150px;
}

.filters select:focus {
  outline: none;
  border-color: var(--primary-gold);
}

/* Categories Section */
.categories {
  padding: var(--section-padding);
  background: white;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: var(--shadow-light);
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
  border-color: var(--primary-gold);
}

.category-card.active {
  background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
  color: var(--dark-navy);
}

.category-card i {
  font-size: 3rem;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.category-card.active i {
  color: var(--dark-navy);
}

.category-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

/* Recipes Section */
.recipes {
  padding: var(--section-padding);
  background: var(--cream-white);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.recipe-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.recipe-image {
  height: 250px;
  overflow: hidden;
  position: relative;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
  transform: scale(1.1);
}

.recipe-content {
  padding: 1.5rem;
}

.recipe-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--deep-purple);
}

.recipe-description {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.recipe-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: #666;
}

.recipe-meta i {
  color: var(--primary-gold);
}

.recipe-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wishlist-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #ccc;
}

.wishlist-btn.active {
  color: var(--rich-burgundy);
}

.wishlist-btn:hover {
  color: var(--rich-burgundy);
}

/* Blog Section */
.blog {
  padding: var(--section-padding);
  background: var(--cream-white);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.blog-image {
  height: 200px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

.blog-content {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.blog-date {
  color: var(--primary-gold);
  font-weight: 500;
}

.blog-category {
  background: var(--primary-gold);
  color: var(--dark-navy);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-content h3 {
  color: var(--deep-purple);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.blog-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--light-gold);
}

/* Wishlist Section */
.wishlist {
  padding: var(--section-padding);
  background: white;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.empty-wishlist {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.empty-wishlist i {
  font-size: 4rem;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-heavy);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.close:hover {
  color: var(--rich-burgundy);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.modal-body .recipe-image {
  height: 400px;
}

.modal-body .recipe-details {
  padding: 2rem;
}

.modal-body .recipe-details h2 {
  color: var(--deep-purple);
  margin-bottom: 1rem;
}

.modal-body .recipe-meta {
  margin-bottom: 1.5rem;
}

.modal-body .ingredients,
.modal-body .instructions {
  margin-bottom: 1.5rem;
}

.modal-body .ingredients h3,
.modal-body .instructions h3 {
  color: var(--deep-purple);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.modal-body .ingredients ul,
.modal-body .instructions ol {
  padding-left: 1.5rem;
}

.modal-body .ingredients li,
.modal-body .instructions li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Auth Modal */
.auth-modal {
  max-width: 400px;
}

.auth-container {
  padding: 2rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #666;
  transition: color 0.3s ease;
}

.tab-btn.active {
  color: var(--deep-purple);
  border-bottom: 2px solid var(--primary-gold);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--deep-purple);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-gold);
}

/* Footer */
.footer {
  background: var(--dark-navy);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary-gold);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.footer-section ul li:hover {
  transform: translateX(7px);
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-gold);
}

.developer-info {
  margin-top: 1rem;
}

.developer-info p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  transition: all ease-in-out 0.35s;
}

.developer-info p:hover {
  color: var(--primary-gold);
  transform: translateX(7px);
}

.developer-info i {
  color: var(--primary-gold);
  width: 16px;
}

.developer-info a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.developer-info a:hover {
  color: var(--light-gold);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-gold);
  color: var(--dark-navy);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  color: var(--cream-white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-medium);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-body .recipe-image {
    height: 250px;
  }

  .auth-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-filters {
    flex-direction: column;
    gap: 1rem;
  }

  .search-container {
    flex-direction: column;
    border-radius: 15px;
    max-width: 100%;
  }

  .search-btn {
    border-radius: 0 0 15px 15px;
  }

  .filters {
    justify-content: center;
  }

  .filters select {
    min-width: 120px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 1.5rem;
  }

  .recipe-content {
    padding: 1rem;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-body .recipe-details {
    padding: 1.5rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--light-gold);
}
