/* =========================================================
   BLOOOW DISCOVERY SECTIONS — EVENTS + REGULATED OFFERS
========================================================= */
.discovery-page {
    --discovery-max: 1280px;
}

.discovery-header-tools {
    width: min(100%, var(--discovery-max));
    margin: 0 auto;
    padding: 0 0 8px var(--blooow-brand-rail, 200px);
}

.discovery-search-form {
    display: grid;
    grid-template-columns: minmax(280px, 1.65fr) minmax(180px, 0.72fr) 190px;
    gap: 9px;
}

.discovery-search-field,
.discovery-select-wrap,
.discovery-search-button {
    min-height: 46px;
    border: 1px solid color-mix(in srgb, var(--page-text) 70%, transparent);
    border-radius: 11px;
    background: var(--page-bg);
    color: var(--page-text);
}

.discovery-search-field,
.discovery-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
}

.discovery-search-field svg,
.discovery-select-wrap svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.75;
}

.discovery-search-field input,
.discovery-select-wrap select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--page-text);
    font: inherit;
    font-size: 0.88rem;
}

.discovery-select-wrap select {
    appearance: none;
    cursor: pointer;
}

.discovery-search-field input::placeholder {
    color: var(--page-text);
    opacity: 0.42;
}

.discovery-search-button {
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-color: var(--page-text);
    background: var(--page-text);
    color: var(--page-bg);
    font: inherit;
    font-size: 0.83rem;
    font-weight: 800;
    cursor: pointer;
}

.discovery-search-button:hover,
.discovery-search-button:focus-visible {
    background: var(--page-bg);
    color: var(--page-text);
}

.discovery-marketplace,
.discovery-detail-shell {
    width: min(calc(100% - 28px), var(--discovery-max));
    margin: 0 auto;
}

.discovery-marketplace {
    padding: 18px 0 56px;
}

.discovery-intro {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.8fr);
    gap: 30px;
    align-items: end;
    padding: 10px 0 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--page-text) 25%, transparent);
}

.discovery-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    opacity: 0.6;
}

.discovery-intro h1,
.discovery-detail-copy h1,
.offer-detail-shell > h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 3.2rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.discovery-intro p {
    margin: 0;
    max-width: 560px;
    justify-self: end;
    color: color-mix(in srgb, var(--page-text) 68%, transparent);
    font-size: 0.9rem;
    line-height: 1.55;
}

.quick-filter-rail,
.discovery-category-rail {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-filter-rail::-webkit-scrollbar,
.discovery-category-rail::-webkit-scrollbar {
    display: none;
}

.quick-filter-rail {
    gap: 7px;
    padding: 12px 0;
}

.quick-filter-chip,
.discovery-sort-links a {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--page-text) 42%, transparent);
    border-radius: 999px;
    background: var(--page-bg);
    color: var(--page-text);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 750;
}

.quick-filter-chip {
    padding: 8px 13px;
}

.quick-filter-chip:hover,
.quick-filter-chip:focus-visible,
.quick-filter-chip.selected,
.discovery-sort-links a:hover,
.discovery-sort-links a:focus-visible,
.discovery-sort-links a.selected {
    background: var(--page-text);
    color: var(--page-bg);
}

.discovery-category-section {
    padding: 0 0 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--page-text) 25%, transparent);
}

.discovery-category-rail {
    gap: 9px;
    padding: 2px 0;
}

.discovery-category-card {
    width: 138px;
    height: 104px;
    flex: 0 0 auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid color-mix(in srgb, var(--page-text) 35%, transparent);
    border-radius: 12px;
    background: var(--page-bg);
    color: var(--page-text);
    text-decoration: none;
    text-align: center;
}

.discovery-category-card:hover,
.discovery-category-card:focus-visible,
.discovery-category-card.selected {
    border-color: var(--page-text);
    background: var(--page-text);
    color: var(--page-bg);
}

.discovery-category-monogram {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.86rem;
    font-weight: 850;
}

.discovery-category-card strong {
    font-size: 0.72rem;
    line-height: 1.1;
}

.discovery-toolbar {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.discovery-toolbar > span {
    font-size: 0.7rem;
    opacity: 0.56;
}

.discovery-sort-links {
    display: flex;
    gap: 6px;
}

.discovery-sort-links a {
    padding: 7px 10px;
}

.event-grid,
.offer-grid {
    display: grid;
    gap: 12px;
}

.event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-card,
.offer-card {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--page-text) 31%, transparent);
    border-radius: 14px;
    background: var(--page-bg);
    color: var(--page-text);
}

.event-card.featured,
.offer-card.featured {
    border-color: var(--page-text);
}

.event-card-media {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: color-mix(in srgb, var(--page-text) 5%, var(--page-bg));
    text-decoration: none;
    color: var(--page-text);
}

.event-card-media img,
.discovery-detail-media img,
.institution-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.event-date-tile,
.event-detail-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.event-date-tile strong,
.event-detail-date strong {
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    letter-spacing: -0.06em;
}

.event-date-tile small,
.event-detail-date span {
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.event-card-body,
.offer-card {
    padding: 14px;
}

.discovery-card-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.discovery-card-badges span {
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--page-text) 35%, transparent);
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.event-card h2,
.offer-card h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
}

.event-card h2 a,
.offer-card h2 a {
    color: inherit;
    text-decoration: none;
}

.event-card h2 a:hover,
.offer-card h2 a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.event-card-time,
.event-card-location,
.event-card-organizer,
.offer-institution,
.offer-institution-type,
.offer-benefit,
.offer-summary {
    margin: 0;
}

.event-card-time {
    margin-top: 10px;
    font-size: 0.76rem;
    font-weight: 800;
}

.event-card-location,
.event-card-organizer,
.offer-summary,
.offer-institution-type {
    margin-top: 5px;
    font-size: 0.72rem;
    line-height: 1.45;
    opacity: 0.62;
}

.discovery-empty {
    grid-column: 1 / -1;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed color-mix(in srgb, var(--page-text) 35%, transparent);
    border-radius: 14px;
    text-align: center;
}

.discovery-empty strong {
    font-size: 0.95rem;
}

.discovery-empty span {
    font-size: 0.75rem;
    opacity: 0.6;
}

.offer-card {
    display: flex;
    flex-direction: column;
    min-height: 330px;
}

.offer-card-top,
.offer-detail-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.offer-card-top {
    margin-bottom: 12px;
}

.institution-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--page-text) 40%, transparent);
    border-radius: 10px;
    background: var(--page-text);
    color: var(--page-bg);
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.institution-mark img {
    object-fit: contain;
    background: #fff;
}

.offer-institution {
    font-size: 0.78rem;
    font-weight: 850;
}

.offer-institution-type {
    margin-top: 2px;
}

.offer-benefit {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 800;
}

.offer-summary {
    margin-top: 7px;
}

.offer-card-footer {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid color-mix(in srgb, var(--page-text) 20%, transparent);
    font-size: 0.68rem;
    opacity: 0.72;
}

.offer-card-footer a {
    color: inherit;
    font-size: 1.15rem;
    text-decoration: none;
}

.regulatory-note {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--page-text) 30%, transparent);
    border-radius: 12px;
    font-size: 0.72rem;
    line-height: 1.55;
}

.regulatory-note p {
    margin: 5px 0 0;
    opacity: 0.68;
}

/* Detail pages */
.discovery-detail-shell {
    padding: 24px 0 64px;
}

.detail-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--page-text);
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 800;
    opacity: 0.64;
}

.detail-back:hover { opacity: 1; }

.discovery-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}

.discovery-detail-media {
    min-height: 420px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--page-text) 28%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--page-text) 4%, var(--page-bg));
}

.discovery-detail-copy {
    padding-top: 6px;
}

.discovery-detail-copy h1,
.offer-detail-shell > h1 {
    margin-top: 10px;
}

.detail-facts {
    margin: 24px 0;
    display: grid;
    gap: 11px;
}

.detail-facts div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--page-text) 18%, transparent);
}

.detail-facts dt {
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.52;
}

.detail-facts dd {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.detail-description {
    font-size: 0.88rem;
    line-height: 1.72;
    opacity: 0.82;
}

.detail-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-primary-action,
.detail-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 15px;
    border: 1px solid var(--page-text);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 850;
}

.detail-primary-action {
    background: var(--page-text);
    color: var(--page-bg);
}

.detail-secondary-action {
    background: var(--page-bg);
    color: var(--page-text);
}

.offer-detail-heading {
    margin-bottom: 18px;
}

.institution-mark-large {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 13px;
}

.offer-detail-institution {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 850;
}

.offer-detail-benefit {
    max-width: 780px;
    margin: 14px 0 0;
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.4;
}

.offer-detail-layout {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 24px;
}

.offer-detail-section {
    margin-top: 26px;
}

.offer-detail-section h2,
.offer-verification-panel h2 {
    margin: 0 0 10px;
    font-size: 0.85rem;
}

.offer-verification-panel {
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--page-text) 30%, transparent);
    border-radius: 13px;
}

.detail-facts.compact {
    margin: 0;
}

.detail-facts.compact div {
    grid-template-columns: 92px 1fr;
}

.regulator-source {
    margin-top: 16px;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid color-mix(in srgb, var(--page-text) 20%, transparent);
    font-size: 0.7rem;
}

.regulator-source span { opacity: 0.62; }
.regulator-source a { color: inherit; font-weight: 750; }
.detail-regulatory-note { max-width: 900px; }

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

@media (max-width: 820px) {
    .discovery-header-tools {
        width: min(calc(100% - 20px), var(--discovery-max));
        padding-left: 0;
    }

    .discovery-search-form {
        grid-template-columns: 1fr 1fr;
    }

    .discovery-search-field {
        grid-column: 1 / -1;
    }

    .discovery-search-button {
        min-width: 0;
    }

    .discovery-intro,
    .discovery-detail-grid,
    .offer-detail-layout {
        grid-template-columns: 1fr;
    }

    .discovery-intro p {
        justify-self: start;
    }

    .discovery-detail-media {
        min-height: 340px;
    }
}

@media (max-width: 640px) {
    .discovery-marketplace,
    .discovery-detail-shell {
        width: min(calc(100% - 18px), var(--discovery-max));
    }

    .discovery-marketplace {
        padding-top: 8px;
    }

    .discovery-intro {
        gap: 10px;
        padding-bottom: 14px;
    }

    .discovery-intro h1,
    .discovery-detail-copy h1,
    .offer-detail-shell > h1 {
        font-size: 1.9rem;
    }

    .discovery-intro p {
        font-size: 0.78rem;
    }

    .discovery-category-card {
        width: 116px;
        height: 90px;
    }

    .discovery-category-monogram {
        width: 32px;
        height: 32px;
    }

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

    .event-card {
        display: grid;
        grid-template-columns: 122px 1fr;
    }

    .event-card-media {
        aspect-ratio: auto;
        min-height: 150px;
    }

    .event-card-body {
        padding: 11px;
    }

    .event-card h2 {
        font-size: 0.92rem;
    }

    .offer-card {
        min-height: 0;
    }

    .discovery-detail-media {
        min-height: 260px;
    }

    .detail-facts div,
    .detail-facts.compact div {
        grid-template-columns: 74px 1fr;
    }
}

@media (max-width: 420px) {
    .discovery-search-form {
        grid-template-columns: 1fr;
    }

    .discovery-search-field {
        grid-column: auto;
    }

    .discovery-search-button {
        min-height: 43px;
    }
}

.discovery-pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.discovery-pagination > a,
.discovery-pagination > span,
.discovery-pagination-pages a,
.discovery-pagination-pages span {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--page-text) 30%, transparent);
    border-radius: 9px;
    color: var(--page-text);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 750;
}

.discovery-pagination-pages {
    display: flex;
    align-items: center;
    gap: 5px;
}

.discovery-pagination-pages .current {
    background: var(--page-text);
    color: var(--page-bg);
    border-color: var(--page-text);
}

.discovery-pagination .disabled,
.discovery-pagination-pages .ellipsis {
    opacity: 0.34;
}

.discovery-pagination-pages .ellipsis {
    border-color: transparent;
}

@media (max-width: 640px) {
    .discovery-pagination-pages {
        display: none;
    }

    .discovery-pagination > a,
    .discovery-pagination > span {
        flex: 1;
    }
}

/* =========================================================
   BUSINESS-ALIGNED EVENTS + REGULATED OFFERS MARKETPLACES
   These index surfaces deliberately reuse the Business
   marketplace's search, category, toolbar and card language.
========================================================= */

.events-page .discovery-aligned-marketplace,
.offers-page .discovery-aligned-marketplace {
    padding-top: 8px;
}

.events-page .category-label,
.offers-page .category-label {
    text-align: center;
}

.discovery-category-glyph {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 10px;
    color: currentColor;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.event-marketplace-card,
.offer-marketplace-card {
    min-height: 100%;
}

.event-marketplace-media,
.offer-marketplace-media {
    display: grid;
    place-items: center;
}

.event-date-fallback,
.offer-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #ffffff;
}

.event-date-fallback strong {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 850;
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.event-date-fallback span {
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.offer-logo-fallback {
    gap: 8px;
}

.offer-logo-fallback strong {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.offer-logo-fallback span {
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.offer-marketplace-media.institution-logo-media {
    padding: 22px;
    background: #ffffff;
}

.offer-marketplace-media.institution-logo-media img {
    position: static;
    inset: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-card-meta,
.offer-card-meta {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.event-card-meta span,
.offer-card-meta span {
    min-width: 0;
}

.event-card-meta span:last-child,
.offer-card-meta span:last-child {
    text-align: right;
}

.offer-verification-line span:last-child {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.discovery-offer-toolbar {
    min-height: 58px;
}

.discovery-section-label {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.discovery-section-kicker {
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.discovery-section-copy {
    min-width: 0;
    color: var(--page-text);
    font-size: 0.7rem;
    opacity: 0.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discovery-regulatory-note {
    margin-top: 22px;
    border-color: var(--page-text);
    border-radius: 12px;
    background: var(--page-bg);
    color: var(--page-text);
}

.events-page .business-empty,
.offers-page .business-empty {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .discovery-category-glyph {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        font-size: 0.9rem;
    }

    .event-date-fallback strong {
        font-size: 3.2rem;
    }

    .event-date-fallback span {
        margin-top: 7px;
        font-size: 0.68rem;
    }

    .offer-marketplace-media.institution-logo-media {
        padding: 16px;
    }

    .discovery-offer-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .discovery-section-label {
        padding-top: 2px;
    }

    .discovery-section-copy {
        display: none;
    }
}
