.community-page {
    background: #f8fafc;
    color: #0f172a;
}

.community-container {
    width: calc(100% - (2 * var(--bambu-container-gutter, 24px)));
    max-width: var(--bambu-container-max-width, 1290px);
    margin-inline: auto;
    box-sizing: border-box;
}

.community-search-section {
    padding: 48px 0 40px;
    background: #e3e9f5;
}

.community-search-wrap {
    position: relative;
}

.community-search-wrap > img {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
}

.community-search-wrap input {
    width: 100%;
    padding: 13px 17px 14px 45px;
    color: #1e293b;
    font: inherit;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    box-shadow: 0 1px 2px #0000000d;
}

.community-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.community-filter-pills button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    color: #374151;
    font: inherit;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    cursor: pointer;
}

.community-filter-pills button img,
.community-filter-pills button svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.community-filter-pills button.is-active {
    color: #1f7a46;
    font-weight: 700;
    border-color: #35ad6866;
}

.community-section {
    padding: 80px 0;
    background: #ffffff;
}

.community-section:nth-of-type(odd) {
    background: #f8fafc;
}

.community-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.community-section-header h2 {
    margin: 0;
    color: #08162d;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
}

.community-section-header > a,
.community-section-actions > a,
.community-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.community-news .community-card-footer a img {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.community-section-header > a img,
.community-section-actions > a img {
    width: 9px;
    height: 4px;
    flex: 0 0 9px;
}

.community-section-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.community-nav-controls {
    display: flex;
    gap: 8px;
}

.community-nav-controls button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
}

.community-nav-controls img {
    width: 12px;
    height: 12px;
}

.community-news-grid,
.community-events-grid,
.community-innovation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.community-news-card,
.community-event-card,
.community-innovation-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 2px #0000000d;
}

.community-news-image,
.community-event-image,
.community-innovation-image {
    position: relative;
    height: 192px;
    overflow: hidden;
    background: #0f172a;
}

.community-news-image > img,
.community-event-image > img,
.community-innovation-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-news-image > span,
.community-event-type,
.community-innovation-image > span {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #166534;
    font-size: 10px;
    font-weight: 700;
    background: #fffffff2;
    border-radius: 9999px;
}

.community-news-body,
.community-event-body,
.community-innovation-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.community-tag-row,
.community-innovation-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.community-tag-row > span,
.community-innovation-meta > span {
    padding: 4px 10px;
    color: #047857;
    font-size: 11px;
    background: #ecfdf5;
    border-radius: 4px;
}

.community-tag-row > span:nth-child(2),
.community-innovation-meta > time {
    color: #334155;
    background: #f1f5f9;
}

.community-tag-row .community-news-tag-blue {
    color: #1d4ed8;
    background: #eff6ff;
}

.community-tag-row .community-news-tag-purple {
    color: #9333ea;
    background: #faf5ff;
}

.community-news-body > time,
.community-iotw-content time,
.community-innovation-meta > time {
    color: #9ca3af;
    font-size: 11px;
}

.community-news-body h3,
.community-event-body h3,
.community-innovation-body h3 {
    display: -webkit-box;
    height: calc(1.35em * 2);
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-news-body > p,
.community-innovation-body > p {
    display: -webkit-box;
    height: calc(1.5em * 4);
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.community-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.community-card-footer > span {
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
}

.community-show-more {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.community-show-more a,
.community-event-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(90deg, #43b263, #3ba295 25%, #3b7ab5 50%, #7147a7 75%, #814272);
    border-radius: 9999px;
}

.community-show-more img {
    width: 9px;
    height: 8px;
}

.community-event-action img {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.community-events {
    background: #f8fafc;
}

.community-event-card {
    justify-content: space-between;
}

.community-event-image {
    height: 210px;
}

.community-event-type {
    color: #ffffff;
    background: #071127d9;
}

.community-event-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    width: 52px;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    background: #ffffff;
    border-radius: 8px;
}

.community-event-date b {
    font-size: 10px;
}

.community-event-date b.green { color: #059669; }
.community-event-date b.blue { color: #2563eb; }
.community-event-date b.purple { color: #9333ea; }

.community-event-date strong {
    color: #0f172a;
    font-size: 22px;
}

.community-event-body ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.community-event-body li {
    color: #64748b;
    font-size: 12px;
}

.community-event-body li::before {
    display: inline-block;
    width: 18px;
    color: #35ad68;
    content: '•';
}

.community-event-action {
    align-self: flex-start;
    margin: 0 24px 24px;
    padding: 10px 18px;
    font-size: 12px;
}

.community-iotw {
    background: #ffffff;
}

.community-iotw-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    background: #08162d;
    border-radius: 16px;
}

.community-iotw-image {
    position: relative;
    min-height: 360px;
}

.community-iotw-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-iotw-image > span {
    position: absolute;
    top: 24px;
    left: 24px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.community-iotw-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 40px;
}

.community-iotw-content h3 {
    display: -webkit-box;
    height: calc(1.35em * 2);
    margin: 22px 0 16px;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-iotw-content > div > p:last-child {
    display: -webkit-box;
    height: calc(1.5em * 4);
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.community-kicker {
    margin: 24px 0 0;
    color: #35ad68;
    font-size: 11px;
    font-weight: 700;
}

.community-iotw-content .community-tag-row time {
    margin-left: auto;
}

.community-iotw-content .community-card-footer {
    border-color: #ffffff1a;
}

.community-iotw-content .community-card-footer a {
    color: #35ad68;
}

.community-innovation-card .community-card-footer a img {
    width: 11px;
    height: 20px;
    flex: 0 0 11px;
}

.community-innovation-up {
    background: #f8fafc;
}

.community-innovation-image > span {
    color: #ffffff;
    background: #071127d9;
}

.community-innovation-meta {
    justify-content: space-between;
}

.community-innovation-meta > time {
    padding: 4px 8px;
    border-radius: 9999px;
}

.community-innovation-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.community-innovation-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.community-innovation-stats strong {
    color: #35ad68;
    font-size: 13px;
}

.community-innovation-stats div:nth-child(2) strong {
    color: #7c4d9e;
}

.community-innovation-stats span {
    color: #94a3b8;
    font-size: 11px;
}

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

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

    .community-iotw-image {
        min-height: 280px;
    }
}

@media (max-width: 767px) {
    .community-search-section,
    .community-section {
        padding-block: 56px;
    }

    .community-filter-pills {
        flex-direction: column;
        gap: 8px;
    }

    .community-filter-pills button {
        width: 100%;
        justify-content: space-between;
    }

    .community-section-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .community-section-actions {
        width: 100%;
        justify-content: space-between;
    }

    .community-news-grid,
    .community-events-grid,
    .community-innovation-grid {
        grid-template-columns: 1fr;
    }

    .community-iotw-content {
        padding: 28px 24px;
    }

    .community-iotw-content .community-tag-row time {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .community-search-section,
    .community-section {
        padding-block: 48px;
    }

    .community-section-header h2 {
        font-size: 32px;
    }

    .community-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ---------- Community, góp ý marcom (tháng 10/2026) ---------- */
.community-page .hero {
    position: relative;
    background: #050b1c;
}

.community-page .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--community-hero-art, none) right center / cover no-repeat;
    pointer-events: none;
}

.community-page .hero[style*="background-image"]::before,
.community-page .hero-decor {
    display: none;
}

.community-page .hero-inner {
    position: relative;
    z-index: 1;
}

/* Thanh tìm kiếm nền trắng, chip lọc chữ 15px. */
.community-page .community-search-section {
    padding: 36px 0 28px;
    background: #fff;
}

.community-page .community-filter-pills button {
    min-height: 42px;
    padding: 9px 18px;
    font-size: 15px;
}

/* Section xen kẽ trắng / màu, InnovationUP nền gradient sáng như News & Events ở Home. */
.community-page .community-section {
    padding: 56px 0 64px;
}

.community-page .community-iotw,
.community-page .community-events {
    background: #fff;
}

.community-page .community-innovation-up {
    background: linear-gradient(110deg, #ecf8f1 0%, #e9f0fb 55%, #f1ecf8 100%);
}

.community-page .community-news,
.community-page .community-offerings {
    background: #eef2f8;
}

.community-page .community-section-header {
    margin-bottom: 28px;
}

.community-page .community-section-header h2 {
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Innovation of the Week và News: 4 card một hàng trên desktop. */
@media (min-width: 1025px) {
    .community-page .community-news-grid.is-four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .bambu-page .community-page [data-content-section] .community-news-grid.is-four > :nth-child(4) {
        display: flex;
    }

    .community-page .community-news-grid.is-four .community-news-body h3 {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .community-page .community-section {
        padding: 40px 0 48px;
    }

    .community-page .community-filter-pills button {
        min-height: 38px;
        padding: 7px 14px;
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .community-page .community-section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 20px;
    }

    .community-page .community-section-header h2 {
        font-size: 26px;
    }

    .community-page .community-section-header > a {
        flex: 0 0 auto;
        margin: 0;
        font-size: 14px;
    }
}

/* ---------- Community: khớp design marcom (icon tìm kiếm, nền section, card gọn) ---------- */
.community-search-wrap > svg {
    position: absolute;
    top: 50%;
    left: 22px;
    transform: translateY(-50%);
    pointer-events: none;
}

.community-page .community-search-wrap input {
    height: 52px;
    padding-left: 52px;
    border: 1px solid #dce3ec;
    border-radius: 999px;
    font-size: 16px;
}

.community-page .community-search-section {
    padding: 36px 0;
    border-bottom: 1px solid #e6ebf2;
}

/* Nền theo design: IOTW màu, InnovationUP gradient, News màu, Events trắng, HOT Offerings màu. */
.community-page .community-iotw,
.community-page .community-news,
.community-page .community-offerings {
    background: #e8eef6;
}

.community-page .community-innovation-up {
    background: linear-gradient(100deg, #e6f6ee 0%, #e8effa 50%, #f0e8f4 100%);
}

.community-page .community-events {
    background: #fff;
}

.community-page .community-section-header {
    align-items: flex-end;
    margin-bottom: 32px;
}

.community-page .community-section-header h2 {
    color: #0b1220;
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 500;
    line-height: 1.2;
}

.community-page .community-section-header > a {
    color: #0b1220;
    font-size: 15px;
    font-weight: 600;
}

/* Card gọn: ảnh 170px, chủ đề chữ in hoa xanh, tiêu đề 16px 2 dòng, ngày 13px, link đậm. */
.community-page .community-news-grid.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.community-compact-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.community-compact-card:hover {
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.18);
    transform: translateY(-3px);
}

.community-compact-card[hidden] {
    display: none;
}

.community-compact-image {
    display: block;
    height: 170px;
    overflow: hidden;
    background: #e2e8f0;
}

.community-compact-image img,
.community-compact-image .community-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-compact-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 20px;
}

.community-compact-topic {
    margin: 0;
    color: #1e7a5c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 16px;
    text-transform: uppercase;
}

.community-compact-body h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-compact-body h3 a {
    color: #0b1220;
    text-decoration: none;
}

.community-compact-body h3 a:hover {
    color: #1e7a5c;
}

.community-compact-meta,
.community-compact-excerpt {
    margin: 0;
    color: #5b6168;
    font-size: 13px;
    line-height: 18px;
}

.community-compact-excerpt {
    display: -webkit-box;
    overflow: hidden;
    line-height: 19px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-compact-link {
    margin-top: auto;
    padding-top: 8px;
    color: #0b1220;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
}

.community-compact-link:hover {
    color: #1e7a5c;
}

@media (max-width: 1024px) {
    .community-page .community-news-grid.is-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .community-page .community-news-grid.is-three {
        grid-template-columns: 1fr;
    }

    .community-compact-image {
        height: 190px;
    }
}

/* Card News: tiêu đề luôn chiếm 2 dòng để ngày và "Read article" thẳng hàng giữa các card. */
.community-compact-body h3 {
    min-height: 46px;
}

.community-compact-link {
    margin-top: 0;
}

.community-page .community-news-grid {
    align-items: start;
}

/* Card Events & Webinars theo design: ảnh 170px, ô ngày nhỏ, 1 dòng giờ · địa điểm, nút nhỏ. */
.community-page .community-events-grid {
    gap: 20px;
}

.community-page .community-event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.community-page .community-event-image {
    position: relative;
    display: block;
    height: 170px;
}

.community-page .community-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-page .community-event-date {
    top: auto;
    bottom: 8px;
    left: 12px;
    width: 46px;
    height: 50px;
    padding: 0;
    border-radius: 8px;
    gap: 0;
}

.community-page .community-event-date b {
    font-size: 11px;
    line-height: 13px;
}

.community-page .community-event-date strong {
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
}

.community-page .community-event-type {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0b1220;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
}

.community-page .community-event-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 0;
}

.community-page .community-event-body h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.community-page .community-event-body h3 a {
    color: #0b1220;
}

.community-event-line {
    margin: 0;
    color: #5b6168;
    font-size: 13px;
    line-height: 19px;
}

.community-page .community-event-action {
    align-self: flex-start;
    height: 36px;
    margin: auto 20px 20px;
    margin-top: 14px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
}

/* HOT Offerings theo design: "View offer" màu tối đậm, chữ vừa mắt. */
.community-page .community-offer-card {
    gap: 12px;
    padding: 22px 24px;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.community-page .community-offer-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2f7;
    color: #1e7a5c;
    font-size: 17px;
}

.community-page .community-offer-partner {
    color: #5b6168;
    font-size: 13px;
}

.community-page .community-offer-highlight,
.bambu-page .community-page .community-offer-highlight {
    font-size: 22px;
    line-height: 30px;
    color: #1e7a5c;
}

.community-page .community-offer-card h3 {
    font-size: 15px;
    font-weight: 400;
    line-height: 22px;
}

.community-page .community-offer-card h3 a {
    color: #0b1220;
}

.community-page .community-offer-card .community-card-footer {
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
    color: #8a93a3;
    font-size: 12px;
}

.community-page .community-offer-card .community-card-footer a {
    color: #0b1220;
    font-size: 14px;
    font-weight: 600;
}
