/* リセット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: #2c3e50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px 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.5rem;
    margin-right: 2rem;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    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: #3498db;
}

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

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

.hero-content {
    max-width: 900px;
    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;
}

/* スケール視覚化 */
.scale-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.scale-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.scale-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.scale-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.scale-label {
    font-size: 1.1rem;
}

.scale-arrow {
    font-size: 2rem;
    opacity: 0.6;
}

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

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

/* アプローチセクション */
.approach-section {
    background: white;
}

.approach-explanation {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

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

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

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

.benefit-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.benefit-card p {
    color: #6c757d;
}

/* 学習構造 */
.learning-structure {
    background: #f8f9fa;
}

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

.structure-level {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.structure-level:hover {
    transform: translateY(-5px);
}

.level-header {
    background: #3498db;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.level-number {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.level-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.level-content {
    padding: 2rem;
}

.level-content p {
    color: #555;
    margin-bottom: 1rem;
}

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

.level-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #6c757d;
}

.level-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #3498db;
}

/* スケール例 */
.scale-examples {
    background: white;
}

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

.scale-example {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.scale-example h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.code-preview {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    overflow-x: auto;
}

.code-preview pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

/* 価値グリッド */
.why-important {
    background: #f8f9fa;
}

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

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

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

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.value-card p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 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: #3498db;
    color: white;
}

.cta-button.primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.cta-button.secondary:hover {
    background: white;
    color: #2c3e50;
}

/* 学習ページ用スタイル */
.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0;
}

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

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

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

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

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

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

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

.scale-progression {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.progression-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    flex: 1;
    min-width: 150px;
}

.progression-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.progression-arrow {
    font-size: 2rem;
    color: #3498db;
}

.example-grid {
    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 #e74c3c;
}

.example-good {
    border: 2px solid #27ae60;
}

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

.example-bad .example-header {
    background: #ffeef0;
    color: #c0392b;
}

.example-good .example-header {
    background: #e8f8f5;
    color: #229954;
}

.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    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: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1.5rem;
    margin: 2rem 0;
}

.key-points h4 {
    color: #1976d2;
    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: #2196f3;
}

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

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

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

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

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

footer p {
    margin-bottom: 0.5rem;
}

footer p:last-child {
    color: #95a5a6;
    font-size: 0.875rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .scale-visualization {
        flex-direction: column;
    }
    
    .scale-arrow {
        transform: rotate(90deg);
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .page-nav {
        flex-direction: column;
        gap: 1rem;
    }
}