.events-home-section {
  padding: 72px 0 64px;
  background: #f7faff;
}
.events-home-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.events-home-intro h2 { margin-top: 8px; }
.events-home-intro p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.events-home-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}
.events-home-actions .btn { white-space: nowrap; }
.events-home-actions .events-home-add { display: inline-flex; align-items: center; gap: 8px; background: #101722; border-color: #101722; }
.events-home-actions .events-home-add:hover { background: #263246; border-color: #263246; }
.events-home-add > span { color: var(--accent); font-size: 24px; font-weight: 500; line-height: .75; }
.events-home-actions .events-home-all { min-height: 36px; }
.events-home-actions .events-home-all:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 3px; }
.events-home-section .events-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 1.36fr) minmax(250px, .95fr);
  gap: 16px;
  align-items: stretch;
}
.events-home-primary,
.events-home-secondary,
.events-home-periods { min-width: 0; }
.events-home-secondary {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 364px;
}
.home-event-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(25, 49, 89, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-event-card:hover {
  transform: translateY(-2px);
  border-color: #b8cdf7;
  box-shadow: 0 14px 30px rgba(25, 49, 89, .1);
}
.home-event-card-link {
  position: relative;
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.home-event-card-link:focus-visible,
.events-home-period-list a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}
.home-event-card--featured { height: 100%; min-height: 364px; background: #142342; }
.home-event-card--featured .home-event-card-link::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 36, .06) 15%, rgba(6, 16, 36, .5) 50%, rgba(6, 16, 36, .94) 100%);
  content: "";
}
.home-event-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.home-event-card--featured:hover .home-event-card-image { transform: scale(1.035); }
.home-event-card-date {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 54px;
  min-height: 65px;
  border-radius: 10px;
  background: #edf3ff;
  color: var(--blue);
  text-align: center;
  text-decoration: none;
}
.home-event-card-date strong { font-size: 22px; line-height: 1; }
.home-event-card-date small { margin-top: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.home-event-card--featured .home-event-card-date {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(6, 16, 36, .2);
}
.home-event-card-badge {
  position: absolute;
  z-index: 1;
  top: 17px;
  right: 16px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #dff7df;
  color: #23663d;
  font-size: 11px;
  font-weight: 800;
}
.home-event-card-feature-copy {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  gap: 8px;
  color: #fff;
}
.home-event-card-feature-copy h3 {
  color: #fff;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.16;
}
.home-event-card-category {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.home-event-card-feature-copy .home-event-card-category { color: #c8dcff; }
.home-event-card-description {
  display: -webkit-box;
  max-width: 410px;
  overflow: hidden;
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.home-event-card-feature-footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.home-event-card-meta { display: grid; min-width: 0; gap: 4px; color: rgba(255, 255, 255, .9); font-size: 11px; line-height: 1.3; }
.home-event-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-event-card-cta {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.home-event-card--compact { min-height: 0; }
.home-event-card--compact .home-event-card-link {
  display: grid;
  grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
  align-items: stretch;
}
.home-event-card-compact-media { position: relative; display: block; min-height: 110px; overflow: hidden; background: #edf3ff; }
.home-event-card-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-event-card--compact .home-event-card-date {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  width: 43px;
  min-height: 49px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(6, 16, 36, .17);
}
.home-event-card--compact .home-event-card-date strong { font-size: 18px; }
.home-event-card--compact .home-event-card-date small { margin-top: 3px; font-size: 9px; }
.home-event-card-compact-copy { display: grid; min-width: 0; align-content: center; gap: 5px; padding: 10px 13px; }
.home-event-card-compact-copy .home-event-card-category { color: var(--blue); }
.home-event-card-compact-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.home-event-card-compact-location {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.events-home-periods {
  padding: 18px;
  border: 1px solid #dfe7f5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(25, 49, 89, .045);
}
.events-home-periods h3 { margin-bottom: 14px; font-size: 17px; }
.events-home-period-list { display: grid; gap: 9px; }
.events-home-period-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 7px 10px;
  border: 1px solid #e2eafd;
  border-radius: 11px;
  background: #f7faff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.events-home-period-list a:hover { transform: translateX(2px); border-color: #b5cafa; background: #eef4ff; }
.events-home-period-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #dce6fb; border-radius: 10px; background: #fff; color: var(--blue); }
.events-home-period-icon svg { width: 23px; height: 23px; }
.events-home-period-list a:hover .events-home-period-icon { border-color: #b5cafa; background: #fff; }

.events-home-dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 28px; overflow: auto; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px rgba(11, 16, 24, .25); overscroll-behavior: contain; }
.events-home-dialog:not([open]), .events-home-dialog [hidden] { display: none !important; }
.events-home-dialog::backdrop { background: rgba(11, 16, 24, .56); }
.events-home-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.events-home-dialog-kicker { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.events-home-dialog h2 { margin: 6px 0 0; font-size: clamp(24px, 3vw, 29px); line-height: 1.2; }
.events-home-dialog h3 { margin: 18px 0 10px; font-size: 23px; line-height: 1.25; }
.events-home-dialog p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.events-home-dialog-lead { margin: 14px 0 22px; }
.events-home-dialog-close { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid #dfe7f5; border-radius: 50%; background: #fff; color: var(--ink); font: 26px/1 sans-serif; cursor: pointer; }
.events-home-choices { display: grid; gap: 11px; }
.events-home-choices button { display: grid; gap: 5px; padding: 17px 18px; border: 1px solid #dfe7f5; border-radius: 12px; background: #f7faff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.events-home-choices button:hover { border-color: #a9c1f7; background: #eef4ff; }
.events-home-choices strong { font-size: 15px; }
.events-home-choices span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.events-home-dialog-back { margin: 20px 0 0; padding: 0; border: 0; background: none; color: var(--blue); font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.events-home-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.events-home-dialog-actions .events-home-dialog-register { gap: 9px; background: #101722; border-color: #101722; color: #fff; }
.events-home-dialog-actions .events-home-dialog-register:hover { background: #263246; border-color: #263246; }
.events-home-dialog-register > span { color: var(--accent); font-size: 24px; font-weight: 500; line-height: .75; }
.events-home-dialog [data-event-panel="share"] > p { margin: 0 0 18px; }
.events-home-dialog .ww-audience-form { padding-top: 2px; }
.events-home-dialog :is(button, a, h2, h3):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
html.events-home-modal-open { overflow: hidden; }
.events-home-empty,
.events-home-secondary-empty {
  display: grid;
  min-height: 100%;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 1px solid #dfe7f5;
  border-radius: 15px;
  background: #fff;
}
.events-home-empty strong { font-size: 22px; }
.events-home-secondary-empty strong { font-size: 17px; }
.events-home-empty p,
.events-home-secondary-empty p { color: var(--muted); line-height: 1.5; }

@media (max-width: 1120px) {
  .events-home-section .events-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-home-periods { grid-column: 1 / -1; }
  .events-home-period-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .events-home-section .events-home-grid { grid-template-columns: minmax(0, 1fr); }
  .events-home-header { align-items: start; flex-direction: column; gap: 18px; }
  .events-home-periods { grid-column: auto; }
  .events-home-period-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-home-secondary { min-height: 0; }
  .home-event-card--compact { min-height: 110px; }
}

@media (max-width: 520px) {
  .events-home-section { padding: 48px 0; }
  .events-home-intro h2 { font-size: 30px; }
  .events-home-actions { width: 100%; gap: 10px; }
  .events-home-actions > a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 50px;
    justify-content: center;
  }
  .events-home-actions .btn { padding-inline: 10px; text-align: center; }
  .events-home-actions .events-home-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 50px;
    padding: 0 10px;
    border: 1px solid #d5deed;
    border-radius: 14px;
    background: #fff;
    color: var(--blue);
    font-weight: 750;
    justify-content: center;
    text-decoration: none;
  }
  .home-event-card--featured { min-height: 355px; }
  .home-event-card--compact .home-event-card-link { grid-template-columns: minmax(106px, 34%) minmax(0, 1fr); }
  .home-event-card-compact-copy { padding: 10px; }
  .home-event-card-compact-copy h3 { font-size: 13px; }
  .events-home-periods { padding: 14px; }
  .events-home-period-list a { grid-template-columns: 34px minmax(0, 1fr); gap: 7px; padding: 6px; font-size: 12px; }
  .events-home-period-icon { width: 34px; height: 34px; }
  .events-home-period-icon svg { width: 20px; height: 20px; }
  .events-home-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 20px; border-radius: 16px; }
  .events-home-dialog-actions { align-items: stretch; flex-direction: column; }
  .events-home-dialog-actions .btn { width: 100%; }
}
