/* ============================================================
   投稿詳細ページ スタイル
   front-rebuild.css のデザイン言語を踏襲
   ============================================================ */

/* ── ヒーローセクション ── */
.single-hero {
    position: relative;
    background: linear-gradient(to right, #6a9f6e 0%, #8bbe8d 35%, #b5dbb7 65%, #dceedd 100%);
    padding: calc(var(--hg-header-height) + 60px) 20px 60px;
    overflow: hidden;
}

.single-hero__inner {
    max-width: var(--hg-page-max);
    margin: 0 auto;
}

.single-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.single-hero__date {
    font-family: var(--hg-font-en);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.75);
}

.single-hero__cat {
    display: inline-block;
    padding: 3px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    background: var(--hg-accent);
    color: var(--hg-ink);
    text-decoration: none;
    transition: background 0.2s;
}

.single-hero__cat:hover {
    background: #fff;
    color: var(--hg-ink);
}

.single-hero__title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    width: auto !important;
}

.single-hero__title::after {
    display: none;
}

.single-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.single-hero__wave svg {
    display: block;
    width: 100%;
    height: 60px;
}

.single-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.single-hero__tag {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

/* ── 記事本文セクション ── */
.single-body {
    padding: 0 20px 60px;
}

.single-body__inner {
    max-width: 820px;
    margin: 0 auto;
}

/* ── アイキャッチ ── */
.single-body__eyecatch {
    margin: 32px 0 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.single-body__eyecatch-space {
    margin: 32px 0 40px;
    height: 1px;
}

.single-body__eyecatch img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── 記事コンテンツ ── */
.single-content {
    background: var(--hg-card);
    border-radius: 16px;
    padding: 48px 48px 56px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.single-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 48px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--hg-accent);
    color: var(--hg-ink);
}

.single-content h2:first-child {
    margin-top: 0;
}

.single-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 36px 0 14px;
    padding-left: 14px;
    border-left: 4px solid var(--hg-accent);
    color: var(--hg-ink);
}

.single-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--hg-ink);
}

.single-content p {
    font-size: 0.95rem;
    line-height: 2;
    margin: 0 0 20px;
    color: var(--hg-ink);
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
}

.single-content a {
    color: var(--hg-accent-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.single-content a:hover {
    color: var(--hg-ink);
}

.single-content ul,
.single-content ol {
    margin: 0 0 20px;
    padding-left: 1.6em;
}

.single-content li {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--hg-ink);
}

.single-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--hg-surface);
    border-left: 4px solid var(--hg-accent);
    border-radius: 0 10px 10px 0;
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--hg-muted);
}

.single-content blockquote p {
    color: var(--hg-muted);
    margin-bottom: 0;
}

.single-content pre {
    margin: 24px 0;
    padding: 20px 24px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.7;
}

.single-content code {
    background: var(--hg-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

.single-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

.single-content table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.single-content th,
.single-content td {
    padding: 12px 16px;
    border: 1px solid var(--hg-border);
    text-align: left;
}

.single-content th {
    background: var(--hg-surface);
    font-weight: 700;
}

.single-content figure {
    margin: 24px 0;
}

.single-content figcaption {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--hg-muted);
    text-align: center;
}

/* ── WPブロックエディター カラー ── */
.single-content .has-black-color {
    color: #4D4D4D;
}

.single-content .has-white-color {
    color: #ffffff;
}

.single-content .has-yellow-color {
    color: #ffffcc;
}

.single-content .has-red-color {
    color: #cc0000;
}

.single-content .has-orange-color {
    color: #ffa500;
}

.single-content .has-pink-color {
    color: #ffd1ff;
}

.single-content .has-blue-color {
    color: #ccffff;
}

.single-content .has-purple-color {
    color: #aa00ff;
}

.single-content .has-green-color {
    color: #ccffcc;
}

.single-content .has-black-background-color {
    background-color: #4D4D4D;
}

.single-content .has-white-background-color {
    background-color: #ffffff;
}

.single-content .has-yellow-background-color {
    background-color: #ffffcc;
}

.single-content .has-red-background-color {
    background-color: #cc0000;
}

.single-content .has-orange-background-color {
    background-color: #ffa500;
}

.single-content .has-pink-background-color {
    background-color: #ffd1ff;
}

.single-content .has-blue-background-color {
    background-color: #ccffff;
}

.single-content .has-purple-background-color {
    background-color: #aa00ff;
}

.single-content .has-green-background-color {
    background-color: #ccffcc;
}

/* ── WPブロック テキスト配置 ── */
.single-content .has-text-align-left {
    text-align: left;
}

.single-content .has-text-align-center {
    text-align: center;
}

.single-content .has-text-align-right {
    text-align: right;
}

/* ── WPブロック フォントサイズ ── */
.single-content .has-small-font-size {
    font-size: 0.8rem;
}

.single-content .has-medium-font-size {
    font-size: 1.1rem;
}

.single-content .has-large-font-size {
    font-size: 1.5rem;
}

.single-content .has-x-large-font-size {
    font-size: 2rem;
}

/* ── WPブロック ワイド／全幅 ── */
.single-content .alignwide {
    margin-left: -48px;
    margin-right: -48px;
    max-width: calc(100% + 96px);
}

.single-content .alignfull {
    margin-left: calc(-48px - 16px);
    margin-right: calc(-48px - 16px);
    max-width: none;
    width: calc(100% + 128px);
}

/* ── WPブロック カラム ── */
.single-content .wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

.single-content .wp-block-column {
    flex: 1 1 0;
    min-width: 0;
}

/* ── WPブロック ボタン ── */
.single-content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.single-content .wp-block-button__link {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.single-content .wp-block-button__link:hover {
    opacity: 0.85;
}

/* ── WPブロック セパレータ ── */
.single-content .wp-block-separator {
    border: none;
    border-top: 2px solid var(--hg-border);
    margin: 32px 0;
}

.single-content .wp-block-separator.is-style-wide {
    width: 100%;
}

.single-content .wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    line-height: 1;
}

.single-content .wp-block-separator.is-style-dots::before {
    content: '···';
    font-size: 1.5rem;
    letter-spacing: 1em;
    color: var(--hg-muted);
}

/* ── WPブロック スペーサー ── */
.single-content .wp-block-spacer {
    clear: both;
}

/* ── WPブロック 画像 ── */
.single-content .wp-block-image {
    margin: 24px 0;
}

.single-content .wp-block-image figcaption {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--hg-muted);
    text-align: center;
}

/* ── WPブロック ギャラリー ── */
.single-content .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

.single-content .wp-block-gallery .wp-block-image {
    margin: 0;
    flex: 1 1 auto;
}

/* ── WPブロック カバー ── */
.single-content .wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin: 24px 0;
    border-radius: 10px;
    overflow: hidden;
}

/* ── WPブロック メディアとテキスト ── */
.single-content .wp-block-media-text {
    display: grid;
    grid-template-columns: 50% 1fr;
    gap: 24px;
    align-items: center;
    margin: 24px 0;
}

.single-content .wp-block-media-text.has-media-on-the-right {
    grid-template-columns: 1fr 50%;
}

.single-content .wp-block-media-text__media img {
    width: 100%;
    height: auto;
}

/* ── WPブロック グループ ── */
.single-content .wp-block-group {
    margin: 24px 0;
}

.single-content .wp-block-group.has-background {
    padding: 24px;
    border-radius: 10px;
}

/* ── WPブロック リスト ── */
.single-content .wp-block-list {
    margin: 0 0 20px;
    padding-left: 1.6em;
}

/* ── 投稿ナビゲーション（前後記事） ── */
.single-postnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 48px;
}

.single-postnav__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    background: var(--hg-card);
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--hg-ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.single-postnav__link:hover {
    border-color: var(--hg-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.single-postnav__link--next {
    text-align: right;
}

.single-postnav__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.single-postnav__link--next .single-postnav__label {
    justify-content: flex-end;
}

.single-postnav__label .material-symbols-outlined {
    font-size: 16px;
}

.single-postnav__title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── おすすめ記事セクション ── */
.single-recommend {
    background: var(--hg-surface);
    padding: 64px 20px 80px;
}

.single-recommend__inner {
    max-width: var(--hg-page-max);
    margin: 0 auto;
}

.single-recommend__heading {
    text-align: center;
    margin-bottom: 40px;
}

.single-recommend__en {
    margin: 0;
    font-family: var(--hg-font-en);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hg-accent-dark);
    font-weight: 700;
}

.single-recommend__title {
    margin: 6px 0 0;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--hg-ink);
    line-height: 1.4;
}

.single-recommend__title::after {
    display: none;
}

.single-recommend__more {
    text-align: center;
    margin-top: 44px;
}

.single-recommend__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--hg-ink);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}

.single-recommend__btn:hover {
    background: var(--hg-accent-dark);
    color: #fff;
    transform: translateY(-2px);
}

.single-recommend__btn .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.2s;
}

.single-recommend__btn:hover .material-symbols-outlined {
    transform: translateX(4px);
}

/* ── レスポンシブ ── */
@media (max-width: 768px) {
    .single-hero {
        background: #6a9f6e;
        padding: calc(var(--hg-header-height) + 40px) 16px 44px;
    }

    .single-body__eyecatch {
        margin: 24px 0 28px;
        border-radius: 12px;
    }

    .single-body__eyecatch-space {
        margin: 24px 0 28px;
        height: 1px;
    }

    .single-content {
        padding: 28px 20px 36px;
        border-radius: 12px;
    }

    .single-content h2 {
        font-size: 1.2rem;
        margin-top: 36px;
    }

    .single-content h3 {
        font-size: 1.05rem;
    }

    .single-postnav {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 32px;
    }

    .single-postnav__link--next {
        text-align: left;
    }

    .single-postnav__link--next .single-postnav__label {
        justify-content: flex-start;
    }

    .single-recommend {
        padding: 44px 16px 56px;
    }

    .single-recommend .arc-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .single-recommend .arc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
