/* ============================================
   BASE.CSS - 全ページ共通の基盤スタイル
   ============================================ */

/* --- CSS Variables (カスタムプロパティ) --- */
:root {
    /* カラーパレット */
    --color-primary: #4A90E2;
    --color-secondary: #7ED321;
    --color-text-dark: #333;
    --color-text-light: #666;
    --color-text-white: #ffffff;
    --color-background-dark: #1a1a1a;
    --color-background-light: #f5f5f5;

    /* スペーシング */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;

    /* フォントサイズ */
    --font-size-sm: 0.9em;
    --font-size-base: 1em;
    --font-size-lg: 1.2em;
    --font-size-xl: 1.5em;
    --font-size-2xl: 2em;
    --font-size-3xl: 3em;

    /* その他 */
    --border-radius-sm: 8px;
    --border-radius-md: 15px;
    --border-radius-lg: 20px;
    --transition-fast: 0.3s;
    --transition-normal: 0.4s;
    --transition-slow: 0.8s;
}

/* --- リセット/基本設定 --- */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--color-text-dark);
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6, p, ul, ol {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 共通背景設定 --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/back.svg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    pointer-events: none;
}

/* --- 共通レイアウトクラス --- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- 共通ページタイトルスタイル --- */
/* FAQ基準のタイトルスタイル - 全ページで統一 */
.main-title {
    font-size: 3em;
    margin-bottom: 15px;
    text-align: center;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 60px;
    text-align: center;
}

/* --- 共通ユーティリティクラス --- */
.text-center {
    text-align: center;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* --- フェードインアニメーション（共通） --- */
.fade-in-target {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow) ease-out, transform var(--transition-slow) ease-out;
}

.fade-in-target.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- モバイル対応: タッチターゲット --- */
@media (max-width: 768px) {
    /* すべてのボタンとリンクに最小タッチターゲットサイズを適用 */
    button,
    a,
    input[type="submit"],
    input[type="button"],
    .button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    /* テキストが長いリンクの場合はインラインブロックで表示 */
    a {
        display: inline-block;
    }

    /* word-break対策: 長い単語の折り返し */
    body {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* 画像のoverflow防止 */
    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    /* コンテナのoverflow防止 */
    .content-wrapper,
    section,
    main {
        max-width: 100%;
        overflow-x: hidden;
    }
}
