/* Homepage comparison: CyberTested vs pentest firm vs scanner */

.compare-section {
    background: var(--background-color-section);
    padding: 88px 0 96px;
}

.compare-section .container {
    max-width: 1140px;
}

.compare-intro {
    max-width: 820px;
    margin: 0 auto 40px;
    text-align: center;
}

.compare-intro h2 {
    margin: 0 0 14px;
    color: #111;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.compare-intro p {
    margin: 0;
    color: #8a8f98;
    font-size: 16px;
    line-height: 1.5;
}

.compare-mobile-banner {
    display: none;
}

.compare-swipe {
    display: none;
    margin: 0 0 10px;
    color: #9aa0a6;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compare-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 0;
    scrollbar-width: thin;
}

.compare-scroll:focus-visible {
    outline: 2px solid var(--brand-navy);
    outline-offset: 2px;
}

.compare-table {
    width: 100%;
    min-width: 960px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.compare-table col.compare-col-label { width: 26%; }
.compare-table col.compare-col-us { width: 26%; }
.compare-table col.compare-col-alt { width: 24%; }

.compare-table th,
.compare-table td {
    padding: 18px 22px;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: #4b5563;
}

.compare-table thead th {
    padding: 20px 22px 18px;
    border-bottom: 1px solid #ececec;
    vertical-align: bottom;
    background: #fff;
}

.compare-label {
    width: 26%;
    color: #9aa0a6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.compare-table tbody th {
    width: 26%;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.compare-head {
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    display: block;
}

.compare-sub {
    display: block;
    margin-top: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.compare-us {
    background: #fff;
    border-left: 2px solid var(--brand-navy);
    border-right: 2px solid var(--brand-navy);
}

.compare-table thead th.compare-us {
    background: var(--page-header-bg);
    color: var(--page-header-text);
    border-left: 2px solid var(--brand-navy);
    border-right: 2px solid var(--brand-navy);
    border-bottom: none;
}

.compare-logo {
    display: block;
    width: 168px;
    max-width: 100%;
    height: auto;
    margin: 0 0 8px;
}

.compare-table thead th.compare-us .compare-sub {
    color: white;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:last-child td.compare-us {
    border-bottom: 2px solid var(--brand-navy);
}

.compare-yes {
    color: #1f7a4c;
    font-weight: 600;
}

.compare-no {
    color: #c2185b;
    font-weight: 600;
}

.compare-metric {
    display: block;
    color: var(--important-color);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.compare-table td:not(.compare-us) .compare-metric {
    color: #3d4450;
}

.compare-metric-note {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.compare-us .compare-metric-note {
    color: #4b5563;
}

/* Tablet: horizontal scroll only */
@media (min-width: 768px) and (max-width: 991px) {
    .compare-section {
        padding: 56px 0 64px;
    }

    .compare-intro h2 {
        font-size: 24px;
    }

    .compare-swipe {
        display: block;
    }

    .compare-scroll {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        border-left: none;
        border-right: none;
    }

    .compare-table {
        min-width: 880px;
    }

    .compare-table th,
    .compare-table td {
        padding: 16px 18px;
    }

    .compare-head {
        font-size: 16px;
    }

    .compare-logo {
        width: 148px;
    }
}

/* Small phones: stacked cards, no sideways scroll */
@media (max-width: 767px) {
    .compare-section {
        padding: 48px 0 56px;
    }

    .compare-intro {
        margin-bottom: 24px;
        text-align: left;
    }

    .compare-intro h2 {
        font-size: 22px;
    }

    .compare-intro p {
        font-size: 15px;
    }

    .compare-swipe {
        display: none;
    }

    .compare-mobile-banner {
        display: block;
        margin-bottom: 16px;
        padding: 18px 16px;
        background: var(--page-header-bg);
        border: 1px solid var(--brand-navy);
    }

    .compare-mobile-banner .compare-logo {
        width: 140px;
        margin-bottom: 6px;
    }

    .compare-mobile-banner .compare-sub {
        margin-top: 0;
        color: rgba(255, 255, 255, 0.78);
        font-size: 12px;
        line-height: 1.4;
    }

    .compare-scroll {
        overflow: visible;
        background: transparent;
        border: none;
    }

    .compare-scroll:focus-visible {
        outline: none;
    }

    .compare-table {
        min-width: 0;
        display: block;
        background: transparent;
    }

    .compare-table colgroup,
    .compare-table thead {
        display: none;
    }

    .compare-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .compare-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e8e8e8;
    }

    .compare-table tbody th {
        display: block;
        width: auto;
        padding: 14px 16px 10px;
        border-bottom: 1px solid #ececec;
        font-size: 14px;
    }

    .compare-table tbody td {
        display: grid;
        grid-template-columns: minmax(0, 42%) 1fr;
        align-items: start;
        gap: 4px 12px;
        padding: 10px 16px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 13px;
        line-height: 1.45;
    }

    .compare-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #9aa0a6;
    }

    .compare-table tbody td.compare-us {
        border-left: none;
        border-right: none;
        background: #f3f6fb;
    }

    .compare-table tbody td.compare-us::before {
        color: var(--important-color);
    }

    .compare-table tbody td:last-child {
        border-bottom: none;
    }

    .compare-table tbody tr:last-child td.compare-us {
        border-bottom: none;
    }

    .compare-metric {
        display: inline;
        font-size: 20px;
    }

    .compare-metric-note {
        display: inline;
        margin-top: 0;
        margin-left: 4px;
        font-size: 12px;
    }

    .compare-table td:not(.compare-us) .compare-metric {
        font-size: 20px;
    }
}
