/* ====================================
   Index Page Specific Styles
   Professional cooking website design
   ==================================== */

/* ====================================
   Hero Section
   ==================================== */
.index-page {
  background: linear-gradient(135deg, #f5e6d3 0%, #e8d4b8 100%) !important;
  background-image: linear-gradient(135deg, #f5e6d3 0%, #e8d4b8 100%) !important;
  min-height: 100vh;
}

html {
  height: 100%;
}

body.index-page {
  height: 100%;
}

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(200, 150, 78, 0.3) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('images/background.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-header);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(200, 150, 78, 0.2);
  line-height: 1.1;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-text-brown);
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--color-text-brown);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-text-dark);
  background: var(--color-primary);
  padding: 1.25rem 3rem;
  border-radius: 50px;
  text-decoration: none;
  border: 3px solid var(--color-text-dark);
  box-shadow: 0 8px 24px rgba(59, 35, 20, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 35, 20, 0.3);
  background: var(--color-secondary);
}

.hero-cta:active {
  transform: translateY(-2px);
}

/* ====================================
   Features Section
   ==================================== */
.features {
  padding: 5rem 2rem;
  background: rgba(245, 230, 211, 0.6);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 2.5rem;
  border-radius: 24px;
  border: 3px solid var(--color-text-dark);
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(59, 35, 20, 0.1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(59, 35, 20, 0.2);
  background: rgba(255, 255, 255, 1);
}

.feature-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(2px 2px 4px rgba(59, 35, 20, 0.1));
}

.feature-card h3 {
  font-family: var(--font-header);
  font-size: 1.75rem;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.feature-card p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--color-text-brown);
  line-height: 1.7;
}

/* ====================================
   Recipes Section
   ==================================== */
.recipes-section {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, rgba(245, 230, 211, 0.6) 0%, rgba(232, 212, 184, 0.8) 100%);
}

.section-title {
  font-family: var(--font-header);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-text-dark);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.375rem;
  color: var(--color-text-brown);
  text-align: center;
  margin-bottom: 3rem;
}

/* Filters & Search Row */
.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* Search Bar */
.search-container {
  max-width: 380px;
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid var(--color-text-dark);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 16px rgba(59, 35, 20, 0.1);
  transition: all 0.3s ease;
}

.search-wrapper:focus-within {
  box-shadow: 0 6px 24px rgba(59, 35, 20, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  filter: drop-shadow(1px 1px 2px rgba(59, 35, 20, 0.1));
}

.search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text-dark);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 0.5rem;
}

.search-input::placeholder {
  color: var(--color-text-brown);
  opacity: 0.6;
}

.search-clear {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--color-text-brown);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.search-clear:hover {
  background: var(--color-cream);
  color: var(--color-text-dark);
  transform: scale(1.1);
}

.search-clear:active {
  transform: scale(0.95);
}

.search-results-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-brown);
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.no-results-message {
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--color-text-brown);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  border: 3px dashed var(--color-secondary);
  margin: 2rem 0;
}

.no-results-message::before {
  content: '🔍';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--color-text-dark);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--color-text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 35, 20, 0.15);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-text-dark);
  box-shadow: 0 4px 16px rgba(200, 150, 78, 0.4);
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.recipe-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  border: 3px solid var(--color-text-dark);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(59, 35, 20, 0.1);
  text-decoration: none;
  display: block;
}

.recipe-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 16px 48px rgba(59, 35, 20, 0.25);
}

.recipe-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-light) 100%);
  border-bottom: 3px solid var(--color-text-dark);
}

.recipe-content {
  padding: 1.75rem;
}

.recipe-title {
  font-family: var(--font-header);
  font-size: 1.5rem;
  color: var(--color-text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.recipe-meta {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-brown);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.recipe-category {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--color-cream);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  border: 2px solid var(--color-secondary);
}

.recipe-steps {
  color: var(--color-text-brown);
  font-size: 0.95rem;
}

.recipe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 2px solid var(--color-cream);
}

.recipe-cta {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.recipe-cta::after {
  content: '→';
  transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-cta::after {
  transform: translateX(4px);
}

/* ====================================
   Footer
   ==================================== */
.site-footer {
  background: rgba(59, 35, 20, 0.95);
  color: var(--color-cream);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
  font-family: var(--font-header);
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.footer-section h3 {
  font-size: 2rem;
}

.footer-section h4 {
  font-size: 1.5rem;
}

.footer-section p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-cream-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 165, 116, 0.3);
  font-family: var(--font-body);
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 3rem 1.5rem;
  }

  .features,
  .recipes-section {
    padding: 3rem 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .search-container {
    max-width: 100%;
    order: -1; /* Search appears above filters on mobile */
  }

  .search-input {
    font-size: 1rem;
    padding: 0.625rem 0.5rem;
  }

  .search-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
  }

  .category-filters {
    justify-content: center;
    gap: 0.75rem;
  }

  .filter-btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }
}

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

.recipe-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.recipe-card:nth-child(1) { animation-delay: 0.1s; }
.recipe-card:nth-child(2) { animation-delay: 0.15s; }
.recipe-card:nth-child(3) { animation-delay: 0.2s; }
.recipe-card:nth-child(4) { animation-delay: 0.25s; }
.recipe-card:nth-child(5) { animation-delay: 0.3s; }
.recipe-card:nth-child(6) { animation-delay: 0.35s; }

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.hero-cta:focus-visible,
.filter-btn:focus-visible,
.recipe-card:focus-visible,
.search-input:focus-visible,
.search-clear:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 4px;
}
