* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    background: #f5f5f5;
}

/* ヘッダー */
header {
    background: #fff;
    border-bottom: 3px solid #17a2b8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-image {
    height: 30px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #17a2b8;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #17a2b8;
}

/* メインビジュアル */
.hero {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 目次 */
.toc {
    background: #fff;
    border: 2px solid #17a2b8;
    margin: 40px 0;
}

.toc-header {
    background: #17a2b8;
    color: #fff;
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-toggle {
    display: none;
    font-size: 20px;
}

.toc-content {
    padding: 20px;
}

.toc-content ol {
    list-style: none;
    counter-reset: toc-counter;
}

.toc-content li {
    counter-increment: toc-counter;
    margin: 10px 0;
}

.toc-content li::before {
    content: counter(toc-counter) ". ";
    color: #17a2b8;
    font-weight: bold;
    margin-right: 8px;
}

.toc-content a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.toc-content a:hover {
    color: #17a2b8;
}

/* メインコンテンツ */
main {
    background: #fff;
    padding: 40px;
    margin-bottom: 40px;
}

/* 見出し */
h2 {
    font-size: 28px;
    color: #17a2b8;
    border-left: 5px solid #17a2b8;
    padding-left: 15px;
    margin: 60px 0 30px 0;
}

h3 {
    font-size: 22px;
    color: #333;
    border-bottom: 2px solid #17a2b8;
    padding-bottom: 10px;
    margin: 40px 0 20px 0;
}

/* 段落 */
p {
    margin-bottom: 20px;
}

/* レイアウト: 文章半分画像半分 */
.layout-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.layout-half img {
    width: 100%;
    height: auto;
    display: block;
}

/* レイアウト: 文章と画像セット */
.layout-image-text {
    margin: 40px 0;
}

.layout-image-text img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

/* レイアウト: 2カラム文章 */
.layout-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.column {
    padding: 20px;
    background: #f8f9fa;
    border-left: 3px solid #17a2b8;
}

.column h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #17a2b8;
}

/* テーブル */
.table-wrapper {
    overflow-x: auto;
    margin: 40px 0;
}

/* 上ヘッダーテーブル（デフォルト） */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: #17a2b8;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

td {
    padding: 15px;
    border: 1px solid #ddd;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

/* 上ヘッダー + 右スライド */
.table-scroll {
    position: relative;
}

.table-scroll::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #17a2b8;
    pointer-events: none;
    font-weight: bold;
}

.table-scroll.scrolled-end::after {
    display: none;
}

.table-scroll .table-wrapper {
    overflow-x: auto;
    margin: 0;
}

/* 左ヘッダーテーブル */
.table-left-header table th {
    background: #17a2b8;
    color: #fff;
    text-align: left;
    width: 200px;
    min-width: 200px;
}

.table-left-header table tbody th {
    background: #17a2b8;
    color: #fff;
    font-weight: bold;
}

/* 左ヘッダー + 右スライド */
.table-left-scroll {
    position: relative;
}

.table-left-scroll::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #17a2b8;
    pointer-events: none;
    font-weight: bold;
}

.table-left-scroll.scrolled-end::after {
    display: none;
}

.table-left-scroll .table-wrapper {
    overflow-x: auto;
    margin: 0;
}

/* 二列テーブル（左ヘッダーのみ） */
.table-two-column table {
    width: 100%;
}

.table-two-column table th {
    width: 30%;
    background: #17a2b8;
    color: #fff;
}

.table-two-column table td {
    width: 70%;
}

/* モバイル表示用 */
.only-mobile {
    display: none;
}

.only-pc {
    display: block;
}

/* トップに戻るボタン */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #17a2b8;
    color: #fff;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
    transition: opacity 0.3s;
}

.back-to-top:hover {
    opacity: 0.8;
}

.back-to-top.show {
    display: flex;
}

/* ボタン */
.btn-primary {
    display: inline-block;
    background: #17a2b8;
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-outline {
    display: inline-block;
    background: #fff;
    color: #17a2b8;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #17a2b8;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 16px;
}

.btn-outline:hover {
    background: #17a2b8;
    color: #fff;
}

.button-group {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* パンくずリスト */
.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #17a2b8;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* iframe専用クラス */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 40px 0;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.iframe-map {
    margin: 40px 0;
    border: 2px solid #ddd;
}

.iframe-map iframe {
    width: 100%;
    height: 450px;
    display: block;
}

/* ブログ一覧 */
.blog-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.blog-item {
    background: #fff;
    border: 2px solid #ddd;
    overflow: hidden;
    transition: border-color 0.3s;
}

.blog-item:hover {
    border-color: #17a2b8;
}

.blog-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-item-content {
    padding: 20px;
}

.blog-item-date {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.blog-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.blog-item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.blog-item a {
    text-decoration: none;
    color: inherit;
}

/* PDF専用クラス */
.pdf-embed {
    width: 100%;
    height: 600px;
    border: 2px solid #ddd;
    margin: 40px 0;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: #f8f9fa;
    border-left: 3px solid #17a2b8;
    text-decoration: none;
    color: #333;
    margin: 20px 0;
    transition: background 0.3s;
}

.pdf-link:hover {
    background: #e9ecef;
}

.pdf-link::before {
    content: '📄';
    font-size: 24px;
}

/* アクセス情報セクション */
.access-section {
    margin: 60px 0;
}

.access-info {
    background: #f8f9fa;
    padding: 30px;
    margin-bottom: 30px;
}

.access-info h4 {
    color: #17a2b8;
    margin-bottom: 20px;
    font-size: 20px;
}

.access-info p {
    margin-bottom: 10px;
}

/* リスト */
ul {
    margin: 20px 0 20px 20px;
}

li {
    margin: 10px 0;
}

/* ボックス */
.info-box {
    background: #e7f6f8;
    border-left: 5px solid #17a2b8;
    padding: 20px;
    margin: 30px 0;
}

/* フッター */
footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #17a2b8;
    margin-bottom: 15px;
    font-size: 18px;
}

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

.footer-section li {
    margin: 8px 0;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #17a2b8;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}
