
/*
 * RADAFOOD PWA
 * BRAND.CSS COMPLETO
 * Versione 2026-10-25.10
 *
 * App larga 680px
 * Due ricette per riga su desktop
 * Una ricetta per riga su iPhone
 * Ombre leggere
 * Ricetta del giorno panoramica
 * Categorie con segnaposto ufficiale
 * Titoli e ricerca in stile RadaFood
 * Ingredienti e Procedimento valorizzati
 */

:root {
  --rf-red: #e34152;
  --rf-red-dark: #b62635;
  --rf-blue: #2196f3;
  --rf-ink: #243648;
  --rf-muted: #657786;
  --rf-line: #e7e7eb;
}

/* STRUTTURA */

html body .app {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

html body nav {
  width: min(680px, 100%);
  max-width: 680px;
}

/* HEADER */

header {
  height: 128px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand img {
  width: 180px;
  height: 116px;
  max-width: 100%;
  object-fit: contain;
}

main {
  padding-top: 16px;
}

main:focus-visible {
  outline: none;
}

/* TITOLI DELLE PAGINE RICETTE E RICERCA */

html body .app main:has(.search-box) > h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 26px;
  color: var(--rf-blue);
  font-size: clamp(25px, 4.8vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

html body .app main:has(.search-box) > h1::before,
html body .app main:has(.search-box) > h1::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  min-width: 15px;
  flex-shrink: 0;
  background: var(--rf-red);
}

/* RICERCA */

html body .app main .search-box {
  border-radius: 14px;
  border: 1px solid #e1e9ee;
  background: #f8fbfd;
  box-shadow: none;
}

html body .app main .search-box:focus-within {
  border-color: var(--rf-blue);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, .09);
}

html body .app main .search-box input {
  min-width: 0;
  font-size: 14px;
}

html body .app main:has(.recipe-grid) > p {
  color: var(--rf-muted);
  line-height: 1.65;
}

/* HOME - RICETTA DEL GIORNO */

html body .app main .hero {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2.15 / 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 17px;
  background: #f5f5f5;
  box-shadow:
    0 4px 11px rgba(0, 0, 0, .08),
    0 9px 20px rgba(0, 0, 0, .045);
}

html body .app main .hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

html body .app main .hero .hero-copy {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 30px 24px;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(14, 28, 39, .91),
    rgba(14, 28, 39, .46) 65%,
    transparent
  );
}

html body .app main .hero .hero-copy h2 {
  color: #fff;
  font-size: clamp(21px, 4vw, 28px);
  line-height: 1.2;
  margin: 8px 0;
}

html body .app main .hero .hero-copy small {
  color: #fff;
}

/* CATEGORIE HOME */

/*
 * Se un'immagine di categoria non esiste,
 * il suo riquadro mostra il segnaposto
 * ufficiale RadaFood come sfondo.
 *
 * Le fotografie esistenti restano visibili.
 */

html body .app .categories .category {
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #edf0f2;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, .06),
    0 7px 16px rgba(0, 0, 0, .035);
}

html body .app .categories .category img {
  display: block;
  width: 100%;
  background-color: #f8f8f8;
  background-image:
    url("/radafood/images/ricetta-segnaposto.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: transparent;
}

html body .app .categories .category-copy strong {
  color: var(--rf-ink);
}

html body .app .categories .category-copy i {
  color: var(--rf-red-dark);
}

/* DETTAGLIO RICETTA */

.rf-recipe-screen {
  width: 100%;
  min-width: 0;
}

.rf-recipe-back {
  display: inline-flex;
  color: #146b94;
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 22px;
}

.rf-recipe-back:hover {
  text-decoration: underline;
}

/* TITOLO RICETTA */

.rf-recipe-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 24px;
  color: var(--rf-blue);
  font-size: clamp(23px, 4.4vw, 29px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
}

.rf-recipe-title::before,
.rf-recipe-title::after {
  content: "";
  width: 28px;
  min-width: 18px;
  height: 1px;
  background: var(--rf-red);
  flex-shrink: 0;
}

/* FOTO DETTAGLIO */

.rf-recipe-screen .detail-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2.5 / 1;
  max-height: none;
  object-fit: cover;
  object-position: center;
  margin: 0 0 14px;
  border-radius: 15px;
  border: 1px solid #ededed;
  background: #fff;
  box-shadow:
    0 3px 9px rgba(0, 0, 0, .09),
    0 9px 19px rgba(0, 0, 0, .055);
}

/* PREPARAZIONE / COTTURA / DOSI */

.rf-recipe-screen .rf-recipe-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 13px 0 16px;
  border-bottom: 1px solid var(--rf-red);
  background: #fff;
}

.rf-recipe-screen .rf-recipe-info-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  padding: 4px 5px;
  border: 0;
  border-radius: 0;
  background: #fff;
  text-align: center;
  flex-wrap: wrap;
}

.rf-recipe-screen .rf-recipe-info-icon {
  color: var(--rf-blue);
  font-size: 17px;
  line-height: 1;
}

.rf-recipe-screen .rf-recipe-info-label {
  color: #606068;
  font-size: 11px;
  line-height: 1.3;
}

.rf-recipe-screen .rf-recipe-info-label::after {
  content: ":";
}

.rf-recipe-screen .rf-recipe-info-value {
  color: #44444a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* AZIONI DETTAGLIO */

.rf-recipe-screen .rf-recipe-actions {
  display: block;
  width: 100%;
  padding-top: 28px !important;
  padding-bottom: 18px;
  margin: 0;
  border-bottom: 1px solid var(--rf-red);
}

.rf-recipe-screen .rf-recipe-actions-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.rf-recipe-screen .rf-recipe-actions-row button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 10px 7px;
  border: 1px solid #e2e5e8;
  border-radius: 12px !important;
  background: #fff;
  color: var(--rf-ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, .07),
    0 5px 10px rgba(0, 0, 0, .035) !important;
  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.rf-recipe-screen
.rf-recipe-actions-row
.rf-share-action {
  color: var(--rf-red-dark);
  border-color: #ecc3c8;
  background: #fff;
}

.rf-recipe-screen
.rf-recipe-actions-row
.rf-save-action {
  background: #fff;
  color: var(--rf-ink);
}

.rf-recipe-screen
.rf-recipe-actions-row
.rf-like-action {
  background: #fff;
  color: var(--rf-ink);
}

@media (hover: hover) {
  .rf-recipe-screen
  .rf-recipe-actions-row button:hover {
    transform: translateY(-2px);
    box-shadow:
      0 3px 8px rgba(0, 0, 0, .09),
      0 7px 14px rgba(0, 0, 0, .05) !important;
  }
}

.rf-recipe-screen
.rf-recipe-actions-row button:active {
  transform: translateY(1px);
}

.rf-recipe-screen .rf-recipe-actions p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--rf-muted);
}

/* CONTROLLI ALTERNATIVI */

.rf-recipe-screen .rf-pwa-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 20px 0 17px;
  border-bottom: 1px solid var(--rf-red);
}

.rf-recipe-screen .rf-pwa-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 45px;
  padding: 9px 6px;
  border: 1px solid #e2e5e8;
  border-radius: 9px;
  background: #fff;
  color: #33333b;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.rf-recipe-screen .rf-pwa-action-primary {
  color: var(--rf-red-dark);
  border-color: #ecc3c8;
  font-weight: 650;
}

.rf-recipe-screen .rf-pwa-action-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--rf-muted);
  font-size: 11px;
  line-height: 1.5;
}

/* INGREDIENTI / PROCEDIMENTO */

.rf-recipe-screen .detail {
  max-width: none;
  margin: 28px 0 35px;
}

.rf-recipe-screen .rf-recipe-content {
  padding: 0;
}

.rf-recipe-screen .rf-recipe-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--rf-red);
}

.rf-recipe-screen .rf-recipe-section:last-child {
  border-bottom: 0;
}

.rf-recipe-screen .rf-recipe-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--rf-line);
  color: var(--rf-blue);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.rf-recipe-screen .rf-recipe-section h3::before {
  content: "";
  width: 4px;
  height: 23px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--rf-red);
}

.rf-recipe-screen .rf-recipe-text {
  color: #303036;
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ELENCO RICETTE - DUE COLONNE */

html body .app .recipe-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  width: 100%;
  max-width: 100%;
  gap: 18px;
  align-items: stretch;
  justify-content: stretch;
}

html body .app .recipe-grid .recipe-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 15px;
  overflow: hidden;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, .075),
    0 8px 17px rgba(0, 0, 0, .045);
}

html body .app .recipe-card > a {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

html body .app .recipe-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

html body .app .recipe-card h2 {
  margin: 0;
  padding: 15px 15px 18px;
  color: var(--rf-blue);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

html body .app .rf-card-info {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  min-width: 0;
  margin-top: auto;
  padding: 13px 12px 15px;
  border-top: 1px solid #eeeeef;
  background: #fff;
}

html body .app .rf-card-info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

html body .app .rf-card-info-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

html body .app .rf-card-info-icon {
  display: none;
}

html body .app .rf-card-info-label {
  color: #6a7581;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

html body .app .rf-card-info-value {
  display: block;
  color: var(--rf-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* CARICA ALTRE RICETTE */

html body .app main:has(.recipe-grid) > button {
  display: block;
  width: fit-content;
  min-height: 46px;
  margin: 32px auto 18px;
  padding: 12px 24px;
  border: 1px solid var(--rf-red-dark);
  border-radius: 12px;
  background: var(--rf-red-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 3px 8px rgba(182, 38, 53, .13);
  cursor: pointer;
}

html body .app main:has(.recipe-grid) > button:hover {
  background: #a41e2d;
}

html body .app main:has(.recipe-grid) > button:disabled {
  opacity: .65;
  cursor: wait;
}

html body .app main:has(.recipe-grid) > button[hidden] {
  display: none;
}

/* IPHONE */

@media (max-width: 600px) {
  html body .app {
    max-width: 100%;
  }

  html body nav {
    width: 100%;
    max-width: 100%;
  }

  html body .app main .hero {
    aspect-ratio: 1.75 / 1;
    border-radius: 14px;
  }

  html body .app main .hero .hero-copy {
    padding: 23px 20px 20px;
  }

  html body .app .recipe-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
  }

  html body .app .recipe-card img {
    aspect-ratio: 4 / 3;
  }

  html body .app .recipe-card h2 {
    padding: 16px 16px 18px;
    font-size: 19px;
  }

  html body .app .rf-card-info {
    gap: 8px;
    padding: 13px 13px 16px;
  }

  html body .app .rf-card-info-label {
    font-size: 11px;
  }

  html body .app .rf-card-info-value {
    font-size: 13px;
  }

  html body .app main:has(.search-box) > h1 {
    gap: 8px;
    font-size: 25px;
  }

  html body .app main:has(.search-box) > h1::before,
  html body .app main:has(.search-box) > h1::after {
    width: 15px;
  }

  .rf-recipe-title {
    font-size: 23px;
    gap: 9px;
  }

  .rf-recipe-title::before,
  .rf-recipe-title::after {
    width: 18px;
  }

  .rf-recipe-screen .detail-image {
    aspect-ratio: 1.85 / 1;
    border-radius: 12px;
    margin-bottom: 13px;
  }

  .rf-recipe-screen .rf-recipe-info {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .rf-recipe-screen .rf-recipe-info-card {
    flex-direction: column;
    gap: 4px;
    padding-inline: 3px;
  }

  .rf-recipe-screen .rf-recipe-info-label,
  .rf-recipe-screen .rf-recipe-info-value {
    font-size: 10px;
  }

  .rf-recipe-screen .rf-recipe-actions {
    padding-top: 24px !important;
    padding-bottom: 16px;
  }

  .rf-recipe-screen .rf-recipe-actions-row {
    gap: 7px;
  }

  .rf-recipe-screen
  .rf-recipe-actions-row button {
    min-height: 46px;
    padding: 8px 4px;
    font-size: 11px;
    border-radius: 9px !important;
  }

  .rf-recipe-screen .rf-pwa-actions {
    gap: 6px;
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .rf-recipe-screen .rf-pwa-action {
    min-height: 44px;
    padding: 8px 4px;
    font-size: 11px;
  }

  .rf-recipe-screen .rf-recipe-section h3 {
    font-size: 20px;
  }

  .rf-recipe-screen .rf-recipe-text {
    line-height: 1.85;
  }
}

/* IPHONE PICCOLI */

@media (max-width: 360px) {
  header {
    height: 116px;
    padding-inline: 14px;
  }

  .brand img {
    width: 164px;
    height: 104px;
  }

  .rf-recipe-title {
    font-size: 21px;
  }

  .rf-recipe-screen
  .rf-recipe-actions-row button {
    font-size: 10px;
  }

  html body .app .rf-card-info {
    gap: 5px;
    padding-inline: 8px;
  }
}

/* ACCESSIBILITA' */

@media (prefers-reduced-motion: reduce) {
  .rf-recipe-screen
  .rf-recipe-actions-row button {
    transition: none;
  }
}