/* second-page.php専用スタイル */
.content .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.content .col-lg-12 {
    padding: 0 15px;
    box-sizing: border-box;
    flex: 0 0 100%;
    max-width: 100%;
}

.main {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto 30px auto;
    max-width: 1000px;
    line-height: 1.8;
    color: #333;
}

/* メインタイトル */
.main h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
    line-height: 1.3;
    text-align: center;
    border-bottom: 3px solid #337ab7;
    padding-bottom: 20px;
}

/* システム画像 */
.system_t {
    text-align: center;
    margin: 30px 0;
}

.system_t img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 目次 */
#index {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

#index p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #337ab7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

#index p .close-btn {
    font-size: 0.8rem;
    font-weight: normal;
    color: #337ab7;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

#index p .close-btn:hover {
    text-decoration: underline;
}

/* 目次が閉じた時の表示ボタン */
#index-toggle {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

#index-toggle p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #337ab7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

#index-toggle p .open-btn {
    font-size: 0.8rem;
    font-weight: normal;
    color: #337ab7;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

#index-toggle p .open-btn:hover {
    text-decoration: underline;
}

#index ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

#index li {
    margin-bottom: 1px;
    line-height: 0.7;
}

#index li.h2 {
    font-weight: 600;
    margin-bottom: 2px;
    counter-increment: toc-counter;
    position: relative;
    padding-left: 0;
}

#index li.h2::before {
    content: counter(toc-counter) ".";
    font-weight: 600;
    color: #333;
    margin-right: 4px;
    font-size: 0.9rem;
}

#index {
    counter-reset: toc-counter;
}

#index li.h2 a {
    color: #337ab7;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline;
}

#index li.h2 a:hover {
    text-decoration: underline;
}

#index li ul {
    margin-top: 1px;
    margin-bottom: 2px;
    padding-left: 12px;
    counter-reset: toc-sub-counter;
}

#index li ul li {
    margin-bottom: 0px;
    counter-increment: toc-sub-counter;
    position: relative;
}

#index li ul li::before {
    content: counter(toc-counter) "." counter(toc-sub-counter);
    font-weight: normal;
    color: #666;
    margin-right: 4px;
    font-size: 0.8rem;
}

#index li ul li a {
    color: #337ab7;
    text-decoration: none;
    font-size: 0.8rem;
}

#index li ul li a:hover {
    text-decoration: underline;
}

/* ページトップに戻るフローティングボタン */
.page-top-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.page-top-floating.show {
    opacity: 1;
    visibility: visible;
}

.page-top-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #337ab7;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(51, 122, 183, 0.3);
    transition: all 0.3s ease;
}

.page-top-link:hover {
    background: #286090;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(51, 122, 183, 0.4);
    color: #fff;
    text-decoration: none;
}

.page-top-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ナビゲーションボタン */
#ball_index,
#ball_top {
    position: fixed;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

#ball_index {
    bottom: 100px;
}

#ball_top {
    bottom: 20px;
}

#ball_index:hover,
#ball_top:hover {
    transform: scale(1.1);
}

/* 見出し */
.main h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #337ab7;
    margin: 2em 0 1em 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.main h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin: 1.5em 0 1em 0;
}

.main h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
    margin: 1.2em 0 0.8em 0;
}

/* 段落 */
.main p {
    margin-bottom: 1.5em;
}

.main p.strong {
    font-weight: 600;
    color: #d63384;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #d63384;
}

/* リスト */
.main ul, .main ol {
    margin: 1em 0 1.5em 2em;
}

.main li {
    margin-bottom: 0.5em;
}

/* 画像とキャプション */
.system {
    text-align: center;
    margin: 20px 0;
}

.system img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kohyoka {
    margin: 20px 0;
    text-align: center;
}

.kohyoka img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kohyoka figcaption {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.6;
}

/* ステップ画像 */
.step {
    text-align: center;
    margin: 30px 0;
}

.step img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

/* 料金テーブル */
#price2 {
    margin: 30px 0;
    overflow-x: auto;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.price-table th,
.price-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.price-table th {
    background: #337ab7;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.price-table tr:hover {
    background: #f8f9fa;
}

.price-table tr.price-total {
    background: #e3f2fd;
    font-weight: 600;
}

.price-table tr.price-total td {
    color: #1976d2;
}

/* リンク */
.main a {
    color: #337ab7;
    text-decoration: none;
}

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

.main a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 991px) {
    .main {
        padding: 20px;
        margin: 0 15px 20px 15px;
    }
    
    .main h1 {
        font-size: 2rem;
    }
    
    #ball_index,
    #ball_top {
        width: 50px;
        height: 50px;
        right: 15px;
    }
    
    #ball_index {
        bottom: 80px;
    }
    
    #ball_top {
        bottom: 15px;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 15px;
        margin: 0 10px 20px 10px;
        border-radius: 8px;
    }
    
    .main h1 {
        font-size: 1.8rem;
    }
    
    .main h2 {
        font-size: 1.6rem;
    }
    
    .main h3 {
        font-size: 1.4rem;
    }
    
    #index {
        padding: 12px;
        margin: 12px 0;
    }
    
    #index p {
        font-size: 0.95rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        margin-bottom: 8px;
        padding-bottom: 4px;
        white-space: nowrap;
    }
    
    #index p .close-btn {
        font-size: 0.75rem;
        align-self: flex-end;
    }
    
    #index-toggle {
        padding: 12px;
        margin: 12px 0;
    }
    
    #index-toggle p {
        font-size: 0.95rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        padding-bottom: 4px;
        white-space: nowrap;
    }
    
    #index-toggle p .open-btn {
        font-size: 0.75rem;
        align-self: flex-end;
    }
    
    #index li.h2 a {
        font-size: 0.85rem;
    }
    
    #index li ul li a {
        font-size: 0.75rem;
    }
    
    #index li {
        margin-bottom: 0px;
        line-height: 0.7;
    }
    
    #index li.h2 {
        margin-bottom: 1px;
    }
    
    #index li ul {
        margin-top: 0px;
        margin-bottom: 1px;
        padding-left: 10px;
    }
    
    #index li ul li {
        margin-bottom: 0px;
    }
    
    #ball_index,
    #ball_top {
        width: 45px;
        height: 45px;
        right: 10px;
    }
    
    #ball_index {
        bottom: 70px;
    }
    
    .price-table th,
    .price-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* モバイルでのページトップボタン */
    .page-top-floating {
        bottom: 20px;
        right: 20px;
    }
    
    .page-top-link {
        width: 50px;
        height: 50px;
    }
    
    .page-top-text {
        font-size: 12px;
    }
}
