/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background-color: #1f2937;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav h1 {
    font-size: 1.4rem;
    margin-right: 2rem;
}

nav h1 a {
    color: white;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s;
    position: relative;
}

nav a:hover,
nav a.active {
    color: #60a5fa;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #60a5fa;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 1.5rem;
}

/* セクション共通 */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

.section-lead {
    text-align: center;
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 問題提起セクション */
.problem-statement {
    background: white;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.problem-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s;
}

.problem-card:hover {
    transform: translateY(-5px);
}

.problem-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.problem-card p {
    color: #6b7280;
}

/* 学習パス */
.learning-path {
    background: #f9fafb;
}

.path-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.path-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.path-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2rem;
    top: 4rem;
    bottom: -2rem;
    width: 2px;
    background: #e5e7eb;
}

.path-number {
    background: #667eea;
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.path-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.path-content h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.path-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.path-content ul {
    list-style: none;
    padding: 0;
}

.path-content li {
    color: #4b5563;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.path-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
}

/* 原則の概要 */
.principles-overview {
    background: white;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.principle-card {
    text-align: center;
    padding: 2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s;
}

.principle-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
}

.principle-icon {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.principle-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.principle-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.cta-button.primary {
    background: white;
    color: #667eea;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: white;
    color: #667eea;
}

/* 学習ページ用スタイル */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-intro {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.content-section {
    padding: 3rem 0;
    background: white;
}

.content-section + .content-section {
    border-top: 1px solid #e5e7eb;
}

.learning-content {
    max-width: 900px;
    margin: 0 auto;
}

.concept-box {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.concept-box h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.example-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.example-bad,
.example-good {
    border-radius: 12px;
    overflow: hidden;
}

.example-bad {
    border: 2px solid #ef4444;
}

.example-good {
    border: 2px solid #10b981;
}

.example-header {
    padding: 1rem;
    font-weight: bold;
}

.example-bad .example-header {
    background: #fee2e2;
    color: #dc2626;
}

.example-good .example-header {
    background: #d1fae5;
    color: #059669;
}

.code-block {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block pre {
    margin: 0;
}

.key-points {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin: 2rem 0;
}

.key-points h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.key-points ul {
    list-style: none;
    padding: 0;
}

.key-points li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.key-points li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3b82f6;
}

/* ナビゲーション */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-button:hover {
    background: #764ba2;
    transform: translateX(5px);
}

.nav-button.prev:hover {
    transform: translateX(-5px);
}

/* フッター */
footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer p:last-child {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .example-comparison {
        grid-template-columns: 1fr;
    }
    
    .path-item {
        flex-direction: column;
    }
    
    .path-item::after {
        left: 2rem;
    }
}