:root {
  --rf-blue: #1A4FED;
  --rf-blue-hover: #1240C8;
  --text-dark: #1A1A1A;
  --text-muted: #4A4A4A;
  --divider: #E5E5E5;
  --hero-gradient: linear-gradient(
    135deg,
    #9C4DC8 0%,
    #C44E8C 35%,
    #EE7059 65%,
    #F4A24D 100%
  );
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ---------- Back button ---------- */
.back-button {
  display: inline-block;
  background: var(--rf-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  margin-bottom: 32px;
  box-shadow:
    0 6px 16px rgba(26, 79, 237, 0.28),
    0 2px 4px rgba(26, 79, 237, 0.18);
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.back-button:hover,
.back-button:focus-visible {
  background: var(--rf-blue-hover);
  outline: none;
  box-shadow:
    0 10px 22px rgba(26, 79, 237, 0.32),
    0 3px 6px rgba(26, 79, 237, 0.2);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-gradient);
  border-radius: 28px;
  padding: 44px 56px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  margin-bottom: 8px;
  box-shadow:
    0 24px 48px rgba(196, 78, 140, 0.18),
    0 8px 16px rgba(0, 0, 0, 0.08);
}
.hero h1 {
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  font-size: clamp(34px, 5.5vw, 60px);
  margin: 0 0 18px;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.hero p {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2vw, 24px);
  margin: 0;
  line-height: 1.35;
}

/* ---------- Events ---------- */
#events-list {
  margin-top: 16px;
}

.event {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  padding: 40px 0;
  align-items: start;
  position: relative;
}
.event::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.12) 18%,
    rgba(0, 0, 0, 0.12) 82%,
    rgba(0, 0, 0, 0) 100%
  );
}
.event:last-child::after {
  display: none;
}

.event-title {
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  color: var(--rf-blue);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  margin: 0 0 10px;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.event-title a {
  color: inherit;
  text-decoration: inherit;
  text-underline-offset: inherit;
  text-decoration-thickness: inherit;
  font: inherit;
  letter-spacing: inherit;
  transition: color 120ms ease, opacity 120ms ease;
}
.event-title a:hover,
.event-title a:focus-visible {
  color: var(--rf-blue-hover);
  outline: none;
}
.event-date {
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 18px;
  color: var(--text-dark);
}
.event-description {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 22px;
  max-width: 60ch;
}

.register-button {
  display: inline-block;
  background: var(--rf-blue);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: 10px;
  transition: background 120ms ease;
}
.register-button:hover,
.register-button:focus-visible {
  background: var(--rf-blue-hover);
  outline: none;
}

.event-image-wrap {
  width: 260px;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: #F1F1F2;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.06);
  justify-self: end;
}
a.event-image-wrap {
  display: block;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
a.event-image-wrap:hover,
a.event-image-wrap:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.16),
    0 6px 12px rgba(0, 0, 0, 0.08);
  outline: none;
}
.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 16px;
  font-size: 17px;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .page {
    padding: 20px 18px 60px;
  }
  .hero {
    padding: 28px 24px;
    border-radius: 20px;
  }
  .event {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 0;
  }
  .event-image-wrap {
    order: -1;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 360px;
    justify-self: start;
  }
}
