/* Bootstrap Grid 반응형 스타일 */
@media (max-width: 991px) {
    /* 태블릿에서 1열로 변경 */
    .dev-tech-category-layout .col-md-8,
    .dev-tech-category-layout .col-md-4 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 30px;
    }

    .dev-tech-category-layout .row > [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 왼쪽 열: 추천 게시물 - Grid 관련 속성 주석 처리 */
.dev-tech-left-column {
    display: flex;
    flex-direction: column;
}

.posts-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.purchase-post-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.purchase-post-item:hover {
    background: #f8f9fa;
}

.purchase-tech-item {
    cursor: pointer;
}

.purchase-tech-item .purchase-tech-image img {
    transition: transform 0.2s ease;
}

/* all-category.html용 아이템들 이미지 hover 효과 (다른 게시물과 동일) */
.purchase-tech-item:hover .purchase-tech-image img {
    transform: scale(1.05);
}

.post-divider {
    border: none;
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

.post-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 700;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image {
    position: relative;
    flex-shrink: 0;
    width: 200px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #999;
    margin-top: auto;
}

.post-share {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 10px;
}

.share-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666 !important
}

.share-btn:hover {
    background: #f5f5f5;
    border-color: #2196F3;
}

/* 오른쪽 열: 3개 위젯 - Grid 관련 속성 주석 처리 */
.dev-tech-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 위젯 공통 스타일 - .base-widget 클래스 사용 권장 */
.dev-tech-right-column > div {
    /* 기본 스타일은 .base-widget 클래스에서 상속 가능 */
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

/* 위젯 콘텐츠 - .base-widget-content 클래스와 동일한 값 */
.widget-content {
    padding: 16px; /* .base-widget-content와 동일 */
    margin: 0 !important; /* 블로그 페이지에서 margin 제거 */
}

/* 블로그 페이지에서 label margin 제거 */
label,
.label {
    margin: 0 !important;
}

/* span.label 클래스도 명시적으로 오버라이딩 */
span.label {
    margin: 0 !important;
}


.design-tech-left-column {
    min-width: 0;
}

.design-tech-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 개발 테크 더보기 섹션 */
.load-more-section {
    padding: 30px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    /* text-align: center !important; → Bootstrap .text-center 클래스 사용으로 제거 */
    /* display: flex; justify-content: center; align-items: center; → Bootstrap .text-center로 대체 */
}


/* 아이콘 기본 스타일만 유지 */
.load-more-btn i {
    font-size: 12px;
    margin-left: 5px;
}


.load-more-btn .fa-spinner {
    animation: base-spin 1s linear infinite;
}

/* 기존 spin 애니메이션은 base-spin으로 대체됨 */


@media (max-width: 768px) {
    .dev-tech-category-layout,
    .design-tech-category-layout {
        padding: 0 20px;
        padding-bottom: 40px;
    }

    .dev-tech-post-item,
    .design-tech-post-item {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .post-image {
        width: 100%;
        height: 200px;
    }
}

/* 인기 게시글 위젯 */
.popular-posts-widget {
    position: relative;
}

.popular-posts-widget .widget-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 700;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.widget-image {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.widget-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.widget-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.widget-share {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.pagination-prev,
.pagination-next {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    color: #2196F3;
}

.pagination-info {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* HOT 키워드 위젯 */
.hot-keywords-widget .widget-header {
    margin-bottom: 16px;
}


.hot-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-keyword:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hot-keyword.blue {
    background: #2196F3;
    color: white;
}

.hot-keyword.purple {
    background: #9C27B0;
    color: white;
}

.hot-keyword.black {
    background: #333;
    color: white;
}

.hot-keyword.orange {
    background: #FF9800;
    color: white;
}

.hot-keyword.blue-light {
    background: #03A9F4;
    color: white;
}

.hot-keyword.pink {
    background: #E91E63;
    color: white;
}

.hot-keyword.green {
    background: #4CAF50;
    color: white;
}

.hot-keyword.blue-dark {
    background: #1976D2;
    color: white;
}

.hot-keyword.pink-dark {
    background: #AD1457;
    color: white;
}

/* 추천 게시글 위젯 */
.recommended-posts-widget {
    position: relative;
}

.recommended-posts-widget .widget-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 700;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* ===================================
   카테고리 네비게이션 스타일
   =================================== */

/* 카테고리 네비게이션 컨테이너 */
.category-navigation {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

/* 메인 카테고리 네비게이션 고정 상태 (밸런스UP 섹션 제외) */
body > .category-navigation.sticky,
.blog-header-container + .category-navigation.sticky {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999 !important; /* 메인 네비게이션보다 낮게 설정 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    margin-bottom: 0 !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* 밸런스UP 섹션의 카테고리 네비게이션은 sticky 적용 안함 */
.balance-up-section .category-navigation.sticky {
    position: relative !important;
    top: auto !important;
    box-shadow: none !important;
}

/* 탭 리스트 컨테이너 */
.tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 8px 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    justify-content: center;
    align-items: flex-start;
    line-height: 1;
}

.tablist::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 탭 버튼 스타일 */
.tab {
    background: transparent;
    border: none;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    border-bottom: 3px solid transparent;
    min-width: 80px;
    text-align: center;
    font-family: Pretendard, sans-serif;
    line-height: 1.25;
    flex-shrink: 0;
    margin: 2px;
}

/* 탭 호버 상태 */
.tab:hover {
    background: #e9ecef;
    color: #333;
}

/* 탭 활성 상태 */
.tab.active,
.tab[aria-selected="true"] {
    background: transparent;
    color: #333;
    border-bottom-color: #333;
    font-weight: 600;
}

/* 활성 탭 하단 검은색 선 */
.tab.active::after,
.tab[aria-selected="true"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
    z-index: 1;
}

/* 탭 포커스 상태 제거 */
.tab:focus {
    outline: none;
}

/* 탭 비활성 상태 */
.tab:not(.active):not([aria-selected="true"]) {
    background: transparent;
    color: #888;
    border-bottom-color: transparent;
}

/* 탭 비활성 호버 */
.tab:not(.active):not([aria-selected="true"]):hover {
    background: #f8f9fa;
    color: #333;
}

/* ALL 탭 기본 선택 상태 제거 */
.tab[data-category="all"] {
    background: transparent;
    color: #888;
    border-bottom-color: transparent;
    font-weight: 600;
}

/* ALL 탭도 다른 탭들과 동일하게 선택 상태 적용 */
.tab[data-category="all"].active,
.tab[data-category="all"][aria-selected="true"] {
    background: transparent;
    color: #333;
    border-bottom-color: #333;
    font-weight: 600;
}

.tab[data-category="all"].active::after,
.tab[data-category="all"][aria-selected="true"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #fff;
    z-index: 1;
}

/* 스크롤 표시기 */
.tablist::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, #f8f9fa);
    pointer-events: none;
    z-index: 2;
}

/* ===================================
   최신 ARTICLE 섹션 스타일
   =================================== */

/* 기본 카테고리 레이아웃 */
.base-category-layout {
    max-width: 1200px;
    margin: 0 auto;
}

/* 왼쪽 열 (게시물 목록) - dev-tech-left-column과 동일하게 수정 */
.purchase-left-column {
    display: flex;
    flex-direction: column;
}

/* 오른쪽 열 (위젯) */
.purchase-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 게시물 아이템은 상단에서 dev-tech-post-item과 함께 통합 정의됨 */

/* 게시물 이미지는 상단의 공통 .post-image 스타일 사용 */

/* 게시물 콘텐츠는 상단의 공통 .post-content 스타일 사용 */

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .purchase-category-layout {
        padding: 0 40px 40px;
    }
}

@media (max-width: 768px) {
    .purchase-category-layout {
        padding: 0 20px 30px;
    }

    .purchase-header {
        margin-bottom: 32px;
    }

    .purchase-title {
        font-size: 28px;
    }

    .purchase-left-column {
        padding: 20px;
    }

    .purchase-post-item {
        flex-direction: column;
        gap: 16px;
    }

    /* 게시물 이미지 반응형은 상단의 공통 .post-image 미디어쿼리 사용 */
}

/* ==============================================
   Blog Bootstrap Enhancements CSS
   Custom CSS to enhance Bootstrap components
   ============================================== */

/* Container width constraints to maintain original layout */
.purchase-category-layout {
    padding: 0 20px !important; /* 반응형에서 다른 값 사용 */
}

/* Panel Enhancements for Bootstrap 3 - Widget Card Override 
   
   NOTE: 이 섹션은 향후 .base-widget 클래스 시스템으로 통합 예정
   현재는 기존 호환성을 위해 유지됨
   */
.purchase-right-column .widget-card.panel.panel-default {
    margin-bottom: 20px !important;
    border: 1px solid #ddd !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;
}

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

.purchase-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;
}


.dev-tech-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;
}

.dev-tech-right-column .widget-card.panel.panel-default .panel-body {
    padding: 15px !important;
    background-color: #ffffff !important;
    position: relative !important;
}

.dev-tech-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 */
.dev-tech-right-column .widget-card .widget-image.thumbnail {
    margin-bottom: 10px !important;
    border: 1px solid #e9ecef !important;
    overflow: hidden !important;
}

/* .dev-tech-right-column .widget-card .widget-image.thumbnail img 스타일은 Bootstrap .img-responsive로 대체됨 */

.dev-tech-right-column .widget-card .widget-meta {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 8px !important;
}

.dev-tech-right-column .widget-card .widget-share {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
}

.dev-tech-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;
}

.dev-tech-right-column .widget-card .widget-share-btn:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* HOT Keywords Widget Special Styling */
.dev-tech-right-column .hot-keywords-widget .panel-body {
    padding: 15px !important;
}

.dev-tech-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;
}

.dev-tech-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 */
.dev-tech-right-column .widget-pagination .btn-group {
    width: 100% !important;
    display: flex !important;
}

.dev-tech-right-column .widget-pagination .btn-group .btn {
    flex: 1 !important;
    border-radius: 0 !important;
}

.dev-tech-right-column .widget-pagination .btn-group .btn:first-child {
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
}

.dev-tech-right-column .widget-pagination .btn-group .btn:last-child {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

/* Loading State Icon Enhancement */
.loading-state i {
    color: #007bff;
}

/* Label Enhancements */
.post-content .label.label-primary {
    display: inline-block !important;
    margin: 0 !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: center !important;
    width: auto !important;
}

.post-tags .label {
    margin-right: 5px;
    font-weight: normal;
    display: inline-block;
    margin-bottom: 5px;
    padding: 4px 8px;
    font-size: 12px;
}

.post-tags .label.label-default {
    background-color: #f5f5f5;
    color: #666;
}

.label-primary {
    background-color: #007bff;
}

/* Widget Tags Enhancement */
.widget-tags .label {
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Button Group Enhancement */
.widget-pagination .btn-group {
    width: 100%;
}

.widget-pagination .btn-group .btn {
    float: none;
}

/* Bootstrap 3 btn 스타일 최소한의 조정만 적용 */
.load-more-btn.btn {
    margin: 20px auto 0 !important;
    display: block !important;
}

.purchase-category-layout .load-more-section {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.purchase-category-layout .load-more-section .load-more-btn {
    margin: 0 auto !important;
    display: inline-block !important;
    text-align: center !important;
    float: none !important;
}

/* 모든 카테고리 더보기 섹션 공통 중앙 정렬 강화 */
.load-more-section.text-center {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.load-more-section.text-center .load-more-btn {
    margin: 0 auto !important;
    display: inline-block !important;
    float: none !important;
}

/* 최종 우선순위 최고 규칙 - 다른 모든 스타일 덮어쓰기 */
[class*="-category-layout"] .load-more-section,
.load-more-section {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

[class*="-category-layout"] .load-more-section .load-more-btn,
[class*="-category-layout"] .load-more-section [id*="load-more-btn"],
.load-more-section .load-more-btn,
.load-more-section [id*="load-more-btn"] {
    margin: 0 auto !important;
    display: inline-block !important;
    text-align: center !important;
    float: none !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;

    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: bold;
    color: #666;
}

.widget-share-btn.btn {
    padding: 6px 10px;
    border-radius: 50%;
    min-width: 36px;
    height: 36px;
}

.pagination-prev.btn,
.pagination-next.btn {
    padding: 4px 8px;
    min-width: 28px;
}

/* Hot Keywords Hover Effects */
.hot-keyword.label {
    margin: 3px;
    display: inline-block;
    font-weight: 500 !important;
    font-size: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hot-keyword:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Bootstrap Card Enhancements for Blog Posts */
.dev-tech-post-item.card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.dev-tech-post-item.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

/* Post Image Enhancements */
.dev-tech-post-item .post-image .card-img-top {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dev-tech-post-item:hover .post-image .card-img-top {
    transform: scale(1.05);
}

/* Post Category Badge */
.dev-tech-post-item .post-category.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
}

/* Post Title Styling */

.dev-tech-post-item:hover .post-title {
    color: #007bff;
}

/* Post Excerpt */

/* Post Tags */
.dev-tech-post-item .post-tag.badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3em 0.6em;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.dev-tech-post-item .post-tag.badge:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff;
}

/* Share Button */
.dev-tech-post-item .share-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Widget Cards Hover Effects */
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease;
}

/* Widget Loading Styles - 베이스 클래스 활용 */
.loading-placeholder,
.widget-loading {
    color: #666;
    text-align: center;
}

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
    .dev-tech-category-layout.container-fluid {
        padding: 0 20px !important;
        padding-bottom: 40px !important;
    }
}

@media (max-width: 767.98px) {
    .dev-tech-category-layout.container-fluid {
        padding: 0 16px !important;
        padding-bottom: 30px !important;
    }

    .hot-keyword {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
}

@media (max-width: 575.98px) {
    .dev-tech-category-layout.container-fluid {
        padding: 0 12px !important;
    }

    .hot-keyword {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

