/* ============================================
   성공 사례 섹션 - 다크 + 글로우 프리미엄 스타일
   ============================================ */

/* 섹션 배경 */
.case-study-section {
    padding: 120px 0;
    background: linear-gradient(180deg, #0a0a0f 0%, #12121f 50%, #0a0a0f 100%);
    position: relative;
    overflow: hidden;
}

/* 배경 글로우 효과 */
.case-study-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 75, 53, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -150px;
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
}

.case-study-bg-glow.secondary {
    background: radial-gradient(circle, rgba(100, 80, 255, 0.08) 0%, transparent 70%);
    top: auto;
    right: auto;
    bottom: -200px;
    left: -150px;
    width: 500px;
    height: 500px;
    animation: glowPulse 8s ease-in-out infinite reverse;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ============================================
   떠다니는 빛 입자
   ============================================ */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-particles span {
    position: absolute;
    display: block;
    width: 4px;
    height: 4px;
    background: rgba(233, 75, 53, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(233, 75, 53, 0.4), 0 0 20px rgba(233, 75, 53, 0.2);
    animation: floatParticle linear infinite;
}

.floating-particles span:nth-child(1) {
    left: 5%; width: 3px; height: 3px;
    animation-duration: 18s; animation-delay: 0s;
}
.floating-particles span:nth-child(2) {
    left: 15%; width: 5px; height: 5px;
    animation-duration: 22s; animation-delay: -3s;
    background: rgba(255, 107, 85, 0.5);
}
.floating-particles span:nth-child(3) {
    left: 28%; width: 3px; height: 3px;
    animation-duration: 16s; animation-delay: -5s;
}
.floating-particles span:nth-child(4) {
    left: 40%; width: 6px; height: 6px;
    animation-duration: 24s; animation-delay: -2s;
    background: rgba(100, 80, 255, 0.4);
    box-shadow: 0 0 10px rgba(100, 80, 255, 0.3);
}
.floating-particles span:nth-child(5) {
    left: 52%; width: 4px; height: 4px;
    animation-duration: 20s; animation-delay: -7s;
}
.floating-particles span:nth-child(6) {
    left: 63%; width: 3px; height: 3px;
    animation-duration: 17s; animation-delay: -4s;
    background: rgba(255, 107, 85, 0.4);
}
.floating-particles span:nth-child(7) {
    left: 72%; width: 5px; height: 5px;
    animation-duration: 21s; animation-delay: -1s;
}
.floating-particles span:nth-child(8) {
    left: 82%; width: 4px; height: 4px;
    animation-duration: 19s; animation-delay: -6s;
    background: rgba(100, 80, 255, 0.3);
    box-shadow: 0 0 10px rgba(100, 80, 255, 0.2);
}
.floating-particles span:nth-child(9) {
    left: 90%; width: 3px; height: 3px;
    animation-duration: 23s; animation-delay: -8s;
}
.floating-particles span:nth-child(10) {
    left: 96%; width: 4px; height: 4px;
    animation-duration: 15s; animation-delay: -3s;
    background: rgba(255, 107, 85, 0.5);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* 섹션 라벨 */
.case-study-section .section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #E94B35;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 8px 20px;
    border: 1px solid rgba(233, 75, 53, 0.3);
    border-radius: 30px;
    background: rgba(233, 75, 53, 0.08);
}

/* 헤더 영역 */
.case-study-section .section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.case-study-section .section-title {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 25px;
}

.case-study-section .section-title .highlight {
    color: #E94B35;
    text-shadow: 0 0 30px rgba(233, 75, 53, 0.4);
}

.case-study-section .section-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   성과 수치 카운터
   ============================================ */
.case-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 70px;
    position: relative;
    z-index: 1;
}

.case-stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    white-space: nowrap;
    gap: 4px;
}

.case-stat-item .stat-number {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, #E94B35, #FF6B55);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(233, 75, 53, 0.3));
}

.case-stat-item .stat-suffix {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #E94B35, #FF6B55);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.case-stat-item .stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.case-stat-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, transparent, rgba(233, 75, 53, 0.3), transparent);
}

/* ============================================
   폰 쇼케이스 (4x2)
   ============================================ */
.case-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.showcase-phone {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    overflow: hidden;
    border-radius: 16px;
    max-width: 220px;
    margin: 0 auto;
}

.showcase-phone img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.18);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.showcase-phone:hover {
    transform: translateY(-12px) scale(1.04);
    filter: drop-shadow(0 20px 50px rgba(233, 75, 53, 0.3)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}

.showcase-phone:hover img {
    transform: scale(1.22);
}

/* ============================================
   대형 상세 케이스 카드 (경쟁사 이상 화려함)
   ============================================ */
.case-detail-cards {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.case-detail-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-detail-card:hover {
    transform: translateY(-8px);
}

/* 애니메이션 그라데이션 보더 */
.card-glow-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 26px;
    background: linear-gradient(
        45deg,
        #E94B35, #FF6B55, #6450ff, #00f2ea, #FF2442, #E94B35
    );
    background-size: 400% 400%;
    animation: borderGlow 6s ease infinite;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.case-detail-card:hover .card-glow-border {
    opacity: 1;
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 카드 내부 */
.card-inner {
    display: flex;
    align-items: stretch;
    background: rgba(15, 15, 25, 0.95);
    border-radius: 24px;
    padding: 50px;
    gap: 50px;
    position: relative;
    overflow: hidden;
}

/* 카드 내부 배경 효과 */
.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(233, 75, 53, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.card-inner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 80, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* 카드 좌측 (텍스트 + 메트릭) */
.card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* 카테고리 뱃지 */
.case-detail-card .case-category {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 5px 16px;
    border-radius: 20px;
    width: fit-content;
}

.case-detail-card .case-category.bakery {
    color: #D4A574;
    background: rgba(212, 165, 116, 0.12);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 0 15px rgba(212, 165, 116, 0.1);
}

.case-detail-card .case-category.beauty {
    color: #E91E8C;
    background: rgba(233, 30, 140, 0.1);
    border: 1px solid rgba(233, 30, 140, 0.25);
    box-shadow: 0 0 15px rgba(233, 30, 140, 0.1);
}

.case-detail-card .case-category.restaurant {
    color: #E94B35;
    background: rgba(233, 75, 53, 0.1);
    border: 1px solid rgba(233, 75, 53, 0.25);
    box-shadow: 0 0 15px rgba(233, 75, 53, 0.1);
}

.case-detail-card .case-category.pharmacy {
    color: #2E8B57;
    background: rgba(46, 139, 87, 0.1);
    border: 1px solid rgba(46, 139, 87, 0.25);
    box-shadow: 0 0 15px rgba(46, 139, 87, 0.1);
}

/* 케이스 타이틀 */
.case-detail-card .case-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.4;
}

.case-detail-card .title-highlight {
    color: #FF6B55;
    text-shadow: 0 0 20px rgba(233, 75, 53, 0.3);
}

/* ============================================
   케이스별 성과 메트릭 (대형 숫자)
   ============================================ */
.case-metrics {
    display: flex;
    gap: 30px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.metric-value {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #E94B35, #FF6B55, #ff9a8b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 0 15px rgba(233, 75, 53, 0.25));
    font-variant-numeric: tabular-nums;
}

/* 케이스 설명 */
.case-detail-card .case-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 18px;
}

.case-detail-card .case-desc strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* 키워드 태그 */
.case-detail-card .case-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.case-detail-card .case-keywords span {
    display: inline-block;
    background: rgba(233, 75, 53, 0.08);
    color: #FF6B55;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(233, 75, 53, 0.2);
    transition: all 0.3s ease;
}

.case-detail-card .case-keywords span:hover {
    background: rgba(233, 75, 53, 0.15);
    border-color: rgba(233, 75, 53, 0.5);
    box-shadow: 0 0 20px rgba(233, 75, 53, 0.2);
    transform: translateY(-2px);
}

/* ============================================
   카드 우측 (폰 목업 + 플랫폼 뱃지)
   ============================================ */
.card-right {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.card-phone-mockup {
    width: 220px;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 40px rgba(233, 75, 53, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-detail-card:hover .card-phone-mockup {
    box-shadow:
        0 0 60px rgba(233, 75, 53, 0.35),
        0 25px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(-6px) scale(1.02);
}

/* 폰 목업 빛 반사 효과 */
.card-phone-mockup::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    transform: rotate(0deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.case-detail-card:hover .card-phone-mockup::after {
    transform: rotate(180deg);
}

.card-phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.18);
    transition: transform 0.6s ease;
}

.case-detail-card:hover .card-phone-mockup img {
    transform: scale(1.22);
}

/* 플랫폼 뱃지 (카드 내) */
.case-detail-card .platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FF2442;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 36, 66, 0.3);
    transition: all 0.3s ease;
}

.case-detail-card .platform-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 36, 66, 0.5);
}

.case-detail-card .platform-badge.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 0 20px rgba(225, 48, 108, 0.3);
}

.case-detail-card .platform-badge.tiktok {
    background: linear-gradient(135deg, #00f2ea, #ff0050);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.3);
}

/* CTA 버튼 */
.case-study-cta {
    text-align: center;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.case-study-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #E94B35, #FF6B55);
    color: white;
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(233, 75, 53, 0.35);
}

.case-study-cta .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(233, 75, 53, 0.5);
}

/* ============================================
   반응형 - 태블릿
   ============================================ */
@media (max-width: 1024px) {
    .case-showcase {
        gap: 20px;
    }

    .showcase-phone img {
        max-width: 100%;
        border-radius: 22px;
    }

    .case-study-section .section-header {
        text-align: center;
    }

    .case-study-section .section-desc {
        margin: 0 auto;
    }

    .case-stats {
        gap: 35px;
    }

    .case-stat-item .stat-number {
        font-size: 44px;
    }

    .case-stat-item .stat-suffix {
        font-size: 26px;
    }

    /* 대형 카드 태블릿 대응 */
    .card-inner {
        padding: 35px;
        gap: 35px;
    }

    .card-right {
        flex: 0 0 220px;
    }

    .card-phone-mockup {
        width: 180px;
        height: 260px;
    }

    .case-detail-card .case-title {
        font-size: 22px;
    }

    .metric-value {
        font-size: 30px;
    }

    .case-metrics {
        gap: 20px;
    }
}

/* ============================================
   반응형 - 모바일
   ============================================ */
@media (max-width: 768px) {
    .case-study-section {
        padding: 80px 0;
    }

    .case-study-section .section-title {
        font-size: 28px;
    }

    .case-study-section .section-label {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 6px 16px;
    }

    /* 배경 글로우 축소 */
    .case-study-bg-glow {
        width: 300px;
        height: 300px;
    }

    .case-study-bg-glow.secondary {
        width: 250px;
        height: 250px;
    }

    /* 파티클 모바일 최적화 */
    .floating-particles span {
        width: 3px !important;
        height: 3px !important;
    }

    /* 설명 텍스트 모바일 */
    .case-study-section .section-desc {
        font-size: 14px;
        line-height: 1.9;
        max-width: 100%;
        padding: 0 10px;
        word-break: keep-all;
    }

    /* 성과 수치 */
    .case-stats {
        gap: 20px;
        margin-bottom: 50px;
    }

    .case-stat-item .stat-number {
        font-size: 30px;
    }

    .case-stat-item .stat-suffix {
        font-size: 18px;
    }

    .case-stat-item .stat-label {
        font-size: 12px;
    }

    .case-stat-divider {
        height: 35px;
    }

    /* 폰 쇼케이스: 모바일 4열 유지 간격 축소 */
    .case-showcase {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 50px;
    }

    .showcase-phone img {
        max-width: 100%;
        border-radius: 20px;
    }

    /* 대형 카드: 세로 레이아웃 */
    .case-detail-cards {
        gap: 30px;
    }

    .card-inner {
        flex-direction: column;
        padding: 30px 24px;
        gap: 30px;
    }

    .card-right {
        flex: none;
        width: 100%;
        order: -1;
    }

    .card-phone-mockup {
        width: 200px;
        height: 280px;
    }

    .case-detail-card .case-title {
        font-size: 20px;
    }

    .metric-value {
        font-size: 28px;
    }

    .case-metrics {
        gap: 20px;
    }

    .case-detail-card .case-desc {
        font-size: 14px;
    }

    .case-detail-card .platform-badge {
        font-size: 12px;
        padding: 6px 16px;
    }
}

/* ============================================
   반응형 - 소형 모바일
   ============================================ */
@media (max-width: 480px) {
    .case-study-section {
        padding: 60px 0;
    }

    .case-study-section .section-title {
        font-size: 24px;
    }

    /* 폰 쇼케이스: 소형 모바일 2열 전환 */
    .case-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 30px;
    }

    .showcase-phone img {
        border-radius: 16px;
    }

    /* 설명 텍스트 소형 모바일 */
    .case-study-section .section-desc {
        font-size: 13px;
        padding: 0 5px;
    }

    /* 성과 수치 더 축소 */
    .case-stats {
        gap: 12px;
        margin-bottom: 40px;
    }

    .case-stat-item .stat-number {
        font-size: 24px;
    }

    .case-stat-item .stat-suffix {
        font-size: 15px;
    }

    .case-stat-item .stat-label {
        font-size: 11px;
    }

    .case-stat-divider {
        height: 28px;
    }

    /* 대형 카드 소형 모바일 */
    .card-inner {
        padding: 24px 18px;
        gap: 24px;
    }

    .case-detail-card {
        border-radius: 18px;
    }

    .card-glow-border {
        border-radius: 20px;
    }

    .card-phone-mockup {
        width: 160px;
        height: 230px;
        border-radius: 18px;
    }

    .case-detail-card .case-title {
        font-size: 18px;
    }

    .metric-value {
        font-size: 24px;
    }

    .metric-label {
        font-size: 11px;
    }

    .case-metrics {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .case-detail-card .case-keywords span {
        font-size: 11px;
        padding: 4px 12px;
    }

    .case-detail-card .case-desc {
        font-size: 13px;
    }
}
