/*
Theme Name:  Lightning Child
Description: Lightning 子テーマ - Seven Colors カスタムデザイン
Template:    lightning
Version:     1.1.0
Text Domain: lightning-child
*/

/* =============================================================
   CSS Custom Properties — Seven Colors 7色パレット
   ============================================================= */
:root {
    --c1: #E94B5C; /* 赤 */
    --c2: #F4972C; /* 橙 */
    --c3: #F6C445; /* 黄 */
    --c4: #7AC74F; /* 緑 */
    --c5: #3DB9C9; /* 水色 */
    --c6: #4A6FE5; /* 青 */
    --c7: #9B5DE5; /* 紫 */
    --sc-ink:  #2E2A26;
    --sc-bg:   #FDFBF7;
    --sc-soft: #FFF6E9;
    --sc-muted: #6b6258;
    --sc-border: #eee2d3;
    --sc-gradient: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7));
    --sc-gradient-diag: linear-gradient(135deg, var(--c6) 0%, var(--c7) 35%, var(--c1) 70%, var(--c2) 100%);
}

/* =============================================================
   Base — body / background
   ============================================================= */
body {
    line-height: 1.8;
    background-color: var(--sc-bg);
    color: var(--sc-ink);
}

/* =============================================================
   1. Sticky Header + 7色グラデーション下ボーダー
   Lightning の JS はスクロール後に body.header_scrolled → position:fixed
   に切り替えるが、それ以前から画面上部に固定したいため sticky を使用。
   border-image は border-bottom のみ設定することで下ラインだけ適用。
   ============================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.96) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 4px solid transparent;
    border-image: var(--sc-gradient) 1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

/* スクロール固定後も同じスタイルを維持 */
.header_scrolled .site-header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 4px solid transparent;
    border-image: var(--sc-gradient) 1;
}

/* 管理バー表示時のオフセット */
.admin-bar .site-header        { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header    { top: 46px; }
}

/* =============================================================
   2. ナビゲーション — フォントサイズ・ホバーカラー
   ============================================================= */
.global-nav-list > li > a {
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s;
}
.global-nav-list > li > a:hover {
    color: var(--c2);
}
.global-nav-list > li[class*="current"]:not(.menu-item-anchor) > a {
    border-bottom: 2px solid var(--c2);
    color: var(--c2);
}

/* =============================================================
   3. ロゴ画像の最大高さ（デスクトップ: 70px / モバイル: 60px）
   ============================================================= */
@media (min-width: 992px)       { .site-header-logo img { max-height: 70px; } }
@media (max-width: 991.98px)    { .site-header-logo img { max-height: 60px; } }

/* =============================================================
   4. セクション間余白（Gutenberg グループブロック直下のみ）
   ============================================================= */
.entry-body > .wp-block-group,
.entry-content > .wp-block-group {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* =============================================================
   5. ニュース一覧 — 均等3列グリッド
   VK Component が flex + col-lg-12（100%幅）のため CSS Grid で上書き
   ============================================================= */
@media (min-width: 992px) {
    .vk_posts-mainSection {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        margin-left: 0;
        margin-right: 0;
    }
    .vk_posts-mainSection > .vk_post { width: auto; margin-left: 0; margin-right: 0; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .vk_posts-mainSection {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-left: 0; margin-right: 0;
    }
    .vk_posts-mainSection > .vk_post { width: auto; margin-left: 0; margin-right: 0; }
}
@media (max-width: 575.98px) {
    .vk_posts-mainSection { display: flex; flex-direction: column; margin-left: 0; margin-right: 0; }
    .vk_posts-mainSection > .vk_post { width: 100%; margin-left: 0; margin-right: 0; }
}

/* =============================================================
   6. VK ボタン・カード — border-radius / hover アニメーション上書き
   ============================================================= */
/* ボタン */
.vk_button .vk_button_link.btn,
.wp-block-button .wp-block-button__link {
    border-radius: 30px !important;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.vk_button .vk_button_link.btn:hover,
.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none;
}

/* プライマリボタンのカラーを --c1 に統一 */
.vk_button .vk_button_link.btn-primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background-color: var(--c1);
    border-color: var(--c1);
}
.vk_button .vk_button_link.btn-primary:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background-color: #d03f50;
    border-color: #d03f50;
}

/* カード (VK Post component) */
.vk_post.card {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vk_post.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* =============================================================
   7. 見出し・リンクカラー — Lightning origin3 上書き
   Lightning は :where() (詳細度0) を使うため、クラス指定で確実に上書き可
   ============================================================= */
/* H2 の上部ボーダー (origin3 skin) → c1 に変更 */
h2:not(.wp-block-post-title):not(.sc-section-title):not(.sc-hero-title) {
    border-top-color: var(--c1);
}
/* H3 のアンダーライン */
h3:not(.wp-block-post-title)::after {
    border-bottom-color: var(--c1);
}
/* テキストリンクホバー */
.entry-body a:hover,
.entry-content a:hover {
    color: var(--c1);
}

/* フッター上ボーダーを7色グラデーションに */
.site-footer {
    border-top: 3px solid transparent;
    border-image: var(--sc-gradient) 1;
}

/* =============================================================
   8. 共通セクションユーティリティ（PHP テンプレートパーツで使用）
   ============================================================= */
.sc-section-head {
    text-align: center;
    margin-bottom: 48px;
}
.sc-section-head .sc-en {
    display: block;
    font-size: 0.8rem;
    letter-spacing: .2em;
    font-weight: 700;
    color: var(--c5);
    margin-bottom: 8px;
    text-transform: uppercase;
}
/* sc-section-title は PHP で <p> タグとして出力し、Lightning の h2 styling を回避 */
.sc-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0;
    color: var(--sc-ink);
}
.sc-section-head > p:last-child {
    margin-top: 12px;
    color: var(--sc-muted);
    font-size: 0.95rem;
}

/* 共通ボタン（カスタムセクション用） */
.sc-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}
.sc-btn-primary { background: #fff; color: var(--c1); }
.sc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    color: var(--c1);
    text-decoration: none;
}
.sc-btn-outline { border: 2px solid #fff; color: #fff; background: transparent; }
.sc-btn-outline:hover {
    background: #fff;
    color: var(--c6);
    text-decoration: none;
    transform: translateY(-2px);
}
.sc-btn-gradient {
    background: var(--c1);
    color: #fff;
}
.sc-btn-gradient:hover {
    background: #d03f50;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    text-decoration: none;
}

/* =============================================================
   9. ヒーローセクション
   ============================================================= */
.sc-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--sc-gradient-diag);
    overflow: hidden;
    padding: 80px 20px;
}
.sc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 40%),
        radial-gradient(circle at 15% 80%, rgba(255,255,255,.18), transparent 40%);
    pointer-events: none;
}
.sc-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}
.sc-hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,.22);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: .05em;
}
.sc-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.5;
    color: #fff;
    /* Lightning h2 スタイルを打ち消す */
    border: none !important;
    padding: 0 !important;
    background: none !important;
}
.sc-hero-subtitle {
    display: block;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 600;
    margin-top: 10px;
    opacity: .92;
}
.sc-hero-body {
    font-size: 1rem;
    margin-bottom: 32px;
    opacity: .95;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}
.sc-hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================================
   10. 7つの強みセクション
   ============================================================= */
.sc-strengths {
    background: var(--sc-soft);
    padding: 70px 20px;
}
.sc-strengths-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.sc-strength-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
@media (max-width: 575.98px) {
    .sc-strength-grid { grid-template-columns: 1fr; }
}
.sc-strength-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    border-top: 6px solid var(--sc-card-accent, var(--c1));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sc-strength-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.sc-strength-card:nth-child(1) { --sc-card-accent: var(--c1); }
.sc-strength-card:nth-child(2) { --sc-card-accent: var(--c2); }
.sc-strength-card:nth-child(3) { --sc-card-accent: var(--c3); }
.sc-strength-card:nth-child(4) { --sc-card-accent: var(--c4); }
.sc-strength-card:nth-child(5) { --sc-card-accent: var(--c5); }
.sc-strength-card:nth-child(6) { --sc-card-accent: var(--c6); }
.sc-strength-card:nth-child(7) { --sc-card-accent: var(--c7); }
.sc-strength-card .sc-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: var(--sc-card-accent, var(--c1));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}
/* Lightning の h3 スタイル（border-bottom + ::after）を打ち消す */
.sc-strength-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: none !important;
    padding: 0 !important;
    background: none !important;
    position: static !important;
}
.sc-strength-card h3::after { display: none !important; }
.sc-strength-card p { font-size: 0.88rem; color: var(--sc-muted); margin: 0; }

/* =============================================================
   11. CTA バナー
   ============================================================= */
.sc-cta {
    background: var(--sc-gradient);
    color: #fff;
    text-align: center;
    padding: 70px 20px;
}
.sc-cta-inner { max-width: 800px; margin: 0 auto; }
.sc-cta h2,
.sc-cta-title {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 800;
    margin-bottom: 14px;
    color: #fff;
    /* Lightning h2 スタイルを打ち消す */
    border: none !important;
    padding: 0 !important;
    background: none !important;
}
.sc-cta p { margin-bottom: 26px; opacity: .95; font-size: 1rem; }

/* =============================================================
   12. 就労継続支援B型事業セクション
   ============================================================= */
.sc-btype {
    background: var(--sc-soft);
    padding: 70px 20px;
}
.sc-btype-inner { max-width: 1100px; margin: 0 auto; }
.sc-btype-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 40px;
}
@media (max-width: 800px) { .sc-btype-grid { grid-template-columns: 1fr; gap: 32px; } }

/* 写真エリア */
.sc-btype-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.sc-photo-placeholder {
    background: #eee2d3;
    border-radius: 14px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9c9389;
    font-size: 0.82rem;
    text-align: center;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.sc-photo-placeholder.sc-photo-main {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}
.sc-btype-photos img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* 工賃テーブル見出し */
.sc-wage-heading {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--sc-ink);
    border: none !important;
    padding: 0 !important;
    background: none !important;
}
.sc-wage-heading::after { display: none !important; }

/* 工賃比較表 */
.sc-wage-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    margin-top: 20px;
}
.sc-wage-table th,
.sc-wage-table td {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.92rem;
    border: none;
}
.sc-wage-table thead th {
    background: linear-gradient(90deg, var(--c6), var(--c7));
    color: #fff;
    font-weight: 700;
}
.sc-wage-table tbody tr:nth-child(odd)  { background: var(--sc-soft); }
.sc-wage-table tbody tr:nth-child(even) { background: #fff; }
.sc-wage-table td.sc-amount {
    font-weight: 800;
    color: var(--c1);
    white-space: nowrap;
}

/* 注意書き */
.sc-wage-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--sc-muted);
    background: #fff;
    border-left: 4px solid var(--c4);
    padding: 14px 18px;
    border-radius: 8px;
    line-height: 1.7;
}
