/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background-color: #fff;
    color: #333;
}

/* Container */
.reviews-section {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.reviews-container {
    display: flex;
    gap: 40px;
    align-items: stretch; /* 변경: 헤더와 카드의 높이를 맞춤 */
}

/* Header & Nav */
.reviews-header {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 상단 정렬 */
    text-align: left; /* 왼쪽 정렬 추가 */
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: left;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
}

.slider-nav {
    margin-top: 40px; /* 제목과의 간격 */
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start; /* 왼쪽 정렬 */
}

.nav-arrows {
    display: flex;
    border: 1px solid #ddd;
}

.nav-btn {
    width: 50px;
    height: 50px;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.3s;
}

.nav-btn:first-child {
    border-right: 1px solid #ddd;
}

.nav-btn:hover {
    background: #f5f5f5;
}

.more-btn {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.3s;
}

.more-btn:hover {
    background: #f5f5f5;
}

/* Slider */
.reviews-slider {
    width: 100%;
    overflow: hidden;
}

/* Review Card */
.review-card {
    background: #fff;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: auto;
    text-decoration: none; /* 링크 밑줄 제거 */
    color: inherit; /* 글자 색상 유지 */
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px); /* 호버 시 살짝 들림 효과 */
}

.card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 변경: 75% -> 60% (세로 길이 축소) */
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.overlay-text {
    color: #fff;
    font-size: 1.3rem; /* 변경: 1.5 -> 1.3 */
    font-weight: 700;
    line-height: 1.4;
}

.card-content {
    padding: 20px 20px; /* 변경: 30px 25px -> 20px 20px */
}

.content-title {
    font-size: 1.05rem; /* 변경: 1.125 -> 1.05 */
    font-weight: 700;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-desc {
    font-size: 0.9rem; /* 변경: 0.95 -> 0.9 */
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.client-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

/* Card Footer (Attorney Info) */
.card-footer {
    background: #f9f9f9;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* 양쪽 끝 정렬 */
    align-items: flex-start;
    border-top: 1px solid #eee;
    margin-top: auto;
    min-height: 110px;
}

.footer-info {
    flex: 1;
    text-align: left;
}

.footer-label {
    font-size: 0.75rem;
    color: #2c9b6b;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.attorney-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attorney-names span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}

.attorney-photos {
    display: grid;
    grid-template-columns: repeat(2, 42px); /* 2열 고정 */
    grid-auto-rows: 42px;
    gap: 6px;
    margin-left: 10px;
}

.attorney-photo-item {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    border: 1px solid #eee;
}

.attorney-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Responsive */
@media (max-width: 1024px) {
    .reviews-container {
        flex-direction: column;
    }
    
    .reviews-header {
        width: 100%;
        min-height: auto;
        margin-bottom: 30px;
    }
    
    .slider-nav {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .reviews-section {
        padding: 40px 15px;
    }
}

/* 상세 페이지 (Single Review) 스타일 */
.hwp-single-wrapper {
    padding: 80px 20px;
    background: #fff;
    font-family: 'Pretendard', sans-serif;
}

.hwp-single-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
}

/* 사이드바 */
.hwp-single-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.hwp-sidebar-tags {
    display: flex;
    flex-direction: column; /* 세로 정렬로 변경하여 가로 겹침 방지 */
    gap: 10px;
    margin-bottom: 40px;
}

.hwp-tag-category {
    width: 100%; /* 너비를 꽉 채움 */
    padding: 12px;
    background: #1a293b;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.hwp-tag-result {
    width: 100%; /* 너비를 꽉 채움 */
    padding: 12px;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.hwp-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
}

.hwp-attorney-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.hwp-attorney-item {
    text-align: center;
}

.hwp-attorney-photo {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    margin-bottom: 8px;
}

.hwp-attorney-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hwp-attorney-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    word-break: keep-all;
}

/* 메인 영역 */
.hwp-single-main {
    flex: 1;
}

.hwp-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a293b;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hwp-main-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    color: #666;
    font-size: 0.95rem;
}

.hwp-meta-right {
    display: flex;
    gap: 8px;
}

.hwp-view-count {
    font-weight: 600;
}

.hwp-visual-image img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 40px;
    border-radius: 10px;
}

.hwp-letter-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

/* 반응형 */
@media (max-width: 1024px) {
    .hwp-single-container {
        flex-direction: column;
    }
    .hwp-single-sidebar {
        width: 100%;
    }
    .hwp-attorney-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
