/* --- Section 4: Comparison (LIGHT PATH) --- */
#section_4 {
    padding: 100px 0;
    background: #fdfdfd;
    color: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.sec4-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

.sec4-title-area {
    text-align: center;
    margin-bottom: 50px;
}

.sec4-title-area h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.sec4-table-wrapper {
    position: relative;
    width: 100%;
}

.sec4-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px; /* スクロールバーと影のスペース */
}

.sec4-table-inner {
    position: relative;
    min-width: 600px; /* スマホでスクロールさせるための最小幅 */
}

.sec4-table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
    z-index: 2;
    background: transparent;
}

.sec4-table th, .sec4-table td {
    padding: 25px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    white-space: nowrap; /* スマホでセルが縦長になるのを防ぐ */
}

.sec4-table thead th {
    font-weight: 900;
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.sec4-table tbody th {
    font-weight: 900;
    color: #555;
    text-align: left;
}

.sec4-adv-col {
    color: var(--primary);
    font-weight: 900;
    position: relative;
    background: rgba(0, 122, 255, 0.02); /* ほんのり色をつける */
}

/* Light Path Effect (Option 20オリジナルデザインの1本線) */
.sec4-path-line {
    position: absolute;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--primary);
    z-index: 10;
    box-shadow: 0 0 15px var(--primary);
    transition: height 0.1s linear;
}

/* スクロールインジケーター（案F: フルジェスチャー） */
.sec4-scroll-indicator {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 30;
    transition: opacity 0.5s;
}

.sec4-scroll-text {
    position: absolute;
    bottom: -35px; /* 位置を下げて重なりを回避 */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.5s, transform 0.5s;
    width: max-content; /* 改行を防止 */
}

.sec4-scroll-indicator.hidden,
.sec4-scroll-text.hidden {
    opacity: 0;
}

.sec4-scroll-text.hidden {
    transform: translate(-50%, 15px);
}

.sec4-swipe-gesture {
    width: 60px;
    height: 60px;
    position: relative;
    animation: sec4FullGesture 2.5s infinite;
}

.sec4-gesture-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,122,255,0.4));
}

@keyframes sec4FullGesture {
    0% { transform: translateX(50px); opacity: 0; }
    20% { transform: translateX(0); opacity: 1; }
    80% { transform: translateX(-140px); opacity: 1; }
    100% { transform: translateX(-190px); opacity: 0; }
}

.sec4-scroll-text span {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--primary);
    background: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,122,255,0.1);
    white-space: nowrap; /* 改行を確実に防止 */
}

/* テーブル端の影（スクロール可能であることを示す） */
.sec4-table-wrapper::before,
.sec4-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 20px;
    width: 50px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.4s;
    opacity: 0;
}





.sec4-table-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
}

.sec4-table-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.08), transparent);
}

.sec4-table-wrapper.is-scrollable-left::before { opacity: 1; }
.sec4-table-wrapper.is-scrollable-right::after { opacity: 1; }

