/* ── FEATURES SECTION ── */
.features-bg {
    position: relative;
    /* ↓ set your background image here */
    background-image: url('../images/features-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* White overlay on top of the background image */
.features-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.80);
    z-index: 0;
}

/* Keep all content above the overlay */
.features-bg .section-wrap {
    position: relative;
    z-index: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* ── MOBILE HORIZONTAL SCROLL ── */
/* #feature-dots: hidden on desktop, shown on mobile */
#feature-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
    min-height: 36px;
}

/* Override ss-dot colours for light background */
#feature-dots .ss-dot       { background: rgba(0,0,0,0.18); }
#feature-dots .ss-dot.active { background: var(--primary); }

@media (max-width: 768px) {
    #feature-dots { display: flex; }

    .feature-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Break out of section-wrap padding, add 16px back ourselves */
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-bottom: 12px;
    }

    .feature-scroll-wrapper::-webkit-scrollbar { display: none; }

    .feature-grid {
        display: flex;
        flex-direction: row;
        gap: 14px;
        width: max-content;
    }

    .feature-card {
        width: 220px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* 16px trailing space after last card */
    .feature-card:last-child { margin-right: 16px; }
}

@property --grad-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.feature-card {
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    padding: 23px 19px;
    background: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.feature-card.active {
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(from var(--grad-angle), #7c3aed, #38bdf8, #10b981, #fbbf24, #f43f5e, #7c3aed) border-box;
    animation: gradBorderSpin 2.5s linear infinite;
}

@keyframes gradBorderSpin {
    to { --grad-angle: 360deg; }
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-lt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Clickable card link variant */
.feature-card--link,
.feature-card--link:hover,
.feature-card--link:focus,
.feature-card--link:visited,
.feature-card--link h3,
.feature-card--link p {
    text-decoration: none;
    color: inherit;
}

.feature-card--link {
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.5;
}