/*
 * 파일명: blog-style.css
 * 위치: /blog-style.css
 * 기능: 블로그 페이지 전용 스타일
 * 작성일: 2025-08-08
 * 수정일: 2025-08-08
 */

/* ===================================
 * 블로그 헤더
 * ===================================
 */
/* 블로그 헤더 컨테이너 */
.blog-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

/* 블로그 헤더 제목 */
.blog-header-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

/* 블로그 헤더 서브타이틀 */
.blog-header-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* 블로그 검색 */
.blog-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-search-form .input-group {
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.blog-search-form .input-group.focused {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border-color: #FF6B35;
}

.blog-search-form .input-group-text {
    padding: 0 20px;
    background: transparent;
    border: none;
}

.blog-search-form .form-control {
    border: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    background: transparent;
}

.blog-search-form .form-control:focus {
    box-shadow: none;
    outline: none;
}

.blog-search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0 2rem;
    font-weight: 600;
    border: none;
}

/* ===================================
 * 블로그 컨테이너
 * ===================================
 */
/* 메인 컨테이너 */
.blog-container {
    padding: 60px 0 100px;
    background: #f5f6fa;
    min-height: 60vh;
    position: relative;
}

.blog-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom, rgba(26, 26, 46, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

/* 블로그 레이아웃 */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* 블로그 메인 */
.blog-main {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 필터 정보 */
.blog-filter-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.blog-filter-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.blog-filter-info p {
    color: #6c757d;
}

/* 빈 상태 */
.blog-empty {
    text-align: center;
    padding: 4rem 0;
    color: #6c757d;
}

.blog-empty i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

/* ===================================
 * 블로그 그리드
 * ===================================
 */
/* 그리드 컨테이너 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* 블로그 카드 */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

/* 카드 이미지 */
.blog-card-image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* 카드 콘텐츠 */
.blog-card-content {
    padding: 24px;
}

/* 카드 메타 */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.blog-card-category {
    color: #FF6B35;
    font-weight: 600;
    text-decoration: none;
}

.blog-card-category:hover {
    text-decoration: underline;
}

.blog-card-meta time {
    color: #6c757d;
}

/* 카드 제목 */
.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card-title a {
    color: #212529;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: #FF6B35;
}

/* 카드 발췌 */
.blog-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 카드 푸터 */
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.blog-card-views {
    color: #6c757d;
    font-size: 0.875rem;
}

.blog-card-link {
    color: #FF6B35;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
}

.blog-card-link:hover {
    gap: 8px;
}

/* ===================================
 * 페이지네이션
 * ===================================
 */
/* 페이지네이션 컨테이너 */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

/* 페이지네이션 버튼 */
.blog-pagination a,
.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pagination a {
    background: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
}

.blog-pagination a:hover {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
}

.blog-pagination a.active {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
}

.pagination-prev,
.pagination-next {
    gap: 8px;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-dots {
    color: #6c757d;
    cursor: default;
}

/* ===================================
 * 사이드바
 * ===================================
 */
/* 사이드바 위젯 */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 사이드바 제목 */
.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #FF6B35;
}

/* 카테고리 목록 */
.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 8px;
}

.sidebar-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-categories a:hover {
    background: #fff;
    color: #FF6B35;
    border-color: #FF6B35;
    transform: translateX(4px);
}

.sidebar-categories a.active {
    background: #FF6B35;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.sidebar-categories span {
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

.sidebar-categories a.active span {
    background: rgba(255, 255, 255, 0.2);
}

/* 인기 포스트 */
.sidebar-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-posts li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #FF6B35;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
}

.post-info {
    flex: 1;
}

.post-info a {
    display: block;
    color: #212529;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    font-size: 0.9375rem;
}

.post-info a:hover {
    color: #FF6B35;
}

.post-views {
    font-size: 0.8125rem;
    color: #6c757d;
}

/* CTA 위젯 */
.sidebar-cta {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: ctaPulse 3s ease-in-out infinite;
}

.sidebar-cta::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: ctaPulse 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes ctaPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.sidebar-cta h3 {
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.sidebar-cta p {
    margin-bottom: 20px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.sidebar-cta .btn-primary {
    background: #fff;
    color: #FF6B35;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-cta .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===================================
 * 반응형 디자인
 * ===================================
 */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .blog-header-title {
        font-size: 2rem;
    }
    
    .blog-header-subtitle {
        font-size: 1rem;
    }
    
    .blog-main {
        padding: 24px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 40px 0;
    }
    
    .blog-main {
        padding: 20px;
        border-radius: 0;
    }
    
    .sidebar-widget {
        border-radius: 0;
    }
}