/* ==================================== */
/* トップページ専用スタイル（/jp/ /en/ の index のみで読み込む） */
/* base.css / site-light.css の後に適用           */
/* ==================================== */

.home-main {
    --home-purple: var(--lp-light-purple, #1F0D68);
    --home-purple-bright: var(--lp-light-purple-bright, #2A1585);
    --home-text: var(--lp-light-text, #2a2a35);
    --home-muted: #5b5f6e;
    --home-border: var(--lp-light-border, #e5e7eb);
    --home-bg-tint: #f6f5fb;
    padding-bottom: 0;
}

/* 見出しの既定（下線・余白）を打ち消す */
.home-main h1,
.home-main h2,
.home-main h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.home-arrow {
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.2s;
}

a:hover > .home-arrow {
    transform: translateX(3px);
}

/* ===== ボタン ===== */
.home-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.lp-theme-light .home-btn-primary {
    background: var(--home-purple);
    color: #fff;
    padding: 12px 34px;
    font-size: 16px;
}

.lp-theme-light .home-btn-primary:hover {
    background: var(--home-purple-bright);
    color: #fff;
}

.lp-theme-light .home-btn-outline {
    border: 1px solid var(--home-purple);
    color: var(--home-purple);
    padding: 6px 20px;
    font-size: 13px;
}

.lp-theme-light .home-btn-outline:hover {
    background: var(--home-purple);
    color: #fff;
}

/* 主ボタンと同じ大きさの白地＋紫枠（ヒーローの2つ目の導線） */
.lp-theme-light .home-btn-secondary {
    background: #fff;
    border: 1px solid var(--home-purple);
    color: var(--home-purple);
    padding: 11px 33px;
    font-size: 16px;
}

.lp-theme-light .home-btn-secondary:hover {
    background: var(--home-purple);
    color: #fff;
}

/* ===== ヒーロー ===== */
body:has(header.site-light-header) .hero.home-hero {
    margin-bottom: 0;
}

/* キャッチは置かず、ロゴ → 正式名称ロゴ → 説明文 → 団体概要・活動内容ボタンで構成 */
.hero.hero-newlogo.home-hero .hero-logo img.home-logo-compact {
    width: 220px;
    max-width: 100%;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    body:has(header.site-light-header) .hero.hero-newlogo.home-hero {
        padding-top: 96px;
        padding-bottom: 96px;
    }
}

/* .hero は中央寄せの flex なので、中身が縮んで 95% 幅で折り返さないよう幅を固定 */
.hero.home-hero > .hero-content {
    width: 100%;
}

.hero.hero-newlogo.home-hero .hero-text {
    max-width: 960px;
}

.hero.hero-newlogo.hero-light .hero-text p {
    font-size: 16px;
    color: var(--home-text);
    font-weight: 400;
    text-shadow: none;
}

.hero.hero-newlogo .hero-text .home-hero-action {
    margin: 28px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
}

.hero.hero-newlogo .hero-text .home-org-name {
    margin: 0 0 32px;
    line-height: 0;
}

.hero.hero-newlogo .hero-text .home-org-name img {
    display: inline-block;
    width: 400px;
    max-width: 100%;
    height: auto;
}

.hero.hero-newlogo.hero-light .hero-text .home-lead {
    font-size: 16px;
    line-height: 2;
    margin: 0 0 16px;
}

.hero.hero-newlogo.hero-light .hero-text .home-lead:last-of-type {
    margin-bottom: 0;
}

/* ===== セクション共通（背景は画面幅いっぱい・中身は 1120px） ===== */
.home-section {
    margin: 0 calc(-50vw + 50%);
    padding: 64px 40px;
}

.home-section:nth-of-type(even) {
    background: var(--home-bg-tint);
}

.home-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.home-eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--home-purple);
}

.home-eyebrow::after {
    content: "";
    width: 56px;
    height: 1px;
    background: var(--home-purple);
    opacity: 0.5;
}

.home-main .home-heading {
    font-weight: 700;
    font-size: 30px;
    letter-spacing: 0.02em;
    margin: 0;
    color: var(--home-purple);
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 28px;
}

.lp-theme-light .home-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--home-purple);
    text-decoration: none;
    white-space: nowrap;
}

/* ===== バッジ ===== */
.home-badge {
    display: inline-block;
    background: var(--home-purple);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 14px;
    border-radius: 999px;
}

/* ===== 主な活動 ===== */
.home-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.home-activity-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(31, 13, 104, 0.08);
}

.home-thumb {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* 写真が届くまでの仮表示 */
.home-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7e5f0;
    color: #8b87a3;
    font-size: 13px;
    letter-spacing: 0.1em;
}

.home-activity-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    padding: 0 20px 20px;
}

/* バッジを写真の下端に少し重ねる */
.home-activity-body .home-badge {
    margin-top: -12px;
    margin-bottom: 12px;
}

.home-main .home-activity-title {
    font-size: 17px;
    line-height: 1.5;
    color: var(--home-purple);
    margin: 0 0 8px;
}

.home-activity-meta {
    font-size: 14px;
    color: var(--home-muted);
    margin: 0 0 16px;
}

.home-activity-meta span {
    margin-left: 1em;
}

.home-activity-body .home-btn {
    margin-top: auto;
}

/* ===== 今後のイベント（主な活動の下に置く補足ブロック） ===== */
.home-upcoming {
    margin-top: 48px;
}

.home-main .home-subheading {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.02em;
    color: var(--home-purple);
    margin: 0 0 16px;
}

.home-main .home-subheading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--home-border);
}

.home-upcoming-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lp-theme-light .home-upcoming-card {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--home-text);
    border: 1px solid var(--home-border);
    box-shadow: 0 4px 14px rgba(31, 13, 104, 0.06);
    transition: box-shadow 0.2s;
}

.lp-theme-light .home-upcoming-card:hover {
    box-shadow: 0 8px 22px rgba(31, 13, 104, 0.14);
}

.home-upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 104px;
    padding-right: 20px;
    border-right: 1px solid var(--home-border);
    color: var(--home-purple);
    line-height: 1.2;
}

.home-upcoming-date .y {
    font-size: 13px;
}

.home-upcoming-date .md {
    font-size: 28px;
    font-weight: 600;
    margin: 4px 0;
    white-space: nowrap;
}

.home-upcoming-date .md small {
    font-size: 16px;
}

.home-upcoming-date .w {
    font-size: 12px;
}

.home-upcoming-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.home-upcoming-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--home-purple);
    line-height: 1.5;
}

.home-upcoming-venue {
    font-size: 13px;
    color: var(--home-muted);
}

.home-upcoming-note {
    font-size: 13px;
    font-weight: 700;
    color: var(--home-purple);
}

.home-upcoming-arrow {
    color: var(--home-purple);
    font-size: 20px;
    flex-shrink: 0;
}

/* ===== 参画企業（全社同サイズ・ランク名なし） ===== */
.home-logo-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 24px;
}

.home-logo-grid li {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc((100% - 96px) / 5);
    height: 72px;
    container-type: inline-size;
}

/*
 * 画像全体ではなく「主ロゴ部分」の見た目の大きさが揃うよう、社ごとに表示幅を指定する。
 * --logo-w は 200px 枠のときの画像幅（透明余白込み）。枠が狭い画面では li 幅に比例して縮む。
 * 主ロゴ（日立ハイテクの社名行・AGC のタグラインを除く）の文字高と面積を基準に算出し、目視で微調整済み。
 * 画像の切り取り・変形はしない（NGK は規程の余白を画像に焼き込み済みでトリミング禁止）。
 */
.home-logo-grid img {
    width: calc(var(--logo-w, 160) * min(1px, 0.5cqw));
    max-width: none;
    height: auto;
    /* 白地入りのロゴ（日立ハイテク等）を背景色になじませる */
    mix-blend-mode: multiply;
}

.home-logo-grid img[src$="/horiba.png"] { --logo-w: 199; }
.home-logo-grid img[src$="/hitachi_seisakusyo.png"] { --logo-w: 194; }
.home-logo-grid img[src$="/JEOL.png"] { --logo-w: 139; }
.home-logo-grid img[src$="/shimadzu_symbol.png"] { --logo-w: 244; }
.home-logo-grid img[src$="/hitachi_hitech.png"] { --logo-w: 194; }
.home-logo-grid img[src$="/ppes.png"] { --logo-w: 188; }
.home-logo-grid img[src$="/ngk.png"] { --logo-w: 189; }
.home-logo-grid img[src$="/agc.png"] { --logo-w: 138; }
.home-logo-grid img[src$="/resonac.png"] { --logo-w: 176; }

/* ===== NEWS ===== */
.home-news-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}

.home-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--home-border);
}

.home-news-list li {
    border-bottom: 1px solid var(--home-border);
}

.lp-theme-light .home-news-list a {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 4px;
    text-decoration: none;
    color: var(--home-text);
}

.lp-theme-light .home-news-list a:hover .home-news-title {
    color: var(--home-purple);
    text-decoration: underline;
}

.home-news-list time {
    font-size: 14px;
    color: var(--home-muted);
    white-space: nowrap;
}

.home-news-cat {
    flex: 0 0 64px;
    text-align: center;
    background: var(--home-purple);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 0;
    border-radius: 2px;
}

.home-news-title {
    flex: 1;
    font-size: 15px;
}

.home-news-list .home-arrow {
    color: var(--home-purple);
}

.home-news-all {
    text-align: right;
    margin: 16px 0 0;
}

/* ===== タブレット ===== */
@media (max-width: 1023px) {
    .home-activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-upcoming-list {
        grid-template-columns: 1fr;
    }

    .home-logo-grid li {
        flex-basis: calc((100% - 48px) / 3);
    }
}

/* ===== モバイル ===== */
@media (max-width: 767px) {
    .hero.hero-newlogo.hero-light .hero-text .home-lead {
        font-size: 15px;
        text-align: left;
    }

    .home-br-pc {
        display: none;
    }

    .home-section {
        padding: 48px 20px;
    }

    .home-main .home-heading {
        font-size: 24px;
    }

    .home-news-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .home-activity-grid {
        grid-template-columns: 1fr;
    }

    .home-section-head {
        flex-wrap: wrap;
    }

    .lp-theme-light .home-upcoming-card {
        padding: 16px;
        gap: 14px;
    }

    .home-upcoming-date {
        flex-basis: 76px;
        padding-right: 14px;
    }

    .home-upcoming-date .md {
        font-size: 22px;
    }

    .home-logo-grid li {
        flex-basis: calc((100% - 24px) / 2);
        height: 60px;
    }

    .lp-theme-light .home-news-list a {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .home-news-title {
        flex-basis: 100%;
        order: 3;
    }

    .home-news-list .home-arrow {
        display: none;
    }
}
