/* ===================================
   Comparison Section
   =================================== */
.comparison-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.comparison-table thead {
    background: var(--gradient-orange);
}

.comparison-table thead th {
    padding: 25px 20px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.comparison-table thead th.comparison-item {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    width: 20%;
}

.comparison-table thead th.comparison-us {
    width: 28%;
    background: #f97316;
}

.comparison-table thead th.comparison-maker {
    width: 26%;
    background: #fbbf24;
}

.comparison-table thead th.comparison-specialist {
    width: 26%;
    background: #e5e7eb;
    color: #1f2937;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-normal);
}

.comparison-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.05);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 25px 20px;
    vertical-align: middle;
    text-align: center;
}

.comparison-table td.comparison-item {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
    background: var(--bg-light);
    text-align: left;
}

.comparison-table td.comparison-item i {
    margin-right: 8px;
    color: var(--accent-color);
}

.comparison-table td.comparison-us {
    background: white;
    font-weight: 600;
    color: #1a202c;
}

.comparison-table td.comparison-maker {
    background: white;
    color: #1a202c;
}

.comparison-table td.comparison-specialist {
    background: white;
    color: #6b7280;
}

/* ◎ 二重丸 - 最高評価 */
.badge-excellent {
    display: inline-block;
    color: #ea580c;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-right: 8px;
}

/* ○ 丸 - 良い */
.badge-good {
    display: inline-block;
    color: #f59e0b;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-right: 8px;
}

/* △ 三角 - 普通 */
.badge-average {
    display: inline-block;
    color: #6b7280;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    margin-right: 8px;
}

/* Tablet以下でバッジを改行 */
@media (max-width: 968px) {
    .badge-excellent,
    .badge-good,
    .badge-average {
        display: block;
        margin-bottom: 5px;
        margin-right: 0;
    }
}

.comparison-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.05));
    border-radius: 15px;
}

.comparison-cta p {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-table {
        font-size: 14px;
    }

    .comparison-table thead th,
    .comparison-table td {
        padding: 15px 10px;
    }

    .comparison-table thead th {
        font-size: 14px;
    }

    .badge-excellent,
    .badge-good,
    .badge-average {
        font-size: 36px;
    }

    .comparison-cta p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    /* モバイルでテーブルをカード形式に変換 */
    .comparison-table-wrapper {
        overflow-x: visible !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .comparison-table thead {
        display: none; /* ヘッダーを非表示 */
    }
    
    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table td {
        display: block !important;
        width: 100% !important;
    }
    
    .comparison-table tr {
        margin-bottom: 30px !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
        padding: 20px !important;
        border-bottom: none !important;
    }
    
    .comparison-table td {
        padding: 12px 0 !important;
        text-align: left !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
    
    .comparison-table td:last-child {
        border-bottom: none !important;
    }
    
    .comparison-table td.comparison-item {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1e3a8a !important;
        background: transparent !important;
        padding-bottom: 15px !important;
        margin-bottom: 10px !important;
        border-bottom: 2px solid #f97316 !important;
    }
    
    .comparison-table td.comparison-us::before {
        content: "エムケイソルテック: ";
        font-weight: 700;
        color: #f97316;
        display: inline-block;
        margin-right: 8px;
    }
    
    .comparison-table td.comparison-maker::before {
        content: "大手総合メーカー系: ";
        font-weight: 700;
        color: #9ca3af;
        display: inline-block;
        margin-right: 8px;
    }
    
    .comparison-table td.comparison-specialist::before {
        content: "太陽光専門大手: ";
        font-weight: 700;
        color: #9ca3af;
        display: inline-block;
        margin-right: 8px;
    }
    
    .badge-excellent,
    .badge-good,
    .badge-average {
        font-size: 24px !important;
        margin-right: 5px !important;
    }
}
