/* 기본 슬라이더 컨테이너 */
.review-slider-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Swiper 초기화 전 PC 3열 레이아웃 */
@media (min-width: 768px) {
    .review-swiper:not(.swiper-initialized) .swiper-wrapper {
        display: flex;
        gap: 30px;
    }

    .review-swiper:not(.swiper-initialized) .swiper-slide {
        flex: 0 0 calc((100% - 60px) / 3);
    }

    .review-swiper:not(.swiper-initialized) .swiper-slide:nth-child(n + 4) {
        display: none;
    }
}

/* 기본 리뷰 카드 스타일 (모바일) */
.review-card {
    background: #f6f6f6 !important;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* 리뷰 헤더 (평점과 날짜) */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-rating {
    color: #ffd700;
    font-size: 24px;
}

.review-date {
    font-size: 14px;
    color: #888;
    font-weight: normal;
}

/* 리뷰 내용 */
.review-content {
    flex-grow: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-height: 9.6em; /* line-height 1.6 * 6줄 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    cursor: pointer;
}

.review-content.is-truncated::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.6em;
    background: linear-gradient(transparent, #f6f6f6);
    pointer-events: none;
}

.featured-review .review-content.is-truncated::after {
    background: linear-gradient(transparent, #f0f9f1);
}

.review-content {
    position: relative;
}

.review-content p:empty {
    display: none;
}

/* 작성자 */
.review-author {
    color: #333;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* PC 스타일 (768px 이상) */
@media (min-width: 768px) {
    .review-swiper .review-rating {
        font-size: 20px;
    }

    .review-content {
        font-size: 15px;
        line-height: 1.5;
    }

    .review-author {
        font-size: 14px;
    }

    .review-date {
        font-size: 12px;
    }
}

/* 태블릿 중간 사이즈 (선택사항) */
@media (min-width: 576px) and (max-width: 767px) {
    .swiper {
        --swiper-theme-color: #333;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    .review-rating {
        font-size: 22px;
    }

    .review-content {
        font-size: 15px;
    }
}

/* 모바일: 2개 카드 세로 배치 */
.review-slide-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 네비게이션 버튼 */
.swiper-button-next,
.swiper-button-prev {
    top: 50%;
    transform: translateY(-50%);
    color: #333 !important;
    width: 44px;
    height: 44px;
}

/* 모바일에서 네비게이션 버튼 크기 조정 */
@media (max-width: 767px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}

/* 페이지네이션 */
.swiper-pagination {
    bottom: 10px !important;
}

.swiper-pagination-bullet {
    background: #ddd;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #333 !important;
}

/* 섹션 제목 스타일 */
.reviews-section {
    background: #ffffff !important;
    padding: 60px 0;
    margin: 40px 0;
}

.reviews-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
}

@media (max-width: 767px) {
    .reviews-section {
        padding: 40px 0;
        margin: 20px 0;
    }

    .reviews-section h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
}
/* 빈 p 태그 완전 제거 */
.review-content p:empty {
    display: none !important;
}

.review-content p:last-child {
    margin-bottom: 0;
}

/* WordPress가 자동 생성하는 빈 태그들 숨기기 */
.review-card p:empty,
.review-card div:empty {
    display: none !important;
}

/* 추천 리뷰 스타일 (#00710d 기준) */
.featured-review {
    background: linear-gradient(135deg, #f0f9f1 0%, #ffffff 100%) !important;
    border: 2px solid #00710d !important;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(45deg, #00710d, #005a0a);
    color: white;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 0 10px 0 12px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.featured-badge::before {
    content: "★ ";
    color: #90ee90;
}

.featured-review .review-rating {
    color: #00710d !important;
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0, 113, 13, 0.3);
}

.featured-review .review-date {
    color: #00710d !important;
    font-weight: 600;
}

.featured-review .review-content {
    color: #333 !important;
    font-weight: 500;
}

.featured-review .review-author {
    color: #00710d !important;
    border-top-color: rgba(0, 113, 13, 0.2);
    font-weight: 700;
}

/* 리뷰 팝업 */
.review-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.review-popup-overlay.is-active {
    display: flex;
}

.review-popup {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: reviewPopupIn 0.25s ease;
}

@keyframes reviewPopupIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.review-popup__close:hover {
    color: #333;
}

.review-popup__rating {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 8px;
}

.review-popup__date {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.review-popup__content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    word-break: keep-all;
}

.review-popup__author {
    padding-top: 16px;
    border-top: 1px solid #eee;
    color: #555;
    font-size: 14px;
    text-align: right;
}

@media (max-width: 480px) {
    .review-popup {
        padding: 24px;
        border-radius: 12px;
    }
}

/* 관리자 목록 스타일 */
.column-featured .featured-indicator {
    color: #00710d !important;
    font-weight: bold;
}
