/* Chef4All · estilos compartidos por la portada y las páginas de receta */
:root {
    --negro: #111;
    --oro: #f5c518;
    --oro-oscuro: #b8860b;
    --texto: #2a2a2a;
    --suave: #666;
    --fondo: #faf7f0;
    --tarjeta: #fff;
    --radio: 14px;
    --sombra: 0 2px 10px rgba(0, 0, 0, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Alegreya Sans', system-ui, sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--texto);
    background: var(--fondo);
}

h1,
h2,
h3 {
    font-family: 'Alegreya', Georgia, serif;
    line-height: 1.2;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--oro-oscuro);
}

/* Barra superior */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(16px, 5vw, 48px);
    background: var(--negro);
    transition: background-color .3s;
}

.topbar a {
    color: var(--oro);
    text-decoration: none;
}

.topbar a:hover,
.topbar a:focus-visible {
    color: #fff;
}

.logo {
    font-family: 'Alegreya', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.topbar nav {
    display: flex;
    gap: 20px;
    font-size: 1.05rem;
}

/* Cabecera */
.hero {
    padding: clamp(40px, 8vw, 80px) 16px;
    text-align: center;
    background: var(--negro);
    color: #f2f2f2;
}

.hero h1 {
    margin: 0 0 .3em;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    color: var(--oro);
}

.hero p {
    margin: 0 auto;
    max-width: 52ch;
    color: #ccc;
}

/* Rejilla de recetas */
.recetas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 16px 56px;
}

.receta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--tarjeta);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    transition: transform .2s, box-shadow .2s;
}

.receta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}

.receta-enlace {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.receta img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #eee;
}

.receta-texto {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
}

.receta h2 {
    margin: 0 0 .35em;
    font-size: 1.4rem;
}

.receta p {
    margin: 0 0 .8em;
    color: var(--suave);
}

.ver {
    margin-top: auto;
    font-weight: 500;
    color: var(--oro-oscuro);
}

.credito {
    margin-top: auto;
    font-size: .78rem;
    color: #888;
}

.credito a {
    color: inherit;
}

/* Página de receta */
.detalle {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 16px 56px;
}

.detalle-cabecera {
    display: grid;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
}

.detalle-cabecera img {
    width: 100%;
    height: auto;
    border-radius: var(--radio);
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.detalle-cabecera h1 {
    margin: 0 0 .3em;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.detalle-cabecera p {
    margin: 0;
    color: var(--suave);
    font-size: 1.15rem;
}

.detalle-cuerpo {
    display: grid;
    gap: 24px;
}

.bloque {
    padding: 24px;
    background: var(--tarjeta);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
}

.bloque h2 {
    margin: 0 0 .6em;
    font-size: 1.6rem;
}

.bloque ul,
.bloque ol {
    margin: 0;
    padding-left: 1.3em;
}

.bloque li + li {
    margin-top: .45em;
}

.volver {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 500;
    text-decoration: none;
}

@media (min-width: 760px) {
    .detalle-cabecera {
        grid-template-columns: 1fr 1fr;
    }

    .detalle-cuerpo {
        grid-template-columns: 1fr 1.6fr;
        align-items: start;
    }
}

/* Pie */
.pie {
    padding: 28px 16px;
    text-align: center;
    background: var(--negro);
    color: #bbb;
    font-size: .95rem;
}

.pie p {
    margin: .3em 0;
}

.pie strong {
    color: var(--oro);
}

.pie a {
    color: var(--oro);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.topbar.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
