/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background-color: #4a6fa5;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* メインコンテンツ */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

h3 {
    color: #34495e;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

h4 {
    color: #34495e;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

/* 国別カード */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.country-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease;
    text-align: center;
}

.country-card:hover {
    transform: translateY(-5px);
}

.country-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* 画像サイズの制限 - 国アイコン */
.country-svg {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.btn {
    display: inline-block;
    background-color: #4a6fa5;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #3a5a80;
}

/* AIの詳細ページ */
.ai-detail {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ai-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ai-logo {
    margin-right: 1.5rem;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 画像サイズの制限 - AIロゴ */
.ai-logo-img {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ai-title {
    flex: 1;
}

.ai-section {
    margin-bottom: 1.5rem;
}

.ai-section ul {
    list-style-position: inside;
    margin-left: 1rem;
}

.ai-section li {
    margin-bottom: 0.5rem;
}

/* フッター */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

/* 戻るリンク */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #4a6fa5;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .ai-header {
        flex-direction: column;
        text-align: center;
    }
    
    .ai-logo {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* 画像サイズの調整（モバイル） */
    .country-svg {
        max-width: 60px;
        max-height: 60px;
    }
    
    .ai-logo-img {
        max-width: 80px;
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .country-grid {
        grid-template-columns: 1fr;
    }
    
    /* 画像サイズのさらなる調整（小さい画面） */
    .country-svg {
        max-width: 50px;
        max-height: 50px;
    }
}