/* ===========================================================
   オーケー企画 Ver2 - Pages (下層ページ用追加スタイル)
   =========================================================== */

/* ---------- ヒーロースライダー（クライアント実画像3枚） ---------- */
.hero-slider {
    position: absolute; inset: 0; z-index: 0;
}
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    animation: heroSlideShow 18s infinite;
}
.hero-slide-1 { animation-delay: 0s; }
.hero-slide-2 { animation-delay: 6s; }
.hero-slide-3 { animation-delay: 12s; }
@keyframes heroSlideShow {
    0%, 28%   { opacity: 0; transform: scale(1.04); }
    5%, 28%   { opacity: 1; transform: scale(1.0); }
    33%, 100% { opacity: 0; transform: scale(1.0); }
}
/* iOS ちらつき防止 */
.hero-slider .hero-slide { will-change: opacity, transform; }

/* ---------- ページヒーロー（下層共通） ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: calc(var(--header-h) + 56px) 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(232, 115, 42, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.page-hero-eyebrow {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    letter-spacing: 0.15em;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    margin-bottom: 16px;
}
.page-hero-title {
    font-size: clamp(28px, 4vw, 40px);
    color: #fff;
    margin: 0;
}
.page-hero-meta {
    margin: 16px 0 0;
    font-size: 14px;
    opacity: 0.9;
}
.page-hero-meta .post-cat {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    margin-left: 8px;
}

/* ---------- パンくず ---------- */
.breadcrumb {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    font-size: 13px;
}
.bc-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.bc-item {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.bc-item:not(:last-child)::after {
    content: '›';
    color: var(--border);
    margin-left: 8px;
    font-size: 16px;
}
.bc-item a {
    color: var(--primary);
    text-decoration: none;
}
.bc-item a:hover {
    color: var(--accent);
    opacity: 1;
}
.bc-item span[aria-current] {
    color: var(--text);
    font-weight: 500;
}

/* ---------- ページ本文レイアウト ---------- */
.has-subpage { padding-top: 0; }
.page-content { padding: 64px 0; }
.page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.page-body {
    background: #fff;
    padding: 8px 0;
    line-height: 1.95;
}
.page-body h2 {
    font-size: clamp(22px, 2.6vw, 28px);
    color: var(--primary);
    margin: 48px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}
.page-body h2:first-child { margin-top: 0; }
.page-body h3 {
    font-size: 19px;
    color: var(--primary);
    margin: 32px 0 12px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
}
.page-body p { margin: 0 0 18px; }
.page-body ul, .page-body ol { margin: 0 0 18px; padding-left: 24px; list-style: revert; }
.page-body ul li, .page-body ol li { margin-bottom: 8px; line-height: 1.85; }
.page-body img { border-radius: var(--radius); margin: 16px 0; }
/* リンクカード内imgはマージン/角丸打ち消し（カード側で制御） */
.page-body .gallery__item img,
.page-body .work-card img,
.page-body .blog-card img,
.page-body .ig-cell img {
    margin: 0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.page-body strong { color: var(--primary); }
.page-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--bg-light);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
}
.post-eyecatch { margin-bottom: 32px; }
.post-eyecatch img { width: 100%; height: auto; border-radius: var(--radius-lg); }

/* ---------- 施工事例: 工程タイムライン ---------- */
/* リード文（抜粋） */
.works-summary {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text);
    background: var(--bg-light);
    padding: 20px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    margin: 0 0 36px;
}
/* インポート記事の wp:image / wp:paragraph を縦並びで統一 */
.works-timeline { display: flex; flex-direction: column; }
.works-timeline > figure,
.works-timeline > .wp-block-image {
    margin: 0 0 36px;
}
.works-timeline figure img,
.works-timeline .wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    display: block;
    margin: 0;
    box-shadow: var(--shadow-sm);
}
.works-timeline figcaption,
.works-timeline .wp-element-caption {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.7;
    text-align: left;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
}
.works-timeline p {
    margin: 0 0 28px;
    line-height: 1.95;
}
/* 連続する画像の間隔を視覚的にリズム化 */
.works-timeline > figure + figure,
.works-timeline > .wp-block-image + .wp-block-image {
    margin-top: 4px;
}
@media (max-width: 768px) {
    .works-summary { font-size: 15px; padding: 16px 18px; margin-bottom: 28px; }
    .works-timeline > figure,
    .works-timeline > .wp-block-image { margin-bottom: 28px; }
    .works-timeline figcaption,
    .works-timeline .wp-element-caption { font-size: 14px; }
}

/* サイドバー（CTA） */
.page-cta {
    background: var(--bg-light);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    position: sticky;
    top: calc(var(--header-h) + 16px);
}
.page-cta h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--primary);
}
.page-cta p {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.page-cta .btn { margin-bottom: 10px; padding: 14px 16px; font-size: 14px; }
.btn-line {
    background: #06c755;
    color: #fff;
}
.btn-line:hover { background: #05a847; opacity: 1; }

/* ブログ一覧 */
.pagination-wrap {
    margin-top: 48px;
    text-align: center;
}
.pagination-wrap .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    background: #fff;
    font-weight: 600;
    transition: background .2s;
}
.pagination-wrap .page-numbers.current {
    background: var(--primary);
    color: #fff;
}
.pagination-wrap .page-numbers:hover:not(.current) {
    background: var(--bg-light);
    opacity: 1;
}
.no-posts {
    text-align: center;
    padding: 64px 0;
    color: var(--text-muted);
}

/* ---------- Instagram グリッド（フォールバック） ---------- */
.section.instagram { background: #fafbfc; }
.ig-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.ig-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius);
    display: block;
}
.ig-cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s, filter .3s;
}
.ig-cell:hover img {
    transform: scale(1.06);
    filter: brightness(0.85);
}
.ig-cell .ig-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0;
    transition: opacity .3s;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ig-cell:hover .ig-icon { opacity: 1; }
.ig-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    background: #fff8ee;
    border: 1px dashed var(--accent-light);
    padding: 10px;
    border-radius: var(--radius);
    margin-top: 24px;
}
@media (max-width: 768px) {
    .ig-grid { grid-template-columns: repeat(3, 1fr); }
    .page-container { grid-template-columns: 1fr; }
    .page-cta { position: static; }
}

/* ---------- 会社概要テーブル ---------- */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 32px;
}
.company-table th, .company-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.company-table th {
    background: var(--bg-light);
    color: var(--primary);
    width: 30%;
    font-weight: 700;
}
@media (max-width: 640px) {
    .company-table th, .company-table td { display: block; width: 100%; }
    .company-table th { border-bottom: none; padding-bottom: 4px; }
    .company-table td { padding-top: 4px; }
}

/* ---------- 施工事例ギャラリー（一覧） ---------- */
.works-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 8px;
}
.works-archive-grid figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #fff;
    transition: transform .25s;
}
.works-archive-grid figure:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.works-archive-grid figure img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.works-archive-grid figcaption {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}
.works-archive-grid figcaption small {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    font-size: 12px;
}
@media (max-width: 768px) {
    .works-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Pillar Page風 アーカイブ導入文 */
.archive-intro {
    padding: 32px 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.archive-intro__inner {
    max-width: 800px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    text-align: center;
}
