:root {
  color-scheme: dark light;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #f5f2eb;
  color: #222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

nav {
  background: #293144;
  color: white;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  color: #f5c55f;
}

header {
  position: relative;
  overflow: hidden;
}

header img {
  width: 100%;
  height: 340px;
  display: block;
  object-fit: cover;
  object-position: center 10%;
  max-height: 420px;
}

/* Feature row: main concept + highlighted next-event */
.feature-row {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.feature-main .card {
  margin: 0;
}

.feature-event {
  position: relative;
  padding: 1rem 1rem 0.85rem;
  border-left: 6px solid #f5c55f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  height: 100%;
  min-height: 0;
}

.feature-event h2 {
  margin-top: 0;
}

.hero {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
}

.hero p {
  margin: 0;
  color: #f0f0f0;
  max-width: 720px;
}

main {
  padding: 2rem 1.25rem 3rem;
  max-width: 1080px;
  margin: 0 auto;
}

.summary {
  margin-bottom: 2rem;
}

.summary h2 {
  margin-top: 0;
  font-size: 2rem;
  color: #222e3c;
}

.summary p {
  margin: 0;
  font-size: 1.05rem;
  color: #424242;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 1rem 1.2rem 0.75rem;
  margin: 0.75rem 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

/* Remove extra vertical margin for cards inside the grid (use grid gap instead) */
.cards .card {
  margin: 0;
}

.kalender-item {
  padding: 0.5rem;
  border-radius: 14px;
}

.kalender-item + .kalender-item {
  margin-top: 0.5rem;
}

.next-event-timer {
  margin: 0.75rem 0 1rem;
  font-weight: 700;
  color: #293144;
}

/* Prevent the timer from wrapping and make it slightly more prominent */
.next-event-timer {
  white-space: nowrap;
  font-size: 1.05rem;
}

.kalender-next {
  background: #f5c55f;
  color: #222;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.kalender-past {
  opacity: 0.5;
}

.event-link {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #293144;
  color: #f5c55f;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.event-link:hover,
.event-link:focus-visible {
  background: #1f2632;
  color: #ffffff;
  opacity: 0.96;
  transform: translateY(-1px);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.15rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  background: #fff3cc;
  border-color: #f0d98f;
  color: #293144;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-1px);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.social-link-ludoya:hover,
.social-link-ludoya:focus-visible {
  background: #f5c55f;
}

.social-link-linktree:hover,
.social-link-linktree:focus-visible {
  background: #e8d2fa;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.card p {
  margin: 0 0 0.6rem;
  line-height: 1.75;
}

.card p:last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.1rem;
  color: #222e3c;
  background: #f5c55f;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.button.small {
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
}

.button.danger-button {
  background: #b13d3d;
  color: white;
}

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.8rem;
}

.event-card-note {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #5d5d5d;
}

.form-help {
  margin: -0.2rem 0 0.75rem;
  font-size: 0.95rem;
  color: #5d5d5d;
}

.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.notice {
  border-left: 4px solid #f5c55f;
  background: #fff7dc;
  padding: 1rem 1.15rem;
  border-radius: 12px;
}

footer {
  text-align: center;
  padding: 1.5rem 1.25rem;
  color: #5d5d5d;
  font-size: 0.95rem;
}

.event-form {
  display: grid;
  gap: 0.9rem;
}

.event-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.event-form label.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.event-form input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
}

.event-form input,
.event-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d8d1c3;
  border-radius: 12px;
  font: inherit;
}

.button.small {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
}

.bgg-results {
  display: grid;
  gap: 0.5rem;
}

.search-result {
  text-align: left;
  border: 1px solid #e2dccd;
  background: #fcf8ef;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
}

.form-status {
  margin-top: 0.75rem;
  font-weight: 600;
  color: #293144;
}

.form-status.status-error {
  color: #8b1d1d;
}

.events-list {
  display: grid;
  gap: 2rem;
}

.event-group {
  display: contents;
}

.event-group-title {
  grid-column: 1 / -1;
  margin: 1rem 0 0.5rem 0;
  font-size: 1.25rem;
  color: #293144;
}

.event-group-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
  grid-column: 1 / -1;
}

.event-card {
  background: white;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.event-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.event-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.signup-form input {
  flex: 1 1 220px;
}

.signup-count {
  display: inline-block;
  font-weight: 700;
  color: #293144;
}

.empty-state {
  color: #5d5d5d;
}

@media (max-width: 600px) {
  nav {
    justify-content: center;
  }

  .event-group-cards {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .event-group-cards {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .event-group-cards {
    grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
  }
  header img {
    height: 280px;
  }
}
