:root {
  --crema:#fbecd9; --oro:#cc9429; --oro-chiaro:#d7b434; --sabbia:#ccc18a;
  --rosso:#900025; --rosso-scuro:#5a0016; --verde:#63781b; --testo:#222;
  --font:"Nunito Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing:border-box; }
html, body { overflow-x:hidden; }
body { margin:0; background:var(--crema); color:var(--testo); font:500 15px/1.3 var(--font); }
a { color:var(--rosso); }
img { max-width:100%; height:auto; }
b, strong { font-weight:700; }

/* testata */
.testata { display:flex; align-items:center; justify-content:center; max-width:1100px; margin:0 auto; padding:16px 16px 0; }
.menu-toggle { position:absolute; left:-9999px; }
.menu-bottone, .menu-sfondo, .menu-chiudi { display:none; }

/* impaginazione */
.pagina { display:flex; gap:24px; max-width:1100px; margin:0 auto; padding:16px; }
.menu { flex:0 0 150px; align-self:flex-start; padding:0 6px; text-align:center; }
.menu ul { list-style:none; margin:0; padding:10px 0; border-top:1px solid var(--oro); border-bottom:1px solid var(--oro); }
.menu li a, .menu-cerca { display:block; font-size:13px; font-weight:600; line-height:1.55; letter-spacing:.02em; text-transform:uppercase; text-decoration:none; }
.menu li a { color:var(--verde); }
.menu li a:hover, .menu li a.attivo { color:var(--rosso); }
.menu-cerca { margin:14px 0; color:var(--rosso); }
.menu-greca { margin-top:24px; }
.contenuto { flex:1; min-width:0; }
.contenuto a { text-decoration:none; font-weight:600; }
.contenuto a:hover { color:var(--rosso-scuro); }

/* home */
.contenuto > p:first-child { margin:24px 0 0; }
.contenuto > p:first-child img { display:block; margin:0 auto; max-width:520px; }

/* elenco ricette */
.titolo-elenco { margin:0 0 2px; padding:7px; border-radius:4px; background:var(--oro); color:var(--rosso); font-size:15px; font-weight:700; text-align:center; }
.tab-ricette { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:2px; }
.tab-ricette th { padding:7px; border-radius:4px; background:var(--oro); color:var(--rosso); font-size:15px; font-weight:700; }
.tab-ricette th:nth-child(2) { width:24%; }
.tab-ricette th:nth-child(3) { width:15%; }
.tab-ricette td { padding:5px 10px; border-radius:4px; font-size:14px; line-height:1.25; }
.tab-ricette td.nome { background:var(--oro-chiaro); }
.tab-ricette td.nome a { color:#000; font-weight:700; }
.tab-ricette td.nome a:hover { color:var(--rosso); }
.tab-ricette td.tempo, .tab-ricette td.tipo { background:var(--sabbia); text-align:center; }
.tab-ricette td.tempo { overflow-wrap:anywhere; }
.tab-ricette td.tipo { white-space:nowrap; }

/* scheda ricetta */
.scheda { width:100%; border-collapse:separate; border-spacing:2px; }
.scheda th { width:160px; padding:6px; border-radius:4px; background:var(--oro); font-size:15px; font-weight:500; line-height:1.25; text-align:left; vertical-align:top; }
.scheda td { padding:7px; border-radius:4px; background:var(--oro-chiaro); font-size:15px; line-height:1.35; text-align:justify; hyphens:auto; -webkit-hyphens:auto; overflow-wrap:anywhere; }
.scheda td.titolo { color:var(--rosso); font-size:18px; font-weight:700; line-height:1.25; text-align:left; hyphens:manual; }
.scheda img { display:block; max-width:100%; width:auto; }

/* ricerca */
.form-ricerca { max-width:460px; margin:80px auto 0; }
.form-ricerca label { display:block; margin:12px 0 2px; color:var(--rosso); font-size:13px; font-weight:600; }
.form-ricerca input[type=text], .form-ricerca select { width:100%; padding:8px; border:1px solid var(--oro); border-radius:6px; background:#fffdf8; font-size:15px; }
.form-ricerca button { display:block; margin:16px auto 0; padding:8px 28px; border:0; border-radius:6px; background:var(--oro); color:var(--rosso); font-size:15px; font-weight:700; cursor:pointer; }
.form-ricerca button:hover { background:var(--oro-chiaro); }
.avviso { padding:10px; border-radius:4px; background:var(--oro-chiaro); }

@media (min-width: 761px) {
  .scheda img { max-width:600px; }
}
@media (min-width: 900px) {
  /* home e ricerca centrate sulla pagina intera: meta' di menu + spazio */
  .contenuto > p:first-child img, .form-ricerca { position:relative; left:-87px; }
}

/* telefono */
@media (max-width: 760px) {
  .testata { justify-content:space-between; padding:6px 8px; }
  .menu-bottone { display:flex; flex-direction:column; justify-content:center; gap:5px; flex-shrink:0; width:44px; height:44px; margin-left:8px; padding:0 9px; cursor:pointer; }
  .menu-bottone span { display:block; height:3px; border-radius:2px; background:var(--rosso); }
  .pagina { display:block; padding:8px; }
  .menu { position:fixed; top:0; right:0; z-index:50; width:min(78vw, 300px); height:100vh; height:100dvh; margin:0; padding:48px 20px 20px; background:var(--crema); box-shadow:-2px 0 14px rgba(0,0,0,.25); overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; transform:translateX(100%); transition:transform .25s ease; }
  #menu-toggle:checked ~ .pagina .menu { transform:translateX(0); }
  .menu-sfondo { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.35); }
  #menu-toggle:checked ~ .pagina .menu-sfondo { display:block; }
  .menu-chiudi { display:block; position:absolute; top:8px; right:14px; color:var(--rosso); font-size:34px; line-height:1; cursor:pointer; }
  .menu-logo { display:block; margin-bottom:8px; }
  .menu-greca { display:none; }
  .menu li a { font-size:16px; line-height:2; }
  .menu-cerca { margin:12px 0; font-size:16px; }
  .contenuto > p:first-child img { max-width:min(100%, 300px); }
  .tab-ricette thead { display:none; }
  .tab-ricette tr { display:block; margin-bottom:3px; }
  .tab-ricette td { display:block; }
  .tab-ricette td.nome { padding:9px 10px; font-size:15px; }
  .tab-ricette td.tempo, .tab-ricette td.tipo { display:none; }
  .scheda th, .scheda td { display:block; width:auto; }
  .scheda th { padding:4px 6px; font-size:16px; text-transform:uppercase; }
  .scheda td { font-size:16px; }
  .scheda td.titolo { font-size:18px; }
  .form-ricerca { margin-top:20px; }
}
