/*
 * /jp/recipe/assets/css/content-5055.css
 * 紀ノ川風 甘口たくあん漬け（レシピ番号5055）
 *
 * 5055.php からだけ読み込む専用CSS。
 * 既存 view.php が実際に出力する .recipe-detail を名前空間に使用する。
 */

.recipe-detail {
    --r5055-ink: #433c32;
    --r5055-muted: #71695e;
    --r5055-paper: #fffdf8;
    --r5055-cream: #f8f2e5;
    --r5055-rice: #efe4cb;
    --r5055-persimmon: #bd7045;
    --r5055-mustard: #aa8231;
    --r5055-green: #74816b;
    --r5055-pale-green: #eef2e9;
    --r5055-line: #ddd1ba;
    overflow: hidden;
    color: var(--r5055-ink);
    background: var(--r5055-paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-size: 17px;
    line-height: 1.9;
}

.recipe-detail,
.recipe-detail * {
    box-sizing: border-box;
}

.recipe-detail img {
    max-width: 100%;
}

.recipe-detail .rd-container {
    width: calc(100% - 40px);
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
}

.recipe-detail .rd-narrow {
    max-width: 920px;
}

/* =========================================================
   ヒーロー
========================================================= */

.recipe-detail .rd-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--r5055-cream), var(--r5055-rice));
}

.recipe-detail .rd-hero__media,
.recipe-detail .rd-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.recipe-detail .rd-hero__media {
    background: var(--r5055-cream);
}

.recipe-detail .rd-hero__media img {
    display: block;
    max-width: none;
    object-fit: cover;
    object-position: center;
    opacity: 1;
}

.recipe-detail .rd-hero__overlay {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 560px;
    align-items: center;
    background: linear-gradient(
        90deg,
        rgba(255, 253, 248, 0.97) 0%,
        rgba(255, 253, 248, 0.86) 40%,
        rgba(255, 253, 248, 0.20) 72%,
        rgba(255, 253, 248, 0.02) 100%
    );
}

.recipe-detail .rd-hero__content {
    max-width: 650px;
    padding: 72px 0;
}

.recipe-detail .rd-hero__eyebrow,
.recipe-detail .rd-heading__sub,
.recipe-detail .rd-summary__label {
    margin: 0 0 10px;
    color: var(--r5055-persimmon);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.recipe-detail .rd-hero__title,
.recipe-detail .rd-heading h2,
.recipe-detail .rd-flow-item > h3 {
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "HGS明朝E", serif;
    font-weight: 600;
    letter-spacing: 0.035em;
}

.recipe-detail .rd-hero__title {
    margin: 0;
    color: #3f392f;
    font-size: clamp(2.25rem, 5.4vw, 4.5rem);
    line-height: 1.22;
}

.recipe-detail .rd-hero__lead {
    max-width: 40em;
    margin: 24px 0 0;
    color: #574f44;
    font-size: 1.08rem;
}

.recipe-detail .rd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* =========================================================
   ボタン
========================================================= */

.recipe-detail .rd-btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 11px 25px;
    border: 1px solid #765c2d;
    border-radius: 999px;
    color: #fff;
    background: #765c2d;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.recipe-detail .rd-btn--light,
.recipe-detail .rd-btn--ghost {
    color: #5c4926;
    background: rgba(255, 253, 248, 0.94);
}

.recipe-detail .rd-btn:hover,
.recipe-detail .rd-btn:focus-visible {
    color: #fff;
    background: #59451f;
}

/* =========================================================
   概要
========================================================= */

.recipe-detail .rd-summary {
    position: relative;
    z-index: 2;
    margin-top: -44px;
}

.recipe-detail .rd-summary__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--r5055-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(83, 67, 42, 0.10);
}

.recipe-detail .rd-summary__item {
    min-width: 0;
    padding: 24px 28px;
}

.recipe-detail .rd-summary__item + .rd-summary__item {
    border-left: 1px solid var(--r5055-line);
}

.recipe-detail .rd-summary__text {
    margin: 0;
    color: #4e473c;
    font-size: 1.05rem;
    font-weight: 700;
}

/* =========================================================
   本文・パネル
========================================================= */

.recipe-detail .rd-section {
    padding: 76px 0;
}

.recipe-detail .rd-section:nth-of-type(even) {
    background: #faf6ed;
}

.recipe-detail .rd-section--intro {
    padding-top: 104px;
    background: var(--r5055-paper);
}

.recipe-detail .rd-heading {
    margin-bottom: 28px;
}

.recipe-detail .rd-heading--center {
    text-align: center;
}

.recipe-detail .rd-heading h2 {
    margin: 0;
    color: #473e31;
    font-size: clamp(1.72rem, 3.2vw, 2.55rem);
    line-height: 1.48;
}

.recipe-detail .rd-prose {
    color: #554e44;
    font-size: 1.04rem;
}

.recipe-detail .rd-prose p {
    margin: 0;
}

.recipe-detail .rd-prose--panel {
    margin-bottom: 22px;
}

.recipe-detail .rd-panel,
.recipe-detail .rd-closing {
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid var(--r5055-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 38px rgba(84, 66, 37, 0.07);
}

.recipe-detail .rd-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.recipe-detail .rd-list li {
    position: relative;
    padding: 13px 0 13px 30px;
    border-bottom: 1px solid #e7dece;
}

.recipe-detail .rd-list li:last-child {
    border-bottom: 0;
}

.recipe-detail .rd-list li::before {
    content: "";
    position: absolute;
    top: 1.25em;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--r5055-mustard);
}

/* 材料欄の任意材料を必須材料から分ける。 */
.recipe-detail > .rd-section:nth-of-type(5) .rd-list li:nth-child(n+6) {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 14px;
    padding-left: 42px;
    border-bottom-color: #dce4d6;
    background: var(--r5055-pale-green);
}

.recipe-detail > .rd-section:nth-of-type(5) .rd-list li:nth-child(6) {
    margin-top: 20px;
    border-radius: 12px 12px 0 0;
}

.recipe-detail > .rd-section:nth-of-type(5) .rd-list li:last-child {
    border-radius: 0 0 12px 12px;
}

/* =========================================================
   visuals：5055.phpで指定した実画像
========================================================= */

.recipe-detail .rd-visuals {
    display: grid;
    width: 100%;
    gap: 24px;
    margin: 30px 0;
    align-items: stretch;
}

.recipe-detail .rd-visual-card,
.recipe-detail .rd-visuals--single .rd-visual-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--r5055-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(84, 66, 37, 0.07);
    text-align: left;
}

.recipe-detail .rd-visual-card__img {
    display: block;
    min-height: 0;
    background: var(--r5055-cream);
}

.recipe-detail .rd-visual-card__img img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
}

/* 材料写真 */
.recipe-detail > .rd-section:nth-of-type(5) .rd-visuals {
    grid-template-columns: 1fr;
}

.recipe-detail > .rd-section:nth-of-type(5) .rd-visual-card__img {
    aspect-ratio: 4 / 3;
}

.recipe-detail > .rd-section:nth-of-type(5) .rd-visual-card__img img {
    height: 100%;
    object-fit: cover;
}

/* 商品写真 */
.recipe-detail > .rd-section:nth-of-type(8) .rd-visuals {
    grid-template-columns: 1fr;
}

.recipe-detail > .rd-section:nth-of-type(8) .rd-visual-card {
    background: #f8f3e9;
}

.recipe-detail > .rd-section:nth-of-type(8) .rd-visual-card__img {
    display: flex;
    min-height: 380px;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.recipe-detail > .rd-section:nth-of-type(8) .rd-visual-card__img img {
    width: auto;
    max-width: 100%;
    max-height: 340px;
    object-fit: contain;
}

/* キャプション */
.recipe-detail .rd-visual-card__caption {
    margin: 0;
    padding: 16px 18px 18px;
    color: #544b40;
    background: #fff;
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0;
}

/* =========================================================
   作り方：実際のimg要素12点をPC2列・スマホ1列で表示
========================================================= */

.recipe-detail .rd-section--flavor_flow {
    background: linear-gradient(180deg, #f7f1e4 0%, #fbf8f1 100%);
}

.recipe-detail .rd-section--flavor_flow .rd-visuals {
    counter-reset: r5055-step;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.recipe-detail .rd-section--flavor_flow .rd-visual-card {
    counter-increment: r5055-step;
    position: relative;
}

.recipe-detail .rd-section--flavor_flow .rd-visual-card::before {
    content: counter(r5055-step);
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    color: #fff;
    background: var(--r5055-persimmon);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 3px 12px rgba(70, 47, 25, 0.18);
}

.recipe-detail .rd-section--flavor_flow .rd-visual-card__img {
    aspect-ratio: 4 / 3;
}

.recipe-detail .rd-section--flavor_flow .rd-visual-card__img img {
    height: 100%;
    object-fit: cover;
}

.recipe-detail .rd-section--flavor_flow > .rd-container > .rd-list--check {
    margin-top: 28px;
    padding: 18px 22px;
    border: 1px solid #dce4d6;
    border-radius: 14px;
    background: var(--r5055-pale-green);
}

/* =========================================================
   食卓提案
========================================================= */

.recipe-detail .rd-section--closing {
    background: linear-gradient(135deg, #f6efe0 0%, #eef2e9 100%);
}

.recipe-detail .rd-closing {
    text-align: center;
}

.recipe-detail .rd-prose--center {
    max-width: 42em;
    margin: 0 auto;
}

.recipe-detail .rd-closing .rd-visuals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipe-detail .rd-closing .rd-visual-card {
    max-width: none;
}

.recipe-detail .rd-closing .rd-visual-card__img {
    aspect-ratio: 4 / 3;
}

.recipe-detail .rd-closing .rd-visual-card__img img {
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.recipe-detail .rd-closing__actions {
    margin-top: 28px;
}

/* 旧PDFは主導線として表示しない。 */
.recipe-detail .rd-section--cta {
    display: none;
}

/* =========================================================
   スマートフォン
========================================================= */

@media screen and (max-width: 767px) {
    .recipe-detail {
        font-size: 16px;
        line-height: 1.82;
    }

    .recipe-detail .rd-container {
        width: calc(100% - 24px);
    }

    .recipe-detail .rd-hero,
    .recipe-detail .rd-hero__overlay {
        min-height: 520px;
    }

    .recipe-detail .rd-hero__media img {
        object-position: 62% center;
    }

    .recipe-detail .rd-hero__overlay {
        align-items: flex-end;
        background: linear-gradient(
            0deg,
            rgba(255, 253, 248, 0.98) 0%,
            rgba(255, 253, 248, 0.87) 54%,
            rgba(255, 253, 248, 0.16) 100%
        );
    }

    .recipe-detail .rd-hero__content {
        padding: 205px 0 36px;
    }

    .recipe-detail .rd-hero__title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .recipe-detail .rd-hero__lead {
        font-size: 1rem;
    }

    .recipe-detail .rd-summary {
        margin-top: 0;
        padding-top: 18px;
        background: var(--r5055-paper);
    }

    .recipe-detail .rd-summary__grid {
        grid-template-columns: 1fr;
    }

    .recipe-detail .rd-summary__item {
        padding: 17px 20px;
    }

    .recipe-detail .rd-summary__item + .rd-summary__item {
        border-top: 1px solid var(--r5055-line);
        border-left: 0;
    }

    .recipe-detail .rd-section,
    .recipe-detail .rd-section--intro {
        padding: 50px 0;
    }

    .recipe-detail .rd-panel,
    .recipe-detail .rd-closing {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .recipe-detail .rd-section--flavor_flow .rd-visuals,
    .recipe-detail .rd-closing .rd-visuals {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .recipe-detail .rd-visual-card__caption {
        padding: 14px 15px 16px;
        font-size: 1rem;
    }

    .recipe-detail > .rd-section:nth-of-type(8) .rd-visual-card__img {
        min-height: 290px;
        padding: 20px;
    }

    .recipe-detail > .rd-section:nth-of-type(8) .rd-visual-card__img img {
        max-height: 250px;
    }
}

/* =========================================================
   印刷
========================================================= */

@media print {
    .recipe-detail {
        color: #222;
        background: #fff;
        font-size: 11pt;
    }

    .recipe-detail .rd-hero,
    .recipe-detail .rd-hero__overlay {
        min-height: 0;
    }

    .recipe-detail .rd-hero__actions {
        display: none;
    }

    .recipe-detail .rd-hero__content,
    .recipe-detail .rd-section,
    .recipe-detail .rd-section--intro {
        padding: 22px 0;
    }

    .recipe-detail .rd-summary {
        margin-top: 0;
    }

    .recipe-detail .rd-panel,
    .recipe-detail .rd-visual-card,
    .recipe-detail .rd-closing {
        break-inside: avoid;
        box-shadow: none;
    }

    .recipe-detail .rd-section--flavor_flow .rd-visuals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

