/* ============================================================
   STYLE1.CSS — Base, layout, search, recipe cards, 
   and decorative floating shapes.
   Navbar / header styles moved to navbar.css
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── MAIN CONTENT ── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ── SEARCH ── */
.search-section {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.search-container {
  display: flex;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: white;
}

.search-input:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
  transform: translateY(-2px);
}

.search-button {
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #ff6b6b 0%, #f06595 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.search-button:active { transform: translateY(0); }

/* ── RECIPES GRID ── */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.recipe-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  animation: fadeInUp 0.6s ease-out both;
  cursor: pointer;
}

.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; }
.recipe-card:nth-child(5) { animation-delay: 0.5s; }
.recipe-card:nth-child(6) { animation-delay: 0.6s; }
.recipe-card:nth-child(7) { animation-delay: 0.7s; }
.recipe-card:nth-child(8) { animation-delay: 0.8s; }

.recipe-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.recipe-image {
  position: relative;
  overflow: hidden;
  height: 290px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.recipe-card:hover .image-placeholder {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.recipe-card:hover .image-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.recipe-content { padding: 1.5rem; }

.recipe-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.recipe-card:hover .tag {
  background: linear-gradient(135deg, #ff6b6b 0%, #f06595 100%);
  color: white;
  transform: translateY(-2px);
}

/* ── FLOATING DECORATIVE SHAPES ── */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  top: -200px;
  right: -200px;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #ffd93d, #ff6b6b);
  bottom: -150px;
  left: -150px;
  animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #f06595, #ffd93d);
  top: 50%;
  left: 50%;
  animation: float 25s ease-in-out infinite;
}

@keyframes float {
  0%,   100% { transform: translate(0, 0) rotate(0deg);       }
  25%        { transform: translate(50px, -50px) rotate(90deg); }
  50%        { transform: translate(0, -100px) rotate(180deg); }
  75%        { transform: translate(-50px, -50px) rotate(270deg); }
}

/* ============================================================
   RESPONSIVE — content only (navbar responsive is in navbar.css)
   ============================================================ */
@media (max-width: 1024px) {
  .recipes-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
  }

  .main-content { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
  .main-content { padding: 1.5rem 1rem; }

  .search-section { margin-bottom: 2rem; }

  .search-container {
    flex-direction: column;
    max-width: 100%;
  }

  .search-input {
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
  }

  .search-button {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }

  /* .recipes-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  } */

  .recipe-image   { height: 290px; }
  .recipe-title   { font-size: 1.1rem; }
  .recipe-content { padding: 1.25rem; }

  .tag {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
  }

  .recipe-card:hover { transform: translateY(-6px); }

  .shape-1 { width: 250px; height: 250px; }
  .shape-2 { width: 200px; height: 200px; }
  .shape-3 { width: 150px; height: 150px; }
}

@media (max-width: 480px) {
  .main-content { padding: 1rem; }

  .search-input {
    padding: 0.8rem 1rem;
    font-size: 16px;
  }

  .search-button {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .recipes-grid   { gap: 1rem; }
  .recipe-image   { height: 290px; }
  .recipe-content { padding: 1rem; }

  .recipe-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .tag {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
  }

  .recipe-card { border-radius: 12px; }

  .shape-1 { width: 150px; height: 150px; }
  .shape-2 { width: 120px; height: 120px; }
  .shape-3 { width: 100px; height: 100px; }
}
