.features-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.features-section h2 {
    text-align: center;
    font-size: 32px;
    color: #a68ab7;
    margin-bottom: 10px;
}

/* Retro theme for features section header */
body.retro-theme .features-section h2 {
    color: #f4a460; /* replace #a68ab7 light purple */
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 10px auto 30px;
    font-size: 16px;
    color: #ccc;
}

/* ✨ Responsive grid layout for feature cards */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    margin: 0;
    width: 100%;
    padding: 0;
}

/* ✨ Feature Cards */
.feature-list li {
    width: 100%;
    background-color: #2c2c3a;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #4c3a62;
    height: 100%;
}

/* Retro theme feature list card */
body.retro-theme .feature-list li {
    background-color: #f5deb3;
    border-color: #d4a574;
    box-shadow: 0 8px 12px rgba(212, 165, 116, 0.2);
    color: #333344;
}

.feature-list li:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: #a68ab7;
}

.feature-list li a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-list li img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid #4c3a62;
    /* transition: border-bottom-color 0.3s ease; */
}

.feature-list li:hover img {
    border-bottom-color: #a68ab7;
}

.feature-list li div {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.feature-list li h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #d6b3ff;
}

.feature-list li p {
    font-size: 14px;
    color: #bbb;
    line-height: 1.4;
    flex-grow: 1;
}

.feature-list li .feature-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #4c3a62;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.feature-list li .feature-btn:hover {
    background-color: #a68ab7;
    color: #fff;
}

.feature-list li .tags {
    display: inline-flex;  /* display tags in a row */
    flex-direction: row;   /* ensure horizontal layout */
    flex-wrap: wrap;       /* allow wrapping to fit container */
    gap: 6px;             /* space between tags */
    margin-top: 12px;
    align-items: center;   /* vertically center tags */
    justify-content: center; /* horizontally center tags */
    width: 100%;          /* take full container width */
}

.feature-list li .tags::-webkit-scrollbar {
    height: 4px;
}

.feature-list li .tags::-webkit-scrollbar-thumb {
    background: #4c3a62;
    border-radius: 2px;
}

.feature-list li .tags::-webkit-scrollbar-track {
    background: #2c2c3a;
}

.feature-list li .tags .tag {
    display: inline-block; /* or 'flex' if you want more control */
    white-space: nowrap;   /* prevents text from breaking */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    flex: 0 0 auto;        /* prevent stretching */
}

/* 📱 Mobile adjustments */
@media (max-width: 768px) {
    .feature-list {
        gap: 12px;
    }

    .feature-list li {
        flex: 0 0 240px;
    }

    .feature-list li img {
        height: 140px;
    }

    .feature-list li h3 {
        font-size: 16px;
    }

    .feature-list li p {
        font-size: 13px;
    }

    .feature-list li .feature-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    .feature-list li .tags .tag {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* 🌿 Retro theme integration */
body.retro-theme .feature-list li {
    background-color: #f5deb3;
    border-color: #d4a574;
    box-shadow: 0 8px 12px rgba(212, 165, 116, 0.2);
    color: #333344;
}

body.retro-theme .feature-list li:hover {
    border-color: #d4881e;
    box-shadow: 0 10px 18px rgba(212, 136, 30, 0.3);
}

body.retro-theme .feature-list li img {
    border-bottom-color: #d4a574;
}

body.retro-theme .feature-list li:hover img {
    border-bottom-color: #d4881e;
}

body.retro-theme .feature-list li h3 {
    color: #d4881e;
}

body.retro-theme .feature-list li p {
    color: #333344;
}

body.retro-theme .feature-list li .feature-btn {
    background-color: #d4881e;
    color: #fff;
}

body.retro-theme .feature-list li .feature-btn:hover {
    background-color: #e89b3c;
    color: #fff;
}
