/* 레이아웃 공통 */
.wsp-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* PC 그리드 레이아웃 (qw1, qw2 반영) */
.wsp-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.wsp-card-item {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.wsp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* qw2 반영: Hover 애니메이션 & 테두리 컬러 */
.wsp-card-item:hover {
    transform: scale(1.02);
    border-color: var(--wsp-hover-border-color);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.wsp-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
}

.wsp-img-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* 출처 원형 아이콘 */
.wsp-source-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
}

.bg-blog { background-color: #03cf5d; }
.bg-youtube { background-color: #ff0000; }
.bg-tistory { background-color: #ff5722; }
.bg-news { background-color: #2196f3; }
.bg-etc { background-color: #607d8b; }

.wsp-content {
    padding: 15px;
}

.wsp-title {
    margin: 0 0 12px 0;
    color: var(--wsp-title-color);
    font-size: var(--wsp-title-size);
    line-height: 1.4;
    word-break: keep-all;
}

.wsp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wsp-tag-item {
    font-size: var(--wsp-tag-size);
    color: var(--wsp-tag-color);
    border: 1px solid var(--wsp-tag-border-color);
    padding: 3px 10px;
    border-radius: 15px;
}

/* 더보기 버튼 스타일 */
.wsp-more-btn-wrapper {
    text-align: center;
    margin-top: 30px;
}

#wsp-load-more-btn {
    background: #fff;
    border: 1px solid #888;
    padding: 10px 35px;
    border-radius: 25px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

#wsp-load-more-btn:hover {
    background: #f8f8f8;
}

/* 모바일 전용 스타일 (qw5, qw6 반영) */
@media (max-width: 768px) {
    .wsp-grid-layout {
        grid-template-columns: repeat(1, 1fr);
    }

    /* qw5 모바일 메인 기본 스타일 */
    .wsp-mobile-main .wsp-card-item:first-child {
        background-color: var(--wsp-mb-first-bg);
        text-align: center;
        border: none;
        border-radius: 0;
        margin-bottom: 15px;
    }

    .wsp-mobile-main .wsp-card-item:not(:first-child) {
        border: none;
        border-bottom: 1px dashed #ddd;
        border-radius: 0;
    }

    .wsp-mobile-main .wsp-card-item:not(:first-child) .wsp-card-link {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
    }

    /* 풀원형 프로필 이미지 */
    .wsp-mobile-main .wsp-card-item:not(:first-child) .wsp-img-wrapper {
        width: 80px;
        height: 80px;
        padding-top: 0;
        border-radius: 50%;
        border: var(--wsp-mb-border-width) solid var(--wsp-mb-border-color);
        flex-shrink: 0;
    }

    /* 첫번째 글 동일 스타일 적용 옵션 활성화 시 (wsp-same-first-style) */
    .wsp-mobile-main.wsp-same-first-style .wsp-card-item:first-child {
        background-color: transparent;
        text-align: left;
        border-bottom: 1px dashed #ddd;
    }

    .wsp-mobile-main.wsp-same-first-style .wsp-card-item:first-child .wsp-card-link {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
    }

    .wsp-mobile-main.wsp-same-first-style .wsp-card-item:first-child .wsp-img-wrapper {
        width: 80px;
        height: 80px;
        padding-top: 0;
        border-radius: 50%;
        border: var(--wsp-mb-border-width) solid var(--wsp-mb-border-color);
        flex-shrink: 0;
    }

    /* qw6 모바일 페이지 스타일 */
    .wsp-mobile-page .wsp-card-item {
        border: none;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
}

/* =========================================================
   qw7 슬라이더 레이아웃 스타일 (첨부 이미지 디자인 완벽 재현)
   ========================================================= */
.wsp-qw7-container {
    display: flex;
    background-color: #c5d2dc; /* 파스텔 블루톤 배경 */
    border-radius: 16px;
    padding: 35px 25px;
    align-items: center;
    gap: 25px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}

.wsp-qw7-info-side {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wsp-qw7-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    margin: 0 0 20px 0;
    word-break: keep-all;
    min-height: 60px;
}

.wsp-qw7-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    min-height: 32px;
}

.wsp-qw7-tag {
    background: rgba(255, 255, 255, 0.7);
    color: #4a6572;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

/* 컨트롤러 & 페이징 */
.wsp-qw7-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wsp-qw7-pagination {
    display: flex !important;
    width: auto !important;
    gap: 6px;
}

.wsp-qw7-pagination .swiper-pagination-bullet {
    width: 24px;
    height: 24px;
    background: transparent;
    color: #333;
    font-weight: bold;
    font-size: 13px;
    opacity: 0.7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    cursor: pointer;
}

.wsp-qw7-pagination .swiper-pagination-bullet-active {
    background: #ffcc00; /* 황색 강조 원형 */
    color: #111;
    opacity: 1;
}

.wsp-qw7-playpause-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    padding: 0 4px;
}

.wsp-qw7-slider-side {
    flex: 1;
    min-width: 0; /* flex overflow 방지 */
}

.wsp-qw7-card-link {
    display: block;
    text-decoration: none;
}

.wsp-qw7-img-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    padding-top: 100%; /* 1:1 정사각형 이미지 카드 */
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.wsp-qw7-img-box img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.wsp-qw7-like-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #ff4757;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 모바일 반응형 (qw7) */
@media (max-width: 768px) {
    .wsp-qw7-container {
        flex-direction: column;
        padding: 20px 15px;
    }
    .wsp-qw7-info-side {
        width: 100%;
    }
    .wsp-qw7-slider-side {
        width: 100%;
    }
}