/*
===============================================
Shinka AI - Success Stories Slider
成功事例スライダー
===============================================
*/

/* ========================================
   Success Stories Section
   ======================================== */

.shinka-success-stories {
    position: relative;
    padding: 120px 0;
    background: #0A0E27;
    overflow: hidden;
}

/* 白背景バリエーション（TOPページ用） */
.shinka-success-stories--white {
    background: #FFFFFF;
}

.shinka-success-stories--white .shinka-success-stories__title {
    color: #0A0E27;
}

.shinka-success-stories--white .shinka-success-story {
    background: rgba(10, 14, 39, 0.03);
    border: 1px solid rgba(10, 14, 39, 0.1);
}

.shinka-success-stories--white .shinka-success-story:hover {
    background: rgba(10, 14, 39, 0.05);
}

.shinka-success-stories--white .shinka-success-story__text {
    color: rgba(10, 14, 39, 0.9);
}

.shinka-success-stories--white .shinka-success-story__image {
    border: 3px solid rgba(10, 14, 39, 0.2);
}

.shinka-success-stories--white .shinka-success-story:hover .shinka-success-story__image {
    border-color: #4795E8;
}

/* AIパーティクル背景 */
.shinka-success-stories__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(71, 149, 232, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(203, 104, 121, 0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* パーティクルアニメーション */
.shinka-success-stories__bg::before,
.shinka-success-stories__bg::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite;
}

.shinka-success-stories__bg::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shinka-success-stories__bg::after {
    top: 60%;
    right: 20%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    50% { transform: translate(100px, -100px); }
}

.shinka-success-stories .c-container {
    position: relative;
    z-index: 10;
}

/* ========================================
   Heading
   ======================================== */

.shinka-success-stories__heading {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.shinka-success-stories__label {
    display: block;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.3em;
    padding: 8px 24px;
    background: linear-gradient(135deg, #4795E8 0%, #CB6879 100%);
    color: #FFFFFF;
    border-radius: 4px;
    margin: 0 auto 24px;
    width: fit-content;
    text-shadow: 0 2px 10px rgba(71, 149, 232, 0.5);
}

.shinka-success-stories__title {
    display: block;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    font-family: "游明朝体", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", "HG明朝E", serif;
    color: #FFFFFF;
    line-height: 1.5;
}

/* ========================================
   Slider Container
   ======================================== */

.shinka-success-stories__slider {
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* ニューラルネットワーク風の接続線 */
.shinka-success-stories__slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(71, 149, 232, 0.3) 10%,
        rgba(203, 104, 121, 0.3) 50%,
        rgba(71, 149, 232, 0.3) 90%,
        transparent 100%
    );
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
}

/* 接続線上を流れる光のパルス */
.shinka-success-stories__slider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #4795E8, transparent);
    transform: translateY(-50%);
    border-radius: 50%;
    animation: pulse 8s linear infinite;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(71, 149, 232, 0.8);
}

.shinka-success-stories__track {
    display: flex;
    gap: 40px;
    animation: slide 40s linear infinite;
    will-change: transform;
    width: max-content;
}

/* 無限ループのためにカードを2回繰り返す */
.shinka-success-stories__track::after {
    content: '';
    flex: 0 0 40px;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 20px));
    }
}

@keyframes pulse {
    0% {
        left: -100px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: calc(100% + 100px);
        opacity: 0;
    }
}

/* ホバー時にアニメーション一時停止 */
.shinka-success-stories__slider:hover .shinka-success-stories__track {
    animation-play-state: paused;
}

/* ========================================
   Success Story Card
   ======================================== */

.shinka-success-story {
    flex: 0 0 450px;
    height: 380px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* カードの光る境界線 */
.shinka-success-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #4795E8, #CB6879);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.shinka-success-story:hover::before {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.shinka-success-story:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 20px 60px rgba(71, 149, 232, 0.3),
        0 0 40px rgba(203, 104, 121, 0.2);
}

/* ========================================
   Card Image
   ======================================== */

.shinka-success-story__image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    flex-shrink: 0;
}

.shinka-success-story__image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.shinka-success-story:hover .shinka-success-story__image::after {
    left: 100%;
}

.shinka-success-story:hover .shinka-success-story__image {
    border-color: #4795E8;
    box-shadow: 0 0 30px rgba(71, 149, 232, 0.6);
}

.shinka-success-story__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.shinka-success-story:hover .shinka-success-story__image img {
    transform: scale(1.1);
}

/* ========================================
   Card Content
   ======================================== */

.shinka-success-story__content {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* ========================================
   Meta (業種・エリア)
   ======================================== */

.shinka-success-story__meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shinka-success-story__meta::before {
    content: '';
    width: 4px;
    height: 4px;
    background: rgba(71, 149, 232, 0.6);
    border-radius: 50%;
    flex-shrink: 0;
}

.shinka-success-stories--white .shinka-success-story__meta {
    color: rgba(10, 14, 39, 0.6);
}

.shinka-success-stories--white .shinka-success-story__meta::before {
    background: rgba(71, 149, 232, 0.8);
}

.shinka-success-story__text {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-family: "游明朝体", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", "HG明朝E", serif;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* ========================================
   Badge
   ======================================== */

.shinka-success-story__badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #4795E8 0%, #CB6879 100%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 900;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(71, 149, 232, 0.4);
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.shinka-success-story:hover .shinka-success-story__badge {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(71, 149, 232, 0.6);
}

/* ========================================
   レスポンシブ
   ======================================== */

@media (max-width: 767px) {
    .shinka-success-stories {
        padding: 80px 0;
    }

    .shinka-success-stories__heading {
        margin-bottom: 60px;
    }

    .shinka-success-stories__label {
        font-size: 16px;
        padding: 6px 16px;
        margin-bottom: 16px;
    }

    .shinka-success-stories__title {
        font-size: 24px;
    }

    .shinka-success-stories__slider {
        padding: 20px 0;
    }

    .shinka-success-story {
        flex: 0 0 320px;
        height: 360px;
        padding: 24px;
    }

    .shinka-success-story__image {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .shinka-success-story__meta {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .shinka-success-story__text {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .shinka-success-story__badge {
        font-size: 12px;
        padding: 6px 16px;
    }

    @keyframes slide {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-100% / 2 - 20px));
        }
    }
}