body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    color: #333333;
    padding-bottom: 40px;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

#main_top {
    background: #ffffff;
    border-bottom: none;
}

/* Section 1: 인기 포스트와 베스트 포스트 배너 */
.featured-posts-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.featured-posts-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.main-posts-section {
    flex: 2;
}

.best-posts-section {
    flex: 1;
}

/* 이미지 스타일 */
.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section 2: 필터 버튼 */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 40px;
}

.filter-buttons {
    display: flex;
    justify-content: start;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background-color: #f8f9fa;
    color: #666666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff5d1a, #ff7a47);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active {
    background-color: #ff5d1a;
    color: #ffffff;
}

.filter-btn.active::before {
    left: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 글쓰기 버튼 */
.write-btn {
    background-color: #ff5d1a;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.write-btn:hover {
    background-color: #e55a2b;
}

.write-icon {
    width: 23px;
}

.drafts-btn {
    background-color: #ff5d1a;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.drafts-btn:hover {
    background-color: #e55a2b;
    color: #ffffff;
}

/* Section 3: 블로그 포스트 그리드 */
.blog-posts {
    padding: 40px 0 80px 0;
    background-color: #ffffff;
}

/* 그리드 포스트들 */
.posts-grid,
.more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px; /* 그리드 간격 증가 */
    margin-bottom: 60px;
}

/* 상단 캐러셀 섹션 헤더 */
.featured-posts-section .section-header {
    margin-bottom: 30px;
}

.featured-posts-section .section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.featured-posts-section .section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* 캐러셀 컨테이너 */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    width: 100%;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 16px;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 메인 캐러셀 카드 (상단 배너용) */
.featured-posts-section .main-carousel-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
    height: 350px;
}

.featured-posts-section .main-carousel-card:hover {
    /* transform 효과 제거 */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.featured-posts-section .main-carousel-card .post-image {
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-posts-section .main-carousel-card .post-image .post-img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 100%;
    min-width: 100%;
}

.featured-posts-section .main-carousel-card:hover .post-image .post-img {
    transform: scale(1.05);
}

/* 메인 캐러셀 카드 이미지 오버레이 */
.featured-posts-section .main-carousel-card .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    color: white;
}

.featured-posts-section .main-carousel-card .overlay-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* 메인 캐러셀 카드 내부 텍스트 */
.featured-posts-section .main-carousel-card .image-overlay .post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.featured-posts-section .main-carousel-card .image-overlay .post-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 베스트 캐러셀 카드 (상단 배너용) */
.featured-posts-section .best-carousel-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
    height: 350px;
    position: relative;
}

.featured-posts-section .best-carousel-card:hover {
    /* transform 효과 제거 */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.featured-posts-section .best-carousel-card .post-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-posts-section .best-carousel-card .post-image .post-img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 100%;
    min-width: 100%;
}

.featured-posts-section .best-carousel-card:hover .post-image .post-img {
    transform: scale(1.05);
}

.featured-posts-section .best-carousel-card .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: rgba(72, 72, 72, 0.8);
    /*background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);*/
    color: #ffffff;
    z-index: 2;
}

.featured-posts-section .best-carousel-card .post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.featured-posts-section .best-carousel-card .post-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.featured-posts-section .best-carousel-card .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.featured-posts-section .best-carousel-card .post-date-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.featured-posts-section .best-carousel-card .post-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 캐러셀 네비게이션 */
.featured-posts-section .carousel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 10px;
}

.featured-posts-section .carousel-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666666;
    backdrop-filter: blur(10px);
}

.featured-posts-section .carousel-btn:hover {
    background-color: #ff5d1a;
    border-color: #ff5d1a;
    color: #ffffff;
    transform: scale(1.1);
}

.featured-posts-section .carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.featured-posts-section .carousel-dots {
    display: flex;
    gap: 8px;
}

.featured-posts-section .carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-posts-section .carousel-dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

/* 고정 캐러셀 도트 */
.carousel-dots-fixed {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

/* 메인 포스트 캐러셀 도트 */
.featured-posts-section .main-posts-carousel .carousel-dots-fixed {
    position: static;
    display: flex;
    gap: 6px;
    justify-content: start;
    margin-top: 20px;
    z-index: 10;
}

.carousel-dots-fixed .carousel-dot-fixed {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots-fixed .carousel-dot-fixed.active {
    background-color: #e55a2b;
    transform: scale(1.2);
}

.featured-posts-section .best-posts-carousel .carousel-dots-fixed .carousel-dot-fixed {
    background-color: rgba(255, 255, 255, 0.7);
}

.featured-posts-section .best-posts-carousel .carousel-dots-fixed .carousel-dot-fixed.active {
    background-color: #ff5d1a;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* 숨겨진 포스트들은 클릭 불가능하게 설정 */
.post-card[style*="display: none"] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* 일반 그리드 카드 */
.grid-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    height: 390px;
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    /* transform 효과 제거 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.grid-card .post-image {
    position: relative;
    height: 200px; /* 이미지 높이는 원래대로 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
}

.grid-card .post-image .post-img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 100%;
    min-width: 100%;
}

.grid-card:hover .post-image .post-img {
    transform: scale(1.05);
}

.grid-card .post-content {
    padding: 20px; /* 패딩 줄임 */
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-card .post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0 0 4px 0; /* 제목과 설명 사이 여백 더 줄임 */
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.3rem;
    flex-shrink: 0; 
}

.grid-card .post-description {
    font-size: 0.95rem;
    color: #666666;
    line-height: 1.5;
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
    flex-shrink: 0;
}

.grid-card .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0; /* 메타 영역 크기 고정 */
    min-height: 30px; /* 최소 높이 유지 */
    padding-top: 2px; /* 상단 패딩 더 줄임 */
}

.grid-card .post-date {
    font-size: 0.9rem;
    color: #999999;
    font-weight: 500;
}


/* 카테고리 태그 */
.category-tag {
    background-color: #ff5d1a;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
}

.best-badge {
    font-size: 1rem;
    color: #ff5d1a;
}

/* 베스트 포스트 카드의 카테고리 태그 */
.featured-posts-section .best-carousel-card .category-tag {
    background-color: rgba(255, 93, 26, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 포스트 링크 스타일 */
.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 더 많은 글 보기 버튼 */
.load-more-section {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
    
    .posts-grid,
    .more-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .featured-posts-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .main-posts-section,
    .best-posts-section {
        flex: none;
    }
    
    .posts-grid,
    .more-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-posts-section {
        padding: 60px 0;
    }
    
    .featured-posts-container {
        gap: 20px;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-buttons {
        gap: 8px;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .write-btn {
        padding: 14px 28px;
        font-size: 0.9rem;
        align-self: center;
    }
    
    .featured-posts-section .section-title {
        font-size: 1.5rem;
    }
    
    .featured-posts-section .main-carousel-card {
        height: 320px;
    }
    
    .featured-posts-section .main-carousel-card .image-overlay {
        padding: 20px;
    }
    
    .featured-posts-section .main-carousel-card .image-overlay .post-title {
        font-size: 1.5rem;
    }
    
    .featured-posts-section .best-carousel-card {
        height: 320px;
    }
    
    .featured-posts-section .best-carousel-card .post-content {
        padding: 20px;
    }
    
    .posts-grid,
    .more-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px; /* 모바일에서도 간격 증가 */
    }
    
    .grid-card .post-content {
        padding: 20px;
    }
    
    .grid-card {
        height: 380px; /* 모바일에서 카드 높이 조정 */
    }
    
    .grid-card .post-image {
        height: 200px; /* 모바일에서도 이미지 높이 원래대로 */
    }
    
    .grid-card .post-title {
        height: 3.36rem; /* 모바일에서 2줄 고정 높이 조정 */
    }
    
    .grid-card .post-description {
        height: 3.825rem; /* 모바일에서 3줄 고정 높이 조정 */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .featured-posts-section {
        padding: 40px 0;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        width: 200px;
        padding: 12px 20px;
    }
    
    .featured-posts-section .main-carousel-card {
        height: 300px;
    }
    
    .featured-posts-section .main-carousel-card .image-overlay {
        padding: 15px;
    }
    
    .featured-posts-section .main-carousel-card .image-overlay .post-title {
        font-size: 1.3rem;
    }
    
    .featured-posts-section .main-carousel-card .image-overlay .post-description {
        font-size: 0.9rem;
    }
    
    .featured-posts-section .best-carousel-card {
        height: 300px;
    }
    
    .featured-posts-section .best-carousel-card .post-content {
        padding: 18px;
    }
    
    .featured-posts-section .best-carousel-card .post-title {
        font-size: 1.1rem;
    }
    
    .featured-posts-section .best-carousel-card .post-description {
        font-size: 0.85rem;
    }
    
    .posts-grid,
    .more-grid {
        grid-template-columns: 1fr;
        gap: 20px; /* 작은 모바일에서도 간격 증가 */
    }
    
    .grid-card {
        height: 360px; /* 작은 모바일에서 카드 높이 조정 */
    }
    
    .grid-card .post-image {
        height: 200px; /* 작은 모바일에서도 이미지 높이 원래대로 */
    }
    
    .grid-card .post-title {
        height: 3.08rem; /* 작은 모바일에서 2줄 고정 높이 조정 */
    }
    
    .grid-card .post-description {
        height: 3.375rem; /* 작은 모바일에서 3줄 고정 높이 조정 */
    }
    
    .featured-posts-section .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .featured-posts-section .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* 빈 상태 메시지 스타일 */
.empty-state-section {
    display: none;
    padding: 40px 0 80px 0;
}

.empty-state-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.empty-state-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

.empty-state-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4rem;
    color: #ff5d1a;
    margin-bottom: 24px;
    opacity: 0.8;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.empty-state-description {
    font-size: 1rem;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.empty-state-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.empty-state-actions .btn-primary {
    background-color: #ff5d1a;
    color: #ffffff;
}

.empty-state-actions .btn-primary:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 93, 26, 0.3);
}

/* 반응형 빈 상태 메시지 */
@media (max-width: 768px) {
    .empty-state-container {
        min-height: 300px;
        padding: 40px 15px;
    }
    
    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 20px;
    }
    
    .empty-state-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .empty-state-description {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .empty-state-actions .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .empty-state-container {
        min-height: 250px;
        padding: 30px 10px;
    }
    
    .empty-state-icon {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }
    
    .empty-state-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .empty-state-description {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .empty-state-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .empty-state-actions .btn {
        width: 200px;
        justify-content: center;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.6s ease-out;
}