/* ============================================================
   EVENTPILLAR — page styles
   Stats box matched to the Document Intelligence page.
   ============================================================ */

:root {
  --navy: #0B1F3A;
  --teal: #0D8F84;
  --white: #FFFFFF;
  --off-white: #F7F8FC;
  --gray-100: #F0F2F7;
  --gray-200: #E2E6F0;
  --gray-400: #8B94A8;
  --gray-600: #4A5568;
  --text: #0B1F3A;

  --brand: #7B00B8;
  --brand-dark: #6A06A0;
  --stats-bg: #F3EEFB;

  --radius: 12px;
  --radius-sm: 8px;

  /* Header height. Measure the real header in DevTools and update this
     one value — .filters-bar sticky offset is derived from it. */
  --header-h: 95px;
}

/* Scoped to the template so it can't leak into Elementor pages */
.hero,
.filters-bar,
.main,
.events-section {
  font-family: 'Sora', sans-serif;
  color: var(--text);
  box-sizing: border-box;
}

.hero *,
.filters-bar *,
.main * {
  box-sizing: border-box;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(30deg, #7502AF 10%, #5A0B85 90%);
  padding: 80px 48px 64px;
  position: relative;
  margin-top: 0;          /* was 10px — caused the white gap under the header */
  overflow: visible;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 143, 132, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 20px;
  text-align: center;
}

.hero h1 span { color: #FFFFFF; }

.hero p {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

/* ============================================================
   HERO STATS  — matched to the Document Intelligence page
   Selectors are scoped (.hero .hero-stats) so that if diProduct.css
   also loads on this page, this rule wins on specificity.
   ============================================================ */

.hero .hero-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  background: var(--stats-bg);
  border-radius: 24px;
  padding: 38px 30px;

  width: 100%;
  max-width: 1200px;
  margin: 48px auto -70px;

  position: relative;
  z-index: 20;
  box-shadow: none;          /* DI version has no shadow */
}

.hero .stat-item {
  flex: 1;
  min-width: 0;
  min-height: 0;             /* was 100px — forced the box too tall */
  text-align: center;
  padding: 4px 24px;
  border-right: 1px solid rgba(0, 0, 0, 0.12);   /* was 2px — too heavy */
}

.hero .stat-item:last-child { border-right: none; }

.hero .stat-num {
  display: block;
  font-size: 38px;           /* was 2.8em — inherited unpredictably */
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand);
  margin: 0 0 10px;
}

.hero .stat-label {
  display: block;
  font-size: 16px;           /* was 13px — too small next to DI */
  font-weight: 400;
  line-height: 1.45;
  color: #3A3A4D;
  margin: 0;
}

/* Spacer that lets the stats box overhang into the white section */
.events-section {
  background: #FFFFFF;
  padding-top: 70px;
}

/* ============================================================
   FILTERS BAR
   ============================================================ */

.filters-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 48px;
  margin-top: 70px;
  position: sticky;
  top: var(--header-h);      /* was a hardcoded 68px */
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.filters-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(13, 143, 132, 0.04);
}

.filter-btn.active {
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand) 100%);
  border-color: transparent;
  color: var(--white);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.filter-divider {
  width: 1px;
  height: 28px;
  background: var(--gray-200);
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 48px;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ============================================================
   EVENT CARDS
   ============================================================ */

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
  align-items: stretch;
}

.event-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(11, 31, 58, 0.1);
  border-color: var(--brand);
}

.card-date-strip {
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand) 100%);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-event-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 12px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-600);
}

.meta-label {
  min-width: 80px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-value {
  font-size: 13px;
  color: var(--gray-600);
}

.card-logo {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}

.card-cta:hover { gap: 10px; }
.card-cta svg { transition: transform 0.2s; }
.card-cta:hover svg { transform: translateX(2px); }

.card-cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  position: relative;
  background-color: #F4E7FF;
  border-radius: var(--radius);
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(123, 0, 184, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  position: relative;
  font-size: 24px;
  font-weight: 600;
  color: #1B1139;
  margin: 0 0 12px;
}

.cta-banner p {
  position: relative;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
  margin: 0 0 24px;
}

.cta-banner .cta-btn-wrap {
  position: relative;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.contact-pill-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 100px;
  background: linear-gradient(180deg, #AA49DB 0%, #5B2775 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.contact-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
}

.contact-pill-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

/* ============================================================
   ANIMATION
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.event-card { animation: fadeUp 0.4s ease both; }
.event-card:nth-child(2) { animation-delay: 0.05s; }
.event-card:nth-child(3) { animation-delay: 0.10s; }
.event-card:nth-child(4) { animation-delay: 0.15s; }
.event-card:nth-child(5) { animation-delay: 0.20s; }
.event-card:nth-child(6) { animation-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .event-card,
  .event-card:hover,
  .card-cta,
  .card-cta svg {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .hero .hero-stats { padding: 32px 24px; }
  .hero .stat-item  { padding: 4px 16px; }
  .hero .stat-num   { font-size: 34px; }
  .hero .stat-label { font-size: 15px; }
}

@media (max-width: 900px) {
  .events-grid { grid-template-columns: 1fr 1fr; }
  .hero  { padding: 56px 24px; }
  .hero h1 { font-size: 36px; }
  .main  { padding: 40px 24px; }
  .filters-bar { padding: 16px 24px; }
}

@media (max-width: 767px) {
  .events-grid { grid-template-columns: 1fr; }

  .hero .hero-stats {
    flex-wrap: wrap;
    gap: 0;
    padding: 28px 18px;
    margin-bottom: -50px;
  }

  .hero .stat-item {
    flex: 0 0 50%;
    padding: 16px 12px;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
  }

  .hero .stat-item:nth-child(2n)  { border-right: none; }
  .hero .stat-item:nth-child(-n+2) { border-bottom: 1px solid rgba(0, 0, 0, 0.12); }

  .hero .stat-num   { font-size: 30px; }
  .hero .stat-label { font-size: 14px; }

  #typeFilters,
  #yearFilters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  #typeFilters .filter-btn,
  #yearFilters .filter-btn {
    width: 100%;
    text-align: center;
  }

  .filter-divider { display: none; }
}