/* Guadiana Digital — Receitas
   Vive dentro do header.php/footer.php do site. Usa as fontes que o site já carrega
   (Playfair Display, Source Serif 4) e segue o tema do botão ☾ (html[data-theme]). */

:root {
  --rc-fundo: #fbf8f2;
  --rc-papel: #ffffff;
  --rc-creme: #f3ebdc;
  --rc-texto: #1f2a33;
  --rc-suave: #5d6670;
  --rc-linha: #e3d9c7;
  --rc-acento: #b4532a;      /* terracota */
  --rc-rio: #1d4e6b;         /* azul Guadiana */
  --rc-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --rc-texto-serif: "Source Serif 4", Georgia, serif;
  --rc-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --rc-fundo: #161b1f; --rc-papel: #1d2328; --rc-creme: #232a30;
  --rc-texto: #f1ece3; --rc-suave: #a9b1b8; --rc-linha: #333c44;
  --rc-acento: #e08a5c; --rc-rio: #8fc1de;
}

.rc, .rc * { box-sizing: border-box; }
.rc { color: inherit; font-family: var(--rc-texto-serif); font-size: 17px; line-height: 1.65; }
.rc a { color: var(--rc-rio); }
.rc img { max-width: 100%; height: auto; }

/* Só no modo autónomo (sem header.php do site) */
body.rc-autonomo { margin: 0; background: var(--rc-fundo); }
.rc-topo { border-bottom: 1px solid var(--rc-linha); background: var(--rc-papel); }
.rc-topo__in { max-width: 1040px; margin: 0 auto; padding: 12px 16px; }
.rc-marca { font-family: var(--rc-serif); font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--rc-texto); }
body.rc-autonomo .rc { color: var(--rc-texto); }
.rc-marca span { font-weight: 400; color: var(--rc-suave); font-size: .95rem; margin-left: 4px; }

/* Sub-navegação das receitas */
.rc-nav { display: flex; gap: 18px; font-family: var(--rc-sans); font-size: .9rem; margin: 0 0 24px; padding-bottom: 10px; border-bottom: 1px solid var(--rc-linha); }
.rc-nav a { text-decoration: none; color: var(--rc-suave); padding: 4px 0; border-bottom: 2px solid transparent; }
.rc-nav a[aria-current="page"], .rc-nav a:hover { color: inherit; border-bottom-color: var(--rc-acento); }

.rc-main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.rc-nota { margin: 48px 0 0; padding-top: 14px; border-top: 1px solid var(--rc-linha); font-family: var(--rc-sans); font-size: .8rem; color: var(--rc-suave); }

/* Ficha */
.rc-ficha__cab { max-width: 720px; }
.rc-etiqueta { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rc-acento); }
.rc-ficha h1, .rc-arquivo__cab h1 { font-family: var(--rc-serif); font-weight: 700; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.rc-regiao { margin: 8px 0 0; color: var(--rc-suave); font-style: italic; font-family: var(--rc-serif); }
.rc-resumo { font-size: 1.12rem; margin: 14px 0 0; max-width: 64ch; }

.rc-figura { margin: 26px 0 0; }
.rc-figura img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--rc-creme); }
.rc-figura figcaption { font-size: .78rem; color: var(--rc-suave); margin-top: 6px; }

.rc-factos { list-style: none; margin: 22px 0 0; padding: 14px 0; display: flex; flex-wrap: wrap; gap: 10px 32px; border-top: 1px solid var(--rc-linha); border-bottom: 1px solid var(--rc-linha); }
.rc-factos li { display: flex; flex-direction: column; font-family: var(--rc-serif); font-size: 1.1rem; }
.rc-factos span { font-family: var(--rc-sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rc-suave); }

.rc-corpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 30px; }
@media (min-width: 820px) { .rc-corpo { grid-template-columns: 320px minmax(0, 1fr); gap: 48px; } }

.rc-corpo h2, .rc-sec-titulo { font-family: var(--rc-serif); font-size: 1.45rem; margin: 0 0 12px; }

.rc-ingredientes { background: var(--rc-creme); color: var(--rc-texto); border-radius: 8px; padding: 20px 20px 14px; align-self: start; }
.rc-ingredientes ul { list-style: none; margin: 0; padding: 0; }
.rc-ingredientes li { padding: 7px 0 7px 26px; border-bottom: 1px dashed var(--rc-linha); position: relative; cursor: pointer; }
.rc-ingredientes li:last-child { border-bottom: 0; }
.rc-ingredientes li::before { content: ""; position: absolute; left: 0; top: 13px; width: 13px; height: 13px; border: 1.5px solid var(--rc-acento); border-radius: 3px; }
.rc-ingredientes li.feito { color: var(--rc-suave); text-decoration: line-through; }
.rc-ingredientes li.feito::before { background: var(--rc-acento); }
.rc-ajuda { font-size: .78rem; color: var(--rc-suave); margin: 10px 0 0; }

.rc-passos ol { margin: 0; padding: 0; list-style: none; counter-reset: passo; }
.rc-passos li { counter-increment: passo; position: relative; padding: 0 0 18px 48px; }
.rc-passos li::before { content: counter(passo); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--rc-rio); color: var(--rc-papel); font-family: var(--rc-serif); font-weight: 700; display: grid; place-items: center; font-size: 1rem; }
.rc-dica { color: var(--rc-texto); margin-top: 8px; padding: 14px 18px; border-left: 4px solid var(--rc-acento); background: var(--rc-papel); border-radius: 0 8px 8px 0; }
.rc-dica strong { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rc-acento); margin-bottom: 2px; }

.rc-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.rc-acoes a, .rc-acoes button { font: inherit; font-size: .92rem; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--rc-linha); background: var(--rc-papel); color: var(--rc-texto); text-decoration: none; cursor: pointer; }
.rc-acoes a:hover, .rc-acoes button:hover { border-color: var(--rc-acento); }

.rc-amanha { color: var(--rc-texto); margin: 36px 0 0; padding: 14px 18px; background: var(--rc-creme); border-radius: 8px; }
.rc-amanha span { color: var(--rc-suave); }

/* Grelha */
.rc-grelha-wrap { margin-top: 48px; }
.rc-grelha { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rc-cartao a { display: block; text-decoration: none; color: inherit; }
.rc-cartao img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--rc-creme); }
.rc-cartao__regiao { display: block; margin-top: 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rc-acento); }
.rc-cartao__nome { display: block; font-family: var(--rc-serif); font-size: 1.2rem; line-height: 1.25; margin-top: 2px; }
.rc-cartao a:hover .rc-cartao__nome { text-decoration: underline; }

.rc-arquivo__cab { margin-bottom: 8px; }
.rc-hoje-link { margin: 12px 0 0; font-weight: 600; }
.rc-vazio { font-size: 1.1rem; }

/* Impressão: só a receita */
@media print {
  body > header, body > footer, body > nav, .search-overlay, .rc-nav, .rc-nota, .rc-acoes, .rc-grelha-wrap, .rc-amanha, .rc-ajuda { display: none !important; }
  body { background: #fff !important; } .rc { color: #000; font-size: 12pt; }
  .rc-main { padding: 0; }
  .rc-figura img { max-height: 7cm; }
  .rc-ingredientes { background: none; border: 1px solid #999; }
  .rc-corpo { grid-template-columns: 6.5cm 1fr; gap: 1cm; }
  .rc-passos li::before { background: none; color: #000; border: 1px solid #000; }
}
