/* Growthstock Policy Styles */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: white;
}

.container {
    background-color: white;
    min-height: 100vh;
}

header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

header h1 img {
    height: 32px;
    width: auto;
}

/* 言語切替スタイル（ドロップダウン対応） */
.language-switch {
    position: relative;
    display: inline-block;
}

.language-toggle {
    padding: 8px 16px;
    background-color: white;
    color: #495057;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-toggle:hover {
    background-color: #e9ecef;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.language-dropdown.show {
    display: block;
}

.language-link {
    display: block;
    padding: 8px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.language-link:hover {
    background-color: #007bff;
    color: white;
}

.content-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid #e9ecef;
    padding: 20px;
}

.nav-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background-color: #e9ecef;
    color: #212529;
}

.nav-link.active {
    background-color: #007bff;
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px 40px;
    max-width: calc(100% - 250px);
}

.policy-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.policy-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.last-updated {
    color: #6c757d;
    font-size: 14px;
}

.policy-content {
    line-height: 1.8;
}

.policy-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.policy-section {
    margin-bottom: 32px;
}

.policy-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
}

.policy-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
    margin-top: 24px;
}

.policy-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    margin-top: 20px;
}

.policy-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    margin-top: 16px;
}

.subsection {
    margin-bottom: 24px;
}

.subsection h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
}

.subsection ol,
.subsection ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.subsection ol li,
.subsection ul li {
    margin-bottom: 8px;
    text-align: justify;
    line-height: 1.6;
}

.subsection p {
    margin-bottom: 12px;
}

/* テーブルスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background-color: white;
}

table th,
table td {
    border: 1px solid #e9ecef;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

table th {
    background-color: white;
    font-weight: 600;
    color: #495057;
}

table tr:nth-child(even) {
    background-color: white;
}

table tr:hover {
    background-color: #e9ecef;
}

/* 強調テキストスタイル */
strong {
    font-weight: 600;
    color: #212529;
}

em {
    font-style: italic;
}

u {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .main-content {
        max-width: 100%;
        padding: 20px;
    }
    
    header {
        padding: 15px 20px;
    }
    
    .policy-header h2 {
        font-size: 24px;
    }
}

/* Language redirect styles */
.language-redirect {
    text-align: center;
    padding: 50px 20px;
}

.language-redirect h1 {
    margin-bottom: 30px;
    color: #212529;
}

.language-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.language-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.language-button:hover {
    background-color: #0056b3;
}

/* 章の区分 */
.chapter-section {
    margin-bottom: 24px;
}

/* 1. 2. 3. 形式のリスト（start属性使用） */
ol.decimal {
    list-style-type: decimal;
    padding-left: 20px;
    margin-bottom: 16px;
}

ol.decimal > li {
    margin-bottom: 8px;
    text-align: justify;
    line-height: 1.6;
}

/* (1) (2) (3) 形式のリスト（start属性使用） */
ol.decimal-parentheses {
    list-style: none;
    counter-reset: item; /* 自分でカウンタをリセット */
    padding-left: 0;
    margin-bottom: 16px;
}

ol.decimal-parentheses > li {
    counter-increment: item; /* 項目ごとにカウンタを進める */
    display: block;
    margin-bottom: 8px;
    padding-left: 2.5em;
    position: relative;
    text-align: justify;
    line-height: 1.6;
}

ol.decimal-parentheses > li:before {
    content: "(" counter(item) ") ";
    position: absolute;
    left: 0;
    font-weight: normal;
    color: #495057;
}
