/* Home page v2 — compact "what's on" layout. Loaded only on the front page when v2 is active. */

.neh-home { --line: #e6e9f2; --soft: #f5f7fc; --muted: var(--secondary-text-color, #6b7390); color: var(--primary-color); }
.neh-home a { text-decoration: none; }

.neh-sec { margin: 0 0 56px; }
.neh-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 14px;
}
.neh-sec-head h2 {
  font-family: var(--font-family-secondary);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--primary-color);
  text-wrap: balance;
}
.neh-sec-lead { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }
.neh-head-link, .neh-see-all, .neh-more { color: var(--accent-color-bright-blue) !important; font-weight: 600; font-size: 15px; }
.neh-head-link:hover, .neh-see-all:hover, .neh-more:hover { text-decoration: underline; }

/* ─── When: tabs ─── */
.neh-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.neh-tabs::-webkit-scrollbar { display: none; }
.neh-tab {
  border: 0;
  background: transparent;
  color: var(--primary-color);
  font: 600 14px/1 var(--font-family-primary);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.neh-tab:hover { background: #fff; }
.neh-tab[aria-selected="true"] { background: var(--primary-color); color: #fff; }
.neh-tab:focus-visible { outline: 2px solid var(--accent-color-bright-blue); outline-offset: 2px; }

.neh-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 8px 36px;
}
.neh-day-title {
  font-family: var(--font-family-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 2px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}
.neh-day-title span { color: var(--primary-color); }
.neh-more { display: inline-block; margin: 8px 0 0; font-size: 14px; }
.neh-see-all { display: inline-block; margin-top: 18px; }
.neh-none { padding: 22px; border: 1px dashed #cfd5e6; border-radius: 14px; color: var(--muted); }

/* ─── Rows (shared by all lists) ─── */
.neh-rows { list-style: none; margin: 0; padding: 0; }
.neh-row {
  display: grid;
  grid-template-columns: 72px auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 14px;
  padding: 12px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.neh-row:hover { background: var(--soft); }
.neh-row:not(:has(.neh-row-thumb)) { grid-template-columns: 72px minmax(0, 1fr); }
.neh-row { align-items: start; }
.neh-row-time { margin-top: 2px; }
.neh-row-time {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-color);
  white-space: nowrap;
  padding-left: 10px;
  border-left: 3px solid var(--c, var(--accent-color-bright-blue));
}
.neh-row-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--soft);
  border-top: 3px solid var(--c, var(--accent-color-bright-blue));
  line-height: 1.05;
  text-align: center;
}
.neh-row-date b { font-family: var(--font-family-secondary); font-size: 20px; font-weight: 600; color: var(--primary-color); }
.neh-row-date small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.neh-row-date.is-range b { font-size: 14px; }
.neh-row-date.is-range small { font-size: 10px; text-transform: lowercase; letter-spacing: .02em; }
.neh-row-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.neh-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.neh-row-title {
  font-family: var(--font-family-primary);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--primary-color) !important;
}
.neh-row:hover .neh-row-title { color: var(--accent-color-bright-blue) !important; }
.neh-row-meta { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neh-row-cat {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--c, var(--accent-color-bright-blue));
  background: color-mix(in srgb, var(--c, #4c8ef7) 12%, #fff);
  white-space: nowrap;
}

/* ─── What: category tiles ─── */
.neh-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 12px;
}
.neh-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--primary-color) !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.neh-tile:hover { transform: translateY(-2px); border-color: var(--accent-color-bright-blue); box-shadow: 0 8px 24px rgba(16, 36, 112, .08); }
.neh-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef3ff;
  color: var(--accent-color-bright-blue);
  margin-bottom: 6px;
}
.neh-tile-label { font-family: var(--font-family-secondary); font-weight: 500; font-size: 16px; line-height: 1.25; }
.neh-tile-count { font-size: 13px; color: var(--muted); }

/* ─── Two-column blocks ─── */
.neh-two { display: grid; gap: 0 48px; }
@media (min-width: 992px) {
  .neh-two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

/* ─── Where: towns ─── */
.neh-towns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px 16px; }
.neh-towns a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--primary-color) !important;
  transition: border-color .15s ease, background-color .15s ease;
}
.neh-towns a:hover { border-color: var(--accent-color-bright-blue); background: var(--soft); }
.neh-town-icon { color: var(--accent-color-bright-blue); display: inline-flex; }
.neh-town-icon svg { width: 20px; height: 20px; }
.neh-town-name { flex: 1; font-weight: 600; }
.neh-town-count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 9px; }

/* ─── Featured (only when events are tagged "featured") ─── */
.neh-featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.neh-feat {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1c56, #1d3aa8) center / cover no-repeat;
  color: #fff !important;
}
.neh-feat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 18, 60, .85), rgba(8, 18, 60, 0) 60%); }
.neh-feat-body { position: relative; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.neh-feat-body small { opacity: .85; font-size: 13px; }
.neh-feat-body b { font-family: var(--font-family-secondary); font-size: 20px; font-weight: 500; line-height: 1.25; }

/* ─── Small screens ─── */
@media (max-width: 575px) {
  .neh-sec { margin-bottom: 44px; }
  .neh-row, .neh-row:not(:has(.neh-row-thumb)) { grid-template-columns: 72px minmax(0, 1fr); }
  .neh-row-thumb { display: none; }
  .neh-row-meta { white-space: normal; }
  .neh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .neh-sec-head { align-items: flex-start; flex-direction: column; }
}

/* headings: the theme styles h3 big/uppercase — reset inside the new home */
.neh-home h3.neh-day-title {
  font-family: var(--font-family-primary) !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
}
.neh-home h3.neh-day-title span { color: var(--primary-color) !important; }

/* v2 hero: background ends right under the quick filters; content starts on white */
/* the "What's on" tabs and "Explore by town" do the job of the quick filters here */
body.neh-home-v2 .site-header .neh-quick-filters { display: none !important; }
body.neh-home-v2 .site-header .header-overlay:not(.filtered) { bottom: -70px !important; }
body.neh-home-v2 .home-page-content.neh-home { margin-top: 80px !important; padding-top: 0; }
@media (max-width: 575px) {
  body.neh-home-v2 .header-search .home-lead { display: none; }
  body.neh-home-v2 .home-page-content.neh-home { margin-top: 44px !important; }
  .neh-tabs { width: 100%; }
}

/* ─── "Surprise me" game ─── */
.neh-lucky-box {
  position: relative;
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(0, 166, 255, .35) 0%, transparent 60%),
    radial-gradient(60% 90% at 0% 100%, rgba(155, 81, 224, .35) 0%, transparent 60%),
    linear-gradient(160deg, #0b1c56 0%, #12287a 100%);
  overflow: hidden;
}
.neh-lucky-intro h2 {
  font-family: var(--font-family-secondary);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
  text-wrap: balance;
}
.neh-lucky-intro h2 span { color: var(--accent-color-yellow, #ffd23f); }
.neh-lucky-intro p { margin: 0; color: rgba(255, 255, 255, .8); max-width: 60ch; }
.neh-lucky-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: end; }
.neh-lucky-form label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.neh-lucky-form label small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
.neh-lucky-form select {
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: 600 16px/1 var(--font-family-primary);
  text-transform: none;
  letter-spacing: 0;
}
.neh-lucky-form select option { color: var(--primary-color); }
.neh-lucky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-color-yellow, #ffd23f);
  color: var(--primary-color);
  font: 700 16px/1 var(--font-family-primary);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.neh-lucky-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 210, 63, .35); }
.neh-lucky-btn:disabled { opacity: .7; cursor: progress; }
.neh-lucky-btn:hover svg { transform: rotate(90deg); }
.neh-lucky-btn svg { transition: transform .3s ease; }

.neh-reel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px dashed rgba(255, 255, 255, .3);
  padding: 20px;
  text-align: center;
}
.neh-reel-text { font-family: var(--font-family-secondary); font-size: clamp(18px, 2.4vw, 24px); font-weight: 500; color: #fff; }
.neh-lucky-empty { padding: 18px 20px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: #fff; }

.neh-pick {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  color: var(--primary-color);
  animation: neh-pop .35s ease-out;
}
@keyframes neh-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .neh-pick { animation: none; } }
.neh-pick-img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.neh-pick-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 70%, transparent) 0%, transparent 60%),
    linear-gradient(160deg, #0b1c56, #102470);
  border-bottom: 4px solid var(--c);
}
.neh-pick-cover b { font-family: var(--font-family-secondary); font-size: 54px; line-height: 1; }
.neh-pick-cover small { font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.neh-pick-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.neh-pick-cat { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.neh-pick h3 { font-family: var(--font-family-secondary); font-size: 22px; font-weight: 600; line-height: 1.25; margin: 4px 0 0; color: var(--primary-color); }
.neh-pick-meta { margin: 0; color: var(--secondary-text-color, #6b7390); font-size: 15px; }
.neh-pick-price { margin: 0; font-weight: 700; }
.neh-pick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.neh-pick-go, .neh-pick-again {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: 700 15px/1 var(--font-family-primary);
  cursor: pointer;
}
.neh-pick-go { background: var(--accent-color-bright-blue); color: #fff !important; }
.neh-pick-go:hover { background: var(--accent-color-blue); }
.neh-pick-again { border: 1px solid #c9cfe3; background: #fff; color: var(--primary-color); }
.neh-pick-again:hover { border-color: var(--accent-color-bright-blue); }
.neh-pick-count { margin: 6px 0 0; font-size: 13px; color: var(--secondary-text-color, #6b7390); }
@media (max-width: 575px) {
  .neh-pick { grid-template-columns: 1fr; }
  .neh-pick-img, .neh-pick-cover { min-height: 140px; }
}

/* long-running events inside a day ("also open") */
.neh-home h4.neh-also-title {
  font-family: var(--font-family-primary) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-color) !important;
  margin: 18px 0 2px !important;
}
.neh-home h4.neh-also-title small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); margin-left: 6px; }
.neh-also { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.neh-also b { color: var(--primary-color); }
.neh-also a { color: var(--accent-color-bright-blue) !important; }

/* ─── Today / Tomorrow: rows read top-to-bottom; extra columns only when the list is long ───
   ≤6 rows: 1 column · 7–12: 2 columns · 13+: 3 columns (fewer on narrow screens) */
#panel-today .neh-rows,
#panel-tomorrow .neh-rows { column-gap: 36px; }
#panel-today .neh-row,
#panel-tomorrow .neh-row { break-inside: avoid; }
@media (min-width: 768px) {
  #panel-today .neh-rows:has(> .neh-row:nth-child(7)),
  #panel-tomorrow .neh-rows:has(> .neh-row:nth-child(7)) { column-count: 2; }
}
@media (min-width: 1100px) {
  #panel-today .neh-rows:has(> .neh-row:nth-child(13)),
  #panel-tomorrow .neh-rows:has(> .neh-row:nth-child(13)) { column-count: 3; }
}

/* game title: keep the yellow phrase together when it wraps */
#h-lucky span { display: inline-block; }

/* game "When": calendar field styled like the selects next to it */
.neh-lucky-date { position: relative; display: block; }
.neh-lucky-date svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .8); pointer-events: none; }
.neh-lucky-form .neh-lucky-date-input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: 600 16px/1 var(--font-family-primary);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color-scheme: dark;
}
.neh-lucky-form .neh-lucky-date-input:focus { outline: 2px solid var(--accent-color-yellow, #ffd23f); outline-offset: 1px; }

/* "Pick a vibe" mood tiles */
.neh-vibes .neh-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.neh-vibes .neh-tile-lead { font-size: 13px; color: var(--muted, #6b7390); line-height: 1.35; }

.neh-head-links { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; }

/* category pills: readable dark text on a light tint of the category colour + a colour dot (works for yellow too) */
.neh-row-cat,
.neh-pick-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2b3358 !important;
  background: color-mix(in srgb, var(--c, #4c8ef7) 16%, #fff);
}
.neh-row-cat::before,
.neh-pick-cat::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, #4c8ef7);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c, #4c8ef7) 70%, #000);
  flex: none;
}

/* less empty space between the search card and the first block */
body.neh-home-v2 .home-page-content.neh-home { margin-top: 20px !important; }
@media (max-width: 575px) { body.neh-home-v2 .home-page-content.neh-home { margin-top: 16px !important; } }

/* phones: all four "When" tabs visible without sideways scrolling */
@media (max-width: 575px) {
  .neh-when .neh-sec-head { flex-wrap: wrap; gap: 10px; }
  .neh-tabs { display: grid !important; grid-template-columns: auto auto auto auto; width: 100%; justify-content: space-between; overflow: visible; }
  .neh-tab { font-size: 13px !important; padding: 9px 9px !important; white-space: nowrap; }
}
@media (max-width: 359px) { .neh-tab { font-size: 12px !important; padding: 8px 6px !important; } }

@media (max-width: 575px) { .neh-tabs { padding: 3px !important; gap: 2px !important; } .neh-tab { padding: 9px 8px !important; } }

/* v4.21: never overflow on phones (large system font): 4 equal columns, label may wrap */
@media (max-width: 575px) {
  .neh-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; overflow: hidden !important; border-radius: 22px !important; }
  .neh-tab { white-space: normal !important; line-height: 1.15 !important; text-align: center; min-width: 0; border-radius: 18px !important; padding: 9px 4px !important; overflow-wrap: anywhere; }
}
