/**
 * BHASNet Theme — Events & Awareness page styles.
 * Extracted from the page-events-awareness.php inline <style> blocks.
 * Enqueued conditionally by bhasnet_enqueue_events_awareness_page_assets()
 * in inc/assets.php, only when this page template is active.
 */

/* Featured event spotlight */
.bh-page-head--events {
    padding-bottom: 8.5rem;
}
.bh-featured-wrapper {
    margin-top: -5.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}
.bh-featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.bh-featured-label {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bh-paper);
}
.bh-featured-scroll {
    display: flex;
    gap: 1rem;
}
.bh-featured-scroll--multi {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 0.6rem;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar completely while keeping scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.bh-featured-scroll--multi::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}
.bh-featured-card {
    flex: 1 1 100%;
    width: 100%;
}
.bh-featured-scroll--multi .bh-featured-card {
    flex: 0 0 auto;
    width: min(560px, 88vw);
    scroll-snap-align: start;
}
.bh-featured-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 0.5rem;
    background: var(--bh-paper);
    border: 1px solid var(--bh-line-dark);
    border-radius: var(--bh-radius);
    color: var(--bh-ink);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.bh-featured-arrow:hover {
    border-color: var(--bh-red);
    color: var(--bh-red);
}

/* Page-wide: timeline, filters, sticky bar, cards, FAQ, etc. */
/* ============================================================
   Events & Awareness - Compact styling with Hover + Click
   ============================================================ */

.bh-timeline-item {
    background: var(--bh-paper);
    border: 1px solid var(--bh-line-dark);
    padding: 0.85rem 1.15rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.2s ease;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
}
.bh-timeline-item:hover {
    border-color: var(--bh-slate-light);
}
.bh-timeline-item.bh-event-expanded,
.bh-timeline-item.bh-awareness-expanded {
    border-color: var(--bh-red);
    box-shadow: 0 2px 12px rgba(215, 38, 61, 0.08);
}
@media (min-width: 640px) {
    .bh-timeline-item {
        grid-template-columns: 110px 1fr;
        gap: var(--bh-space-md);
        padding: 0.85rem 1.15rem;
    }
}

.bh-timeline-date {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    color: var(--bh-red);
    white-space: nowrap;
    padding-top: 0.1rem;
}
.bh-timeline-item[data-type="awareness"] .bh-timeline-date {
    color: var(--bh-amber);
}

.bh-timeline-toggle {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bh-timeline-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.bh-timeline-title {
    font-family: var(--bh-font-display);
    font-size: 1.1rem;
    font-weight: 600;
}
.bh-timeline-item[data-type="event"] .bh-timeline-title {
    cursor: pointer;
}
/* CHANGED: Awareness titles are also clickable for expansion */
.bh-timeline-item[data-type="awareness"] .bh-timeline-title {
    cursor: pointer;
}
.bh-timeline-badge {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15em 0.5em;
    border-radius: 0;
    border: 1px solid var(--bh-line-dark);
    color: var(--bh-slate);
}
.bh-timeline-item[data-type="event"] .bh-timeline-badge {
    color: var(--bh-red);
    border-color: var(--bh-red);
}
.bh-timeline-item[data-type="awareness"] .bh-timeline-badge {
    color: var(--bh-amber);
    border-color: var(--bh-amber);
}

.bh-timeline-summary {
    display: block;
    color: var(--bh-slate);
    font-size: var(--bh-size-body);
    margin-top: 0.15rem;
}

/* ============================================================
   Event Actions - Show on hover, always show when expanded
   ============================================================ */
.bh-event-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.bh-timeline-item:hover .bh-event-actions,
.bh-timeline-item.bh-event-expanded .bh-event-actions,
.bh-timeline-item.bh-awareness-expanded .bh-event-actions {
    opacity: 1;
    max-height: 100px;
    margin-top: 0.5rem;
}

/* ============================================================
   Expanded Detail - Only shows when expanded
   ============================================================ */
.bh-timeline-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.bh-timeline-item.bh-event-expanded .bh-timeline-detail,
.bh-timeline-item.bh-awareness-expanded .bh-timeline-detail {
    max-height: 2000px;
    opacity: 1;
    margin-top: 0.75rem;
}

.bh-event-description,
.bh-awareness-description {
    color: var(--bh-ink);
    font-size: var(--bh-size-body);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.bh-event-description p:last-child,
.bh-awareness-description p:last-child {
    margin-bottom: 0;
}
.bh-event-description img,
.bh-awareness-description img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}
.bh-event-description iframe,
.bh-awareness-description iframe {
    max-width: 100%;
    border-radius: 4px;
}

/* ============================================================
   Buttons
   ============================================================ */
.bh-timeline-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    letter-spacing: 0.02em;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--bh-line-dark);
    background: transparent;
    color: var(--bh-ink);
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.bh-timeline-action-btn:hover {
    background: var(--bh-ink);
    color: var(--bh-paper);
    border-color: var(--bh-ink);
}
.bh-timeline-action-btn--primary {
    background: var(--bh-red);
    border-color: var(--bh-red);
    color: var(--bh-paper);
}
.bh-timeline-action-btn--primary:hover {
    background: var(--bh-red-deep);
    border-color: var(--bh-red-deep);
    color: var(--bh-paper);
}

/* ============================================================
   Share buttons - compact icon buttons within the actions row
   ============================================================ */
.bh-share-label {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-micro);
    color: var(--bh-slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.2rem;
}
.bh-share-btn {
    padding: 0.25rem 0.55rem;
    font-size: var(--bh-size-small);
}
.bh-copy-url-btn .bh-copy-status {
    font-size: var(--bh-size-micro);
    margin-left: 0.2rem;
}

/* Expand button - always visible */
.bh-event-expand-btn .fa-chevron-down,
.bh-awareness-expand-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}
.bh-timeline-item.bh-event-expanded .bh-event-expand-btn .fa-chevron-down,
.bh-timeline-item.bh-awareness-expanded .bh-awareness-expand-btn .fa-chevron-down {
    transform: rotate(180deg);
}
.bh-event-expand-btn:disabled,
.bh-awareness-expand-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ============================================================
   Past Events Archive
   ============================================================ */
.bh-past-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.bh-past-event-card {
    background: var(--bh-paper);
    border: 1px solid var(--bh-line-dark);
    padding: 0.95rem 1.15rem;
    transition: border-color 0.2s ease;
}
.bh-past-event-card--expandable:hover {
    border-color: var(--bh-slate-light);
}
.bh-past-event-card.bh-past-event-expanded {
    border-color: var(--bh-red);
    box-shadow: 0 2px 12px rgba(215, 38, 61, 0.08);
}
.bh-past-event-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}
.bh-past-event-main {
    flex: 1;
    min-width: 200px;
}
.bh-past-event-date {
    display: block;
    font-size: var(--bh-size-small);
    color: var(--bh-slate);
}
.bh-past-event-title {
    font-family: var(--bh-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0.1rem 0;
}
.bh-past-event-card--expandable .bh-past-event-title {
    cursor: pointer;
}
.bh-past-event-location {
    display: block;
    color: var(--bh-slate);
    font-size: var(--bh-size-body);
}
.bh-past-event-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.bh-past-event-attended {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    color: var(--bh-slate);
    white-space: nowrap;
}
.bh-past-event-expand-btn {
    background: none;
    border: 1px solid var(--bh-line-dark);
    color: var(--bh-red);
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.bh-past-event-expand-btn:hover {
    border-color: var(--bh-red);
}
.bh-past-event-expand-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}
.bh-past-event-card.bh-past-event-expanded .bh-past-event-expand-btn .fa-chevron-down {
    transform: rotate(180deg);
}
.bh-past-event-expand-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.bh-past-event-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.bh-past-event-card.bh-past-event-expanded .bh-past-event-detail {
    max-height: 3000px;
    opacity: 1;
    margin-top: 0.85rem;
}
.bh-past-event-recap {
    color: var(--bh-ink);
    font-size: var(--bh-size-body);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.bh-past-event-recap p:last-child {
    margin-bottom: 0;
}
.bh-past-event-recording {
    margin-bottom: 1rem;
}
.bh-past-event-recording iframe,
.bh-past-event-recording embed {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    width: 100%;
    border: none;
}
.bh-past-event-resources {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bh-line-dark);
}
.bh-past-event-resources h4 {
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bh-slate);
    margin-bottom: 0.4rem;
}
.bh-past-event-resources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bh-past-event-resources li {
    margin-bottom: 0.3rem;
}
.bh-past-event-resources li i {
    color: var(--bh-slate);
    width: 1.1em;
    text-align: center;
    margin-right: 0.1rem;
}
.bh-past-event-resources a {
    color: var(--bh-red);
    text-decoration: underline;
}

/* ============================================================
   Month Headers
   ============================================================ */
.bh-timeline-month-header {
    font-family: var(--bh-font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bh-ink);
    padding-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.bh-timeline-month-group:first-child .bh-timeline-month-header {
    padding-top: 0;
}

/* Sidebar - tighter */
.bh-sidebar-nav a,
.bh-sidebar-nav button {
    padding: 0.35rem 0.2rem !important;
    padding-left: 0.5rem !important;
    font-size: var(--bh-size-small) !important;
}
.bh-sidebar-nav-group-label {
    padding: 0.5rem 0.2em 0.2em !important;
    font-size: var(--bh-size-small) !important;
}

/* ============================================================
   Sticky Filter Bar
   ============================================================ */
.bh-sticky-actions {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bh-line-dark);
    padding: 0.35rem 0;
    transform: none !important;
    opacity: 1 !important;
    transition: top 0.15s ease;
}

.bh-sticky-actions-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bh-sticky-actions-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bh-sticky-filter-nav {
    display: flex;
    align-items: center;
    gap: 0.05rem;
}

.bh-sticky-filter-link {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.9rem;
    font-family: var(--bh-font-mono);
    font-size: var(--bh-size-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bh-slate);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}
.bh-sticky-filter-link:hover {
    color: var(--bh-ink);
}
.bh-sticky-filter-link.is-active {
    color: var(--bh-red);
    border-bottom-color: var(--bh-red);
}

.bh-sticky-search input[type="search"] {
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--bh-line-dark);
    border-radius: 2px;
    font-family: var(--bh-font-body);
    font-size: var(--bh-size-body);
    background: var(--bh-paper);
    color: var(--bh-ink);
    width: 160px;
}
.bh-sticky-search input[type="search"]:focus-visible {
    outline: 2px solid var(--bh-red);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 900px) {
    #how-it-works div[style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    #get-involved > .bh-container > .bh-reveal > div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    #faq div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    #faq div[style*="grid-template-columns: repeat(2, 1fr)"] p {
        padding-left: 0 !important;
    }
}

@media (max-width: 600px) {
    .bh-timeline-item {
        padding: 0.5rem 0.6rem;
        margin-bottom: 0.4rem;
    }
    .bh-timeline-title {
        font-size: 1rem;
    }
    .bh-timeline-date {
        font-size: 0.75rem;
    }
    .bh-timeline-action-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    .bh-sticky-actions-inner {
        justify-content: flex-start;
    }
    .bh-sticky-actions-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
        width: 100%;
    }
    .bh-sticky-filter-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .bh-sticky-filter-link {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }
    .bh-sticky-search input[type="search"] {
        width: 100%;
    }
}