/* ============================================
   index_main.css — 메인페이지 전용 스타일
   (index.php 인라인 <style> 블록에서 추출)
   ============================================ */

/* [2026 업그레이드] 배지 스타일 */
.badge-upgrade {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #D30026 0%, #E63355 100%);
    border-radius: 20px;
    margin-right: 4px;
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(211, 0, 38, 0.5);
}

/* LIVE 배지 스타일 */
.badge-live {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #D30026 0%, #E63355 100%);
    border-radius: 20px;
    margin-right: 4px;
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(211, 0, 38, 0.5);
}

/* 반짝이는 효과 */
.badge-upgrade::before,
.badge-live::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 3s infinite;
}

/* 펄스 글로우 애니메이션 */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(211, 0, 38, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 25px rgba(211, 0, 38, 0.8);
        transform: scale(1.05);
    }
}

/* 빛나는 효과 애니메이션 */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ============================================
   히스토리 섹션 스타일 - 깔끔한 라이트 테마
   ============================================ */
.history_wrap {
    background: #fff;
    padding: 40px 0 60px 0;
    border-top: 1px solid #eee;
}
.history_wrap .wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}
.history_wrap .title_wrap {
    margin-bottom: 32px;
}
.history_wrap .title_wrap .title {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin-bottom: 6px;
}
.history_wrap .title_wrap .text {
    font-size: 15px;
    color: #666;
}
.history_wrap .tab_buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.history_wrap .tab_btn {
    padding: 10px 20px;
    border: 1px solid #eee;
    background: #fff;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.history_wrap .tab_btn:hover {
    border-color: #FF3B30;
    color: #FF3B30;
}
.history_wrap .tab_btn.active {
    background: #FF3B30;
    border-color: #FF3B30;
    color: #fff;
}
.history_wrap .tab_content {
    display: none;
}
.history_wrap .tab_content.active {
    display: block;
}
.history_wrap .history_slider {
    overflow: hidden;
}
.history_wrap .swiper-slide {
    width: auto;
}
.history_wrap .instructor_card,
.history_wrap .class_card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}
.history_wrap .instructor_card:hover,
.history_wrap .class_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: #ddd;
}
.history_wrap .card_image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f5f5f5;
}
.history_wrap .card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.history_wrap .sold_out_overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.history_wrap .card_content {
    padding: 16px;
}
.history_wrap .card_category {
    display: inline-block;
    font-size: 12px;
    color: #FF3B30;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #FEE2E2;
    border-radius: 4px;
}
.history_wrap .card_title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.history_wrap .card_instructor {
    font-size: 13px;
    color: #888;
}
.history_wrap .control {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    justify-content: center;
}
.history_wrap .control button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}
.history_wrap .control button:hover {
    background: #FF3B30;
    border-color: #FF3B30;
    color: #fff;
}
@media (max-width: 768px) {
    .history_wrap {
        padding: 32px 0 40px 0;
    }
    .history_wrap .title_wrap .title {
        font-size: 20px;
    }
    .history_wrap .swiper-slide {
        width: auto;
    }
    .history_wrap .tab_btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============================================
   김머신 봇 섹션(독자 히어로)
   ============================================ */
.kmbot_hero { padding: 34px 0 10px; }
.kmbot_grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; align-items: stretch; }
.kmbot_copy { padding: 26px 22px; border-radius: 18px; background: linear-gradient(180deg, #0b0b0b 0%, #151515 100%); color: #fff; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 18px 60px rgba(0,0,0,0.35); }
.kmbot_badge { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: rgba(211,0,38,0.16); color: #ff7a8f; border: 1px solid rgba(211,0,38,0.35); margin-bottom: 10px; }
.kmbot_title { font-size: 30px; line-height: 1.2; font-weight: 900; letter-spacing: -0.02em; }
.kmbot_sub { margin-top: 10px; font-size: 18px; line-height: 1.5; color: rgba(255,255,255,0.82); min-height: 2.2em; }
.kmbot_cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.kmbot_btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.kmbot_btn_primary { background: linear-gradient(135deg, #D30026 0%, #ff4d6d 100%); color: #fff; box-shadow: 0 10px 26px rgba(211,0,38,0.35); }
.kmbot_btn_primary:hover { filter: brightness(1.03); }
.kmbot_btn_ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.14); }
.kmbot_btn_ghost:hover { background: rgba(255,255,255,0.10); }
.kmbot_hint { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,0.6); }

.kmbot_card { position: relative; border-radius: 18px; background: #fff; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 18px 60px rgba(0,0,0,0.12); overflow: hidden; }
.kmbot_chat { padding: 18px; background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%); }
.kmbot_bubble { max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.kmbot_bubble_user { margin-left: auto; background: #111; color: #fff; border-bottom-right-radius: 6px; }
.kmbot_bubble_bot { margin-top: 10px; background: rgba(211,0,38,0.08); color: #111; border: 1px solid rgba(211,0,38,0.12); border-bottom-left-radius: 6px; }
.kmbot_prompts { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 14px 18px; background: #fff; border-top: 1px solid rgba(0,0,0,0.06); }
.kmbot_chip { height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid rgba(0,0,0,0.12); background: #fff; cursor: pointer; }
.kmbot_chip:hover { border-color: rgba(211,0,38,0.35); box-shadow: 0 8px 20px rgba(211,0,38,0.10); }

.kmbot_toast { position: absolute; left: 14px; right: 14px; bottom: 14px; transform: translateY(18px); opacity: 0; pointer-events: none; background: rgba(17,17,17,0.92); color: #fff; padding: 10px 12px; border-radius: 12px; font-size: 12px; transition: all .25s ease; }
.kmbot_toast.is-active { transform: translateY(0); opacity: 1; }

/* 교체 타이핑 커서 */
.km-typing::after {
    content: "\2589";
    margin-left: 2px;
    opacity: 1;
    animation: kmBlink 1s steps(1) infinite;
}
@keyframes kmBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .km-typing::after { animation: none; }
    .kmbot_toast { transition: none; }
}

@media (max-width: 960px) {
    .kmbot_grid { grid-template-columns: 1fr; }
    .kmbot_title { font-size: 26px; }
    .kmbot_sub { font-size: 16px; }
}
@media (max-width: 1239px) {
    .kmbot_hero { padding: 34px 16px 10px; }
}
@media (max-width: 768px) {
    .kmbot_grid { gap: 18px; }
}
