/*
 * Receptsidorna (/Recept och /Recept/{id}). Bygger på Article.css: samma färger och typsnitt,
 * plus ingredienslista, kalkylator och receptkort.
 */
.story-article .recipe-subtitle { margin: -10px 0 20px; color: #6d6156; }
.story-article .kicker a { color: inherit; text-decoration: none; }

/*
 * Sidhuvudet på ett recept. Artiklarna har en stor parallaxbild; recepten har i stället
 * ett uppslag med texten till vänster och bilden som ett inramat, lite snett foto.
 */
.story-article .recipe-hero {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 44px;
    align-items: center;
    margin: 10px 0 40px;
    padding: 40px 44px;
    background-color: var(--card-bg);
    background-image: radial-gradient(rgba(160, 82, 45, .06) 1px, transparent 1px);
    background-size: 14px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.story-article .recipe-hero.no-image { grid-template-columns: 1fr; }
.story-article .recipe-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: 0;
}
.story-article .recipe-hero h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 14px;
    background-color: var(--accent-color);
}
.story-article .recipe-hero .recipe-subtitle { margin: 0 0 16px; }
.story-article .recipe-hero .lead { font-size: 1.05rem; margin-bottom: 22px; }

.story-article .recipe-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-color);
}
.story-article .recipe-facts li {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}
.story-article .recipe-facts .value { color: var(--primary-color); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.story-article .recipe-facts .label { color: #6d6156; font-size: 0.8rem; }

.story-article .recipe-hero-image { margin: 0; }
.story-article .recipe-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 10px solid #fff;
    border-radius: 3px;
    box-shadow: 0 10px 28px rgba(63, 36, 26, .22), 0 2px 6px rgba(63, 36, 26, .12);
    transform: rotate(1.5deg);
}

/* Ingredienser bredvid stegen på stora skärmar, under varandra på små. */
.story-article .recipe-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    gap: 40px;
    align-items: start;
}
.story-article .recipe-ingredients {
    position: sticky;
    top: 20px;
    padding: 20px 22px 10px;
    background-color: var(--card-bg);
    border-radius: 8px;
}
.story-article .recipe-ingredients h2,
.story-article .recipe-steps h2 { margin-top: 0; }

.story-article .ingredient-list { padding-left: 0; margin: 0 0 1.2em; }
.story-article .ingredient-list li {
    list-style-type: none;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
}
.story-article .ingredient-list li:last-child { border-bottom: 0; }
.story-article .ingredient-list .amount {
    flex: 0 0 6.5em;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}
.story-article .ingredient-list .note { color: #6d6156; }

.story-article .recipe-steps ol li { padding-left: 4px; }
.story-article .scaled { font-weight: 700; }

/* Kalkylatorn för antal portioner. */
.story-article .recipe-calculator { margin: 0 0 18px; }
.story-article .recipe-calculator label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
}
.story-article .recipe-calculator-input { display: flex; align-items: stretch; max-width: 200px; }
.story-article .recipe-calculator input[type=number] {
    flex: 1;
    height: 42px;
    margin: 0;
    padding: 0 8px;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    box-sizing: border-box;
}
.story-article .recipe-calculator input[type=number]:focus { border-bottom: 1px solid var(--accent-color); box-shadow: none; }
.story-article .recipe-step {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--primary-color);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.story-article .recipe-step:first-child { border-radius: 6px 0 0 6px; }
.story-article .recipe-step:last-child { border-radius: 0 6px 6px 0; }
.story-article .recipe-step:hover,
.story-article .recipe-step:focus-visible { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }
.story-article .recipe-reset {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

.story-article .recipe-footer { margin-top: 30px; text-align: center; }

/* Översikten /Recept. */
.story-article .recipe-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.story-article .recipe-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background-color: var(--card-bg);
    border-radius: 8px;
    transition: box-shadow .2s;
}
.story-article .recipe-card:hover,
.story-article .recipe-card:focus-visible { box-shadow: 0 4px 14px rgba(63, 36, 26, .18); }
.story-article .recipe-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.story-article .recipe-card-text { display: flex; flex-direction: column; padding: 14px 16px 18px; }
.story-article .recipe-card-category {
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.story-article .recipe-card-title { color: var(--primary-color); font-size: 1.2rem; font-weight: 700; margin-top: 2px; }
.story-article .recipe-card-subtitle { color: #6d6156; font-size: 0.9rem; margin-top: 4px; }

@media (max-width: 900px) {
    .story-article .recipe-hero { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
    /* Bilden först på smala skärmar, rak och utan ram ut mot kanterna av rutan. */
    .story-article .recipe-hero-image { order: -1; margin: -28px -28px 0; }
    .story-article .recipe-hero-image img { border: 0; border-radius: 10px 10px 0 0; box-shadow: none; transform: none; }
}
@media (max-width: 800px) {
    .story-article .recipe-layout { grid-template-columns: 1fr; gap: 10px; }
    .story-article .recipe-ingredients { position: static; }
}
@media (max-width: 600px) {
    .story-article .recipe-hero { padding: 20px; margin-top: 0; }
    .story-article .recipe-hero-image { margin: -20px -20px 0; }
    .story-article .recipe-hero h1 { font-size: 1.8rem; }
    .story-article .recipe-facts { gap: 12px 22px; }
}

/* Utskrift: bara receptet, med de mängder besökaren har valt. */
@media print {
    .story-article .recipe-hero { display: block; padding: 0; background: none; border: 0; }
    .story-article .recipe-hero-image img { max-width: 50%; border: 0; box-shadow: none; transform: none; }
    nav, footer, .parallax-container, .fixed-action-btn, .recipe-footer,
    .recipe-step, .recipe-reset, .story-article .kicker { display: none !important; }
    .story-article .recipe-layout { grid-template-columns: 1fr 2fr; gap: 24px; }
    .story-article .recipe-ingredients { position: static; background: none; padding: 0; }
    .story-article .recipe-calculator input[type=number] { border: 0; text-align: left; padding: 0; height: auto; }
    .story-article .recipe-calculator-input { max-width: none; }
}
