/**
 * 統一口コミデザイン - サブエリアのデザインをベースに全体統一
 */

/* 口コミアイテム共通スタイル */
.review-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 口コミヘッダー */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.review-author {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.review-age {
    color: #666;
    font-size: 0.875rem;
}

.review-verified {
    background-color: #4caf50;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.review-date {
    color: #888;
    font-size: 0.875rem;
}

/* 口コミソースラベル */
.review-source-label {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.review-item--internet_research .review-source-label {
    background-color: #e3f2fd;
    color: #1976d2;
}

.review-item--photo_verified .review-source-label {
    background-color: #e8f5e9;
    color: #388e3c;
}

.review-item--law_office_provided .review-source-label {
    background-color: #fff3e0;
    color: #f57c00;
}

.review-item--direct_submission .review-source-label {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* 評価 */
.review-rating {
    margin: 0.75rem 0;
}

.review-rating .star-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* 口コミ内容 */
.review-content {
    color: #333;
    line-height: 1.7;
    margin: 1rem 0;
    white-space: pre-wrap;
}

/* 口コミ詳細リンク - 必ず下に配置 */
.review-more {
    margin-top: 1rem;
    text-align: right;
}

.review-more .btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.review-more .btn:hover {
    background-color: #1d4ed8;
}

/* 事務所リンク */
.review-office-link {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.review-office-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.review-office-link a:hover {
    text-decoration: underline;
}

/* 免責事項 */
.review-disclaimer {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.75rem;
    margin-top: 2rem;
}

.review-disclaimer p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #6c757d;
}

/* 事務所カード内のバッジ改行対応 */
.office-type-badge {
    display: block;
    margin-bottom: 1rem;
}

.law-office-card .law-office-logo {
    text-align: center;
    margin-bottom: 1rem;
}

/* トップページ口コミソース説明 */
.review-source-description {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.review-source-description h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 700;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e9ecef;
}

.review-source-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #e9ecef;
}

.review-source-item:last-child {
    margin-bottom: 0;
}

/* 独自インターネット調査 */
.review-source-item:nth-child(1) {
    border-left-color: #1976d2;
}

.review-source-item:nth-child(1) h4 {
    color: #1976d2;
}

/* 写真付きレビュー・相談認証済み */
.review-source-item:nth-child(2) {
    border-left-color: #388e3c;
}

.review-source-item:nth-child(2) h4 {
    color: #388e3c;
}

/* 弁護士法人・司法書士法人から提供された口コミ */
.review-source-item:nth-child(3) {
    border-left-color: #f57c00;
}

.review-source-item:nth-child(3) h4 {
    color: #f57c00;
}

/* 当サイトに直接寄せられた口コミ */
.review-source-item:nth-child(4) {
    border-left-color: #7b1fa2;
}

.review-source-item:nth-child(4) h4 {
    color: #7b1fa2;
}

.review-source-item h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: block;
    position: relative;
    padding-left: 1.5rem;
}

.review-source-item h4::before {
    content: "●";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8rem;
}

.review-source-item p {
    color: #666;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
    display: block;
}

/* トップページのロゴ調整 */
.law-office-card--recommended .law-office-logo img {
    max-width: 240px;
    width: 100%;
    height: auto;
}

.law-office-card--recommended .office-type-badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .review-item {
        padding: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .review-more {
        text-align: center;
    }
    
    .review-more .btn {
        width: 100%;
    }
    
    /* スマホでバッジとロゴの被りを防ぐ */
    .office-type-badge {
        position: static !important;
        margin-bottom: 1rem;
    }
}

/* 運営企業紹介のスマホ対応 */
.company-info-section {
    overflow-x: auto;
}

.company-info-table {
    min-width: 100%;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .company-info-table {
        font-size: 0.875rem;
    }
    
    .company-info-table td,
    .company-info-table th {
        padding: 0.5rem;
        white-space: normal;
        word-break: break-word;
    }
}

/* サブエリアPC表示改善 */
@media (min-width: 1024px) {
    .office-card {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 2rem;
        align-items: start;
    }
    
    .office-card__header {
        grid-column: 1 / -1;
    }
    
    .office-card__info {
        max-width: 600px;
    }
    
    .office-card__features,
    .office-card__cta-image,
    .office-card__cta-button,
    .office-card__offices,
    .office-card__detail-link {
        grid-column: 2;
    }
}