/* 숏코드 스타일 - 목록 및 상세 페이지 */

/* ===== 필터 영역 ===== */
.crc-review-list {
    padding: 20px 0;
}

.crc-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.crc-filter-selects {
    display: flex;
    gap: 15px;
}

.crc-filter-select {
    position: relative;
}

.crc-select {
    appearance: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 40px 10px 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 140px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.crc-select:focus {
    outline: none;
    border-color: #00b894;
}

.crc-search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.crc-search-input {
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    min-width: 200px;
    outline: none;
}

.crc-search-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
}

.crc-search-btn:hover {
    color: #00b894;
}

/* ===== 리뷰 그리드 ===== */
.crc-review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.crc-review-list[data-columns="2"] .crc-review-grid {
    grid-template-columns: repeat(2, 1fr);
}

.crc-review-list[data-columns="4"] .crc-review-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== 리뷰 카드 ===== */
.crc-review-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.crc-review-card:hover {
    border-color: #00b894;
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.1);
}

.crc-card-link {
    display: block;
    padding: 25px;
    text-decoration: none;
    color: inherit;
}

.crc-card-header {
    margin-bottom: 12px;
}

.crc-counselor-name {
    font-size: 13px;
    color: #f39c12;
    font-weight: 500;
}

.crc-review-card .crc-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crc-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #888;
}

.crc-card-category {
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 4px;
}

.crc-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.crc-star {
    color: #f39c12;
}

.crc-review-card .crc-card-content {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}

.crc-review-card .crc-card-content p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crc-review-card .crc-highlight {
    color: #00b894;
    font-weight: 500;
}

/* ===== 페이지네이션 ===== */
.crc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 40px;
}

.crc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.crc-pagination .page-numbers:hover {
    border-color: #00b894;
    color: #00b894;
}

.crc-pagination .page-numbers.current {
    background: #00b894;
    border-color: #00b894;
    color: #fff;
}

.crc-no-reviews {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* ===== 상세 페이지 ===== */
.crc-review-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.crc-detail-nav {
    display: flex;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.crc-nav-item {
    flex: 1;
    padding: 15px 20px;
    border-right: 1px solid #eee;
}

.crc-nav-item:last-child {
    border-right: none;
}

.crc-nav-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.crc-nav-item a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crc-nav-item a:hover {
    color: #00b894;
}

.crc-nav-current {
    background: #fff;
}

.crc-detail-content {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 40px;
}

.crc-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 2px solid #2c3e50;
    margin-bottom: 30px;
}

.crc-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.crc-detail-views {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
    margin-left: 20px;
}

.crc-detail-body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.crc-detail-body p {
    margin-bottom: 1.5em;
}

.crc-detail-body strong {
    color: #2c3e50;
}

.crc-error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .crc-review-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .crc-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .crc-filter-selects {
        flex-wrap: wrap;
    }

    .crc-select {
        width: 100%;
    }

    .crc-search-box {
        width: 100%;
    }

    .crc-search-input {
        flex: 1;
        min-width: auto;
    }

    .crc-review-grid {
        grid-template-columns: 1fr;
    }

    .crc-detail-nav {
        flex-direction: column;
    }

    .crc-nav-item {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .crc-nav-item:last-child {
        border-bottom: none;
    }

    .crc-detail-content {
        padding: 25px;
    }

    .crc-detail-header {
        flex-direction: column;
        gap: 10px;
    }

    .crc-detail-views {
        margin-left: 0;
    }

    .crc-detail-title {
        font-size: 22px;
    }
}

/* ===== 대시보드 스타일 ===== */
.crc-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Noto Sans KR', sans-serif;
}

.crc-dashboard-header {
    margin-bottom: 50px;
}

.crc-header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

.crc-btn-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b08d55;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: background 0.3s;
}

.crc-btn-write:hover {
    background: #9a7b46;
    color: #fff;
}

.crc-trophy-icon {
    position: absolute;
    right: 20%;
    font-size: 40px;
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 베스트 후기 섹션 */
.crc-best-section {
    position: relative;
}

.crc-best-header-text {
    margin-bottom: 20px;
}

.crc-best-header-text h2 {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crc-best-header-text h2::before {
    content: '👑';
    font-size: 24px;
    color: #ffb142;
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.crc-best-header-text p {
    color: #888;
    font-size: 14px;
    margin: 0;
    padding-left: 50px;
}

.crc-best-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.crc-best-card {
    background: #fff;
    border: 1px solid #ffb142;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    box-shadow: 0 5px 15px rgba(255, 177, 66, 0.1);
    transition: transform 0.3s ease;
}

.crc-best-card:hover {
    transform: translateY(-5px);
}

.crc-best-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #ffb142;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    transform: rotate(-15deg);
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.crc-best-icon-badge {
    position: absolute;
    top: -15px;
    right: 10px;
    font-size: 24px;
    background: #ffb142;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.crc-best-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-top: 20px;
    margin-bottom: 15px;
    min-height: 72px;
    /* 3줄 높이 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crc-read-more {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}

.crc-read-more:hover {
    color: #ffb142;
}

.crc-best-likes {
    font-size: 13px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.crc-best-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.crc-best-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crc-avatar-placeholder {
    width: 36px;
    height: 36px;
    background: #ffb142;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
}

.crc-author-info {
    display: flex;
    flex-direction: column;
}

.crc-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.crc-role {
    font-weight: 400;
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.crc-date {
    font-size: 12px;
    color: #aaa;
}

.crc-like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #ccc;
    transition: color 0.2s;
}

.crc-like-btn:hover {
    color: #ff6b6b;
}

/* 그리드 리스트 스타일 조정 */
.crc-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.crc-total-count {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.crc-select-small {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.crc-dashboard-list .crc-review-card {
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

.crc-dashboard-list .crc-card-body {
    padding: 20px;
    position: relative;
}

.crc-dashboard-list .crc-card-body::before {
    content: '"';
    font-family: serif;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 60px;
    line-height: 1;
    color: #f0f0f0;
    z-index: 0;
}

.crc-dashboard-list .crc-card-excerpt {
    position: relative;
    z-index: 1;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.crc-dashboard-list .crc-card-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crc-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crc-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}

.crc-author-meta {
    display: flex;
    flex-direction: column;
}

.crc-author-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.crc-card-likes {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.crc-card-likes:hover {
    color: #ff6b6b;
    transform: scale(1.05);
}

/* ===== 모달 스타일 ===== */
.crc-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* 스크롤은 내부 content에서 처리 */
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);

    /* Flexbox Center - 기본 설정 */
    align-items: center;
    justify-content: center;
}

.crc-modal.show {
    display: flex !important;
    /* 강제로 flex 적용 */
}

.crc-modal-content {
    background-color: #fefefe;
    margin: 0;
    /* margin: auto 제거 */
    padding: 0;
    border: none;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crc-close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.crc-close-modal:hover {
    color: #333;
}

.crc-modal-header-section {
    padding: 25px 25px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crc-btn-submit:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* ===== 좋아요 상태 ===== */
.crc-like-btn.liked,
.crc-card-likes.liked,
.crc-best-likes.liked {
    color: #ff6b6b;
    font-weight: bold;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== BEST 후기 랭킹 색상 (금, 은, 동) ===== */
/* 1위 - 금색 (기본값과 동일하지만 명시) */
.crc-best-card:nth-child(1) {
    border-color: #ffb142;
}

.crc-best-card:nth-child(1) .crc-best-icon-badge,
.crc-best-card:nth-child(1) .crc-best-badge {
    background: #ffb142;
}

/* 2위 - 은색 */
.crc-best-card:nth-child(2) {
    border-color: #bdc3c7;
}

.crc-best-card:nth-child(2) .crc-best-icon-badge,
.crc-best-card:nth-child(2) .crc-best-badge {
    background: #bdc3c7;
}

.crc-best-card:nth-child(2):hover {
    box-shadow: 0 5px 15px rgba(189, 195, 199, 0.3);
}

/* 3위 - 동색 */
.crc-best-card:nth-child(3) {
    border-color: #e67e22;
    /* 좀 더 진한 오렌지/브론즈 느낌 */
}

.crc-best-card:nth-child(3) .crc-best-icon-badge,
.crc-best-card:nth-child(3) .crc-best-badge {
    background: #e67e22;
}

.crc-best-card:nth-child(3):hover {
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.crc-modal-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crc-modal-avatar {
    width: 44px;
    height: 44px;
    background: #ffb142;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
}

.crc-modal-user-info {
    display: flex;
    flex-direction: column;
}

.crc-modal-username {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.crc-badge {
    font-size: 11px;
    font-weight: normal;
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 4px;
    color: #666;
    margin-left: 5px;
}

.crc-modal-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.crc-modal-content-body {
    padding: 10px 25px 25px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    min-height: 150px;
}

.crc-modal-footer-section {
    padding: 20px 25px;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crc-modal-more-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
}

.crc-modal-likes {
    font-size: 13px;
    color: #ff6b6b;
    font-weight: 500;
}

/* ===== 글쓰기 모달 스타일 ===== */
.crc-write-content {
    max-width: 700px;
}

.crc-write-content .crc-modal-body {
    padding: 30px;
    /* 내부 여백 추가 */
}

.crc-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.crc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 700;
}

.crc-form-group {
    margin-bottom: 20px;
}

.crc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.crc-form-group input[type="text"],
.crc-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    /* 패딩 포함 */
}

.crc-form-group input[type="text"]:focus,
.crc-form-group textarea:focus {
    border-color: #00b894;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.crc-btn-submit {
    display: block;
    width: 100%;
    padding: 15px;
    background: #00b894;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.crc-btn-submit:hover {
    background: #00a180;
}

.crc-btn-submit:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.crc-like-btn.liked,
.crc-card-likes.liked,
.crc-best-likes.liked {
    color: #ff6b6b;
    font-weight: bold;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}