/* =========================================================
   DIRECTORY GOO
   Browse Popular Business Categories V2.2
   Expanded subcategory list refinement only
   Parent V2.1 cards remain untouched
   ========================================================= */

/* Expanded list container */
.directorygoo-server-directory
.directorygoo-seo-category > ul {
    margin: 0 !important;
    padding: 18px 18px 20px !important;
    list-style: none !important;
    border-top: 1px solid rgba(0,0,0,.055) !important;
    background: rgba(255,255,255,.98) !important;
}

/* Only use grid while the category is actually expanded */
.directorygoo-server-directory
.directorygoo-seo-category >
h3:has(.directorygoo-category-toggle[aria-expanded="true"]) + ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 8px 10px !important;
}

/* Individual subcategory */
.directorygoo-server-directory
.directorygoo-seo-category > ul > li {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

/* Subcategory link */
.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a {
    position: relative !important;
    display: flex !important;
    align-items: center !important;

    width: 100% !important;
    min-height: 40px !important;

    padding: 9px 34px 9px 13px !important;

    color: #233651 !important;
    background: #f8fafc !important;
    border: 1px solid #edf1f5 !important;
    border-radius: 8px !important;

    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;

    text-decoration: none !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease,
        box-shadow .18s ease !important;
}

/* Small directional arrow */
.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a::after {
    content: "›" !important;

    position: absolute !important;
    right: 13px !important;
    top: 50% !important;

    transform: translateY(-50%) !important;

    color: #8a98aa !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    transition:
        color .18s ease,
        transform .18s ease !important;
}

/* Hover / keyboard focus */
.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a:hover,
.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a:focus-visible {
    color: #0879d9 !important;
    background: #f2f8ff !important;
    border-color: #cfe5fb !important;

    transform: translateY(-1px) !important;

    box-shadow:
        0 4px 12px rgba(31,71,115,.08) !important;

    outline: none !important;
}

.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a:hover::after,
.directorygoo-server-directory
.directorygoo-seo-category > ul > li > a:focus-visible::after {
    color: #0879d9 !important;
    transform: translate(2px,-50%) !important;
}

/* Tablet: keep lists easier to scan */
@media (min-width:768px) and (max-width:991px) {
    .directorygoo-server-directory
    .directorygoo-seo-category >
    h3:has(.directorygoo-category-toggle[aria-expanded="true"]) + ul {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile: preserve single-column behavior */
@media (max-width:767px) {
    .directorygoo-server-directory
    .directorygoo-seo-category >
    h3:has(.directorygoo-category-toggle[aria-expanded="true"]) + ul {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
    }

    .directorygoo-server-directory
    .directorygoo-seo-category > ul {
        padding: 12px !important;
    }

    .directorygoo-server-directory
    .directorygoo-seo-category > ul > li > a {
        min-height: 42px !important;
        font-size: 14px !important;
    }
}
