/* ==========================================================================
   Comparison Table – Flexible Content Section
   Desktop: ScotPac 2.0 Figma node 6428:12341
   Mobile:  ScotPac 2.0 Figma node 6418:1436
   ========================================================================== */

/* ── CSS Custom Properties ─────────────────────────────────────────────── */
.ct-section {
    --ct-max-width: 1200px;
    --ct-border-color: #e2deff;
    --ct-border-radius-header: 40px;
    --ct-cell-padding-x: 24px;
    --ct-cell-padding-y: 16px;
    --ct-cell-min-height: 67px;
    --ct-row-divider: 1px solid var(--ct-border-color);
    --ct-featured-bg: #4615d6;
    --ct-featured-text: #ffffff;
    --ct-label-text: #62626d;
    --ct-font-label: 'Poppins', sans-serif;
    --ct-font-header: 'Noto Serif', serif;
    --ct-icon-size: 16px;
    --ct-arrow-size: 40px;
    --ct-transition: 0.35s ease;
    /* Mobile column widths */
    --ct-mobile-col-width: 177px;
    --ct-mobile-sticky-col-width: 177px;
}

/* Small column size variant */
.ct-section.ct-column-size--small {
    --ct-cell-padding-x: 16px;
    --ct-cell-padding-y: 12px;
    --ct-cell-min-height: 52px;
    --ct-mobile-col-width: 140px;
    --ct-mobile-sticky-col-width: 120px;
}

/* ── Container ─────────────────────────────────────────────────────────── */
.ct-section .ct-container {
    max-width: var(--ct-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Section Intro ─────────────────────────────────────────────────────── */
.ct-section-intro {
    text-align: center;
    margin-bottom: 40px;
}

.ct-section-title {
    font-family: var(--ct-font-header);
    font-weight: 500;
    font-size: 2rem;
    color: var(--ct-featured-bg); /* #4615d6 purple — matches mobile design */
    margin: 0 0 12px;
    letter-spacing: -0.025em;
}

.ct-section-subtitle p,.ct-section-subtitle {
    color: rgba(21, 20, 57, 0.60);
text-align: center;
font-family: Poppins;
font-size: 18px;
font-style: normal;
font-weight: 400;
line-height: 26px; /* 144.444% */
margin-bottom:34;
}

/* ── "Scroll to see more" hint ─────────────────────────────────────────── */
/* Hidden on desktop, shown on mobile */
.ct-scroll-hint {
    display: none;
}

/* ── Table Wrapper ─────────────────────────────────────────────────────── */
.ct-table-wrapper {
    position: relative;
    width: 100%;
	    max-width: 1068px;
    margin: auto;
}

/* ── Table ─────────────────────────────────────────────────────────────── */
.ct-table {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── Rows ──────────────────────────────────────────────────────────────── */
.ct-row {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* ── Cells (shared) ────────────────────────────────────────────────────── */
.ct-cell {
    flex: 1 0 0;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: var(--ct-cell-padding-y) var(--ct-cell-padding-x);
    min-height: var(--ct-cell-min-height);
    box-sizing: border-box;
    position: relative;
    font-family: var(--ct-font-label);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ct-label-text);
    word-break: break-word;
}

/* Override border color per cell via CSS var set inline */
.ct-cell {
    border-color: var(--ct-border-color, #e2deff);
}

/* Row dividers between body rows */
.ct-row--body + .ct-row--body .ct-cell {
    border-top: var(--ct-row-divider);
}

/* ── Header Row ────────────────────────────────────────────────────────── */
.ct-row--header {
    position: relative;
    z-index: 1;
}

.ct-cell--header {
    background-color: transparent;
    min-height: 82px;
    font-family: var(--ct-font-header);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ct-label-text);
    justify-content: center;
    text-align: center;
}

/* Featured header: full pill shape (desktop + mobile) */
.ct-cell--header.ct-cell--featured {
    border-radius: var(--ct-border-radius-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ct-border-color);
    margin-bottom: -1px;
    padding-top: 20px;
    padding-bottom: 20px;
    z-index: 3;
}

/* Empty header cell */
.ct-cell--empty-header {
    background: transparent !important;
    border: none !important;
}

/* ── Body Cells ────────────────────────────────────────────────────────── */
.ct-cell--body {
    font-size: 14px;
    background-color: #ffffff;
}

/* Featured column body cells */
.ct-cell--body.ct-cell--featured {
    border-left: 1px solid var(--ct-border-color, #e2deff);
    border-right: 1px solid var(--ct-border-color, #e2deff);
    font-size: 13px;
    color: var(--ct-featured-text);
}

/* Last featured body row: bottom border */
.ct-row--body:last-child .ct-cell--body.ct-cell--featured {
    border-bottom: 1px solid var(--ct-border-color, #e2deff);
}

/*
 * ── Alternate row striping ──────────────────────────────────────────────
 *
 * When no explicit alt colour is set via ACF, the PHP outputs no inline
 * background-color on .ct-cell--alt cells, so this CSS fallback kicks in:
 * a subtle semi-transparent darkening tint that works on any column colour.
 *
 * When an explicit colour IS set, the inline style takes precedence over this.
 */
.ct-cell--body.ct-cell--alt {
    /* Fallback auto-tint: works on both light and dark column backgrounds */
    background-image: linear-gradient(
        rgba(0, 0, 0, 0.04),
        rgba(0, 0, 0, 0.04)
    );
}

/* Alt cells inside featured (purple) column: slightly lighter tint */
.ct-cell--body.ct-cell--alt.ct-cell--featured {
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.08)
    );
}

/* ── Cell Content ──────────────────────────────────────────────────────── */
.ct-cell-content {
    flex: 1;
}

.ct-cell-content p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.ct-cell-content strong,
.ct-cell-content b {
    font-weight: 600;
}

/* ── Icons ─────────────────────────────────────────────────────────────── */
.ct-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--ct-icon-size);
    height: var(--ct-icon-size);
}

.ct-icon--check { color: currentColor; }
.ct-icon--cross { color: currentColor; opacity: 0.6; }

.ct-cell--featured .ct-icon--check,
.ct-cell--featured .ct-icon--cross {
    color: var(--ct-featured-text);
    opacity: 1;
}

/* ── Logo ──────────────────────────────────────────────────────────────── */
.ct-logo {
    display: block;
    max-width: 100%;
}

.ct-logo__img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

picture.ct-logo {
    display: block;
    max-width: 100%;
}

/* ── Header Link ───────────────────────────────────────────────────────── */
.ct-header-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

.ct-header-link:hover { opacity: 0.85; }
.ct-header-label { display: block; }

/* ── Table outline border ──────────────────────────────────────────────── */
.ct-table-wrapper::before {
    content: '';
    position: absolute;
    inset: 82px 0 0 0;
    border: 1px solid var(--ct-border-color);
    pointer-events: none;
    z-index: 1;
}

/* ── Progress Bar (mobile only) ────────────────────────────────────────── */
.ct-progress-bar {
    display: none; /* hidden on desktop */
    width: 100%;
    max-width: 350px;
    height: 10px;
    background-color: var(--ct-border-color);
    border-radius: 55px;
    overflow: hidden;
    margin-top: 16px;
}

.ct-progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--ct-featured-bg);
    border-radius: 55px;
    transition: width 0.1s linear;
    will-change: width;
}

/* ── Desktop Slider Arrows ─────────────────────────────────────────────── */
.ct-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--ct-arrow-size);
    height: var(--ct-arrow-size);
    background: #ffffff;
    border: 1px solid var(--ct-border-color);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    color: var(--ct-featured-bg);
    transition: background var(--ct-transition), color var(--ct-transition);
}

.ct-slider-arrow:hover {
    background: var(--ct-featured-bg);
    color: #ffffff;
    border-color: var(--ct-featured-bg);
}

.ct-slider-prev { left: -20px; }
.ct-slider-next { right: -20px; }

.ct-slider-arrow[disabled],
.ct-slider-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Desktop slider: rows become scrollable */
.ct-has-slider .ct-table-wrapper { overflow: hidden; }
.ct-has-slider .ct-table { overflow: visible; }

.ct-has-slider .ct-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ct-has-slider .ct-row::-webkit-scrollbar { display: none; }

.ct-has-slider .ct-cell {
    flex: 0 0 var(--ct-slide-col-width, 280px);
    scroll-snap-align: start;
}


/* Revert slider on desktop when mobile-only */
@media (min-width: 768px) {
    .ct-slider-mobile-only .ct-row {
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .ct-slider-mobile-only .ct-cell {
        flex: 1 0 0;
    }
    .ct-slider-mobile-only .ct-slider-arrow {
        display: none;
    }
	.ct-section-intro {
    max-width: 704px;
    margin-left: auto;
    margin-right: auto;
}

h2.ct-section-title {
    max-width: 426px;
    margin-left: auto;
    margin-right: auto;
    color: #4615D6;
    text-align: center;
    font-family: "Noto Serif";
    font-size: 44px;
    font-style: normal;
    font-weight: 500;
    line-height: 52px; /* 118.182% */
    margin-bottom: 34px;
}
}

/* ==========================================================================
   MOBILE STYLES (≤ 767px)
   Matches Figma node 6418:1436
   ========================================================================== */
@media (max-width: 767px) {

    /* ── Section container ── */
    .ct-section .ct-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* ── Section intro: left-aligned ── */
    .ct-section-intro {
        text-align: left;
        margin-bottom: 12px;
    }

    .ct-section-title {
        font-size: 32px;
        line-height: 1.625; /* 52px / 32px */
        letter-spacing: -0.4px;
    }

    .ct-section-subtitle,.ct-section-subtitle p {
        font-size: 18px;
        line-height: 1.444; /* 26px / 18px */
        color: rgba(21, 20, 57, 0.6);
		        text-align: left;
    }

    /* ── "Scroll to see more" hint ── */
    .ct-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        margin-top: 8px;
        margin-bottom: 12px;
    }

    .ct-scroll-hint__text {
        font-family: var(--ct-font-label);
        font-size: 15px;
        line-height: 1.067;
        letter-spacing: 0.4px;
        color: var(--ct-featured-bg);
        white-space: nowrap;
    }

    .ct-scroll-hint__icon {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    /*
     * ── SINGLE horizontal scroll container ───────────────────────────────
     *
     * The entire table (all rows together) scrolls horizontally inside
     * ct-table-wrapper.  Individual rows are NOT scroll containers.
     * The sticky label column uses position:sticky within this wrapper.
     *
     * SPECIFICITY NOTE: The desktop slider rules use 2-class selectors
     *   (.ct-has-slider .ct-table-wrapper, .ct-has-slider .ct-row, etc.)
     * which beat 1-class rules even inside a media query.  We mirror those
     * selectors here so the mobile rules win on cascade order.
     */
    .ct-table-wrapper,
    .ct-has-slider .ct-table-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Stacking context so sticky z-index is scoped correctly */
        isolation: isolate;
    }

    .ct-table-wrapper::-webkit-scrollbar,
    .ct-has-slider .ct-table-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Remove desktop pseudo-border overlay (not needed on mobile) */
   .ct-table-wrapper::before {
        content: ''!important;
        position: absolute;
        inset: 82px 0 0 0;
        border: 1px solid var(--ct-border-color);
        pointer-events: none;
        z-index: 1;
        width: 150%;
}

    /* Table grows to its natural content width */
    .ct-table {
        /* min-width: max-content; */
        /* width: auto; */
    }

    /* Rows must NOT scroll individually — they ride the wrapper scroll */
    .ct-row,
    .ct-has-slider .ct-row {
        overflow-x: visible;
        overflow-y: visible;
        scroll-snap-type: none;
        width: 150%;
        justify-content: space-between;
        gap: 0;
    }

    /* All cells: fixed mobile column width */
    .ct-cell,
    .ct-has-slider .ct-cell {
        flex: 0 0 33.3333333%;
        min-width: 33.3333333%;
        font-size: 14px;
        scroll-snap-align: none;
    }

    /* ── Sticky label column (col 0) ──────────────────────────────────── */
    .ct-cell--sticky {
        flex: 0 0 33.3333333%;
        min-width: 33.3333333%;
        /* position: sticky; */
        left: 0;
        /* z-index: 5; */
    }

    /* Header sticky cell: transparent — empty in design */
    .ct-cell--header.ct-cell--sticky {
        background-color: transparent;
    }

    /* Body sticky cells: white so scrolled columns don't bleed through */
    .ct-cell--body.ct-cell--sticky {
        background-color: #ffffff;
    }

    /* ── Header cells ── */
    .ct-cell--header {
        min-height: 82px;
        font-size: 15px;
    }

    /* Featured header: full pill (40px radius) */
    .ct-cell--header.ct-cell--featured {
        border-radius: var(--ct-border-radius-header); /* 40px */
    }

    /* Non-featured, non-empty header cells: top-rounded only */
    .ct-cell--header:not(.ct-cell--featured):not(.ct-cell--empty-header):not(.ct-cell--sticky) {
       
        border: 1px solid rgba(226, 222, 255, 0);
        border-bottom: none;
    }

    /*
     * ── Body area border ─────────────────────────────────────────────────
     *
     * Recreates the full outer border of the body block that Figma draws
     * as a single rectangle around Cards/Feature:
     *   - top:   border-top on first body row
     *   - bottom: border-bottom on last body row
     *   - left:  border-left on sticky col (always at left edge)
     *   - right: border-right on last cell in each row
     *
     * Plus the sticky-column separator (right border on sticky body cells).
     */
    .ct-row--body:first-of-type .ct-cell {
        border-top: 1px solid var(--ct-border-color);
    }

    .ct-row--body:last-child .ct-cell {
        border-bottom: 1px solid var(--ct-border-color);
    }

    /* Right edge of table */
    .ct-row--body .ct-cell:last-child {
        border-right: 1px solid var(--ct-border-color);
    }

    /* Left edge + right separator for the sticky label column */
    .ct-row--body .ct-cell--sticky {
        border-left: 1px solid var(--ct-border-color);
        border-right: 1px solid var(--ct-border-color);
    }

    /* ── Progress bar: visible on mobile ── */
    .ct-progress-bar {
        display: block;
    }

    /* ── Hide desktop slider arrows on mobile ── */
    .ct-slider-arrow {
        display: none;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .ct-section {
        --ct-mobile-col-width: 177px;
        --ct-mobile-sticky-col-width: 177px;
    }
}
