/* ==========================================================================
   共通テーマ・基本設定
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

/* IDを持つ要素（ページ内リンクのジャンプ先）すべてにナビゲーションバー分の余白を確保 */
[id] {
    scroll-margin-top: 80px;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   ヘッダー・ナビゲーション・フッター（全ページ共通）
   ========================================================================== */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

h1.header-title {
    color: white;
    margin: 0;
    font-size: 2rem;
    letter-spacing: 2px;
    line-height: 1;
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    background-color: var(--secondary-color);
    padding: 12px 0;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    font-size: 0.9rem;
    color: #7f8c8d;
    background-color: #e9ecef;
}

/* ==========================================================================
   レイアウト・共通パーツ
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container-small {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.page-title {
    color: var(--secondary-color);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    padding-bottom: 15px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
}

/* ==========================================================================
   【ホーム（index.html）用】固有スタイル
   ========================================================================== */
.hero {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    margin-bottom: 50px;
}

.hero h2 {
    border: none;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.store-badge {
    display: inline-block;
    padding: 14px 32px;
    background-color: #000;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.store-badge:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.section-title {
    color: var(--secondary-color);
    text-align: center;
    font-size: 1.8rem;
    margin: 60px 0 40px;
    padding-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.feature-card h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
    line-height: 1.2;
}

.feature-card p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
}

.feature-card ul {
    padding-left: 20px;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

.feature-card li {
    margin-bottom: 10px;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: baseline;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 20px;
    min-width: 100px;
}

/* ==========================================================================
   【開発裏話（story.html）用】固有スタイル
   ========================================================================== */
.highlight-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box p {
    margin: 0;
    font-style: italic;
    color: #555;
}

.card h2 {
    color: #2c3e50;
    font-size: 1.4rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.card p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: #444;
}

.card ul {
    padding-left: 24px;
}

.card li {
    margin-bottom: 8px;
}

/* ==========================================================================
   【プライバシーポリシー（privacy_policy.html）用】固有スタイル
   ========================================================================== */
.notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: bold;
    color: #856404;
}

.intro {
    font-weight: bold;
    margin-bottom: 30px !important;
}

/* ==========================================================================
   【お問い合わせ（contact.html）用】固有スタイル
   ========================================================================== */
.form-placeholder {
    background-color: #f1f2f6; 
    padding: 60px 20px; 
    border: 2px dashed #a4b0be; 
    border-radius: 8px; 
    color: #7f8fa6;
}

/* ==========================================================================
   【シチュエーション一覧（situations.html）用】固有スタイル
   ========================================================================== */
.age-group-section {
    margin-bottom: 60px;
    padding-top: 20px;
}

.age-group-title {
    color: var(--secondary-color);
    font-size: 1.6rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 25px;
}

.mode-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 20px 0 15px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

.situation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.sit-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e1e8ed;
}

.sit-image-container {
    width: 100%;
    height: 160px;
    background-color: #e1e8ed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sit-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sit-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.sit-card-desc {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

.update-time {
    text-align: center;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: bold;
    margin-top: -20px;
    margin-bottom: 20px;
    background-color: #e8f4f8;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.update-time-container {
    text-align: center;
}

.page-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.page-nav-link {
    background-color: #f1f2f6;
    color: var(--secondary-color);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-nav-link:hover {
    background-color: #dfe4ea;
    transform: translateY(-2px);
}

/* ==========================================================================
   レスポンシブ対応（スマホ画面）
   ========================================================================== */
@media (max-width: 768px) {
    .news-list li {
        flex-direction: column;
    }
    .news-date {
        margin-bottom: 8px;
    }
    .hero h2 {
        font-size: 1.8rem;
    }
}
