/* ============================================
   AI活用学習ライブラリ - メインスタイル
   モバイルファーストデザイン
============================================ */

/* リセット & 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* カラーパレット - 図書館風の落ち着いた色調 */
    --primary-color: #2c3e50;
    --secondary-color: #8b7355;
    --accent-color: #d4a574;
    --text-color: #2d3436;
    --text-light: #636e72;
    --bg-color: #f5f3f0;
    --bg-light: #faf9f7;
    --border-color: #d4cfc7;
    --success-color: #6c9a8b;
    --warning-color: #c17767;
    
    /* タイポグラフィ - モバイル基準 */
    --font-main: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', 'Meiryo', sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    
    /* スペーシング - モバイル基準 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* ボーダー */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* シャドウ */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   ヘッダー - モバイル優先
============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.logo h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
    width: 100%;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}

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

/* ============================================
   ヒーローセクション - モバイル優先
============================================ */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3d566e 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 30px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

.stat-item i {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    background: var(--accent-color);
    color: var(--primary-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
    min-height: 48px;
    width: 100%;
    max-width: 320px;
}

.cta-button:active {
    background: #c89a64;
    transform: scale(0.98);
}

/* ============================================
   セクション共通 - モバイル優先
============================================ */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.section-title i {
    color: var(--secondary-color);
    font-size: 2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* ============================================
   ロードマップ - モバイル優先
============================================ */
.roadmap {
    background-color: var(--bg-light);
}

.stages {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.stage-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-left: 5px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.stage-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stage-card:active {
    transform: scale(0.98);
}

.stage-0 { border-left-color: #3498db; }
.stage-1 { border-left-color: #2ecc71; }
.stage-2 { border-left-color: #f39c12; }
.stage-3 { border-left-color: #9b59b6; }

.stage-header {
    margin-bottom: var(--spacing-md);
}

.stage-number {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.stage-0 .stage-number { background: #3498db; }
.stage-1 .stage-number { background: #2ecc71; }
.stage-2 .stage-number { background: #f39c12; }
.stage-3 .stage-number { background: #9b59b6; }

.stage-header h3 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin: var(--spacing-xs) 0;
    font-weight: 700;
}

.stage-tag {
    display: inline-block;
    background: var(--bg-color);
    color: var(--text-light);
    padding: 2px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.stage-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    font-size: 0.9rem;
}

.stage-topics {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.stage-topics li {
    padding: var(--spacing-xs) 0;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
}

.stage-topics li i {
    color: var(--success-color);
    margin-top: 4px;
    flex-shrink: 0;
}

.stage-footer {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.duration {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stage-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-height: 44px;
    width: 100%;
}

.stage-button:active {
    background: var(--secondary-color);
    transform: scale(0.98);
}

/* ============================================
   追加リソースセクション - モバイル優先
============================================ */
.additional-resources {
    background-color: var(--bg-color);
}

.resource-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.resource-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.resource-card:active {
    transform: scale(0.98);
    border-color: var(--accent-color);
}

.resource-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
}

.resource-icon i {
    font-size: 1.75rem;
    color: white;
}

.resource-card h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.resource-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   フッター - モバイル優先
============================================ */
.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
    padding: 4px 0;
    min-height: 32px;
    line-height: 1.5;
}

.footer-section ul li a:active {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ============================================
   タブレット (768px以上)
============================================ */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .container {
        max-width: 720px;
        padding: 0 var(--spacing-lg);
    }
    
    :root {
        --spacing-sm: 1rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    .main-nav a {
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        width: auto;
    }
    
    .section-title {
        font-size: 2.25rem;
        flex-direction: row;
    }
    
    .stages {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stage-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .stage-button {
        width: auto;
    }
}

/* ============================================
   デスクトップ (1024px以上)
============================================ */
@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .main-nav {
        gap: var(--spacing-md);
    }
    
    .main-nav a {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .stages {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .resource-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stage-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }
    
    .resource-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-color);
    }
    
    .cta-button:hover {
        background: #e4b584;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
    }
    
    .stage-button:hover {
        background: var(--secondary-color);
        transform: translateX(5px);
    }
}

/* ============================================
   大画面 (1200px以上)
============================================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-content {
        max-width: 800px;
    }
}
