/* ==============================================
   基本設定と変数 (Base & Variables)
   ============================================== */
:root {
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --light-bg-color: #f9fafb;
    /* ← この色も確認 */

    --primary-color: #10B981;
    --primary-dark-color: #059669;
    --primary-light-color: #d1fae5;
    /* ← 現在使われている薄い緑 */

    --muted-color: #6b7280;
    --border-color: #e5e7eb;
    --font-family-base: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container.narrow {
    max-width: 800px;
}

/* ==============================================
   ヘッダー (Header)
   ============================================== */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.brand-logo {
    flex-shrink: 0;
}

.brand-logo img {
    height: 32px;
    /* ← ここの数値を小さくします（例: 28px） */
    width: auto;
    display: block;
}

.desktop-nav {
    display: none;
}

.desktop-nav a {
    margin: 0 16px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1100;
}

.hamburger-menu span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 1200;
    padding: 60px 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.menu-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar nav li a {
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 15px 0;
    display: block;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.sidebar-overlay.is-open {
    opacity: 1;
    visibility: visible;
}


/* ==============================================
   言語切り替え (Language Switcher)
   ============================================== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
}

.desktop-lang-switcher {
    display: none;
    margin-right: 24px;
}

.lang-switcher a {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--muted-color);
    padding: 5px;
    transition: color 0.3s;
    text-decoration: none;
}

.lang-switcher a.active {
    color: var(--primary-color);
}

.lang-switcher span {
    color: var(--border-color);
    font-size: 1rem;
}


/* ==============================================
   ボタン (Buttons)
   ============================================== */
.btn {
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.btn-primary:hover {
    background-color: var(--primary-dark-color);
}

.btn.btn-secondary {
    background-color: var(--bg-color);
    color: white;
    border-color: var(--primary-color);
}

.btn.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn.contact-btn {
    display: none;
}

/* ==============================================
   セクション共通スタイル (Section Commons)
   ============================================== */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light-bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--muted-color);
    margin: 0 auto;
    max-width: 600px;
}

/* ==============================================
   各セクションのスタイル (Individual Sections)
   ============================================== */


/* ==============================================
   ヒーローセクション (Hero Section)
   ============================================== */
.hero {
    /* min-height: 100vh; */
    /* 画面いっぱいの高さ */
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;

    /* ★変更点: 白から薄い緑へのシンプルなグラデーション背景 */
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary-light-color) 100%);
    color: var(--text-color);
    /* 文字色を黒に */
}

/* ヒーローセクションのメインコンテンツ */
.hero-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
    z-index: 1;
    /* コンテンツが背景の上にくるように */
    background-image: url('/images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 背景画像の上に白いオーバーレイを追加 */
.hero-main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: -1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin: 0 0 24px;
    font-weight: 700;
    white-space: pre-wrap;
    color: var(--text-color);
}

.hero-content p {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-color);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 24px auto 0;
}

.hero-buttons .btn {
    padding: 8px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-buttons .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-buttons .btn.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-buttons .btn.btn-primary:hover {
    background-color: var(--primary-dark-color);
}

.hero-buttons .btn.btn-secondary {
    background-color: transparent;
    border-color: var(--primary-color);
}

.hero-buttons .btn.btn-secondary:hover {
    background-color: var(--primary-light-color);
}

.hero-illustration {
    max-width: 500px;
    margin: 0 auto;
}

/* ヒーローセクション下部の事業紹介エリア */
.hero-businesses {
    background-color: var(--light-bg-color);
    padding: 40px 0;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
}

.hero-businesses-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 32px;
    color: var(--text-color);
}

.hero-businesses .services-grid {
    margin-bottom: 32px;
}

.hero-businesses .service-card {
    background-color: var(--bg-color);
    backdrop-filter: none;
    border-color: var(--border-color);
    color: var(--text-color);
}

.hero-businesses .service-card:hover {
    background-color: var(--bg-color);
}

.hero-businesses .service-card p {
    color: var(--muted-color);
}

.hero-businesses-inquiry {
    font-size: 0.9rem;
    color: var(--text-color);
}

.hero-businesses-inquiry a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
}

.hero-businesses-inquiry a:hover {
    text-decoration: none;
}

.hero-illustration {
    /* max-widthを画面幅の割合で指定し、大きすぎないようにする */
    max-width: 80vw;
    /* 画面幅の80%に制限 */
    margin: 32px auto 0;
    /* 上部に少し余白を追加 */
    text-align: center;
    /* 中の画像を中央揃え */
}

/* ★追加: hero-illustration内の画像を制御 */
.hero-illustration img,
.hero-illustration picture {
    max-width: 100%;
    /* 親要素(hero-illustration)からはみ出さない */
    height: auto;
    /* アスペクト比を維持 */
    display: block;
    /* 中央揃えを有効にするため */
}


/* --- Service Overview & Others --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-card {
    background-color: var(--bg-color);
    padding: 32px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.service-card .image-placeholder,
.service-card picture {
    display: block;
    margin: 0 auto 20px;
    width: 60px;
    height: 60px;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-card h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.service-card p {
    margin: 0;
    color: var(--muted-color);
}


/* --- Researchers & Participants Section --- */
.feature-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.feature-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.feature-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    text-align: left;
    /* リスト自体は左揃えの方が見やすい */
    display: inline-block;
    /* text-align:leftを有効にするため */
}

.feature-content li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.feature-content li::before {
    content: '✔';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-image {
    max-width: 500px;
    margin: 0 auto;
}

/* --- Team Section --- */
.team-list {
    border-top: 1px solid var(--border-color);
}

.team-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px;
    border-bottom: 1px solid var(--border-color);
}

.team-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.team-item-title {
    color: var(--muted-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.team-item-affiliation {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
}

.team-item-socials {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    margin-left: 16px;
}

.team-item-socials a {
    display: block;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.team-item-socials a:hover {
    opacity: 1;
}

.team-item-socials img,
.team-item-socials svg {
    width: 24px;
    height: 24px;
}

/* --- Company Profile Section --- */
.company-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.company-table th {
    width: 40%;
    font-weight: 500;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}


/* --- Image Placeholders --- */
.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
}

/* --- Footer --- */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--muted-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer-contact {
    margin-bottom: 24px;
}

.footer-contact p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.footer-contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.copyright {
    margin: 0;
}


/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transform: translateY(30px);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* ==============================================
   PC向けスタイル (Desktop Styles - 992px and up)
   ============================================== */
@media (min-width: 992px) {
    .section {
        padding: 120px 0;
    }

    .section-header h2 {
        font-size: 2.8rem;
    }

    .hamburger-menu {
        display: none;
    }

    .desktop-nav,
    .btn.contact-btn,
    .desktop-lang-switcher {
        display: flex;
    }

    .hero-main-content {
        padding: 40px;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "content"
            "buttons";
        gap: 40px 60px;
        text-align: center;
    }

    .hero-content {
        grid-area: content;
    }

    .hero-buttons {
        grid-area: buttons;
        flex-direction: row;
        max-width: 720px;
        margin: 20px 0 0;
    }

    .hero-buttons .btn {
        flex: 1 1 0;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    #service-overview .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    #upcoming-features .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-businesses .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    .feature-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .feature-layout.reverse .feature-content {
        order: 2;
    }

    .feature-layout.reverse .feature-image {
        order: 1;
    }

    .team-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 32px;
    }

    .company-table th {
        width: 30%;
    }
}