/* ==========================================================================
   STYLE RICETTE - TENUTA ZACCONE (TEMA CHIARO & PANNA)
   Foglio di stile dedicato esclusivamente al modulo Ricette & Abbinamenti Gourmet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABILI DI TEMA (Tonalità Chiare, Crema e Accenti Botanici)
   -------------------------------------------------------------------------- */
:root {
  --rcp-bg-body: #faf8f5;          /* Sfondo panna/crema naturale caldo */
  --rcp-bg-card: #ffffff;          /* Schede ricetta bianco ottico */
  --rcp-surface-soft: #f4efe9;     /* Box dettagli e griglie crema chiaro */
  --rcp-border: #e6dfd5;          /* Bordi delicati tono su tono */
  
  --rcp-text-main: #24292f;        /* Testo scuro antracite per contrasto netto */
  --rcp-text-muted: #5e6573;       /* Testo secondario grigio caldo */

  --rcp-brand-dark: #1b263b;       /* Navy scuro per titoli */
  --rcp-brand-accent: #2e7d32;     /* Verde foglia vivo per link ed evidenze */
  --rcp-brand-mint: #e8f5e9;       /* Verde chiaro pastello per sfondi badge */
  --rcp-spicy-red: #d32f2f;        /* Rosso peperoncino */
  --rcp-spicy-bg: #ffebee;

  --rcp-radius-lg: 16px;
  --rcp-radius-sm: 8px;
  --rcp-shadow: 0 8px 24px rgba(32, 38, 71, 0.08);
}

/* --------------------------------------------------------------------------
   2. OVERRIDE STRUTTURA GENERALE PER LA PAGINA RICETTE
   -------------------------------------------------------------------------- */
body.recipes-theme {
  background-color: var(--rcp-bg-body) !important;
  color: var(--rcp-text-main);
  background-image: none !important;
}

body.recipes-theme header {
  background-color: #f0ebe1;
  color: var(--rcp-brand-dark);
  border-bottom: 1px solid var(--rcp-border);
}

body.recipes-theme header h2 {
  color: var(--rcp-brand-dark);
  font-weight: 700;
  margin-top: 10px;
}

.intro-ricette .section-title {
  color: var(--rcp-brand-dark) !important;
  font-size: 2.3em;
}

.intro-ricette-desc {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 25px auto;
  line-height: 1.6;
  font-size: 1.15em;
  color: var(--rcp-text-muted) !important;
}

/* --------------------------------------------------------------------------
   3. BARRA FILTRO A TENDINA
   -------------------------------------------------------------------------- */
.filter-toolbar {
  max-width: 820px;
  margin: 20px auto 45px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 1.05em;
  font-weight: 700;
  color: var(--rcp-brand-dark);
}

.category-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  color: var(--rcp-brand-dark);
  font-family: inherit;
  font-size: 1.05em;
  font-weight: 700;
  padding: 12px 50px 12px 24px;
  border-radius: 40px;
  border: 1.5px solid var(--rcp-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231b263b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px auto;
  min-width: 280px;
  text-align: left;
  transition: all 0.25s ease;
}

.category-select:hover, .category-select:focus {
  border-color: var(--rcp-brand-accent);
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.12);
}

/* --------------------------------------------------------------------------
   4. INTESTAZIONI GRUPPI VARIETÀ
   -------------------------------------------------------------------------- */
.variety-group {
  margin-bottom: 75px;
}

.variety-header {
  border-bottom: 2px solid var(--rcp-border);
  padding-bottom: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.variety-header h2 {
  color: var(--rcp-brand-dark);
  font-size: 2em;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.variety-header a {
  color: #ffffff;
  background-color: var(--rcp-brand-accent);
  padding: 8px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.variety-header a:hover {
  background-color: #256628;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. CARD DELLA RICETTA
   -------------------------------------------------------------------------- */
.recipe-card {
  background-color: var(--rcp-bg-card);
  color: var(--rcp-text-main);
  border-radius: var(--rcp-radius-lg);
  margin-bottom: 40px;
  box-shadow: var(--rcp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  border: 1px solid var(--rcp-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   6. MEDIA E CAROSELLO FOTOGRAFICO
   -------------------------------------------------------------------------- */
.recipe-media {
  flex: 1 1 42%;
  min-width: 320px;
  position: relative;
  background-color: #ede9e1;
  overflow: hidden;
  user-select: none;
}

.recipe-slider {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.recipe-slide {
  min-width: 100%;
  height: 100%;
}

.recipe-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 400px;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--rcp-brand-dark);
  border: 1px solid rgba(0,0,0,0.06);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.slider-btn:hover {
  background-color: var(--rcp-brand-accent);
  color: #ffffff;
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

/* --------------------------------------------------------------------------
   7. CONTENUTO TESTUALE DELLA RICETTA
   -------------------------------------------------------------------------- */
.recipe-body {
  flex: 1 1 58%;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.recipe-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 12px;
}

.recipe-title {
  font-size: 1.6em;
  color: var(--rcp-brand-dark);
  margin: 0;
  font-weight: 800;
  line-height: 1.25;
}

/* --------------------------------------------------------------------------
   8. BADGE, ICONE E SCALA PICCANTEZZA A 5 LIVELLI
   -------------------------------------------------------------------------- */
.recipe-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-vegan { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-microgreen { background: #f1f8e9; color: #33691e; border: 1px solid #dcedc8; }
.badge-mushrooms { background: #efebe9; color: #4e342e; border: 1px solid #d7ccc8; }
.badge-meat { background: #fbe9e7; color: #bf360c; border: 1px solid #ffccbc; }
.badge-fish { background: #e1f5fe; color: #0277bd; border: 1px solid #b3e5fc; }
.badge-carb { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* Indicatore piccantezza calibrato da 1 a 5 */
.spicy-level {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  background: var(--rcp-spicy-bg);
  border-radius: 20px;
  border: 1px solid #ffcdd2;
  cursor: help;
}

.chili-icon {
  font-size: 1.05em;
  line-height: 1;
}

.chili-empty {
  opacity: 0.22;
  filter: grayscale(1);
}

/* --------------------------------------------------------------------------
   9. DETTAGLI TECNICI E RUOLO DEL MICROGREEN
   -------------------------------------------------------------------------- */
.recipe-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 14px 0;
  padding: 12px 18px;
  background-color: var(--rcp-surface-soft);
  border-radius: var(--rcp-radius-sm);
  border: 1px solid var(--rcp-border);
  font-size: 0.95em;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rcp-text-muted);
}

.meta-item strong {
  color: var(--rcp-text-main);
  font-weight: 700;
}

.microgreen-role {
  margin: 8px 0 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--rcp-brand-accent);
  background-color: #f7fbf7;
  border-radius: 0 var(--rcp-radius-sm) var(--rcp-radius-sm) 0;
  border-top: 1px solid #edf4ee;
  border-right: 1px solid #edf4ee;
  border-bottom: 1px solid #edf4ee;
  font-size: 0.95em;
  line-height: 1.55;
  color: #233423;
}

/* --------------------------------------------------------------------------
   10. INGREDIENTI E PROCEDIMENTO
   -------------------------------------------------------------------------- */
.recipe-grid-details {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 25px;
  margin-top: 12px;
}

.recipe-grid-details h4 {
  margin: 0 0 8px 0;
  color: var(--rcp-brand-dark);
  font-size: 1.05em;
  font-weight: 700;
  border-bottom: 1px solid var(--rcp-border);
  padding-bottom: 4px;
}

.ingredients-list, .steps-list {
  padding-left: 20px;
  margin: 0;
  line-height: 1.65;
  font-size: 0.95em;
  color: #3b434e;
}

.steps-list li {
  margin-bottom: 5px;
}

.product-shop-link {
  color: var(--rcp-brand-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  background-color: var(--rcp-brand-mint);
  padding: 2px 7px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.product-shop-link:hover {
  background-color: var(--rcp-brand-accent);
  color: #ffffff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE MOBILE
   -------------------------------------------------------------------------- */
@media screen and (max-width: 900px) {
  .recipe-card {
    flex-direction: column;
  }

  .recipe-media {
    min-width: 100%;
  }

  .recipe-slide img {
    min-height: 250px;
    max-height: 320px;
  }

  .recipe-body {
    padding: 20px 16px;
  }

  .recipe-title {
    font-size: 1.35em;
  }

  .recipe-grid-details {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .variety-header h2 {
    font-size: 1.5em;
  }

  .category-select {
    width: 100%;
    min-width: unset;
  }
}