/* 사연 게시판 전용 스타일 */

/* 이주의 사연 섹션 */
.story_weekly_section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.story_section_title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.story_weekly_list {
    display: grid;
    gap: 20px;
}

.story_weekly_item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story_weekly_item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.story_weekly_badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.story_weekly_item h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.story_weekly_item h4 a {
    color: #333;
    text-decoration: none;
}

.story_weekly_item h4 a:hover {
    color: #0066cc;
}

.story_weekly_info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.story_weekly_content {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

/* 채택 사연 TOP 10 슬라이더 스타일 추가 */
.story_adopted_section {
    margin-bottom: 40px;
    padding: 0;
}

.story_adopted_slider_wrap {
    position: relative;
    margin: 0 -20px;
    padding: 20px 60px; /* 상단 패딩 추가 */
}

.story_adopted_slider {
    overflow: hidden;
    margin: 0 20px;
    border-radius: 16px;
}

.story_adopted_track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.story_adopted_slide {
    flex: 0 0 calc(33.333% - 14px);
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 24px; /* 상하 패딩 증가 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    transition: all 0.3s ease;
    margin-top: 15px; /* 순위 배지를 위한 상단 여백 증가 */
    min-height: 200px; /* 최소 높이 설정 */
}

.story_adopted_slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.adopted_rank {
    position: absolute;
    top: -15px; /* 위치 조정 */
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    z-index: 5; /* z-index 추가 */
}

.adopted_rank.rank1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
}

.adopted_rank.rank2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    box-shadow: 0 4px 8px rgba(156, 163, 175, 0.3);
}

.adopted_rank.rank3 {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.3);
}

.adopted_content {
    margin-top: 25px; /* 순위 배지와의 간격 증가 */
}

.adopted_content h4 {
    margin: 0 0 16px 0; /* 하단 마진 증가 */
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.adopted_content h4 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.adopted_content h4 a:hover {
    color: #5B21B6;
}

.adopted_info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px; /* 마진 증가 */
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.adopted_info .adopted_writer {
    font-weight: 500;
    color: #4b5563;
}

.adopted_info .adopted_like {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ef4444;
    font-weight: 500;
}

.adopted_excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7; /* 줄간격 증가 */
}

/* 슬라이더 네비게이션 버튼 */
.slider_nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slider_nav:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-50%) scale(1.1);
}

.slider_prev {
    left: 10px;
}

.slider_next {
    right: 10px;
}

.slider_nav svg {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* 슬라이더 도트 인디케이터 */
.slider_dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.slider_dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider_dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background: #5B21B6;
}

/* 인기 사연 사이드바 */
.story_popular_sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 100;
}

.story_sidebar_title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.story_popular_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.story_popular_list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.story_popular_list li:last-child {
    border-bottom: none;
}

.story_rank {
    width: 30px;
    height: 30px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.story_popular_content {
    flex: 1;
}

.story_popular_content a {
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 4px;
}

.story_popular_content a:hover {
    color: #0066cc;
}

.story_popular_info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.story_like_count {
    color: #ff6b6b;
}

/* 리스트 테이블 스타일 */
.story-board-table {
    width: 100%;
    table-layout: auto; /* auto로 변경 */
}

.story-board-table th {
    white-space: nowrap; /* 헤더 텍스트 줄바꿈 방지 */
}

.story-board-table .rb-board-no {
    width: 60px;
    text-align: center;
}

.story-board-table .rb-board-title {
    width: auto; /* 나머지 공간 모두 사용 */
    padding-left: 15px;
    padding-right: 15px;
}

.story-board-table .rb-board-writer {
    width: 100px;
    text-align: center;
    white-space: nowrap;
}

.story-board-table .rb-board-likes {
    width: 80px;
    text-align: center;
    white-space: nowrap;
}

.story-board-table .rb-board-views {
    width: 60px;
    text-align: center;
    white-space: nowrap;
}

.story_like_inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.story_adopt_badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
}

.story_adopted {
    background-color: #f9f9f9;
}

/* 뷰 페이지 스타일 */
.story_view_header {
    margin-bottom: 10px;
}

.story_weekly_badge_view {
    display: inline-block;
    background: #FFD700;
    color: #333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-right: 10px;
}

.story_adopt_badge_view {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

/* 좋아요 버튼 */
.story_like_section {
    text-align: center;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.btn_story_like {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: white;
    border: 2px solid #ff6b6b;
    border-radius: 50px;
    color: #ff6b6b;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_story_like:hover {
    background: #fff5f5;
    transform: scale(1.05);
}

.btn_story_like.liked {
    background: #ff6b6b;
    color: white;
}

.btn_story_like.liked svg {
    fill: white !important;
    stroke: white !important;
}

.btn_story_like .like_count {
    font-weight: bold;
    font-size: 18px;
}

/* 관리자 컨트롤 */
.story_admin_controls {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.story_admin_controls h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.btn_story_weekly,
.btn_story_adopt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-right: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_story_weekly:hover,
.btn_story_adopt:hover {
    background: #f0f0f0;
}

.btn_story_weekly.active {
    background: #FFD700;
    color: #333;
    border-color: #FFD700;
}

.btn_story_adopt.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 반응형 - 슬라이더 부분만 추가 */
@media (max-width: 1200px) {
    .story_adopted_slide {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 1400px) {
    .story_popular_sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .story_weekly_section {
        padding: 15px;
    }
    
    .story_section_title {
        font-size: 18px;
    }
    
    .story_weekly_item {
        padding: 15px;
    }
    
    .story_weekly_badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .story_weekly_info {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .story_like_section {
        margin: 30px 0;
        padding: 20px 0;
    }
    
    .btn_story_like {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn_story_like .like_count {
        font-size: 16px;
    }
    
    .story_admin_controls {
        text-align: center;
    }
    
    .btn_story_weekly,
    .btn_story_adopt {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    /* 슬라이더 반응형 추가 */
    .story_adopted_slider_wrap {
        padding: 20px 40px; /* 상단 패딩 유지 */
    }
    
    .story_adopted_slide {
        flex: 0 0 100%;
    }
    
    .slider_nav {
        width: 35px;
        height: 35px;
    }
    
    .slider_prev {
        left: 0;
    }
    
    .slider_next {
        right: 0;
    }
}