/* 최근 게시글 섹션 - 호주 장터 스타일 */

.recent-posts-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .recent-posts-section {
        padding: 0 1rem;
    }
}

.recent-posts-section .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0;
}

.recent-posts-section .section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.recent-posts-section .section-subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
}

.recent-posts-list {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.post-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid #f1f3f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--badge-color, #ff6b35);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-item:hover {
    border-color: var(--badge-color, #ff6b35);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.12);
    transform: translateY(-3px);
    background: white;
}

.post-item:hover::before {
    opacity: 1;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 첫 번째 줄: 배지 + 제목 */
.post-row-1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.post-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
}

.post-badge i {
    font-size: 0.9rem;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.5;
    letter-spacing: -0.3px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-item:hover .post-title {
    color: #ff6b35;
}

/* 두 번째 줄: 미리보기 + 시간 */
.post-row-2 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-preview {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #ff6b35;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    background: #fff5f0;
    border-radius: 14px;
    border: 1px solid #ffe5d9;
    min-width: fit-content;
    width: auto;
}

.post-time::before {
    display: none !important;
}

.post-time i {
    font-size: 0.8rem;
    color: #ff6b35;
    flex-shrink: 0;
    display: inline-block !important;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 5rem 2rem;
    color: #868e96;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 2px solid #f1f3f5;
}

.empty-state i,
.error-state i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: #ff6b35;
}

.empty-state p,
.error-state p {
    font-size: 1.05rem;
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

/* 모바일 최적화 - 터치 친화적 */
@media (max-width: 768px) {
    .recent-posts-section {
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .recent-posts-section .section-header {
        margin-bottom: 1.2rem;
    }

    .recent-posts-section .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .recent-posts-section .section-subtitle {
        font-size: 0.9rem;
    }

    .recent-posts-list {
        gap: 0.75rem;
    }

    .post-item {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .post-item:hover {
        transform: none;
    }

    .post-item:active {
        transform: scale(0.98);
        background: #f9fafb;
    }

    .post-row-1 {
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 0.7rem;
    }

    .post-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
        flex-shrink: 0;
    }

    .post-badge i {
        font-size: 0.75rem;
    }

    .post-title {
        font-size: 1rem;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }

    .post-row-2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .post-preview {
        font-size: 0.9rem;
        line-height: 1.5;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .post-time {
        font-size: 0.75rem;
        padding: 0.3rem 0.65rem;
        border-radius: 12px;
    }

    .post-time::before {
        display: none !important;
    }

    .post-time i {
        font-size: 0.75rem;
        display: inline-block !important;
    }

    .empty-state,
    .error-state {
        padding: 4rem 2rem;
    }
}

@media (max-width: 480px) {
    .recent-posts-section {
        margin: 1.5rem auto;
        padding: 0 0.75rem;
    }

    .recent-posts-section .section-header {
        margin-bottom: 1rem;
    }

    .recent-posts-section .section-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .recent-posts-section .section-subtitle {
        font-size: 0.85rem;
    }

    .recent-posts-list {
        gap: 0.6rem;
    }

    .post-item {
        padding: 1rem;
        border-radius: 8px;
    }

    .post-row-1 {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.6rem;
    }

    .post-badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
        flex-shrink: 0;
    }

    .post-badge i {
        font-size: 0.7rem;
    }

    .post-title {
        font-size: 0.9rem;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }

    .post-row-2 {
        gap: 0.4rem;
    }

    .post-preview {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .post-time {
        font-size: 0.7rem;
        padding: 0.25rem 0.55rem;
        border-radius: 10px;
    }

    .post-time::before {
        display: none !important;
    }

    .post-time i {
        font-size: 0.65rem;
        display: inline-block !important;
    }

    .empty-state,
    .error-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i,
    .error-state i {
        font-size: 2.5rem;
    }
}