/* home-style.css */

/* 基本設定 */
:root {
    --primary-color: #0056b3; /* 信頼感のある青 */
    --secondary-color: #4CAF50; /* アクセントの緑 */
    --text-color: #333;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --gray: #f4f4f4;
    --light-gray: #e0e0e0;
    --dark-gray: #555;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

/* ヒーローセクション */
.hero {
    /* パフォーマンス向上のため、背景色は先に読み込み、画像は後からJSで読み込む */
    background-color: #343a40; /* 画像が読み込まれるまでの仮の背景色 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 背景を固定してスクロール時に視差効果を出す */
    text-align: center;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.hero.bg-loaded {
    background-image: url('image/home_top.webp');
    transition: background-image 0.5s ease-in-out; /* 画像がふわっと表示される効果 */
}

.hero-content {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.75); /* 半透明の白い背景 */
    -webkit-backdrop-filter: blur(8px); /* Safari用のぼかし効果 */
    backdrop-filter: blur(8px); /* 背景のぼかし効果（フロストガラス） */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: var(--text-color); /* 背景が白くなったため、テキストの色を濃く変更 */
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
    display: inline-block;
}

.cta-button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

/* セクション共通スタイル */
.features, .how-to-use, .recommend, .science, .cta-section {
    padding: 80px 20px;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

/* 特徴セクション */
.features {
    background-color: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr; /* モバイルでは1列表示がデフォルト */
    gap: 40px;
    max-width: 960px; /* 2列表示に適した最大幅に調整 */
    margin: 0 auto;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 画面幅が768px以上で2列表示（2x2のレイアウト） */
    }
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* 使い方セクション */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 60px;
}

/* こんな方にオススメセクション */
.recommend {
    background-color: var(--white);
}

.recommend-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.recommend-container ul {
    list-style: none;
    padding: 0;
}

.recommend-container li {
    background-color: var(--bg-color);
    padding: 15px 20px 15px 50px;
    margin-bottom: 15px;
    border-radius: 8px;
    position: relative;
    font-size: 1.05rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.recommend-container li::before {
    content: '✔';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-weight: 700;
}

/* 科学的有用性セクション */
.science {
    background-color: var(--bg-color);
}

.science-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.science-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.science-card h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

/* CTAセクション */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
}

.cta-section .section-title::after {
    background-color: var(--white);
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-button-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    display: inline-block;
}

.cta-button-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

/* フッター */
.site-footer {
    background-color: #222;
    color: #aaa;
    padding: 60px 20px 40px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav {
    margin-bottom: 40px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
}

.footer-nav a {
    color: #ddd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--white);
}

.copyright {
    font-size: 0.9rem;
    margin: 0;
    padding-top: 30px;
    border-top: 1px solid #444;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero {
        /* モバイルでの視差効果を無効化し、背景のズーム問題を解消 */
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .steps-container {
        flex-direction: column;
        align-items: center;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    .science-container {
        grid-template-columns: 1fr;
    }
}