/* ==========================================================================
   UPCOMING EVENTS & BAC ACTIVITIES SECTION
   ========================================================================== */
.upcoming-events-section {
    margin: 0 0 56px;
}

.events-header {
    text-align: left;
    margin: 0 0 22px;
}

.events-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bp-gold-soft);
    border: 1px solid rgba(229, 168, 35, .5);
    color: var(--bp-gold-ink);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.events-kicker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bp-gold);
    display: inline-block;
}

.events-headline {
    margin: 0 0 6px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
    color: var(--bp-navy);
}

.events-subhead {
    margin: 0;
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--bp-muted);
}

/* Event Cards Layout */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

.event-card {
    min-width: 0;
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    border-radius: 16px;
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    position: relative;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -16px rgba(10, 25, 47, .5);
    border-color: #c9d3e2;
}

/* Card Header: Date badge + Category Pill */
.event-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    width: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    background: #ffffff;
}

.event-date-month {
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 3px 0;
    display: block;
    line-height: 1.2;
}

.event-date-day {
    background: #ffffff;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
    padding: 4px 0;
    display: block;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.event-type-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #172a45;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 4px 12px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Card Title */
.event-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    margin: 0 0 14px 0;
    text-wrap: balance;
}

/* Meta List (Time & Venue) */
.event-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.event-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    line-height: 1.4;
}

.event-meta-text {
    color: #334155;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Card Footer & Action Button */
.event-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.event-attachment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1e293b !important;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-attachment-btn:hover {
    background: #0f172a;
    color: #ffffff !important;
    border-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    transform: translateY(-1px);
}

/* Empty State */
.events-empty-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 36px 24px;
    text-align: center;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.events-empty-text {
    color: #64748b;
    font-size: 0.92rem;
    font-style: italic;
    margin: 0;
}

/* Activity Category Filter Bar */
.events-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
}

.events-filter-btn {
    padding: 9px 16px;
    border: 1px solid var(--bp-line);
    border-radius: 10px;
    background: var(--bp-surface);
    color: var(--bp-muted);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.events-filter-btn:hover {
    background: var(--bp-canvas);
    border-color: #c9d3e2;
    color: var(--bp-navy);
}

.events-filter-btn.active {
    background: var(--bp-navy);
    border-color: var(--bp-navy);
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--bp-gold);
}

/* Browse All Schedule Button */
.events-browse-all-wrap {
    margin-top: 24px;
}

.events-browse-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    background: var(--bp-navy);
    border: 1px solid var(--bp-navy);
    border-radius: 10px;
    color: #fff;
    font-size: .93rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}

.events-browse-all-btn:hover {
    background: var(--bp-navy-2);
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--bp-gold);
}

.events-browse-all-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Semantic Badges */
.event-type-badge.type-prebid {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.event-type-badge.type-opening {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.event-type-badge.type-meeting {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.event-type-badge.type-postqual {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #ddd6fe;
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }

    .events-headline {
        font-size: 1.35rem;
    }

    .event-card {
        padding: 18px 16px 16px;
    }
}

/* ==========================================================================
   HOMEPAGE PATHWAY & STATUTORY HUB SECTIONS
   ========================================================================== */

/* 1. 4-Step Pathway Section */
.how-it-works-section {
    margin: 0 0 56px;
}

.how-it-works-head {
    margin-bottom: 22px;
}

.pathway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.pathway-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    border-radius: 16px;
    padding: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.pathway-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -16px rgba(10, 25, 47, .5);
    border-color: #c9d3e2;
}

.pathway-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: var(--bp-navy);
    color: var(--bp-gold);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.pathway-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--bp-navy);
}

.pathway-desc {
    margin: 0 0 16px;
    flex: 1;
    font-size: .88rem;
    line-height: 1.6;
    color: var(--bp-muted);
}

.pathway-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .86rem;
    font-weight: 800;
    color: var(--bp-navy-3);
    text-decoration: none;
}

.pathway-link:hover {
    color: var(--bp-gold-ink);
    text-decoration: underline;
}

/* 2. Statutory Transparency Seal & Mandates Hub */

/* --------------------------------------------------------------------------
   Calendar cards: nothing may leave the card. The type pill used to be
   white-space: nowrap, so an entry whose "type" was a long place name pushed
   the pill out over the card's edge and into its neighbour.
   -------------------------------------------------------------------------- */
.events-grid { align-items: stretch; }
.event-card { min-width: 0; overflow: hidden; }
.event-card-head { align-items: flex-start; }
.event-type-badge {
    min-width: 0;
    max-width: calc(100% - 68px);
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    text-align: right;
    justify-content: flex-end;
}
.event-title, .event-project-title, .event-meta-text { overflow-wrap: anywhere; min-width: 0; }
.event-ref-badge { max-width: 100%; overflow-wrap: anywhere; }
.event-meta-item { min-width: 0; }

/* the number beside a calendar tab */
.events-filter-n { font-weight: 600; opacity: .7; }

/* an activity with a picture: the picture on top, and the whole card is pressed to see it large */
.event-card.has-pic { cursor: zoom-in; }
.event-card.has-pic:focus-visible { outline: 3px solid var(--bp-gold); outline-offset: 2px; }
.event-card-pic { display: block; width: calc(100% + 44px); max-width: none; height: 150px; margin: -22px -22px 16px; object-fit: cover; object-position: top center; background: #eef2f8; border-radius: 13px 13px 0 0; }
