/* =========================
   RESET & BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f8f9fa;
  color: #222;
}

/* =========================
   APP LAYOUT
========================= */
.app-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
}

/* =========================
   HEADER
========================= */
.app-header {
  background: #343a40;
  color: #ffffff;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* =========================
   FOOTER
========================= */
.app-footer {
  background: #343a40;
  color: #ffffff;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  position: sticky;
  bottom: 0;
}

/* =========================
   CONTENT
========================= */
.app-content {
  overflow-y: auto;
}

/* =========================
   HERO (INDEX ONLY)
========================= */
.hero {
  background: #ffffff;
  padding: 60px 20px 40px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.hero h1 {
  font-size: 2.3rem;
  margin-bottom: 10px;
}

.hero p {
  color: #555;
}

/* =========================
   RECIPE CARDS
========================= */
.recipe-card {
  height: 420px;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.18);
}

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

.recipe-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-desc {
  color: #555;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================
   RECIPE PAGE ONLY
========================= */
.recipe-page .back-link {
  margin: 20px;
  display: inline-block;
}

.recipe-page .recipe-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
}

.recipe-page .recipe-grid {
  display: grid;
  grid-template-columns: 30% 30% 40%;
  gap: 30px;
  padding: 0 40px;
}

.recipe-page .recipe-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
}

.recipe-page .recipe-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.recipe-page .recipe-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

.recipe-page .recipe-video {
  margin: 50px 40px;
}

.recipe-page .recipe-video iframe {
  width: 100%;
  height: 480px;
  border-radius: 12px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .recipe-page .recipe-grid {
    grid-template-columns: 1fr;
  }

  .recipe-page .recipe-video iframe {
    height: 320px;
  }
}


/* =========================
   RECIPES GRID (INDEX ONLY)
   ========================= */

.recipes-wrapper {
  padding: 40px 20px 60px;
  display: flex;
  justify-content: center;
}

.recipes-grid {
  display: flex;
  gap: 30px;
  max-width: 1100px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================
   RECIPE CARD (FIXED SIZE)
   ========================= */

.recipe-card {
  width: 320px;                /* 🔒 FIXED WIDTH */
  height: 420px;               /* 🔒 FIXED HEIGHT */
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.18);
}

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

.recipe-card .card-body {
  flex: 1;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
}

.recipe-card h5 {
  margin-bottom: 6px;
  font-weight: 600;
}

.recipe-desc {
  font-size: 0.95rem;
  color: #555;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.recipe-card .btn {
  margin-top: auto;
  font-weight: 500;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .recipe-card {
    width: 100%;
    max-width: 340px;
  }
}


/* =========================
   VIEW RECIPE BUTTON FIX
   ========================= */

.recipe-card .btn,
.recipe-card a.btn,
.recipe-card a[href*="recipe"] {
  display: inline-block;
  margin-top: auto;
  padding: 10px 16px;
  background-color: #0d6efd; /* Bootstrap blue */
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Hover */
.recipe-card .btn:hover,
.recipe-card a[href*="recipe"]:hover {
  background-color: #0b5ed7;
  transform: translateY(-1px);
}
