/* ================================================= */
/* 모든 카테고리 오른쪽 컬럼 위젯 스타일 통합          */
/* ================================================= */

/* 모든 카테고리 오른쪽 컬럼에 동일한 위젯 스타일 적용 */
[class*="-right-column"] .widget-card.panel.panel-default {
    margin-bottom: 20px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.1) !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease !important;
}

[class*="-right-column"] .widget-card.panel.panel-default:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.15) !important;
    transform: translateY(-2px) !important;
}

[class*="-right-column"] .widget-card.panel.panel-default .panel-heading {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #e9ecef !important;
    padding: 10px 15px !important;
    border-top-left-radius: 3px !important;
    border-top-right-radius: 3px !important;
    border-color: transparent !important;
}

[class*="-right-column"] .widget-card.panel.panel-default .panel-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #333 !important;
}

[class*="-right-column"] .widget-card.panel.panel-default .panel-title .widget-number {
    display: inline-block !important;
    background-color: #007bff !important;
    color: white !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    text-align: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}

[class*="-right-column"] .widget-card.panel.panel-default .panel-body {
    padding: 15px !important;
    background-color: #ffffff !important;
    position: relative !important;
    justify-content: center;
}

[class*="-right-column"] .widget-card.panel.panel-default .panel-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
    padding: 10px 15px !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
}

/* Widget Content Enhancement - 모든 카테고리 */
[class*="-right-column"] .widget-card .widget-image.thumbnail {
    overflow: hidden !important;
}

/* [class*="-right-column"] .widget-card .widget-image.thumbnail img 스타일은 Bootstrap .img-responsive로 대체됨 */

[class*="-right-column"] .widget-card .widget-meta {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 8px !important;
}

[class*="-right-column"] .widget-card .widget-share {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
}

[class*="-right-column"] .widget-card .widget-share-btn {
    padding: 6px 8px !important;
    border-radius: 50% !important;
    background-color: rgba(255,255,255,0.9) !important;
    border: 1px solid #e9ecef !important;
    color: #666 !important;
    transition: all 0.2s ease !important;
}

[class*="-right-column"] .widget-card .widget-share-btn:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* HOT Keywords Widget Special Styling - 모든 카테고리 */
[class*="-right-column"] .hot-keywords-widget .panel-body {
    padding: 15px !important;
}

[class*="-right-column"] .hot-keywords-list .hot-keyword {
    display: inline-block !important;
    margin: 3px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

[class*="-right-column"] .hot-keywords-list .hot-keyword:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Widget Pagination Enhancement - 모든 카테고리 */
[class*="-right-column"] .widget-pagination .btn-group {
    width: 100% !important;
    display: flex !important;
}

[class*="-right-column"] .widget-pagination .btn-group .btn {
    flex: 1 !important;
    border-radius: 0 !important;
}

[class*="-right-column"] .widget-pagination .btn-group .btn:first-child {
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
}

[class*="-right-column"] .widget-pagination .btn-group .btn:last-child {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

/* ================================================= */
/* Bootstrap 3 호환성을 위한 추가 유틸리티 클래스     */
/* ================================================= */

/* Bootstrap 3 호환 검색바 스타일 */
.blog-search-container {
    max-width: 100%;
    margin: 16px 0 16px 0;
    text-align: center;
}

.blog-search-input-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    background-color: white;
    transition: border-color 0.3s ease;
    overflow: hidden; /* float 요소 포함을 위해 추가 */
}

.blog-search-input-wrapper:hover {
    border-color: #bdbdbd;
}

.blog-search-input-wrapper:focus-within {
    border-color: #1976d2;
}

.blog-search-icon-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 56px; /* 고정 너비 설정 */
    height: 56px;
    line-height: 56px;
    text-align: center;
    padding: 0;
    margin: 0;
    z-index: 2;
}

.blog-search-icon {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    vertical-align: middle;
}

/* 검색 입력 필드 - position 기반 레이아웃 */
.blog-search-input {
    border: none;
    outline: none;
    background: transparent;
    padding: 20px 20px 20px 56px; /* 왼쪽에 아이콘 공간 확보 */
    font-size: 16px;
    font-family: inherit;
    color: #333;
    width: 100%;
    min-height: 16px; /* 최소 높이 조정 */
    height: 56px;
    box-sizing: border-box;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.blog-search-input::placeholder {
    color: #999;
    font-style: normal;
}

/* 검색 아웃라인 - float 레이아웃에 맞게 수정 */
.blog-search-outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    background: transparent;
    pointer-events: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.blog-search-legend {
    display: none;
    outline: none;
    border: none;
    margin: 0;
    padding: 0;
}

/* 카테고리 탭을 위한 Flexbox 대체 */
.tablist.clearfix {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    text-align: center;
    padding: 8px 0;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
}

.tablist .tab {
    display: inline-block;
    vertical-align: top;
    margin: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 위젯 로딩 패딩 - 베이스 클래스 modifier 활용 */
.widget-loading {
    padding: 20px; /* base-loading-container.compact와 동일 */
}

.loading-placeholder {
    padding: 30px 20px; /* base-loading-container.spacious와 동일 */
}

/* clearfix 추가 지원 */
.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

/* center-block 강화 */
.center-block {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Bootstrap 3 float 유틸리티 클래스 */
.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

/* ========================================
   카드 이미지 공통 베이스 클래스 (Phase 1 공통화)
   ======================================== */

/* 카드 이미지 컨테이너 베이스 */
.card-image-base {
    overflow: hidden;
    border-radius: 8px;
}

/* 카드 이미지 공통 스타일 */
.card-img-responsive {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 카드 호버 줌 효과 */
.card-hover-zoom:hover img,
.card-hover-zoom:hover .card-img-top {
    transform: scale(1.05);
}
