/* 取り組み詳細コンテンツ内のリンクスタイル */
.initiative-content a {
    text-decoration: underline;
    text-decoration-color: #166534; /* text-green-800 */
    text-underline-offset: 3px;
    transition: all 0.2s ease-in-out;
}

.initiative-content a:hover {
    color: #15803d; /* text-green-700 */
    text-decoration-color: #15803d;
    text-decoration-thickness: 2px;
}

/* 取り組み詳細コンテンツ内のテーブルスタイル */
.initiative-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.initiative-content table thead {
    background-color: #166534 !important; /* bg-green-800 - 管理画面のBootstrapより優先 */
    color: white !important;
}

.initiative-content table thead th {
    background-color: #166534 !important; /* 個別のthにも適用 */
    color: white !important;
}

.initiative-content table th,
.initiative-content table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
}

/* 最後の列の右ボーダーを削除 */
.initiative-content table th:last-child,
.initiative-content table td:last-child {
    border-right: none;
}

.initiative-content table th {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

/* 画像の横スクロール対策 */
.initiative-content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.initiative-content table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.initiative-content table tbody tr:hover {
    background-color: rgba(34, 197, 94, 0.05); /* hover:bg-green-50 */
}

.initiative-content table tbody tr:nth-child(even) {
    background-color: rgba(249, 250, 251, 0.8); /* bg-gray-50 */
}

.initiative-content table tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 取り組み詳細コンテンツ内のリストスタイル */
.initiative-content ul,
.initiative-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    line-height: 1.7;
}

.initiative-content ul {
    list-style-type: disc;
}

.initiative-content ol {
    list-style-type: decimal;
}

.initiative-content li {
    margin: 0.5rem 0;
    padding-left: 0.25rem;
}

/* ネストしたリスト */
.initiative-content ul ul,
.initiative-content ol ol,
.initiative-content ul ol,
.initiative-content ol ul {
    margin: 0.25rem 0;
    padding-left: 1.25rem;
}

.initiative-content ul ul {
    list-style-type: circle;
}

.initiative-content ul ul ul {
    list-style-type: square;
}

.initiative-content ol ol {
    list-style-type: lower-alpha;
}

.initiative-content ol ol ol {
    list-style-type: lower-roman;
}

/* リスト内のテキストスタイル */
.initiative-content li p {
    margin: 0;
    display: inline;
}

/* 取り組み詳細コンテンツ内の見出しスタイル */
.initiative-content h1,
.initiative-content h2,
.initiative-content h3,
.initiative-content h4,
.initiative-content h5,
.initiative-content h6 {
    color: #166534; /* text-green-800 */
    font-weight: 700;
    line-height: 1.3;
    margin: 1.5rem 0 1rem 0;
}

.initiative-content h1 {
    font-size: 2rem; /* text-3xl */
    border-bottom: 3px solid #166534;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.initiative-content h2 {
    font-size: 1.75rem; /* text-2xl */
    border-bottom: 2px solid #16a34a; /* border-green-600 */
    padding-bottom: 0.375rem;
    margin-bottom: 1.25rem;
}

.initiative-content h3 {
    font-size: 1.5rem; /* text-xl */
    border-left: 4px solid #16a34a; /* border-green-600 */
    padding-left: 0.75rem;
    margin-bottom: 1rem;
}

.initiative-content h4 {
    font-size: 1.25rem; /* text-lg */
    border-left: 3px solid #22c55e; /* border-green-500 */
    padding-left: 0.5rem;
    margin-bottom: 0.75rem;
}

.initiative-content h5 {
    font-size: 1.125rem; /* text-base */
    color: #15803d; /* text-green-700 */
    margin-bottom: 0.75rem;
}

.initiative-content h6 {
    font-size: 1rem; /* text-sm */
    color: #15803d; /* text-green-700 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* 見出し直後の要素のマージン調整 */
.initiative-content h1 + p,
.initiative-content h2 + p,
.initiative-content h3 + p,
.initiative-content h4 + p,
.initiative-content h5 + p,
.initiative-content h6 + p {
    margin-top: 0;
}

/* PC/スマホ対応 */
@media (max-width: 768px) {
    .initiative-content a {
        text-underline-offset: 2px;
    }

    .initiative-content a:hover {
        text-decoration-thickness: 1.5px;
    }

    /* モバイル用テーブルスタイル */
    .initiative-content table {
        font-size: 0.875rem;
        margin: 1rem 0;
    }

    .initiative-content table th,
    .initiative-content table td {
        padding: 8px 12px;
    }

    .initiative-content table th {
        font-size: 0.8rem;
    }

    /* モバイル用リストスタイル */
    .initiative-content ul,
    .initiative-content ol {
        padding-left: 1.25rem;
        margin: 0.75rem 0;
    }

    .initiative-content li {
        margin: 0.375rem 0;
    }

    .initiative-content ul ul,
    .initiative-content ol ol,
    .initiative-content ul ol,
    .initiative-content ol ul {
        padding-left: 1rem;
    }

    /* モバイル用見出しスタイル */
    .initiative-content h1 {
        font-size: 1.5rem; /* text-2xl */
        margin: 1.25rem 0 0.75rem 0;
    }

    .initiative-content h2 {
        font-size: 1.375rem; /* text-xl */
        margin: 1rem 0 0.75rem 0;
    }

    .initiative-content h3 {
        font-size: 1.25rem; /* text-lg */
        margin: 1rem 0 0.5rem 0;
        padding-left: 0.5rem;
    }

    .initiative-content h4 {
        font-size: 1.125rem; /* text-base */
        margin: 0.75rem 0 0.5rem 0;
        padding-left: 0.375rem;
    }

    .initiative-content h5,
    .initiative-content h6 {
        font-size: 1rem; /* text-sm */
        margin: 0.75rem 0 0.5rem 0;
    }

    /* 小さい画面ではテーブルを横スクロール可能にする */
    .initiative-content table {
        min-width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .initiative-content table thead,
    .initiative-content table tbody,
    .initiative-content table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

/* 極小画面用 */
@media (max-width: 480px) {
    .initiative-content table th,
    .initiative-content table td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}
