/* ===== Webinars (Dark Blue Theme – 5 across desktop) ===== */

/* 0) Normalize + sideways overflow guards */
*, *::before, *::after { box-sizing: border-box; }
:root { --sbw: calc(100vw - 100%); }      /* scrollbar width */
html, body { height: 100%; }
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #08111f;
  color: #e6f0ff;
  overflow-x: hidden !important;          /* no sideways scroll */
  touch-action: pan-y;                    /* vertical pan only */
  overscroll-behavior-x: none;
}

/* 1) Sticky footer layout */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.webinar-page { flex: 1; display: flex; flex-direction: column; }

/* 2) Page container */
.webinar-page {
  max-width: 1480px;
  width: calc(100% - 32px);               /* gutters without causing overflow */
  margin: 0 auto;
  padding: 24px 0;                        /* side padding handled by width above */
}

/* 3) Header/Footer 100vw bug fix (centering) */
header, #header, footer, .site-footer {
  width: calc(100vw - var(--sbw)) !important;  /* equals 100% including scrollbar compensation */
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important; right: 0 !important;
  transform: none !important;
}
footer .footer-inner,
.site-footer .footer-inner,
footer > .container,
.site-footer > .container {
  max-width: 1480px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* 4) Hero */
.webinar-hero {
  text-align: center;
  padding: 26px;
  margin: 0 0 18px;
  background: radial-gradient(1200px 800px at -10% -20%, #12223d 0%, #0b1220 40%, #08111f 100%);
  border: 1px solid #12305a;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(3,12,28,.55), inset 0 1px 0 rgba(255,255,255,.04);
}
.webinar-hero h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; color: #eaf3ff; }
.webinar-hero p  { margin: 0; color: #b9cbe8; font-size: 15px; }

/* 5) Grid (tight, centered, no right shift) */
/* Mobile default: 1 col */
.webinar-container {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-items: stretch;
}

/* ≥520px: 2 cols (slightly bigger mobile) */
@media (min-width: 520px) {
  .webinar-container { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

/* ≥840px: 3 cols */
@media (min-width: 840px) {
  .webinar-container { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}

/* ≥1100px: 4 cols */
@media (min-width: 1100px) {
  .webinar-container { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
}

/* ≥1400px: 5 cols */
@media (min-width: 1400px) {
  .webinar-container { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
}

/* Guard: prevent any child from widening the page */
.webinar-container { max-width: 100%; overflow-x: clip; }

/* 6) Card */
.webinar-card {
  background: linear-gradient(180deg, #0b1325 0%, #0a1a31 100%);
  border: 1px solid #163a70;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(3,12,28,.45), inset 0 1px 0 rgba(255,255,255,.03);
  overflow: hidden;
  padding: 12px;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
  max-width: 100%;
}
.webinar-card:hover {
  transform: translateY(-2px);
  border-color: #2a53c7;
  box-shadow: 0 14px 30px rgba(3,12,28,.6);
}

/* 7) Thumb / image (never exceeds container) */
.thumb-wrap { display: block; }
.webinar-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  display: block;
  border: 1px solid #12305a;
}

/* 8) Text */
.webinar-title {
  font-size: 17px;
  font-weight: 800;
  color: #e6f0ff;
  margin: 0 0 6px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.webinar-desc {
  font-size: 14px;
  color: #9fb3c8;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

/* 9) Status + CTA */
.webinar-cta { display: inline-block; text-align: center; }
.webinar-status-badge {
  display: block;
  margin: 8px auto 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: #334155;
  width: auto;
  box-shadow: 0 4px 10px rgba(3,12,28,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.webinar-status-badge.open  { background: #16a34a; }
.webinar-status-badge.closed{ background: #ef4444; }

.join-webinar-btn,
.join-webinar-btn.disabled {
  display: block;
  margin: 6px auto 0;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 18px rgba(2,8,23,.45);
  transition: transform .12s ease, filter .15s ease, box-shadow .2s ease, border-color .2s ease;
  width: auto;                               /* your badge-width JS can still set exact width */
}
.join-webinar-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.join-webinar-btn.disabled {
  pointer-events: none; opacity: .55; cursor: not-allowed;
  background: #0c1a33; border-color: #1e3a8a; color: #cfe1ff;
}

/* 10) Empty state */
.no-webinars {
  grid-column: 1 / -1;
  color: #8aa3c9;
  font-size: 14px;
  text-align: center;
  padding: 14px 0 4px;
}

/* 11) Mobile header menu can cause overflow — keep it wrapped */
@media (max-width: 768px) {
  #menu { white-space: normal !important; width: 100% !important; }
}
/* --- Footer font reset (append at end of webinars.css) --- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

footer, .site-footer {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  font-weight: 400 !important;          /* force normal weight */
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;  /* reduce “bold-ish” rendering */
  -moz-osx-font-smoothing: grayscale;
}

/* Only reset common text elements, avoid touching FA icon weights */
footer p,
footer a,
footer li,
footer span,
footer small {
  font-weight: 400 !important;
}

/* If your footer uses <strong>/<b>, keep them semi-bold, not heavy */
footer strong,
footer b {
  font-weight: 600 !important;
}

/* Keep footer headings from inheriting 800 if present elsewhere */
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
  font-weight: 600 !important;
}
