/**
 * THT Directory — theme shell overrides (hubs, etc.).
 * Loaded as a separate stylesheet so updates apply when tht-directory.css is cached.
 */

/* Card grids — match location / community index (section h2 + linked card titles) */
body.single-tht_location .tht-directory section:has(.tht-card-grid) > h2,
main.tht-pillar-hub section:has(.tht-card-grid) > h2,
main.tht-cluster-hub section:has(.tht-card-grid) > h2,
main.tht-community-index section:has(.tht-card-grid) > h2 {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    margin: 2rem 0 0.75rem !important;
    font-weight: 700;
}

body.single-tht_location .tht-directory section:has(.tht-card-grid) .tht-card h3,
main.tht-pillar-hub section:has(.tht-card-grid) .tht-card h3,
main.tht-cluster-hub section:has(.tht-card-grid) .tht-card h3,
main.tht-community-index section:has(.tht-card-grid) .tht-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
}

body.single-tht_location .tht-directory section:has(.tht-card-grid) .tht-card h3 a,
main.tht-pillar-hub section:has(.tht-card-grid) .tht-card h3 a,
main.tht-cluster-hub section:has(.tht-card-grid) .tht-card h3 a,
main.tht-community-index section:has(.tht-card-grid) .tht-card h3 a {
    color: var(--primary-color, #1d5f8a);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.single-tht_location .tht-directory section:has(.tht-card-grid) .tht-card p,
main.tht-pillar-hub section:has(.tht-card-grid) .tht-card p,
main.tht-cluster-hub section:has(.tht-card-grid) .tht-card p,
main.tht-community-index section:has(.tht-card-grid) .tht-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.85;
}

body.page-template-template-community-index .tht-directory {
    max-width: unset !important;
    margin: auto !important;
}

body.page-template-template-cluster-hub .tht-directory,
body.page-template-template-pillar-hub .tht-directory,
body[class*="template-cluster-hub"] .tht-directory,
body[class*="template-pillar-hub"] .tht-directory {
    max-width: unset !important;
    margin: auto !important;
}

/* Cluster & pillar hub pages — same shell as nodes */
body.page-template-template-community-index .ip-banner,
body.page-template-template-cluster-hub .ip-banner,
body.page-template-template-pillar-hub .ip-banner,
body[class*="template-cluster-hub"] .ip-banner,
body[class*="template-pillar-hub"] .ip-banner {
    display: block !important;
}

body.page-template-template-community-index .inner-page-container,
body.page-template-template-cluster-hub .inner-page-container,
body.page-template-template-pillar-hub .inner-page-container,
body[class*="template-cluster-hub"] .inner-page-container,
body[class*="template-pillar-hub"] .inner-page-container {
    padding: 0 50px !important;
}

body.page-template-template-community-index .tht-breadcrumb,
body.page-template-template-cluster-hub .tht-breadcrumb,
body.page-template-template-pillar-hub .tht-breadcrumb,
body[class*="template-cluster-hub"] .tht-breadcrumb,
body[class*="template-pillar-hub"] .tht-breadcrumb {
    color: var(--primary-text, inherit);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 400;
    padding: 15px 0 24px;
    line-height: 1;
    margin: 0;
}

body.page-template-template-community-index main.tht-community-index header h1,
body.page-template-template-cluster-hub main.tht-cluster-hub header h1,
body.page-template-template-pillar-hub main.tht-pillar-hub header h1,
body[class*="template-cluster-hub"] main.tht-cluster-hub header h1,
body[class*="template-pillar-hub"] main.tht-pillar-hub header h1 {
    font-size: 35px !important;
    line-height: 1.25 !important;
    margin: 0 0 1rem !important;
}

@media screen and (min-width: 1024px) {
    body.page-template-template-community-index main.tht-community-index header h1,
    body.page-template-template-cluster-hub main.tht-cluster-hub header h1,
    body.page-template-template-pillar-hub main.tht-pillar-hub header h1,
    body[class*="template-cluster-hub"] main.tht-cluster-hub header h1,
    body[class*="template-pillar-hub"] main.tht-pillar-hub header h1 {
        font-size: 50px !important;
    }
}

main.tht-community-index section,
main.tht-cluster-hub section,
main.tht-pillar-hub section {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

main.tht-cluster-hub .tht-body ul,
main.tht-pillar-hub .tht-body ul {
    list-style: unset !important;
    padding: 30px 0;
}

main.tht-cluster-hub .tht-body ul li,
main.tht-pillar-hub .tht-body ul li {
    padding: 5px;
    margin-left: 30px;
}

main.tht-cluster-hub .tht-body ol,
main.tht-pillar-hub .tht-body ol {
    list-style: decimal !important;
    padding: 30px 0;
}

main.tht-cluster-hub .tht-body ol li,
main.tht-pillar-hub .tht-body ol li {
    padding: 5px;
    margin-left: 30px;
}

main.tht-cluster-hub .tht-node-list h2,
main.tht-cluster-hub .tht-related-clusters h2,
main.tht-cluster-hub .tht-related-guide h2,
main.tht-pillar-hub .tht-cluster-grid h2,
main.tht-pillar-hub .tht-related-guides h2 {
    margin-bottom: 30px;
}

main.tht-cluster-hub .tht-related-clusters ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 2rem;
}

main.tht-cluster-hub .tht-related-clusters li {
    margin: 0 !important;
    padding: 0.45rem 0 !important;
}

main.tht-cluster-hub footer p,
main.tht-pillar-hub footer p,
main.tht-cluster-hub .tht-author p,
main.tht-pillar-hub .tht-author p {
    margin-bottom: 20px;
}