/* Webinars index design layer.
 *
 * The presentation layer for Components/Pages/WebinarsPage.razor. Global CSS,
 * linked from App.razor — it was Blazor-scoped until the stylesheets were
 * consolidated under wwwroot/css. The same two rules the sibling sheets call
 * out apply:
 *
 * 1. Nothing confines these rules to this page any more, so every selector is
 *    qw- prefixed or a descendant of one.
 * 2. @keyframes names are global too. Hence the qw- prefix on
 *    every one, so they cannot collide with the compiled Tailwind bundle or with
 *    Home's qh-, pricing's qp-, the blog's qb-/qd-, the help centre's qc-, the
 *    HR laws centre's ql- or the video pages' qv-/qvd- animations.
 *
 * These rules are unlayered and Tailwind v4's utilities live inside @layer, so
 * they win regardless of specificity. Keep every selector class-based and
 * prefixed.
 *
 * Palette is the logo ramp shared with the pricing, blog, help-centre and video
 * pages: #a22dea (magenta-violet) → #7b5ee5 → #5b5de2 (indigo-blue), with
 * #4f46e5 → #7c3aed as the primary. No hue from outside that ramp appears here.
 *
 * Layout: hero → one uniform grid of webinar cards, or a single centred empty
 * state. The empty state is the branch that actually ships today (no events are
 * published), so it is treated as a first-class panel rather than as loose copy.
 */

/* ── hero ───────────────────────────────────────────────────────────── */
.qw-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #fbfaff 44%, #f3f1fe 100%);
    padding: 76px 0 62px;
}

.qw-hero__aurora,
.qw-hero__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.qw-hero__aurora i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .72;
    animation: qw-drift 26s ease-in-out infinite;
}

.qw-hero__aurora i:nth-child(1) {
    width: 720px;
    height: 720px;
    top: -400px;
    right: -200px;
    background: radial-gradient(circle, rgba(129, 140, 248, .28), transparent 62%);
}

.qw-hero__aurora i:nth-child(2) {
    width: 560px;
    height: 560px;
    bottom: -300px;
    left: -200px;
    animation-delay: -9s;
    background: radial-gradient(circle, rgba(167, 139, 250, .26), transparent 62%);
}

.qw-hero__aurora i:nth-child(3) {
    width: 440px;
    height: 440px;
    top: 24%;
    left: 44%;
    animation-delay: -16s;
    background: radial-gradient(circle, rgba(162, 45, 234, .16), transparent 62%);
}

@keyframes qw-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-46px, 38px) scale(1.08); }
    66%      { transform: translate(38px, -28px) scale(.94); }
}

.qw-hero__grid {
    opacity: .5;
    background-image: radial-gradient(circle at 1px 1px, rgba(79, 70, 229, .24) 1.1px, transparent 0);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 58% 46% at 50% 8%, #000, transparent 72%);
    mask-image: radial-gradient(ellipse 58% 46% at 50% 8%, #000, transparent 72%);
}

.qw-hero__inner {
    position: relative;
    z-index: 5;
    max-width: 830px;
    margin: 0 auto;
    text-align: center;
}

/* ── breadcrumb ─────────────────────────────────────────────────────── */
/* The old hero was a dark plate, so the trail was white-on-colour. On this
   light hero it becomes slate, and the current page is the only bold step. */
.qw-crumbs {
    margin-bottom: 22px;
}

.qw-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #94a3b8;
}

.qw-crumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color .2s;
}

.qw-crumbs a:hover { color: #4f46e5; }

.qw-crumbs li[aria-current="page"] {
    font-weight: 650;
    color: #4f46e5;
}

/* ── eyebrow ────────────────────────────────────────────────────────── */
.qw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 17px 8px 9px;
    margin-bottom: 26px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #a855f7);
    box-shadow: 0 12px 30px -12px rgba(99, 102, 241, .85);
}

.qw-eyebrow__pip {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .22);
    animation: qw-pulse 2.8s ease-in-out infinite;
}

.qw-eyebrow__pip svg {
    width: 12px;
    height: 12px;
}

@keyframes qw-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .38); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

.qw-hero__title {
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 800;
    color: #0b1020;
    margin: 0 0 20px;
}

.qw-accent {
    background: linear-gradient(96deg, #4f46e5 0%, #7c3aed 46%, #a22dea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qw-hero__lede {
    font-size: clamp(15.5px, 1.2vw, 17.5px);
    line-height: 1.65;
    color: #64748b;
    max-width: 620px;
    margin: 0 auto;
}

/* ── list ───────────────────────────────────────────────────────────── */
.qw-list {
    position: relative;
    padding: 62px 0 92px;
    background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
}

.qw-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.qw-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #eae9f6;
    box-shadow: 0 20px 44px -32px rgba(15, 23, 42, .4);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s;
}

.qw-card:hover {
    transform: translateY(-6px);
    border-color: #d8d5f6;
    box-shadow: 0 36px 72px -34px rgba(79, 70, 229, .45);
}

/* Keyboard users get the same affordance the pointer does — the card is the
   link, so the focus ring belongs on the card and not on an inner element. */
.qw-card:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}

.qw-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    /* Shows through while the banner loads, and stands in for it entirely on a
       row that has no BannerUrl stored. */
    background: linear-gradient(135deg, #7b5ee5, #a22dea 52%, #5b5de2);
}

.qw-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.qw-card:hover .qw-card__media img { transform: scale(1.06); }

.qw-card__ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .55);
}

.qw-card__ph svg { width: 42px; height: 42px; }

/* Two stacked washes rather than one flat tint: the top scrim keeps the card
   edge readable over a bright banner, the bottom one does the same for the
   date chip. */
.qw-card__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11, 16, 32, .22) 0%, rgba(11, 16, 32, 0) 42%),
        linear-gradient(0deg, rgba(11, 16, 32, .58) 0%, rgba(11, 16, 32, 0) 52%);
    transition: opacity .3s;
}

.qw-card:hover .qw-card__scrim { opacity: .82; }

/* ── date chip ──────────────────────────────────────────────────────── */
.qw-card__date {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #fff;
    background: rgba(17, 12, 46, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .18);
}

.qw-card__date svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    opacity: .85;
}

/* ── card body ──────────────────────────────────────────────────────── */
.qw-card__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex: 1 1 auto;
    padding: 20px 22px 22px;
    min-width: 0;
}

.qw-card__title {
    font-size: 16.5px;
    line-height: 1.42;
    font-weight: 750;
    letter-spacing: -.015em;
    color: #0b1020;
    margin: 0;
    min-width: 0;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qw-card:hover .qw-card__title { color: #4f46e5; }

.qw-card__arrow {
    width: 32px;
    height: 32px;
    border-radius: 99px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: #f6f1ff;
    transition: color .25s, background .25s, transform .25s;
}

.qw-card__arrow svg { width: 15px; height: 15px; }

.qw-card:hover .qw-card__arrow {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateX(3px);
}

/* ── empty state ────────────────────────────────────────────────────── */
/* This is the branch that renders today, so it gets the panel treatment the
   cards would otherwise occupy rather than sitting as unframed copy. */
.qw-empty {
    position: relative;
    overflow: hidden;
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 40px 52px;
    text-align: center;
    border-radius: 28px;
    background: #fff;
    border: 1px solid #eae9f6;
    box-shadow: 0 30px 70px -44px rgba(79, 70, 229, .5);
}

/* Hairline of the brand ramp across the top edge. */
.qw-empty::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed 50%, #a22dea);
}

.qw-empty__ic {
    width: 60px;
    height: 60px;
    margin: 0 auto 22px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: #f6f1ff;
}

.qw-empty__ic svg { width: 28px; height: 28px; }

.qw-empty__copy {
    font-size: 15.5px;
    line-height: 1.75;
    color: #64748b;
    margin: 0 auto 30px;
    max-width: 460px;
}

/* ── actions ────────────────────────────────────────────────────────── */
.qw-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.qw-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.005em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, background .25s, color .25s, border-color .25s;
}

.qw-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    transition: transform .25s;
}

.qw-btn:hover svg { transform: translateX(3px); }

.qw-btn:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}

.qw-btn--primary {
    color: #fff;
    background: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #a22dea);
    box-shadow: 0 18px 38px -18px rgba(79, 70, 229, .95);
}

.qw-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px -18px rgba(79, 70, 229, 1);
}

.qw-btn--ghost {
    color: #4f46e5;
    background: #fff;
    border: 1px solid #ddd9f2;
}

.qw-btn--ghost:hover {
    transform: translateY(-2px);
    color: #7c3aed;
    border-color: #c9c2ee;
    background: #faf8ff;
}

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .qw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .qw-hero { padding: 56px 0 44px; }

    .qw-list { padding: 44px 0 62px; }
    .qw-grid { grid-template-columns: minmax(0, 1fr); }

    .qw-empty { padding: 44px 24px 40px; }

    /* Stacked, so let each button own the full width instead of centring two
       differently-sized pills on separate rows. */
    .qw-actions { flex-direction: column; }

    .qw-btn {
        justify-content: center;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qw-hero__aurora i,
    .qw-eyebrow__pip { animation: none !important; }

    .qw-card,
    .qw-card__media img,
    .qw-card__scrim,
    .qw-card__arrow,
    .qw-btn,
    .qw-btn svg {
        transition: none;
    }

    .qw-card:hover,
    .qw-card:hover .qw-card__media img,
    .qw-card:hover .qw-card__arrow,
    .qw-btn:hover,
    .qw-btn:hover svg {
        transform: none;
    }
}
