/* ==========================================================================
   Procevo — pages.css
   フロントページ（LP）以外の下層ページ共通スタイル。
   - ワークショップ詳細 / 一覧、固定ページ、汎用一覧、404
   - main.css のデザイントークン・共通クラス（.container / .btn / .text-link /
     .ws-card / .status-pill 等）を前提に、下層ページ専用のクラスだけを足す。
   - 767px以下をスマホのブレークポイントとして統一する。
   ========================================================================== */

/* --------------------------------------------------------------------------
   共通: 固定ヘッダー分の余白
   -------------------------------------------------------------------------- */
.page-shell {
    padding-top: calc(var(--header-h) + clamp(32px, 6vw, 64px));
    padding-bottom: clamp(72px, 10vw, 140px);
    background: var(--white);
}

/* --------------------------------------------------------------------------
   パンくずリスト
   -------------------------------------------------------------------------- */
.breadcrumb {
    margin-bottom: clamp(20px, 3vw, 32px);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb li {
    display: flex;
    align-items: center;
    min-width: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 8px;
    color: var(--line-strong);
}

.breadcrumb a {
    color: var(--muted);
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--navy);
}

.breadcrumb li[aria-current] {
    overflow: hidden;
    max-width: 44ch;
    color: var(--navy);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   ページ見出し（一覧・固定ページ共通）
   -------------------------------------------------------------------------- */
.page-head {
    max-width: 760px;
}

.page-head__title {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--navy);
}

.page-head__lead {
    max-width: 46em;
    margin-top: 14px;
    font-size: clamp(14.5px, 1.1vw, 15.5px);
    line-height: 1.95;
    color: var(--muted);
}

.page-empty {
    margin-top: clamp(32px, 5vw, 48px);
    padding: clamp(36px, 6vw, 56px) clamp(24px, 4vw, 40px);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--paper);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
    text-align: center;
}

/* --------------------------------------------------------------------------
   本文タイポグラフィ（the_content 用）
   -------------------------------------------------------------------------- */
.entry-content {
    max-width: 760px;
    margin-top: clamp(32px, 4vw, 48px);
    font-size: 16px;
    line-height: 2;
    color: var(--text);
}

.entry-content > * + * {
    margin-top: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--navy);
    font-weight: 700;
}

.entry-content h2 {
    margin-top: 2.6em;
    padding-bottom: .5em;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    line-height: 1.55;
}

.entry-content h3 {
    margin-top: 2.2em;
    font-size: 1.15rem;
    line-height: 1.6;
}

.entry-content h4 {
    margin-top: 1.8em;
    font-size: 1.02rem;
    line-height: 1.7;
}

.entry-content > h2:first-child,
.entry-content > h3:first-child {
    margin-top: 0;
}

.entry-content p {
    letter-spacing: .02em;
}

.entry-content ul,
.entry-content ol {
    display: flex;
    flex-direction: column;
    gap: .55em;
    padding-left: 1.5em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    line-height: 1.9;
}

.entry-content li > ul,
.entry-content li > ol {
    margin-top: .55em;
}

.entry-content a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: var(--sky-soft);
    text-underline-offset: 3px;
    transition: color .25s, text-decoration-color .25s;
}

.entry-content a:hover {
    color: var(--navy);
    text-decoration-color: currentColor;
}

.entry-content strong {
    color: var(--navy);
    font-weight: 700;
}

.entry-content img {
    border-radius: var(--radius-md);
}

.entry-content figure {
    margin: 0;
}

.entry-content figcaption {
    margin-top: .6em;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.entry-content blockquote {
    position: relative;
    padding: 1.2em 1.6em;
    border-left: 4px solid var(--sky);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--paper);
    color: var(--muted);
    font-style: normal;
}

.entry-content blockquote > *:first-child {
    margin-top: 0;
}

.entry-content hr {
    margin: 2.4em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.entry-content th,
.entry-content td {
    padding: .7em 1em;
    border: 1px solid var(--line);
    text-align: left;
}

.entry-content th {
    background: var(--mist);
    color: var(--navy);
    font-weight: 700;
}

.entry-content code {
    padding: .2em .45em;
    border-radius: 6px;
    background: var(--mist);
    font-size: .9em;
}

.entry-content pre {
    padding: 1.2em;
    border-radius: var(--radius-sm);
    background: var(--deep);
    color: #fff;
    overflow-x: auto;
}

.entry-content pre code {
    padding: 0;
    background: none;
    color: inherit;
}

/* --------------------------------------------------------------------------
   ワークショップ詳細
   -------------------------------------------------------------------------- */
.ws-single {
    max-width: 800px;
}

.ws-single__article {
    max-width: 760px;
}

.ws-single__cat {
    margin-bottom: 12px;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .08em;
}

.ws-single__title {
    color: var(--navy);
    font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.ws-single__when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 22px;
    margin: 22px 0 clamp(28px, 4vw, 40px);
    padding-bottom: clamp(24px, 3vw, 32px);
    border-bottom: 1px solid var(--line);
}

.ws-single__date {
    color: var(--navy);
    font-family: var(--font-num);
    font-size: clamp(46px, 7vw, 60px);
    line-height: 1;
}

.ws-single__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-single__weekday {
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.ws-single__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: clamp(8px, 2vw, 16px);
    border-radius: var(--radius-lg);
    background: var(--mist);
}

.ws-single__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-single__back {
    margin-top: clamp(40px, 5vw, 56px);
    text-align: center;
}

.ws-single__back .text-link {
    gap: 8px;
}

/* タグ */
.ws-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: clamp(32px, 4vw, 44px);
    padding: 0;
    list-style: none;
}

.ws-tags a {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--mist);
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.ws-tags a:hover {
    background: var(--sky-soft);
    color: var(--deep);
}

/* 参加CTA */
.ws-cta {
    margin-top: clamp(48px, 6vw, 72px);
    padding: clamp(32px, 5vw, 48px);
    border-radius: var(--radius-lg);
    background: var(--deep);
    color: #fff;
}

.ws-cta__lead {
    font-size: clamp(1.1rem, 2.1vw, 1.35rem);
    font-weight: 700;
    line-height: 1.65;
}

.ws-cta__text {
    max-width: 46em;
    margin-top: 10px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.9;
}

.ws-cta .btn {
    margin-top: 26px;
}

.ws-cta__note {
    margin-top: 16px;
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
}

/* 前後のワークショップ */
.ws-adjacent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: clamp(40px, 5vw, 56px);
}

.ws-adjacent__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: border-color .25s, box-shadow .25s, transform .25s var(--ease-out);
}

.ws-adjacent__item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ws-adjacent__item--empty {
    border: 0;
}

.ws-adjacent__item--next {
    text-align: right;
    align-items: flex-end;
}

.ws-adjacent__dir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .04em;
}

.ws-adjacent__dir .icon {
    width: 16px;
    height: 16px;
}

.ws-adjacent__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--navy);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   ワークショップ一覧（アーカイブ / タクソノミー）
   -------------------------------------------------------------------------- */
.ws-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 32px);
    margin: clamp(40px, 5vw, 56px) 0 0;
    padding: 0;
    list-style: none;
}

.ws-archive-grid .ws-card {
    flex: initial;
}

.ws-archive-grid .ws-card__link {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   ページネーション（the_posts_pagination）
   -------------------------------------------------------------------------- */
.pagination {
    margin-top: clamp(48px, 6vw, 72px);
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--navy);
    font-weight: 700;
    font-size: 14px;
    transition: background .25s, color .25s;
}

.pagination a.page-numbers:hover {
    background: var(--mist);
}

.pagination .page-numbers.current {
    background: var(--blue);
    color: #fff;
}

.pagination .page-numbers.dots {
    color: var(--muted);
}

.pagination .prev .icon,
.pagination .next .icon {
    width: 16px;
    height: 16px;
}

/* --------------------------------------------------------------------------
   汎用一覧（index.php フォールバック）
   -------------------------------------------------------------------------- */
.post-list {
    max-width: 760px;
    margin: clamp(36px, 5vw, 52px) 0 0;
    padding: 0;
    list-style: none;
}

.post-list__item {
    border-top: 1px solid var(--line);
}

.post-list__item:last-child {
    border-bottom: 1px solid var(--line);
}

.post-list__link {
    display: block;
    padding: 26px 4px;
}

.post-list__date {
    display: block;
    color: var(--muted);
    font-family: var(--font-num);
    font-size: 14px;
}

.post-list__title {
    display: block;
    margin-top: 8px;
    color: var(--navy);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.6;
    transition: color .2s;
}

.post-list__link:hover .post-list__title {
    color: var(--blue);
}

.post-list__excerpt {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

/* --------------------------------------------------------------------------
   固定ページ
   -------------------------------------------------------------------------- */
.ws-page {
    max-width: 800px;
}

.ws-page__thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-top: clamp(28px, 4vw, 40px);
    border-radius: var(--radius-lg);
    background: var(--mist);
}

.ws-page__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-404 {
    max-width: 640px;
    margin: clamp(24px, 6vw, 72px) auto 0;
    text-align: center;
}

.error-404__code {
    margin: 0;
    color: var(--sky-soft);
    font-family: var(--font-num);
    font-size: clamp(72px, 15vw, 128px);
    line-height: 1;
}

.error-404__title {
    margin-top: 4px;
    color: var(--navy);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.error-404__text {
    max-width: 46em;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 2;
}

.error-404__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-top: clamp(36px, 5vw, 48px);
}

/* --------------------------------------------------------------------------
   レスポンシブ（〜767px をスマホとする）
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ws-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .page-shell {
        padding-top: calc(var(--header-h) + 28px);
    }

    .ws-archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ws-adjacent {
        grid-template-columns: 1fr;
    }

    .ws-adjacent__item--next {
        text-align: left;
        align-items: flex-start;
    }

    .ws-single__when {
        gap: 12px 18px;
    }

    .error-404__actions {
        width: 100%;
    }

    .error-404__actions .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   フォーカス可視 / モーション配慮
   -------------------------------------------------------------------------- */
.pagination .page-numbers:focus-visible,
.ws-adjacent__item:focus-visible,
.post-list__link:focus-visible,
.ws-card__link:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ws-adjacent__item {
        transition: none;
    }
}
