:root {
    --bg-galaxy: radial-gradient(circle at 50% 50%, #0a0a2a 0%, #050515 50%, #020208 100%);
    --accent: #ffd700;
    --text: #ffffff;
    --sub-text: #d0d0e0;
    --font: 'Zen Maru Gothic', sans-serif;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* 崩れ防止の核心：すべての要素でパディングを含めて幅を計算 */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0; font-family: var(--font);
    background: var(--bg-galaxy); background-attachment: fixed;
    color: var(--text); overflow-x: hidden;
    /* 読みやすさ：大きな文字とゆったりした行間 */
    line-height: 2.0;
    letter-spacing: 0.04em;
    font-size: 18px; 
}

/* 背景演出：重なり順を制御 */
#star-field, #shooting-star-field { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle infinite ease-in-out; opacity: 0.3; }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.shooting-star {
    position: absolute; width: 2px; height: 2px;
    background: linear-gradient(90deg, white, transparent);
    animation: shoot linear forwards;
}
@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-45deg) scaleX(0); opacity: 1; }
    10% { transform: translateX(-100px) translateY(100px) rotate(-45deg) scaleX(50); }
    100% { transform: translateX(-600px) translateY(600px) rotate(-45deg) scaleX(50); opacity: 0; }
}

/* レイアウト */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 850px; }
.text-center { text-align: center; }

/* ヘッダー */
.site-header {
    position: fixed; top: 0; width: 100%; padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(5, 5, 21, 0.85); backdrop-filter: blur(12px); z-index: 100;
}
.header-logo a { font-size: 1.5rem; font-weight: 900; color: var(--accent); text-decoration: none; }
.header-nav { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
.header-nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; font-weight: 700; transition: 0.3s; }
.header-nav a:hover { color: var(--accent); }

/* ヒーロー */
.hero { height:100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-content h1 { font-size: 2.8rem; margin-bottom: 24px; line-height: 1.4; font-weight: 900; }
.hero-content p { font-size: 1.25rem; color: var(--sub-text); margin-bottom: 40px; }

/* セクション共通 */
.section { padding: 20px 0; position: relative; z-index: 1; }
.section-title { font-size: 2.4rem; margin-bottom: 60px; color: var(--accent); font-weight: 900; }

/* ガラスパネル：クリアランスを確保 */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    padding: 60px;
    margin-bottom: 40px;
}

/* 交互レイアウト */
.feature-item { display: flex; align-items: center; gap: 40px; margin-bottom: 80px; padding: 60px; box-sizing: border-box;}
.feature-item.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1.0; text-align: left; }
.feature-image { flex: 1.5; }
.feature-image img { width: 100%; height: auto; border-radius: 25px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); display: block;}

/* 文字サイズ */
.feature-text h3 { font-size: 1.8rem; margin-bottom: 20px; color: var(--accent); line-height: 1.3; }
.feature-text p { font-size: 1.2rem; line-height: 2.0;}

/* お母さんの悩み吹き出し */
.parent-worry-bubble {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.parent-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.bubble-content {
    position: relative;
    background: rgba(255, 107, 107, 0.1); /* 元の赤色を薄く半透明に */
    border: 1px solid rgba(255, 107, 107, 0.3);
    padding: 15px 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* 吹き出しのしっぽ（左側） */
.bubble-content::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid rgba(255, 107, 107, 0.1);
}

.bubble-content p {
    margin: 0;
    color: #ff6b6b; /* 文字色は元の赤色に */
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
}

/* リバースレイアウト時の吹き出し調整 */
.feature-item.reverse .parent-worry-bubble {
    flex-direction: row-reverse; /* アイコンを右に */
}

.feature-item.reverse .bubble-content {
    text-align: right; /* テキストを右寄せに */
}

.feature-item.reverse .bubble-content::after {
    left: auto;
    right: -10px;
    border-right: none;
    border-left: 10px solid rgba(255, 107, 107, 0.1); /* しっぽを右側に */
}

/* ミッション */
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.mission-card { padding: 50px; text-align: left; position: relative; }
.mission-num { font-size: 4rem; font-weight: 900; color: var(--accent); opacity: 0.1; position: absolute; top: 15px; right: 30px; }

/* ボタン */
.cta-button { display: inline-block; padding: 18px 45px; border-radius: 50px; text-decoration: none; font-weight: 900; transition: 0.3s; text-align: center; }
.cta-button.pulse { background: var(--accent); color: #000; animation: pulse 2s infinite; font-size: 1.1rem; }
.cta-button.secondary { border: 2px solid var(--text); color: var(--text); margin-right: 20px; }

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* フッター */
.site-footer { padding: 80px 0; border-top: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); }
.footer-links { margin-top: 30px; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.footer-links a { color: var(--sub-text); text-decoration: none; font-size: 0.95rem; }

/* レスポンシブ */
@media (max-width: 900px) {
    .feature-item, .feature-item.reverse { flex-direction: column; padding: 40px 25px; gap: 30px; }
    .hero-content h1 { font-size: 1.8rem; }
    .mission-grid { grid-template-columns: 1fr; }
    .glass-panel { padding: 40px 25px; }
    .feature-image {
        width: 100%;
    }
}

/* お知らせセクション独自の調整 */
.news-container {
    text-align: left;
}

.news-list li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);
}

.news-date {
    min-width: 100px;
    color: var(--accent);
}

/* =========================================
   スマートフォン・タブレット対応（レスポンスシブ）
========================================= */
@media (max-width: 900px) {
    /* 特徴セクションを縦並びに */
    .feature-item, .feature-item.reverse { 
        flex-direction: column; 
        padding: 40px 25px; 
        gap: 30px; 
    }
    .feature-text {
        text-align: left;
    }
    .feature-image {
        width: 100%;
    }
    
    /* レスポンシブ時の吹き出し調整 */
    .parent-worry-bubble {
        justify-content: center; /* アイコンと吹き出しを中央に */
    }
    
    .feature-item.reverse .parent-worry-bubble {
        flex-direction: row; /* 縦並び時はアイコンを左に戻す */
    }
    
    .feature-item.reverse .bubble-content {
        text-align: left; /* テキストを左寄せに戻す */
    }
    
    .feature-item.reverse .bubble-content::after {
        left: -10px; /* しっぽを左側に戻す */
        right: auto;
        border-left: none;
        border-right: 10px solid rgba(255, 107, 107, 0.1);
    }
}

@media (max-width: 768px) {
    /* 全体の余白と文字サイズ調整 */
    body { font-size: 16px; }
    .container { padding: 0 15px; }

    /* ヘッダー（メニューが折り返さないように調整） */
    .site-header { 
        flex-direction: column; 
        padding: 15px; 
        gap: 15px; 
    }
    .header-nav { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px 15px; /* 上下左右の隙間 */
    }

    /* ヒーローセクション（トップの大きな文字とボタン） */
    .hero { padding: 100px 15px 50px; }
    .hero-content h1 { 
        font-size: 1.6rem !important; /* HTMLの指定を上書き */
        line-height: 1.5 !important;
    }
    .hero-content p { 
        font-size: 1.1rem !important; 
    }
    .hero-cta { 
        display: flex;
        flex-direction: column; /* ボタンを縦並びに */
        gap: 15px; 
        margin-top: 30px;
    }
    .cta-button { 
        width: 100%; /* ボタンを画面幅いっぱいに */
        margin-right: 0 !important; 
        box-sizing: border-box; 
    }

    /* お知らせセクション */
    .news-container { padding: 25px !important; }
    .news-list li {
        flex-direction: column; /* 日付と内容を縦並びに */
        align-items: flex-start !important;
        gap: 5px !important;
    }

    /* 想い（ミッション）などのガラスパネル */
    .glass-panel { padding: 30px 20px !important; }
    #mission p { font-size: 1.1rem !important; }

    /* セクションタイトル */
    .section-title { font-size: 1.8rem; margin-bottom: 40px; }

    /* フッター */
    .site-footer { padding: 40px 0; }
    .footer-links { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    /* スマートフォン時のアイコンサイズ調整 */
    .parent-icon {
        width: 50px;
        height: 50px;
    }
    
    .bubble-content {
        padding: 10px 15px;
    }
    
    .bubble-content p {
        font-size: 1rem;
    }
}

/* ヒーロー画像のスタイル */
.hero-image-container {
    margin: 30px auto;
    max-width: 800px; /* 大きすぎないように調整 */
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); /* 奥行きを出す */
    border: 1px solid var(--glass-border);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.9; /* 少し背景と馴染ませる */
    transition: transform 0.5s ease;
}

/* スマホではマージンを少し狭く */
@media (max-width: 768px) {
    .hero-image-container {
        margin: 20px auto;
        border-radius: 12px;
    }
}

/* --- 追加：ヒーロー画像関連 --- */
.hero-image-container {
    margin: 40px auto;
    max-width: 90%; /* スマホで左右に少し余白を作る */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- 追加：中間CTAセクション --- */
.cta-mid {
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.free-reason {
    margin-top: 25px;
    font-size: 0.95rem;
    color: var(--sub-text);
    line-height: 1.8;
}

/* PCだけで改行するためのクラス */
.pc-only { display: block; }

/* --- スマホ向けの微調整（既存のメディアクエリ内に追加・修正） --- */
@media (max-width: 768px) {
    .hero-image-container {
        max-width: 100%; /* スマホでは横幅いっぱい */
        margin: 30px 0;
        border-radius: 10px;
    }

    .cta-mid {
        padding: 60px 15px;
    }

    .free-reason {
        font-size: 0.85rem; /* スマホでは文字を少し小さく */
        text-align: left;   /* 長い場合は左寄せの方が見やすい */
        display: inline-block;
    }

    .pc-only { display: none; } /* スマホでは改行を解除 */
}