/* Community content from real posts: tabs, HOT Offerings, listings and detail pages. Extends community.css. */

/* reset.min.css sets section/article to display:block, which would override [hidden] used by the filters. */
.community-page [hidden] {
    display: none !important;
}

/* Section tabs: one scrollable row instead of the stacked filter buttons. */
.community-filter-pills button,
.community-listing-tabs a {
    white-space: nowrap;
}

.community-listing-tabs {
    margin-bottom: 32px;
}

.community-listing-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 9px 17px;
    color: #374151;
    font-size: 12px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
}

.community-listing-tabs a:hover {
    border-color: #35ad6866;
}

.community-listing-tabs a.is-active {
    color: #1f7a46;
    font-weight: 700;
    border-color: #35ad6866;
}

.community-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(60% 80% at 20% 20%, rgba(67, 178, 99, 0.35) 0%, rgba(67, 178, 99, 0) 70%),
        radial-gradient(60% 80% at 80% 80%, rgba(113, 71, 167, 0.4) 0%, rgba(113, 71, 167, 0) 70%),
        #0f172a;
}

.community-news-card h3 a,
.community-event-card h3 a,
.community-iotw-card h3 a,
.community-offer-card h3 a {
    color: inherit;
    text-decoration: none;
}

.community-news-card h3 a:hover,
.community-event-card h3 a:hover,
.community-iotw-card h3 a:hover,
.community-offer-card h3 a:hover {
    color: #1f7a46;
}

.community-event-card.is-past .community-event-image {
    filter: grayscale(0.6);
}

.community-empty {
    margin: 0;
    padding: 32px;
    color: #64748b;
    font-size: 15px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
}

.community-events-grid + .community-empty,
.community-empty + .community-events-grid {
    margin-top: 24px;
}

/* Search */
.community-search-wrap {
    margin: 0;
}

.community-search-wrap input:focus {
    outline: none;
    border-color: #35ad68;
    box-shadow: 0 0 0 3px rgba(53, 173, 104, 0.15);
}

.community-search-status {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 13px;
}

.community-search-summary {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 14px;
}

.community-listing-search {
    margin-bottom: 24px;
}

/* HOT Offerings */
.community-offer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.community-offer-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 2px #0000000d;
}

.community-offer-card.is-expired {
    opacity: 0.6;
}

.community-offer-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-offer-logo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #1f7a46;
    font-size: 20px;
    font-weight: 700;
    background: #f1f5f9;
    border-radius: 12px;
}

.community-offer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.community-offer-logo-large {
    width: 96px;
    height: 96px;
    margin-bottom: 16px;
}

.community-offer-partner {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.community-offer-highlight {
    margin: 0;
    color: #1f7a46;
    font-size: 22px;
    font-weight: 700;
}

.bambu-page .community-offer-highlight {
    line-height: 1.25;
}

.community-offer-card h3 {
    margin: 0;
    color: #08162d;
    font-size: 16px;
    font-weight: 600;
}

.community-offer-code {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.community-offer-code span {
    color: #64748b;
    font-size: 12px;
}

.community-offer-code code {
    padding: 10px 14px;
    color: #08162d;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
}

/* Listing pages */
.community-back {
    margin: 0 0 24px;
}

.community-back a {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.community-back a:hover {
    color: #1f7a46;
}

.community-pagination {
    margin-top: 48px;
}

.community-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.community-pagination .page-numbers {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #374151;
    font-size: 14px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
}

.community-pagination .page-numbers.current {
    color: #ffffff;
    font-weight: 700;
    background: #1f7a46;
    border-color: #1f7a46;
}

/* Detail pages */
.community-detail-header {
    padding: 56px 0 32px;
    background: #071127;
    color: #ffffff;
}

.community-detail-narrow {
    max-width: 880px;
}

/* Same breadcrumb as the hero (spacing comes from .breadcrumb-sep); only colours change on the dark band. */
.community-detail-header .breadcrumb a {
    color: #94a3b8;
}

.community-detail-header .breadcrumb .breadcrumb-link {
    padding-left: 8px;
}

.community-detail-header .breadcrumb a:hover {
    color: #ffffff;
}

.community-detail-header .breadcrumb-sep {
    color: #475569;
}

.community-detail-header h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
}

.bambu-page .community-detail-header h1 {
    line-height: 1.2;
}

.community-detail-meta,
.community-detail-lead {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: #cbd5e1;
    font-size: 15px;
}

.community-detail-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.community-detail-topics a {
    display: inline-block;
    padding: 5px 12px;
    color: #c7f0d6;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
}

.community-detail-cover {
    margin: 0 auto;
    padding-top: 40px;
}

/* Inside the two-column layout the cover starts level with the side panel. */
.community-detail-layout .community-detail-cover {
    padding-top: 0;
    margin-bottom: 32px;
}

.community-detail-cover img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
}

.community-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 48px;
    padding-block: 48px 80px;
}

.community-detail-narrow.community-prose {
    padding-block: 40px 80px;
}

.community-prose {
    color: #1e293b;
    font-size: 17px;
}

.bambu-page .community-prose p,
.bambu-page .community-prose li {
    line-height: 1.75;
}

.community-prose > * {
    margin: 0 0 1.2em;
}

.community-prose h2,
.community-prose h3 {
    margin-top: 1.6em;
    color: #08162d;
    font-weight: 700;
}

.community-prose h2 {
    font-size: 26px;
}

.community-prose h3 {
    font-size: 21px;
}

.community-prose a {
    color: #1f7a46;
    text-decoration: underline;
}

.community-prose ul,
.community-prose ol {
    padding-left: 1.4em;
}

/* reset.min.css strips list markers; articles need them back. */
.community-prose ul {
    list-style: disc;
}

.community-prose ol {
    list-style: decimal;
}

.community-prose img {
    height: auto;
    border-radius: 12px;
}

.community-prose blockquote {
    padding: 4px 0 4px 20px;
    color: #334155;
    border-left: 3px solid #43b263;
}

.community-detail-panel {
    position: sticky;
    top: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 2px #0000000d;
}

/* reset.min.css removes paragraph margins; space the panel rows evenly. */
.community-detail-panel > * + * {
    margin-top: 14px;
}

.community-detail-panel > p:not([class]) {
    color: #334155;
    font-size: 14px;
}

.community-detail-panel dl {
    display: grid;
    gap: 4px 0;
    margin: 0;
}

.community-detail-panel dt {
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.community-detail-panel dt:first-child {
    margin-top: 0;
}

.community-detail-panel dd {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
}

.community-detail-status {
    margin: 0 0 16px;
    padding: 8px 12px;
    color: #92400e;
    font-size: 13px;
    background: #fffbeb;
    border-radius: 10px;
}

.community-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(90deg, #43b263 0%, #3ba295 25%, #3b7ab5 50%, #7147a7 75%, #814272 100%);
    border-radius: 9999px;
}

.community-detail-panel > .community-detail-cta {
    width: 100%;
    margin-top: 24px;
}

@media (max-width: 1024px) {
    .community-offer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .community-detail-layout {
        grid-template-columns: 1fr;
    }

    .community-detail-panel {
        position: static;
        order: -1;
    }
}

@media (max-width: 767px) {
    /* Keep tabs on one swipeable row rather than a tall stack. */
    .community-filter-pills,
    .community-listing-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .community-filter-pills button {
        width: auto;
        flex: 0 0 auto;
    }

    .community-offer-grid {
        grid-template-columns: 1fr;
    }

    .community-detail-header {
        padding-top: 40px;
    }
}
