/* ─── ENHANCED RECIPES SECTION ─── */

/* Recipe cards with images */
.recipe-card {
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(39,174,96,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.recipe-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: 0 2px 2px 0;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15,51,32,0.07);
  border-color: rgba(39,174,96,0.18);
}
.recipe-card:hover::after { opacity: 1; }

.recipe-card-thumb {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-card-thumb .recipe-icon-fallback {
  font-size: 28px;
  color: var(--green);
}

.recipe-card-body {
  flex: 1;
  min-width: 0;
  padding: 16px 16px 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.recipe-info {
  flex: 1;
  min-width: 0;
}

.recipe-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recipe-benefit {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.recipe-time {
  font-size: 12px;
  color: var(--text-muted);
}
.recipe-time::before {
  content: '\00b7';
  margin-right: 10px;
  opacity: 0.4;
}

.recipe-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 18px;
  padding-right: 4px;
}

/* ─── RECIPE DETAIL MODAL ─── */
.recipe-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15,51,32,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.recipe-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.recipe-modal {
  background: var(--cream);
  border-radius: 28px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 40px 120px rgba(15,51,32,0.25);
  position: relative;
}
.recipe-modal-overlay.open .recipe-modal {
  transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.recipe-modal::-webkit-scrollbar { width: 6px; }
.recipe-modal::-webkit-scrollbar-track { background: transparent; }
.recipe-modal::-webkit-scrollbar-thumb { background: rgba(39,174,96,0.2); border-radius: 3px; }

.recipe-modal-close {
  position: sticky;
  top: 16px;
  float: right;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green-deep);
  margin: 16px 16px 0 0;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.recipe-modal-close:hover {
  background: white;
}

.recipe-detail-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 28px 28px 0 0;
  display: block;
}

.recipe-detail-icon-header {
  width: 100%;
  height: 120px;
  background: var(--green-light);
  border-radius: 28px 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.recipe-detail-content {
  padding: 24px 28px 32px;
}

.recipe-detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 16px;
  line-height: 1.2;
}

/* Stat pills row */
.recipe-detail-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.recipe-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(39,174,96,0.08);
  color: var(--green-dark);
}
.recipe-pill.muted {
  background: rgba(90,107,82,0.08);
  color: var(--text-muted);
}

/* Science note */
.recipe-science-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(39,174,96,0.05);
  border-radius: 14px;
  margin-bottom: 24px;
}
.recipe-science-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--green);
  margin-top: 1px;
}
.recipe-science-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Ingredients & Steps cards */
.recipe-detail-card {
  background: white;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 16px;
}

.recipe-detail-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
}

/* Ingredients list */
.recipe-ingredients-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recipe-ingredients-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  font-size: 15px;
  color: var(--green-deep);
}
.recipe-ingredients-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Steps list */
.recipe-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: steps;
}
.recipe-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 6px 0;
  font-size: 15px;
  color: var(--green-deep);
  line-height: 1.5;
  counter-increment: steps;
}
.recipe-steps-list li::before {
  content: counter(steps);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Nutrition row */
.recipe-nutrition-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.recipe-nutrition-item {
  flex: 1;
  background: white;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.recipe-nutrition-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  font-family: 'Playfair Display', serif;
}
.recipe-nutrition-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .recipe-card-thumb {
    width: 72px;
    height: 72px;
  }
  .recipe-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 20px;
  }
  .recipe-detail-image {
    height: 180px;
    border-radius: 20px 20px 0 0;
  }
  .recipe-detail-icon-header {
    border-radius: 20px 20px 0 0;
  }
  .recipe-detail-content {
    padding: 20px 20px 28px;
  }
  .recipe-modal-overlay {
    padding: 12px;
  }
  .recipe-nutrition-row {
    flex-wrap: wrap;
  }
  .recipe-nutrition-item {
    min-width: calc(33% - 8px);
  }
}
