.business-single {
    padding: var(--back-padding);
}

/* 事業内容セクション */
.business-section {
    background: linear-gradient(135deg, #ffffff, #f8fafc, #f1f5f9);
}

/* セクションヘッダー */
.business-section .section-header {}

.business-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--font-color);
    margin-bottom: 20px;
}

.business-section .section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* 事業内容グリッド */
.business-grid {
    margin: 0 auto;
    position: relative;
}

/* 事業アイテムコンテナ */
.business-items-container {
    margin-top: var(--margin);
    padding: var(--back-padding);
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ::details-content で開閉アニメーション */
:root {
    interpolate-size: allow-keywords;
}

.business-content details::details-content {
    transition: height 0.4s, opacity 0.4s, content-visibility 0.4s allow-discrete;
    height: 0;
    opacity: 0;
    overflow: clip;
}

.business-content details[open]::details-content {
    height: auto;
    opacity: 1;
}

@supports not (interpolate-size: allow-keywords) {
    .business-content details[open]::details-content {
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .business-content details::details-content {
        transition: none;
    }
}

/* ページネーション */
.business-pagination {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.business-pagination::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -100px;
    bottom: -100px;
    width: 2px;
    background: var(--renga-color);
    transform: translateX(-50%);
    z-index: -1;
    /* ページネーションドットの後ろに配置 */
}

/* ページネーションが表示される時の状態 */
.business-pagination.visible {
    opacity: 1;
    visibility: visible;
}

.business-pagination .pagination-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 1);
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.business-pagination .pagination-dot:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #BD9386;
    transform: scale(1.1);
}

/* アクティブ状態を明確に定義 */
.business-pagination .pagination-dot.active {
    background: #BD9386 !important;
    border-color: #BD9386 !important;
    transform: scale(1.15) !important;
    box-shadow: 0 4px 15px rgba(189, 147, 134, 0.4) !important;
}

.business-pagination .pagination-dot .dot-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

/* アクティブ状態のテキスト色を確実に白に */
.business-pagination .pagination-dot.active .dot-number {
    color: white !important;
}

/* アニメーション用のクラス */
.animate-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.animate-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 事業アイテムの基本スタイルを維持 */

/* 事業アイテム（東京海上HDスタイル） */
.business-item {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: 600px auto;
    background-position: calc(100% - 20px) center;
    background-repeat: no-repeat;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

/* 背景のオーバーレイ（文字を読みやすくするため） */
/* .business-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 50%;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
    z-index: 1;
} */

/* コンテンツエリア（左側に配置） */
.business-content {
    position: relative;
    z-index: 2;
    /* オーバーレイより上に表示 */
    width: 50%;
    /* 左半分の幅 */
    max-width: calc(100% - 620px);
    /* 背景画像の幅（300px）+ 余白（20px）を確保 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
    /* 背景画像との間隔を確保 */
    /* background: rgba(255, 255, 255, 0.6); */
}

/* 事業タイトル */
.business-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--font-color);
    width: fit-content;
    /* 改行されても一行ずつボーダーが適用されるように設定 */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    /* インラインボックスとして扱い、各行にボーダーを適用 */
    display: inline;
}

/* サブタイトル */
.business-subtitle {
    color: #666;
    background: #fff;
    border-top: 0px !important;
    border: 1px solid var(--main-color);
    padding: 20px 30px;
    line-height: 2;
}

.business-content summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.business-content summary::-webkit-details-marker {
    display: none;
}

.business-content summary .business-manager {
    position: relative;
    flex: 1;
}

/* 右側に小さな矢印を描画 */
.business-content summary .business-manager::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.business-content details[open] summary .business-manager::after {
    transform: rotate(-135deg);
}

/* 責任者情報 */
.business-manager {
    font-size: 0.9rem;
    color: #666;
}

/* 責任者ラベルの色分け（4つのコンテンツ用）- 左向き吹き出しスタイル */
.business-item:nth-child(2) .manager-label {
    background: var(--seiso-color);
    position: relative;
}

.business-item:nth-child(2) .manager-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--seiso-color);
    transform: translateY(-50%);
}

.business-item:nth-child(3) .manager-label {
    background: var(--setubi-color);
    position: relative;
}

.business-item:nth-child(3) .manager-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--setubi-color);
    transform: translateY(-50%);
}

.business-item:nth-child(4) .manager-label {
    background: var(--service-color);
    position: relative;
}

.business-item:nth-child(4) .manager-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--service-color);
    transform: translateY(-50%);
}

.business-item:nth-child(5) .manager-label {
    background: var(--shisetu-color);
    position: relative;
}

.business-item:nth-child(5) .manager-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--shisetu-color);
    transform: translateY(-50%);
}

.business-item:nth-child(6) .manager-label {
    background: var(--kenchiku-color);
    position: relative;
}

.business-item:nth-child(6) .manager-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--kenchiku-color);
    transform: translateY(-50%);
}

/* スマホでは矢印を上向きに変更 */
@media (max-width: 768px) {

    .business-item:nth-child(2) .manager-label::after,
    .business-item:nth-child(3) .manager-label::after,
    .business-item:nth-child(4) .manager-label::after,
    .business-item:nth-child(5) .manager-label::after,
    .business-item:nth-child(6) .manager-label::after {
        top: -10px;
        left: 50%;
        border-top: none;
        border-bottom: 10px solid;
        border-right: 10px solid transparent;
        border-left: 10px solid transparent;
        transform: translateX(-50%);
    }

    /* 各事業アイテムの色を個別に指定 */
    .business-item:nth-child(2) .manager-label::after {
        border-bottom-color: var(--seiso-color);
    }

    .business-item:nth-child(3) .manager-label::after {
        border-bottom-color: var(--setubi-color);
    }

    .business-item:nth-child(4) .manager-label::after {
        border-bottom-color: var(--service-color);
    }

    .business-item:nth-child(5) .manager-label::after {
        border-bottom-color: var(--shisetu-color);
    }

    .business-item:nth-child(6) .manager-label::after {
        border-bottom-color: var(--kenchiku-color);
    }
}

.manager-label {
    font-weight: 600;
    color: var(--text-white-color);
    padding: 0.5rem 1rem;
    margin-left: 15px;
}

/* メイン文章 */
.business-description {
    line-height: 1.3;
    font-size: 0.95rem;
    color: var(--font-color);
    background: var(--text-white-color);
    margin-bottom: 20px;
    padding: 20px;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* --- アコーディオン（details/summary）: クラスは変更せずに実装 --- */
.business-content details {
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.business-content summary {
    list-style: none;
    cursor: pointer;
}

/* Chrome/Safariのデフォルトマーカーを非表示 */
.business-content summary::-webkit-details-marker {
    display: none;
}

/* summary内のクリック領域を広げるためblock化 */
.business-content summary .business-manager {
    display: grid;
    grid-template-columns: 1fr 24px;
    align-items: center;
    background: dodgerblue;
    color: #fff;
    padding: 24px;
    cursor: pointer;
    gap: 8px;
    border: 1px solid var(--main-color);
}

/* 業務内容セクション */
.work-contents-section {
    margin-top: 60px;
    padding: 40px 0;
    background: #f8f9fa;
    border-radius: 12px;
}

.work-contents-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.work-contents-section .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--font-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.work-contents-section .section-title .section-title-en {
    font-size: 1rem;
    color: var(--renga-color);
    display: block;
    font-weight: 400;
    margin-top: 5px;
}

.work-contents-section .section-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* 業務内容グリッド */
.work-contents-grid {
    display: grid;
    gap: 30px;
    margin: 0 auto;
}

/* 業務内容アイテム */
.work-content-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
    cursor: pointer;
    max-height: 300px;
}

.work-content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 業務内容画像部分 */
.work-content-image {
    width: 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.work-content-image img {
    transition: transform 0.3s ease;
}

.work-content-item:hover .work-content-image img {
    transform: scale(1.05);
}

/* プレースホルダー画像 */
.work-content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    width: 100%;
    height: 100%;
}

/* オーバーレイとプラスアイコン */
.work-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-content-item:hover .work-content-overlay {
    opacity: 1;
}

.work-content-plus {
    width: 50px;
    height: 50px;
    background: var(--renga-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.work-content-item:hover .work-content-plus {
    transform: scale(1);
}

/* 業務内容情報部分 */
.work-content-info {
    width: 60%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work-content-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--font-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.work-content-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ポップアップスタイル（既存のcompany-popup.jsと同じデザインを踏襲） */
.work-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-popup.popup-opening {
    opacity: 1;
}

.work-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.work-popup .popup-inner {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.work-popup .close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--main-gradient);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s ease;
}

.work-popup .close-popup:hover {
    background: rgba(0, 0, 0, 0.9);
}

.work-popup .popup-content {
    padding: 0;
}

.work-popup .popup-header {
    position: relative;
    margin-bottom: 30px;
}

.work-popup .popup-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.work-content-image img,
.work-popup .popup-image img {
    height: auto;
}

.work-popup .popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--font-color);
    margin: 20px 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--renga-color);
}

.work-popup .popup-body {
    padding: 0 30px 30px;
}

.work-popup .work-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.work-popup .work-detail-content h1,
.work-popup .work-detail-content h2,
.work-popup .work-detail-content h3,
.work-popup .work-detail-content h4 {
    color: var(--font-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.work-popup .work-detail-content p {
    margin-bottom: 20px;
}

.work-popup .work-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.work-popup .work-detail-content ul,
.work-popup .work-detail-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.work-popup .work-detail-content li {
    margin-bottom: 8px;
}

.business-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.business-footer .business-more:nth-child(2) .view-more {
    background: var(--renga-color);
}

.business-footer .business-more:nth-child(2) .view-more:hover {
    color: var(--renga-color);
    border: 1px solid var(--renga-color);
}

/* 大きい画面向けのスタイル調整 */
@media (min-width: 1400px) {
    .business-item {
        min-height: 700px;
        background-size: 630px auto;
        background-position: calc(100% - 20px) center;
        overflow: visible;
        background-attachment: scroll;
        background-clip: padding-box;
    }
}

/* タブレット向けのスタイル調整 */
@media (max-width: 1024px) and (min-width: 769px) {
    .business-content {
        width: 60%;
        max-width: calc(100% - 330px);
    }
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .business-content {
        width: 60%;
    }

    .business-title {
        font-size: 1.8rem;
    }

    /* タブレット用のページネーション調整 */
    .business-pagination {
        right: 20px;
    }

    .business-pagination .pagination-dot {
        width: 45px;
        height: 45px;
    }

    .work-contents-grid {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .business-manager {
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }

    .business-section .section-title {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .business-grid {
        flex-direction: column;
    }

    .business-items-container {
        width: 100%;
        margin-top: 0;
    }

    /* モバイルでのページネーション */
    .business-pagination {
        display: none;
    }

    .business-pagination .pagination-dot {
        width: 40px;
        height: 40px;
    }

    .business-pagination .pagination-dot .dot-number {
        font-size: 12px;
    }

    .business-item {
        background-image: none !important;
        display: block;
    }

    /* モバイルでは背景オーバーレイを全体に適用 */
    .business-item::before {
        right: 0;
        background: rgba(255, 255, 255, 0.9);
    }

    .business-content {
        width: 100%;
        max-width: 100%;
    }

    .business-title {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .business-subtitle {
        font-size: 1rem;
    }

    .work-contents-section {
        margin-top: 40px;
        padding: 30px 0;
    }

    .work-contents-section .section-title {
        font-size: 1.8rem;
    }

    .work-contents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .work-content-item {
        flex-direction: column;
        min-height: auto;
    }

    .work-content-image {
        width: 100%;
        height: 200px;
    }

    .work-content-info {
        width: 100%;
        padding: 20px;
    }

    .work-content-title {
        font-size: 1.2rem;
    }

    /* モバイル用ポップアップ調整 */
    .work-popup .popup-inner {
        width: 90%;
        max-height: 80vh;
        margin: 10% auto;
    }

    .work-popup .popup-inner .close-popup {
        position: fixed;
        bottom: 5%;
        top: auto;
        right: 42%;
        width: 50px;
        height: 50px;
        z-index: 1001;
    }

    .work-popup .popup-image {
        height: 200px;
    }

    .work-popup .popup-title {
        font-size: 1.5rem;
        margin: 15px 20px 0;
    }

    .work-popup .popup-body {
        padding: 0 20px 20px;
    }

    .business-footer {
        gap: 1rem;
    }

    .business-description {
        font-size: 0.9rem;
        margin-bottom: 0px;
    }
}

@media (max-width: 480px) {
    .business-content {
        padding: 0;
    }

    .business-title {
        font-size: 1.3rem;
    }

    .work-content-info {
        padding: 15px;
    }

    .work-content-title {
        font-size: 1.1rem;
    }

    .work-content-description {
        font-size: 0.9rem;
    }
}