/* 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;
}

/* 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;
    }
}

/* ---------- Bài viết, khớp design marcom (tháng 10/2026) ---------- */
.community-detail-page .community-detail-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    height: 320px;
    padding: 44px 0 0;
    box-sizing: border-box;
    background:
        linear-gradient(90deg, rgba(5, 11, 28, 0.92) 0%, rgba(5, 11, 28, 0.55) 45%, rgba(5, 11, 28, 0) 75%),
        var(--news-hero-art, none) right center / cover no-repeat,
        #050b1c;
}

.community-detail-page .community-detail-header > .community-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.community-detail-page .community-detail-header .breadcrumb,
.community-detail-page .community-detail-header .breadcrumb a,
.community-detail-page .community-detail-header .breadcrumb-sep {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.community-detail-page .community-detail-header h1,
.bambu-page .community-detail-page .community-detail-header h1 {
    max-width: 900px;
    width: fit-content;
    margin: 0;
    background: linear-gradient(90deg, #48a973 0%, #4c7cb2 50%, #7a4478 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 48px;
    font-weight: 700;
    line-height: 58px;
    letter-spacing: -0.5px;
}

/* Ngày · thời gian đọc nằm ngay trên ảnh bìa. */
.community-detail-page .community-detail > p.community-detail-meta {
    display: flex;
    margin: 40px auto 16px;
    color: #64748b;
    font-size: 14px;
}

/* Related articles: nền màu, 3 card gọn. */
.community-detail-page .community-related {
    padding: 56px 0 64px;
    background: #e8eef6;
}

.community-detail-page .community-related .community-section-header {
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.community-detail-page .community-related .community-section-header h2 {
    color: #0b1220;
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 500;
    letter-spacing: -0.5px;
}

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

.bambu-page .community-detail-page .community-related .community-news-grid > :nth-child(n+4) {
    display: none;
}

@media (max-width: 767px) {
    .community-detail-page .community-detail-header {
        height: auto;
        padding: 28px 0 40px;
    }

    .community-detail-page .community-detail-header h1,
    .bambu-page .community-detail-page .community-detail-header h1 {
        font-size: 30px;
        line-height: 38px;
    }

    .community-detail-page .community-detail > p.community-detail-meta {
        margin-top: 28px;
        margin-inline: auto;
    }

    .community-detail-page .community-related {
        padding: 40px 0 48px;
    }

    .community-detail-page .community-related .community-section-header {
        flex-direction: row;
        align-items: center;
    }
}

/* ---------- Event detail, khớp design marcom (tháng 10/2026) ---------- */
.event-detail + * {
    margin-top: 0;
}

.event-detail .community-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
    padding-top: 56px;
    padding-bottom: 64px;
}

.community-detail-page:has(.event-detail) {
    background: #f7f9fc;
}

.event-detail .community-detail-cover {
    margin: 0 0 8px;
}

.event-detail .community-detail-cover img {
    display: block;
    width: 100%;
    height: 440px;
    border-radius: 18px;
    background: #0b1220;
    object-fit: cover;
}

.event-detail .community-prose h2 {
    margin: 32px 0 16px;
    color: #0b1220;
    font-size: 28px;
    font-weight: 700;
    line-height: 36px;
}

.event-detail .community-prose p,
.event-detail .community-prose li {
    color: #334155;
    font-size: 18px;
    line-height: 30px;
}

.event-detail .community-prose ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 24px;
}

/* Agenda: khung viền, mỗi dòng giờ xanh + nội dung. */
.event-agenda {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    background: #fff;
    list-style: none;
}

.event-agenda li {
    display: flex;
    gap: 24px;
    padding: 16px 22px;
    border-top: 1px solid #e6ebf2;
    color: #0b1220 !important;
    font-size: 17px !important;
    line-height: 26px !important;
}

.event-agenda li:first-child {
    border-top: 0;
}

.event-agenda-time {
    flex: 0 0 90px;
    color: #1e7a5c;
    font-weight: 700;
}

/* Cột thông tin bên phải. */
.event-detail .community-detail-panel {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.event-detail .community-detail-panel dl {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.event-detail .community-detail-panel dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.event-detail .community-detail-panel dd {
    margin: 2px 0 0;
    color: #0b1220;
    font-size: 17px;
    font-weight: 600;
}

.event-detail .community-detail-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #40af6b 0%, #5f8ea8 50%, #7f4379 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

@media (max-width: 991px) {
    .event-detail .community-detail-layout {
        grid-template-columns: 1fr;
    }

    .event-detail .community-detail-panel {
        position: static;
    }
}

@media (max-width: 767px) {
    .event-detail .community-detail-layout {
        padding-top: 28px;
        padding-bottom: 48px;
    }

    .event-detail .community-detail-cover img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .event-detail .community-prose h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .event-detail .community-prose p,
    .event-detail .community-prose li {
        font-size: 16px;
        line-height: 26px;
    }

    .event-agenda li {
        gap: 14px;
        padding: 14px 16px;
        font-size: 15px !important;
    }

    .event-agenda-time {
        flex-basis: 72px;
    }

    .event-detail .community-detail-panel {
        padding: 22px 20px;
    }
}

/* Nhãn và giá trị sát nhau, các nhóm cách 16px như design. */
.event-detail .community-detail-panel dl {
    gap: 0;
}

.event-detail .community-detail-panel dt {
    margin: 16px 0 0;
}

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

.event-detail .community-detail-panel dd {
    margin: 2px 0 0;
    line-height: 24px;
}

/* Tên đối tác dưới tiêu đề banner (HOT Offering): chữ sáng, căn trái thẳng tiêu đề. */
.community-detail-header .community-detail-meta {
    margin: 0;
    color: #d5dae4;
    font-size: 16px;
    font-weight: 600;
    line-height: 26px;
}
