/* ============================================================
   LRN Events — Card styles matched to leadersrisingnetwork.com/learning-center/
   Calendar icon badge sits left of the event title (like the attached image).
   All layout vars inherit from Astra where possible.
   ============================================================ */

:root {
    --lrn-accent:     #1a3a6b;   /* LRN navy, matches site header */
    --lrn-accent-h:   #0f2548;
    --lrn-cat:        #2563b0;   /* category link color */
    --lrn-text:       #1a1a1a;
    --lrn-muted:      #666;
    --lrn-border:     #e5e7eb;
    --lrn-radius:     4px;
    --lrn-card-bg:    #fff;
    --lrn-gap:        28px;
}

/* ── Grid layout ─────────────────────────────────────────── */
.lrn-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: var(--lrn-gap);
    margin: 24px 0;
}

/* ── List layout ─────────────────────────────────────────── */
.lrn-events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 24px 0;
}
.lrn-events-list .lrn-event-card {
    flex-direction: row;
    padding: 0;
    border-radius: 15px;
    box-shadow: rgba(0, 0, 0, 0.38) -2px 2px 6px -2px;
    margin-bottom: 20px;
    border: none;
}
.lrn-events-list .lrn-event-card:last-child {
    border-bottom: none;
}
.lrn-events-list .lrn-card-thumb {
    flex: 0 0 220px;
    aspect-ratio: 16/10;
    border-radius: var(--lrn-radius);
    overflow: hidden;
}

/* ── Event card base ─────────────────────────────────────── */
.lrn-event-card {
    background: var(--lrn-card-bg);
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    box-shadow: rgba(0, 0, 0, 0.38) -2px 2px 6px -2px;
    overflow: hidden;
}
.lrn-event-card:hover .lrn-card-thumb img {
    transform: scale(1.03);
}
.lrn-event-card a {
    text-decoration: none !important;
}
.lrn-event-card a:hover {
    text-decoration: none !important;
}

/* ── Featured image ──────────────────────────────────────── */
.lrn-card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--lrn-accent);
    border-radius: 0;
    position: relative;
}
.lrn-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

/* Placeholder when no image */
.lrn-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--lrn-accent);
    color: #fff;
    min-height: 160px;
}
.lrn-placeholder-month {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .8;
}
.lrn-placeholder-day {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

/* ── Card body ───────────────────────────────────────────── */
.lrn-card-body {
    padding: 15px 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.lrn-events-list .lrn-card-body {
    padding: 15px 15px 15px 15px;
}

/* ── Category labels — "Articles | Podcasts" style ───────── */
.lrn-card-cats {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--lrn-cat);
    margin-bottom: 2px;
}
.lrn-card-cats a {
    color: var(--lrn-cat);
    text-decoration: none !important;
}
.lrn-card-cats a:hover {
    color: var(--lrn-accent);
    text-decoration: none !important;
}

/* ── Title row: calendar badge + h4 side by side ─────────── */
.lrn-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* ── Calendar icon badge ─────────────────────────────────── */
/*
   Matches the image shared:
   - White rounded rectangle with navy border
   - Solid navy header strip: month text white, bold, small caps
   - Large bold navy day number below
*/
.lrn-cal-badge {
    flex-shrink: 0;
    width: 48px;
    border: 2px solid var(--lrn-accent);
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    margin-top: 2px;
}
.lrn-cal-month {
    display: block;
    background: var(--lrn-accent);
    color: #fff;
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 2px;
    line-height: 1;
}
.lrn-cal-day {
    display: block;
    color: var(--lrn-accent);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    padding: 4px 2px 5px;
}

/* ── Event title — h4, same weight as Learning Center ───── */
.lrn-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--lrn-text);
}
.lrn-card-title a {
    color: #173473;
    text-decoration: none !important;
}
.lrn-card-title a:hover {
    color: #0f2548;
    text-decoration: none !important;
}

/* ── Subline: time · venue ───────────────────────────────── */
.lrn-card-subline {
    font-size: .8rem;
    color: var(--lrn-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    padding-left: 60px;
}
.lrn-card-subline .lrn-sep { opacity: .4; }

/* ── Excerpt (list view) ─────────────────────────────────── */
.lrn-card-excerpt {
    font-size: .88rem;
    color: var(--lrn-muted);
    line-height: 1.55;
    margin-top: 2px;
}

/* ── Card footer / CTA ───────────────────────────────────── */
.lrn-card-footer {
    margin-top: 8px;
    padding-left: 60px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────── */
.lrn-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--lrn-radius);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    line-height: 1.4;
    letter-spacing: .02em;
}
.lrn-btn-primary {
    background: var(--lrn-accent);
    color: #fff;
}
.lrn-btn-primary:hover {
    background: var(--lrn-accent-h);
    color: #fff;
}
.lrn-btn-secondary {
    background: #fff;
    color: #1a3a6b;
    border: 1.5px solid #1a3a6b;
    border-radius: 20px;
}
.lrn-btn-secondary:hover {
    background: #1a3a6b;
    color: #fff;
}
.lrn-btn-large {
    padding: 12px 28px;
    font-size: .95rem;
}

/* ── Filter / archive bar ────────────────────────────────── */
.lrn-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--lrn-border);
}
.lrn-filter-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lrn-filter-btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--lrn-muted);
    border: 1.5px solid var(--lrn-border);
    transition: all .15s;
}
.lrn-filter-btn:hover,
.lrn-filter-btn.active {
    background: var(--lrn-accent);
    color: #fff;
    border-color: var(--lrn-accent);
}
.lrn-view-toggle { display: flex; gap: 6px; }
.lrn-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1.5px solid var(--lrn-border);
    color: var(--lrn-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: all .15s;
}
.lrn-view-btn:hover,
.lrn-view-btn.active {
    background: var(--lrn-accent);
    color: #fff;
    border-color: var(--lrn-accent);
}

/* ── No events ───────────────────────────────────────────── */
.lrn-no-events {
    color: var(--lrn-muted);
    font-style: italic;
    padding: 20px 0;
}

/* ── Single event detail page ────────────────────────────── */
.lrn-single-event { max-width: 820px; }
.lrn-single-details {
    background: #f4f6f9;
    border: 1px solid var(--lrn-border);
    border-radius: 6px;
    padding: 22px 26px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lrn-detail-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: .93rem;
}
.lrn-detail-icon { flex-shrink: 0; font-size: 1.1rem; margin-top: 2px; }
.lrn-stream-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lrn-stream-link {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}
.lrn-zoom     { background: #2d8cff; }
.lrn-youtube  { background: #ff0000; }
.lrn-linkedin { background: #0077b5; }

/* ── Calendar export ─────────────────────────────────────── */
.lrn-cal-links { font-size: .9rem; }
.lrn-cal-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lrn-cal-btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    transition: opacity .15s;
}
.lrn-cal-btn:hover  { opacity: .85; color: #fff; }
.lrn-cal-google     { background: #4285F4; }
.lrn-cal-ical       { background: #555; }
.lrn-cal-outlook    { background: #0078D4; }

/* ── RSVP section ────────────────────────────────────────── */
.lrn-rsvp-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--lrn-border);
}
.lrn-rsvp-wrap h3 { margin-top: 0; }
.lrn-spots-left { color: #b45309; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.lrn-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lrn-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.lrn-form-group label { font-weight: 600; font-size: .88rem; }
.lrn-form-group input {
    padding: 9px 12px;
    border: 1.5px solid var(--lrn-border);
    border-radius: var(--lrn-radius);
    font-size: .95rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.lrn-form-group input:focus {
    border-color: var(--lrn-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,58,107,.12);
}
.lrn-rsvp-msg {
    padding: 12px 16px;
    border-radius: var(--lrn-radius);
    margin-bottom: 14px;
    font-weight: 600;
    font-size: .9rem;
}
.lrn-rsvp-msg.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.lrn-rsvp-msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.lrn-external-rsvp { text-align: center; padding: 28px; background: #f4f6f9; border-radius: 6px; }
.lrn-rsvp-full { font-style: italic; color: var(--lrn-muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
    .lrn-events-grid { grid-template-columns: 1fr; }
    .lrn-events-list .lrn-event-card { flex-direction: column; }
    .lrn-events-list .lrn-card-thumb { flex: unset; aspect-ratio: 16/9; }
    .lrn-events-list .lrn-card-body  { padding: 12px 0 0; }
    .lrn-form-row { grid-template-columns: 1fr; }
    .lrn-filter-bar { flex-direction: column; align-items: flex-start; }
    .lrn-card-subline { padding-left: 0; }
}
