:root {
    --main: #28a745;
    --dark: #222;
    --light: #fff;
    --bg: #fbfbf0;
    --radius: 12px;
}

/* =====================
   基本設定
===================== */
body {
    margin: 0;
    font-family: "Hiragino Kaku Gothic Pro", "メイリオ", sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: linear-gradient(270deg, #dfffe0, #f9fdf8, #dfffe0);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

a {
    color: var(--main);
    text-decoration: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* =====================
   ヘッダー
===================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #ddd;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--main);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: #555;
}

/* ナビ */
.main-nav a {
    margin: 0 12px;
    font-size: 0.95rem;
    color: #000;
}

/* ハンバーガー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 3000;
}

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #000;
        border-radius: 2px;
    }

/* =====================
   トップ表示
===================== */
.top-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.top-video,
.top-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.top-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1);
}

.top-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--light);
    text-align: center;
}

/* =====================
   ボタン
===================== */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--main);
}

.btn-primary {
    background: var(--main);
    color: var(--light);
}

.ghost {
    background: transparent;
    color: var(--main);
}

/* =====================
   スライダー
===================== */
.news-slider,
.initiatives-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.news-item,
.initiative-item {
    scroll-snap-align: start;
    background: #fff;
    border-radius: 10px;
}

.news-item {
    flex: 0 0 300px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.initiative-item {
    flex: 0 0 300px;
    height: 300px;
    overflow: hidden;
    position: relative;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.2);
}

    .initiative-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.initiative-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-weight: bold;
    background: rgba(0,0,0,0.4);
    padding: 5px 10px;
    border-radius: 5px;
}

/* スクロールバー非表示 */
.news-slider::after,
.initiatives-slider::after {
    content: "→";
    position: sticky;
    right: 6px;
    align-self: center;
    font-size: 1.4rem;
    color: rgba(0,0,0,0.3);
    pointer-events: none;
}


/* =====================
   セクション
===================== */
.section {
    padding: 20px 0;
}

.card-section {
    background: #fff;
    padding: 30px 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 30px auto;
}

/* =====================
   受賞・年表
===================== */
.year-block {
    margin: 1.5em 0;
    padding: 1em;
    border-left: 5px solid #2f6f3a;
    background: #fafafa;
}

.award-list details {
    margin-bottom: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.6em;
    background: #fafafa;
}

.award-list summary {
    font-weight: bold;
    cursor: pointer;
}

.award-society {
    color: #b30000;
    font-weight: bold;
}

.award-encourage {
    color: #1a7f37;
    font-weight: bold;
}

/* =====================
   フッター
===================== */
.site-footer {
    background: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* =====================
   背景昆虫
===================== */
.free-insect {
    position: fixed;
    width: 60px;
    pointer-events: none;
    z-index: 1;
}

/* =====================
   トップへ戻る（イモリ）
===================== */
#scrollTopBtn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

    #scrollTopBtn.show {
        opacity: 1;
        pointer-events: auto;
    }

    #scrollTopBtn:hover {
        transform: translateY(-6px) scale(1.1);
    }

/* =====================
   レスポンシブ
===================== */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        right: 0;
        top: 100%;
        background: #fff;
        width: 200px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

        .main-nav.active {
            display: flex;
        }

    .hamburger {
        display: flex;
    }
}

/* =====================
   関連企業 横スクロール
===================== */

.related-company-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0;
}

    /* スクロール誘導（既存sliderと同じ思想） */
    .related-company-slider::after {
        content: "→";
        position: sticky;
        right: 6px;
        align-self: center;
        font-size: 1.4rem;
        color: rgba(0,0,0,0.3);
        pointer-events: none;
    }

.related-company-item {
    flex: 0 0 auto;
    min-width: 220px;
    scroll-snap-align: start;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

    /* リンク */
    .related-company-item a {
        display: block;
        color: var(--dark);
        font-size: 0.95rem;
        font-weight: 500;
    }

    /* hover */
    .related-company-item:hover {
        background: #e9f7ec;
    }


    /* 関連企業リンク */
    .related-company-item img {
        max-width: 100%; /* カード幅を超えない */
        max-height: 60px; /* 高さを制限 */
        object-fit: contain; /* 縮小して収まる */
    }
/* バックへ戻るの白い点を消す */
#backToTop {
    background: none;
    border: none;
    padding: 0;
}

