/* ═══════ SECTION ═══════ */
.modules-section {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #F2F1ED;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 80px 120px 80px 56px;
    gap: 32px;
    overflow: hidden;
}

/* ═══════ LEFT TEXT ═══════ */
.modules-text {
    flex: 0 0 42%;
    max-width: 480px;
    margin-left: clamp(24px, 3vw, 72px);
}

.modules-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #6a09d8;
    margin-bottom: 16px;
}

.modules-heading {
    font-size: clamp(24px, 2.6vw, 36px);
    line-height: 1.18;
    margin-bottom: 18px;
}

.modules-subtext {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 28px;
}

.modules-cta {
    display: inline-block;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 2px solid #d11a80;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.modules-cta:hover {
    opacity: 0.6;
}

/* ═══════ RIGHT COLUMNS ═══════ */
.modules-columns {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    height: 520px;
    position: relative;
    overflow: hidden;
    margin-left: auto;
    margin-right: clamp(20px, 2.8vw, 52px);
}

/* Fade masks */
.modules-columns::before,
.modules-columns::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 90px;
    z-index: 2;
    pointer-events: none;
}

.modules-columns::before {
    top: 0;
    background: linear-gradient(to bottom, #F2F1ED 0%, #F2F1EDcc 40%, transparent 100%);
}

.modules-columns::after {
    bottom: 0;
    background: linear-gradient(to top, #F2F1ED 0%, #F2F1EDcc 40%, transparent 100%);
}

/* Column */
.scroll-col {
    flex: 0 0 235px;
    overflow: hidden;
    position: relative;
}

.scroll-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    will-change: transform;
}

/* ═══════ MODULE CARD ═══════ */
.mod-card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mod-card:hover {
    transform: scale(1.03) translateZ(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.mod-icon {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mod-icon svg {
    width: 16px;
    height: 16px;
}

.mod-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Icon colours */
.ic-purple { background: #6a09d8; color: #fff; }
.ic-pink   { background: #d11a80; color: #fff; }
.ic-blue   { background: #2563eb; color: #fff; }
.ic-teal   { background: #0d9488; color: #fff; }
.ic-orange { background: #ea580c; color: #fff; }
.ic-green  { background: #16a34a; color: #fff; }
.ic-red    { background: #dc2626; color: #fff; }
.ic-dark   { background: #334155; color: #fff; }
.ic-amber  { background: #d97706; color: #fff; }
.ic-indigo { background: #4f46e5; color: #fff; }
.ic-cyan   { background: #0891b2; color: #fff; }
.ic-rose   { background: #e11d48; color: #fff; }

/* ── Large tablet: 1025–1199px ── */
@media (min-width: 1025px) and (max-width: 1199px) {
    .modules-section {
        padding: 60px 64px 60px 40px;
        gap: 24px;
    }
    .modules-text {
        flex: 0 0 40%;
        max-width: 400px;
        margin-left: 0;
    }
    .modules-columns {
        height: 460px;
        margin-right: clamp(12px, 2vw, 32px);
    }
    .scroll-col {
        flex: 0 0 200px;
    }
}

/* ── Stack layout: ≤ 1024px ── */
@media (max-width: 1024px) {
    .modules-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 48px;
        gap: 36px;
    }
    .modules-text {
        flex: none;
        max-width: 540px;
        margin-left: 0;
    }
    .modules-columns {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        height: 380px;
        justify-content: flex-start;
    }
    .scroll-col {
        flex: 0 0 210px;
    }
}

/* ── Tablet: ≤ 767px ── */
@media (max-width: 767px) {
    .modules-section {
        padding: 48px 32px;
        gap: 28px;
    }
    .modules-text {
        max-width: 100%;
    }
    .modules-heading {
        font-size: clamp(20px, 5.5vw, 28px);
    }
    .modules-columns {
        height: 340px;
        gap: 14px;
    }
    .scroll-col {
        flex: 0 0 180px;
    }
}

/* ── Mobile: < 480px ── */
@media (max-width: 479px) {
    .modules-section {
        padding: 40px 20px;
        gap: 24px;
    }
    .modules-heading {
        font-size: clamp(20px, 6vw, 26px);
    }
    .modules-subtext {
        font-size: 13px;
    }
    .modules-columns {
        height: 300px;
        gap: 0;
        justify-content: center;
    }
    .scroll-col:last-child {
        display: none;
    }
    .scroll-col {
        flex: 0 0 260px;
    }
}
