/* IWPG Board 스타일 */

/* 게시판 컨테이너 */
.iwpg-board {
    margin: 40px 0;
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 검색 폼 */
.iwpg-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    align-items: center;
    justify-content: flex-end;
}

.iwpg-search-input {
    flex: 0 0 33%;
    max-width: 400px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.iwpg-search-input:focus {
    outline: none;
    border-color: #f7941d;
}

.iwpg-search-button {
    padding: 12px 30px;
    background: #f7941d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
}

.iwpg-search-button:hover {
    background: #e88310;
}

/* 게시물 컨테이너 */
.iwpg-posts-container {
    min-height: 200px;
}

/* 로딩 */
.iwpg-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.iwpg-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f7941d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: iwpg-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes iwpg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 게시물 목록 */
.iwpg-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.iwpg-post-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    transition: background 0.2s;
}

.iwpg-post-item:hover {
    background: #f9f9f9;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

/* 카테고리 (단일) */
.iwpg-post-category {
    flex: 0 0 120px;
    width: 120px;
    padding: 8px 12px;
    background: #f7941d;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    word-break: keep-all;
    word-wrap: break-word;
}

/* 카테고리 (여러 개) */
.iwpg-post-categories {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.iwpg-post-categories .iwpg-post-category {
    flex: 0 0 auto;
}

.iwpg-post-title {
    flex: 1;
    font-size: 19px;
    line-height: 1.4;
}

.iwpg-post-title a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Avada 테마 밑줄 애니메이션 제거 */
.iwpg-post-title a::before,
.iwpg-post-title a::after {
    display: none !important;
    content: none !important;
}

.iwpg-post-title a:hover,
.iwpg-post-title a:focus,
.iwpg-post-title a:active {
    color: #f7941d !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Avada 특정 클래스 오버라이드 */
.iwpg-post-title a.fusion-link,
.iwpg-post-title a[class*="fusion-"] {
    text-decoration: none !important;
}

.iwpg-post-title a.fusion-link::before,
.iwpg-post-title a.fusion-link::after,
.iwpg-post-title a[class*="fusion-"]::before,
.iwpg-post-title a[class*="fusion-"]::after {
    display: none !important;
    content: none !important;
}

.iwpg-post-date {
    flex: 0 0 auto;
    color: #999;
    font-size: 16px;
    white-space: nowrap;
}

/* 결과 없음 */
.iwpg-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* 페이지네이션 */
.iwpg-pagination {
    margin-top: 40px;
    text-align: center;
}

.iwpg-page-numbers {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.iwpg-page-numbers a,
.iwpg-page-numbers span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.iwpg-page-numbers .current {
    background: #f7941d;
    color: #fff;
    border-color: #f7941d;
    font-weight: 600;
}

.iwpg-page-numbers a:hover {
    background: #f5f5f5;
    border-color: #f7941d;
}

.iwpg-page-prev,
.iwpg-page-next {
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 768px) {
    .iwpg-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .iwpg-search-input {
        flex: 1;
        max-width: 100%;
    }
    
    .iwpg-search-button {
        width: 100%;
    }
    
    .iwpg-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .iwpg-post-category {
        flex: 0 0 100px;
        width: 100px;
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .iwpg-post-categories {
        width: 100%;
        gap: 6px;
    }
    
    .iwpg-post-title {
        font-size: 17px;
    }
    
    .iwpg-post-date {
        font-size: 14px;
    }
}
