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

/* 変数定義 */
:root {
    --primary-color: #3f3277;
    --primary-dark: #2d245a;
    --secondary-color: #6c63ff;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-gray: #e8e8eb;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 基本スタイル */
body {
    font-family: 'Noto Sans JP', 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ヘッダー */
.header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ヒーローセクション */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.btn {
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* 統計カード */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    /* ホバー効果を無効化 - クリック可能に見えないよう固定表示 */
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* 記事カウント */
.article-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 記事グリッド */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--bg-gray);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.article-card h3 a:hover {
    color: var(--primary-color);
}

.article-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

.read-time {
    display: inline-flex;
    align-items: center;
}

.difficulty {
    color: var(--primary-color);
}

/* ランキング */
.ranking-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--bg-gray);
    transition: var(--transition);
}

.ranking-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.rank-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 1.5rem;
    min-width: 50px;
    text-align: center;
}

.ranking-content h3 {
    margin-bottom: 0.5rem;
}

.ranking-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.ranking-content h3 a:hover {
    color: var(--primary-color);
}

.ranking-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.views {
    font-weight: 600;
}

.more-articles {
    text-align: center;
    margin-top: 2rem;
}

/* 機能セクション */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--bg-gray);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.feature-icon svg {
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .feature-icon svg {
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ワークフローセクション */
.workflow {
    padding: 80px 0;
    background: var(--bg-light);
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.workflow-step {
    flex: 1;
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    position: relative;
    transition: var(--transition);
}

.workflow-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.2;
    margin-bottom: 1rem;
}

.workflow-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.workflow-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* CTAセクション */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-white {
    background: var(--white);
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* フッター */
.footer {
    background: #2d2d2d;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.footer-links-grid li {
    margin-bottom: 0.3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* レスポンシブ */
@media (max-width: 768px) {
    /* 基本設定 */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* ナビゲーション */
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* ヒーローセクション */
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* フッター */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    /* レイアウト調整 */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .workflow-arrow {
        display: none;
    }
    
    .workflow-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ranking-container {
        grid-template-columns: 1fr;
    }
    
    .ranking-sidebar {
        display: none;
    }
    
    /* カードスタイル */
    .article-card,
    .feature-card {
        padding: 1.5rem;
    }
    
    .article-card h3,
    .feature-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    /* 小画面専用調整 */
    body {
        font-size: 13px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    /* タイトル・見出し */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* カード・ボタン */
    .article-card,
    .feature-card {
        padding: 1.2rem;
    }
    
    .article-card h3,
    .feature-card h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* スペーシング調整 */
    .section {
        padding: 3rem 0;
    }
}