/**
 * Comparison Pages — single & archive
 *
 * @package Media_Khodro
 */

/* ═══ Archive Hero ═══ */
.mk-comparison-archive {
    direction: rtl;
}

.mk-comp-archive-hero {
    position: relative;
    padding: 3rem 0 3.5rem;
    color: #fff;
    overflow: hidden;
}

.mk-comp-archive-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1a237e 45%, #1d3557 100%);
}

.mk-comp-archive-hero .mk-container {
    position: relative;
    z-index: 1;
}

.mk-comp-archive-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(230, 57, 70, 0.9);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.mk-comp-archive-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.mk-comp-archive-desc {
    max-width: 36rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.7;
}

.mk-comp-archive-stat {
    display: inline-flex;
    flex-direction: column;
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

.mk-comp-archive-stat strong {
    font-size: 1.35rem;
    font-weight: 800;
}

.mk-comp-archive-stat span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ═══ Archive Body ═══ */
.mk-comp-archive-body {
    padding: 2.5rem 0 4rem;
    background: #f4f6f9;
}

.mk-comp-archive-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mk-comp-archive-tab {
    padding: 0.55rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mk-comp-archive-tab:hover {
    border-color: var(--mk-primary);
    color: var(--mk-primary);
}

.mk-comp-archive-tab.is-active {
    background: var(--mk-secondary);
    border-color: var(--mk-secondary);
    color: #fff;
}

.mk-comp-archive-grid {
    margin-bottom: 2rem;
}

.mk-comp-archive-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.mk-comp-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--mk-secondary);
    font-weight: 600;
    text-decoration: none;
}

.mk-comp-archive-pagination .page-numbers.current {
    background: var(--mk-primary);
    border-color: var(--mk-primary);
    color: #fff;
}

.mk-comp-archive-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background: #fff;
    border-radius: 18px;
    border: 1px dashed #dbe3ec;
}

.mk-comp-archive-empty i {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.mk-comp-archive-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.mk-comp-archive-empty p {
    color: #64748b;
    margin: 0 0 1.5rem;
}

/* Card styles → assets/css/sections/comparison.css */

/* ═══ Single Comparison ═══ */
.mk-single-comparison {
    direction: rtl;
}

.mk-comp-page-hero {
    position: relative;
    padding: 2rem 0 3rem;
    color: #fff;
    overflow: hidden;
}

.mk-comp-page-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0f172a 0%, #1a237e 50%, #1d3557 100%);
}

.mk-comp-page-hero .mk-container {
    position: relative;
    z-index: 1;
}

.mk-comp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
}

.mk-comp-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.mk-comp-breadcrumb a:hover {
    color: #fff;
}

.mk-comp-breadcrumb i {
    font-size: 0.6rem;
    opacity: 0.6;
}

.mk-comp-page-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(230, 57, 70, 0.9);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mk-comp-page-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.35;
    max-width: 48rem;
    color: #fff;
}

.mk-comp-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.mk-comp-page-meta i {
    margin-left: 0.35rem;
}

/* Duel layout */
.mk-comp-duel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: stretch;
}

.mk-comp-duel-car {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mk-comp-duel-car.is-winner {
    border-color: rgba(255, 193, 7, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.25), 0 12px 32px rgba(0, 0, 0, 0.2);
}

.mk-comp-winner-ribbon {
    position: absolute;
    top: -0.65rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a1a;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    z-index: 2;
}

.mk-comp-duel-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.mk-comp-duel-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.mk-comp-duel-car:hover .mk-comp-duel-media img {
    transform: scale(1.04);
}

.mk-comp-duel-brand {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.25rem;
}

.mk-comp-duel-name {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.4;
}

.mk-comp-duel-name a {
    color: #fff;
    text-decoration: none;
}

.mk-comp-duel-name a:hover {
    color: #ffc107;
}

.mk-comp-duel-price {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffc107;
}

.mk-comp-duel-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.mk-comp-duel-vs span {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1a237e;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ═══ Spec table ═══ */
.mk-comp-spec-section {
    padding: 3rem 0;
    background: #fff;
}

.mk-comp-section-head {
    margin-bottom: 1.75rem;
}

.mk-comp-section-head .mk-section-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(230, 57, 70, 0.1);
    color: var(--mk-primary);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.mk-comp-section-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mk-secondary);
}

.mk-comp-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.mk-comp-spec-table-wrap {
    overflow-x: auto;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(29, 53, 87, 0.06);
}

.mk-comp-spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.mk-comp-spec-table thead th {
    padding: 1rem 1.15rem;
    background: #f8fafc;
    color: var(--mk-secondary);
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    border-bottom: 1px solid #e8edf3;
}

.mk-comp-spec-table thead th.mk-comp-spec-label-col {
    text-align: right;
    width: 28%;
}

.mk-comp-spec-table thead th.is-winner-col {
    background: rgba(255, 193, 7, 0.12);
    color: #92400e;
}

.mk-comp-spec-table tbody th,
.mk-comp-spec-table tbody td {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.88rem;
    line-height: 1.5;
}

.mk-comp-spec-table tbody th {
    background: #fafbfc;
    color: #64748b;
    font-weight: 700;
    text-align: right;
    width: 28%;
}

.mk-comp-spec-table tbody td {
    text-align: center;
    color: var(--mk-secondary);
    font-weight: 600;
}

.mk-comp-spec-table tbody tr:last-child th,
.mk-comp-spec-table tbody tr:last-child td {
    border-bottom: none;
}

.mk-comp-spec-table tbody td.is-winner-cell {
    background: rgba(255, 193, 7, 0.08);
    font-weight: 800;
}

.mk-comp-spec-table tbody tr:hover td,
.mk-comp-spec-table tbody tr:hover th[scope="row"] {
    background: #f8fafc;
}

/* ═══ Editorial ═══ */
.mk-comp-editorial {
    padding: 3rem 0;
    background: #f4f6f9;
}

.mk-comp-editorial-body {
    background: #fff;
    border-radius: 18px;
    padding: 2rem 2.25rem;
    border: 1px solid #e8edf3;
    line-height: 1.85;
    color: #334155;
}

.mk-comp-editorial-body h2,
.mk-comp-editorial-body h3 {
    color: var(--mk-secondary);
    margin-top: 1.5rem;
}

.mk-comp-editorial-body h2:first-child,
.mk-comp-editorial-body h3:first-child {
    margin-top: 0;
}

/* ═══ Related ═══ */
.mk-comp-related {
    padding: 3rem 0 4rem;
    background: #f4f6f9;
}

.mk-comp-related .mk-comparison-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ═══ Responsive ═══ */
@media (max-width: 992px) {
    .mk-comp-duel {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .mk-comp-duel-vs {
        order: -1;
        padding: 0.5rem 0;
    }

    .mk-comp-duel-vs span {
        width: 48px;
        height: 48px;
        font-size: 0.9rem;
    }

    .mk-comp-related .mk-comparison-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mk-comp-archive-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }

    .mk-comp-archive-tabs::-webkit-scrollbar {
        display: none;
    }

    .mk-comp-archive-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .mk-comp-editorial-body {
        padding: 1.25rem 1.15rem;
    }

    .mk-comp-related .mk-comparison-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .mk-comp-page-hero,
    .mk-comp-archive-hero {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .mk-comp-spec-table thead th,
    .mk-comp-spec-table tbody th,
    .mk-comp-spec-table tbody td {
        padding: 0.7rem 0.75rem;
        font-size: 0.8rem;
    }
}
