/* ================= CATEGORIES WRAPPER ================= */
#categories-wrapper {
    background: #f4f5fa;
    padding: 70px 0 90px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#categories-wrapper .container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---- Intro header ---- */
.categories-intro {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 20px;
}
.categories-eyebrow {
    display: inline-block;
    color: #F4B234;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: 12px;
}
.categories-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #1c2340;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}
.categories-subtext {
    color: #8a8f9e;
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0;
}

/* ---- Section card ---- */
.category-section {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 30px 34px 32px;
    border: 1px solid #edeef3;
    box-shadow: 0 3px 14px rgba(20, 25, 50, 0.05);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    overflow: hidden;
}
.category-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--accent-color, #2F3B78);
}
.category-section:hover {
    box-shadow: 0 16px 36px rgba(20, 25, 50, 0.09);
    transform: translateY(-2px);
}

/* Accent color variables per section */
.accent-blue   { --accent-color: #2F3B78; --accent-soft: #EAF1FF; }
.accent-coral  { --accent-color: #E0526B; --accent-soft: #FCE8EA; }
.accent-teal   { --accent-color: #1B9C85; --accent-soft: #E4F7F2; }
.accent-violet { --accent-color: #7A5CFA; --accent-soft: #F0ECFF; }

.category-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.category-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--accent-soft, #EAF1FF);
    color: var(--accent-color, #2F3B78);
    border-radius: 12px;
    font-size: 17px;
    flex-shrink: 0;
}
.category-section-header h2 {
    margin: 0 0 2px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1c2340;
    letter-spacing: -0.2px;
}
.category-count {
    font-size: 0.78rem;
    color: #a3a7b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---- Pill grid ---- */
.category-pill-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.category-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #F8F9FC;
    color: #333a56;
    text-align: left;
    padding: 15px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #edeef3;
    transition: all 0.25s ease;
}
.category-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.category-pill:hover {
    background: var(--accent-color, #2F3B78);
    color: #fff;
    border-color: var(--accent-color, #2F3B78);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}
.category-pill-arrow {
    flex-shrink: 0;
    font-size: 0.88rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s ease;
}
.category-pill:hover .category-pill-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---- No categories ---- */
.no-categories {
    text-align: center;
    font-size: 1.05rem;
    color: #999;
    padding: 60px 0;
}

/* ---- Entrance animation ---- */
.category-section {
    animation: sectionRise 0.5s ease both;
}
.category-section:nth-of-type(2) { animation-delay: 0.08s; }
.category-section:nth-of-type(3) { animation-delay: 0.16s; }
.category-section:nth-of-type(4) { animation-delay: 0.24s; }
.category-section:nth-of-type(5) { animation-delay: 0.32s; }
@keyframes sectionRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    .category-pill-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    #categories-wrapper {
        padding: 45px 0 60px;
    }
    .categories-heading {
        font-size: 1.6rem;
    }
    .category-section {
        padding: 24px 22px 26px;
        border-radius: 18px;
    }
    .category-pill-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .category-section-header h2 {
        font-size: 1.1rem;
    }
}
@media (max-width: 480px) {
    .category-pill-grid {
        grid-template-columns: 1fr;
    }
    .category-pill-text {
        white-space: normal;
    }
}