/* ========================================
   recipes.css — Strona wszystkich przepisów
   ======================================== */

/* ---- Page Header ---- */
.recipes-header {
  padding: calc(var(--nav-height) + 4rem) 0 3rem;
  text-align: center;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.recipes-page-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.5rem 0 0.75rem;
  line-height: 1;
}

.recipes-page-subtitle {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  letter-spacing: 0.02em;
}

/* ---- Filter Tabs ---- */
.recipes-filters {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out);
}

.filter-btn:hover {
  border-color: var(--accent-terracotta);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  color: #fff;
}

.filter-btn-pro {
  border-color: rgba(212, 167, 69, 0.4);
  color: var(--accent-gold);
}
.filter-btn-pro:hover,
.filter-btn-pro.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}

.filter-pro-crown {
  margin-right: 0.2rem;
}

/* ---- Search Bar ---- */
.recipes-search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.recipes-search {
  position: relative;
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

#recipeSearch {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.85rem 3rem 0.85rem 3rem;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#recipeSearch::placeholder {
  color: var(--text-muted);
}

#recipeSearch:focus {
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px rgba(200, 82, 44, 0.12);
}

.search-clear {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  display: none;
  transition: color 0.2s ease;
}

.search-clear:hover {
  color: var(--text-primary);
}

.recipes-count {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  min-height: 1.4em;
}

/* ---- Recipe Grid ---- */
.recipes-grid-section {
  background: var(--bg-primary);
  padding: 3rem 0 14rem;
  overflow: visible;
}

.recipes-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

/* Karta w katalogu przepisów — pełna spójność ze stroną główną (.featured-card) */
.rcard.featured-card {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  position: relative;
  /* Subtelny Ambient Glow wokół kart w katalogu */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
              0 0 24px rgba(200, 82, 44, 0.22);
}

/* ========================================
   DESKTOP SPOTLIGHT & ZOOM (Wersja na PC)
   Aktualny przepis jest na środku ekranu i lekko powiększony (scale 1.05),
   a poprzednie i następne karty są widoczne u góry i u dołu (scale 0.92, opacity 0.55).
   ======================================== */
@media (min-width: 769px) {
  .rcard.featured-card {
    height: 430px;
    min-height: 430px;
    max-height: 450px;
    grid-template-columns: 1fr 1.15fr;
    transform: scale(0.92);
    opacity: 0.55;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                0 0 18px rgba(200, 82, 44, 0.15);
  }

  /* Zapewnienie, że wideo i zdjęcia mają DOKŁADNIE taką samą wysokość i nie rozpychają karty */
  .rcard.featured-card .featured-card-image {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: auto;
    overflow: hidden;
  }

  .rcard.featured-card .featured-card-image img,
  .rcard.featured-card .featured-card-image video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /* Zbalansowany układ treści z gapem, żeby tekst opisu nigdy nie był ucinany */
  .rcard.featured-card .featured-card-content {
    height: 100%;
    max-height: 100%;
    padding: 1.85rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    gap: 0.65rem;
  }

  .rcard.featured-card .featured-card-content > * {
    flex-shrink: 0;
  }

  .rcard.featured-card .featured-card-content .mono-label {
    margin: 0 !important;
  }

  .rcard.featured-card .featured-card-content h3 {
    font-size: clamp(1.35rem, 2vw, 1.75rem) !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    color: var(--text-primary) !important;
  }

  .rcard.featured-card .featured-card-content p {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    color: var(--text-secondary) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }

  .rcard.featured-card .featured-card-content .recipe-meta {
    margin: 0.1rem 0 !important;
  }

  .rcard.featured-card:not(.is-focused):hover {
    opacity: 0.82;
    transform: scale(0.95);
    border-color: rgba(200, 82, 44, 0.3);
  }

  /* Wyśrodkowana, aktywna karta */
  .rcard.featured-card.is-focused {
    transform: scale(1.05);
    opacity: 1;
    border-color: rgba(200, 82, 44, 0.55);
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.65),
                0 0 42px rgba(200, 82, 44, 0.38);
    z-index: 10;
  }

  .rcard.featured-card.is-focused:hover {
    transform: scale(1.07);
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.72),
                0 0 50px rgba(200, 82, 44, 0.48);
  }
}

/* Stan ukryty dla wyszukiwarki i filtrów */
.rcard.hidden {
  display: none !important;
}

/* ---- Empty state ---- */
.recipes-empty {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.recipes-empty button {
  margin-top: 1.5rem;
}

/* ---- Section Paging w katalogu przepisów (html.recipes-snap) ---- */
html.recipes-snap {
  /* Płynne przewijanie obsługiwane bezpośrednio przez JS window.scrollTo({ behavior: 'smooth' }) */
}

html.recipes-snap .recipes-header {
  scroll-margin-top: 0;
}

/* ---- Stopka na stronie katalogu przepisów (Wyśrodkowana) ---- */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  text-align: center;
  width: 100%;
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  margin: 0 auto;
}

.site-footer .logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.footer-copy {
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

