/* ========================================
   リセットと基本スタイル
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   ヘッダー
   ======================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-title a {
    color: #333;
    text-decoration: none;
}

.header-title a:hover {
    color: #0066cc;
}

/* ========================================
   ナビゲーション
   ======================================== */
.site-navigation {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    overflow: hidden;
}

.nav-toggle-label {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
}

.nav-toggle-label-text {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.nav-toggle-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: background-color 0.3s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon {
    background-color: transparent;
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0 auto;
}

.nav-item a {
    color: #555;
    font-weight: 500;
}

.nav-item a:hover {
    color: #0066cc;
}

/* ========================================
   パンくずリスト
   ======================================== */
.breadcrumb {
    background-color: #f9f9f9;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.875rem;
    align-items: center;
    line-height: 1.5;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #0066cc;
    text-decoration: none;
    word-break: break-word;
    hyphens: auto;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item span {
    color: #666;
    word-break: break-word;
    hyphens: auto;
}

.breadcrumb-item::after {
    content: " / ";
    margin-left: 0.5rem;
    color: #999;
    flex-shrink: 0;
}

.breadcrumb-item:last-child::after {
    content: "";
}

/* ========================================
   メインコンテンツ
   ======================================== */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

/* ========================================
   言語選択ページ
   ======================================== */
.language-selection-page {
    text-align: center;
}

.language-selection-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-selection-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #222;
}

.selection-description {
    color: #666;
    margin-bottom: 2rem;
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.language-item {
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-item:hover {
    border-color: #0066cc;
    background-color: #f0f7ff;
}

.language-link {
    display: block;
    padding: 1.25rem;
    color: #333;
    text-decoration: none;
}

.language-link:hover {
    text-decoration: none;
}

.language-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.language-code {
    color: #999;
    font-size: 0.875rem;
}

/* ========================================
   ホームページ
   ======================================== */
.home-page {
    display: grid;
    gap: 2rem;
}

.hero-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hero-section h1 {
    font-size: 2rem;
    color: #222;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.topic-list-section {
    padding-top: 0.4rem;
    text-align: left;
}
.topic-list-section h2 {
    font-size: 1.2rem;
}
.topic-list-section ul {
    list-style: none;
    margin-top: 0.75rem;
    padding-left: 0.4rem;
    font-size: 0.8rem;
}

.hero-intro {
    color: #555;
    font-size: 1.125rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    padding: 0;
}

.content-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.content-card {
    background-color: #fff;
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.content-card-title {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: #222;
}

.content-card-title a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-card-title a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.content-card-description {
    color: #666;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* ========================================
   ページコンテンツ (About, Privacy, Terms)
   ======================================== */
.page-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-content h1 {
    font-size: 2rem;
    color: #222;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0066cc;
}

.page-content h2 {
    font-size: 1.5rem;
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.policy-section,
.terms-section {
    margin-bottom: 2rem;
}

.policy-section:last-child,
.terms-section:last-child {
    margin-bottom: 0;
}

/* ========================================
   フッター
   ======================================== */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 1rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #999;
    border-top: 1px solid #555;
    padding-top: 1rem;
}

/* ========================================
   レスポンシブ: スマートフォン (最大767px)
   ======================================== */
@media (max-width: 767px) {
    .nav-toggle-label {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        width: 100%;
        padding: 0;
        border-top: 1px solid #ddd;
        transition: max-height 0.3s ease;
    }

    .nav-item {
        border-bottom: 1px solid #eee;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item a {
        display: block;
        padding: 0.75rem 0;
    }

    .nav-toggle:checked ~ .nav-list {
        max-height: 500px;
        margin-top: 0.25rem;
    }

    .breadcrumb {
        padding: 0.5rem 0.75rem;
    }

    .breadcrumb-list {
        font-size: 0.8125rem;
        gap: 0.375rem;
    }

    .breadcrumb-item::after {
        margin-left: 0.375rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .page-content {
        padding: 1.5rem;
    }

    .page-content h1 {
        font-size: 1.75rem;
    }

    .page-content h2 {
        font-size: 1.25rem;
    }
}

/* ========================================
   レスポンシブ: タブレット (768px以上)
   ======================================== */
@media (min-width: 768px) {
    .header-title {
        font-size: 2rem;
    }

    .language-selection-section h1 {
        font-size: 2.5rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-intro {
        font-size: 1.25rem;
    }

    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .breadcrumb {
        padding: 0.875rem 1rem;
    }

    .breadcrumb-list {
        font-size: 0.9375rem;
    }

    .main-content {
        margin: 3rem auto;
    }

    .page-content {
        padding: 3rem;
    }

    .page-content h1 {
        font-size: 2.5rem;
    }

    .page-content h2 {
        font-size: 1.75rem;
    }
}

/* ========================================
   レスポンシブ: PC (1024px以上)
   ======================================== */
@media (min-width: 1024px) {
    .language-list {
        flex-direction: row;
        max-width: 800px;
        justify-content: center;
    }

    .language-item {
        flex: 1;
    }

    .breadcrumb {
        padding: 1rem 1.25rem;
    }

    .breadcrumb-list {
        font-size: 1rem;
    }

    .home-page {
        gap: 2.5rem;
    }

    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .content-card {
        padding: 2rem;
    }
}

/* ========================================
   関連クロス集計リンク
   ======================================== */
.related-cross-links {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.related-cross-links h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #495057;
    font-weight: 600;
}

.related-cross-links ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.related-cross-links li {
    margin-bottom: 0.75rem;
}

.related-cross-links li:last-child {
    margin-bottom: 0;
}

.related-cross-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px solid #007bff;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-cross-links a:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateX(5px);
}

/* ========================================
   ページング
   ======================================== */
.pagination {
    margin: 2rem 0;
}

.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.pagination-nav {
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: inline-block;
}

.pagination-link,
.pagination-current,
.pagination-text {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    min-width: 2.5rem;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    text-decoration: none;
}

.pagination-current {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: 600;
}

.pagination-item.disabled .pagination-text {
    color: #ccc;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.pagination-item.active .pagination-current {
    cursor: default;
}

/* レスポンシブ: スマートフォン */
@media (max-width: 767px) {
    .pagination-link,
    .pagination-current,
    .pagination-text {
        padding: 0.4rem 0.6rem;
        min-width: 2rem;
        font-size: 0.875rem;
    }

    .pagination-list {
        gap: 0.25rem;
    }
}
