@charset "utf-8";

/* 웹진 스타일 스토리북 리스트 */
.storybook-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.storybook-item {
    display: flex;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    min-height: 160px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.storybook-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

/* 좌측 세로선 제거 */

.storybook-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 140px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
}

.storybook-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    background-color: #f8f9fa;
}

/* 본문 이미지가 썸네일로 사용될 때의 스타일 */
.storybook-thumbnail img[src*="data/"] {
    object-fit: contain;
    background-color: #fff;
    padding: 8px;
}

.storybook-item:hover .storybook-thumbnail img {
    transform: scale(1.08);
}

.storybook-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,123,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.storybook-item:hover .storybook-thumbnail::after {
    opacity: 1;
}

.no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 3rem;
}

.storybook-content {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.storybook-content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.storybook-content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.storybook-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #2c3e50;
    letter-spacing: -0.5px;
    flex: 1;
    margin-right: 12px;
}

.storybook-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.storybook-title a:hover {
    color: #007bff;
    text-decoration: none;
}

/* 본문 내용 스타일 */
.storybook-excerpt {
    line-height: 1.6;
    color: #6c757d;
    font-size: 1rem;
}

.storybook-excerpt p {
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.storybook-meta {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.storybook-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.storybook-info i {
    color: #007bff;
    font-size: 0.8rem;
}

/* 바로보기 버튼 스타일 */
.storybook-quick-view-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.storybook-quick-view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #ff5722, #e64a19);
}

.storybook-quick-view-btn i {
    font-size: 0.7rem;
}

/* 기존 링크 버튼 스타일 (호환성을 위해 유지) */
.storybook-link-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    flex-shrink: 0;
}

.storybook-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.storybook-link-btn i {
    font-size: 0.7rem;
}

/* 기존 카드 스타일 (호환성을 위해 유지) */
.storybook-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    min-width: 320px;
    width: 100%;
}

.storybook-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.storybook-card .card-img-top {
    height: 300px;
    object-fit: cover;
    background-color: #f8f9fa;
}

.storybook-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.storybook-card .card-title a {
    color: #333;
    text-decoration: none;
}

.storybook-card .card-title a:hover {
    color: #007bff;
}

.storybook-card .card-text {
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.storybook-card .card-body {
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.storybook-card .card-body .card-text:last-child {
    margin-top: auto;
}

/* 배지 스타일 */
.badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.badge-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
    border: none;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border: none;
    font-weight: 600;
}

/* 게시판 읽기 */
#bo_v_title {
    font-size: 23px;
    font-weight: bold;
    line-height: 1.4;
    letter-spacing: -1px;
}

#bo_v_con {
    min-height: 200px; 
    word-break: break-all;
    overflow: hidden;
}

#bo_v_con img {
    max-width: 100%;
    height: auto;
}

#bo_v_img {
    width: 100%;
    text-align: center;
    overflow: hidden;
    zoom: 1;
}

#bo_v_img:after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

#bo_v_img a.view_image {
    display: block;
}

#bo_v_img img {
    margin-bottom: 1.0rem;
}

/* 게시판 댓글 : 내용 */
.cmt-reply {
    top: 0;
    left: -16px;
}

.by-writer { 
    background: #fbefef !important;
    border-top: 1px solid #f6cece !important;
}

.cmt-content {
    word-break: break-all;
    overflow: hidden;
}

.cmt-content img {
    max-width: 100%;
    height: auto;
}

/* 모바일 반응형 */
@media all and (max-width: 767px) {
    .storybook-item {
        flex-direction: column;
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .storybook-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .storybook-content {
        padding: 20px;
    }
    
    .storybook-content-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }
    
    .storybook-title {
        font-size: 1.2rem;
        margin-bottom: 0;
        margin-right: 12px;
        flex: 1;
    }
    
    .storybook-excerpt {
        font-size: 0.95rem;
        margin-bottom: 16px !important;
    }
    
    .storybook-quick-view-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .storybook-meta {
        margin-bottom: 20px;
    }
    
    .storybook-info {
        padding-top: 16px;
        font-size: 0.85rem;
    }
    
    /* 기존 카드 스타일 */
    .storybook-card {
        min-width: 280px;
    }
    
    .storybook-card .card-img-top {
        height: 200px;
    }
    
    .storybook-card .card-title {
        font-size: 1rem;
    }
    
    .storybook-card .card-body {
        min-height: 100px;
    }
    
    .responsive #bo_list .float-left.float-md-none {
        margin-right: 0.75rem;
    }
    
    .responsive #bo_list .na-title {
        margin-bottom: 0.14rem;
    }
    
    /* 모바일 카테고리 스타일 */
    #bo_cate {
        padding: 12px 0;
        margin-bottom: 20px;
    }
    
    #bo_cate .category-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media all and (max-width: 575px) {
    .storybook-thumbnail {
        height: 160px;
    }
    
    .storybook-content {
        padding: 16px;
    }
    
    .storybook-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .storybook-meta {
        margin-bottom: 16px;
    }
    
    .storybook-info {
        font-size: 0.8rem;
        padding-top: 12px;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .responsive #bo_v_title {
        font-size: 20px;
        line-height: 1.5;
    }
    
    .responsive #bo_v_con { 
        min-height: 140px; 
    }
    
    /* 기존 카드 스타일 */
    .storybook-card {
        min-width: 250px;
    }
    
    .storybook-card .card-img-top {
        height: 150px;
    }
    
    .storybook-card .card-title {
        font-size: 0.9rem;
    }
    
    .storybook-card .card-text {
        font-size: 0.8rem;
    }
    
    .storybook-card .card-body {
        min-height: 80px;
    }
}

/* 게시판 목록 체크박스 */
#bo_gallery .chk-box {
    position: absolute;
    bottom: 5px;
    right: 10px;
    z-index: 2;
}

#bo_gallery .wr-now {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1;
}

/* 게시판 읽기 : SNS 공유 */
#bo_v_sns_icon { 
    margin: -5px auto; 
}

#bo_v_sns_icon img { 
    width: 40px; 
    border-radius: 50%; 
    margin: 5px;
}

/* 스토리북 정보 카드 */
.storybook-info .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.storybook-info .card-body {
    padding: 1.25rem;
}

/* 첨부파일 스타일 */
.attachment-list .btn {
    margin-bottom: 0.5rem;
}

.attachment-list .btn:last-child {
    margin-bottom: 0;
}

/* 관련링크 스타일 */
.related-links .btn {
    margin-bottom: 0.5rem;
}

.related-links .btn:last-child {
    margin-bottom: 0;
}

/* 게시글 읽기 관련링크 스타일 */
#bo_v .card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

#bo_v .card-header h3 {
    color: #495057;
    font-weight: 600;
}

#bo_v .card-header i {
    color: #007bff;
    margin-right: 0.5rem;
}

#bo_v .card-body .btn {
    transition: all 0.3s ease;
    border-radius: 20px;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    word-break: break-all;
}

#bo_v .card-body .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

#bo_v .card-body .btn i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* 버튼 그룹 스타일 */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 검색창 스타일 */
#bo_search .alert {
    border-radius: 8px;
}

#bo_search .form-control {
    border-radius: 4px;
}

#bo_search .btn {
    border-radius: 0 4px 4px 0;
}

/* 페이지네이션 스타일 */
.pagination .page-link {
    border-radius: 4px;
    margin: 0 0.125rem;
}

/* 카테고리 스타일 */
#bo_cate {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 16px 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#bo_cate .sly-wrap {
    border-radius: 8px;
    overflow: hidden;
}

#bo_cate .sly-list {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

#bo_cate .sly-list li {
    margin: 0;
    padding: 0;
    border: none;
}

#bo_cate .category-btn {
    display: block;
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    margin: 0 4px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.05);
    white-space: nowrap;
}

#bo_cate .category-btn:hover {
    background: rgba(255,255,255,0.9);
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    text-decoration: none;
}

#bo_cate .sly-list li.active .category-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    border-color: #007bff;
}

#bo_cate .sly-btn {
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
}

#bo_cate .sly-btn:hover {
    background: rgba(255,255,255,0.95);
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#bo_cate hr {
    margin: 16px 0 0 0;
    border-color: rgba(0,0,0,0.05);
}

/* 기존 카테고리 스타일 (호환성을 위해 유지) */
.category-list .btn {
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

.category-list .btn:last-child {
    margin-bottom: 0;
}

/* 빈 상태 스타일 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.storybook-card {
    animation: fadeIn 0.5s ease-out;
}

/* 호버 효과 */
.storybook-card:hover .card-title a {
    text-decoration: none;
}

.storybook-card:hover .badge {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

/* 접근성 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 스타일 */
.btn:focus,
.form-control:focus,
.custom-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .storybook-card {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .storybook-card .card-title,
    .storybook-card .card-title a {
        color: #e2e8f0;
    }
    
    .storybook-card .card-text {
        color: #a0aec0;
    }
    
    .storybook-card:hover .card-title a {
        color: #63b3ed;
    }
}


