/**
 * Escape rooms: overview grid (CPT "escape-room" query) and single room.
 * Room colour: Toolset field "color" – falls back to the Escape Rooms red.
 */
.aw-rooms { --c: var(--aw-escape); padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
/* Overview: wider than the text sections, big tiles (3 per row on large screens) */
.aw-rooms .aw-wrap--wide { width: min(100% - 2 * var(--aw-gutter), 1760px); }
.aw-rooms__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(1rem, .6rem + 1vw, 1.5rem);
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.aw-room {
  --c: var(--aw-escape);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-m);
  background: var(--aw-ink);
  text-decoration: none;
  transition: border-color var(--aw-dur-fast);
}
.aw-room:hover { border-color: rgb(255 255 255 / .24); color: inherit; }
.aw-room__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
@media (max-width: 600px) { .aw-room__media { aspect-ratio: 4 / 3; } }
.aw-room__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85) brightness(.85);
  transition: transform 1.2s var(--aw-ease-out), filter .6s;
}
.aw-room:hover .aw-room__media img,
.aw-room:focus-visible .aw-room__media img { transform: scale(1.07); filter: none; }
/* Hover: a soft wash of the room colour rises over the photo */
.aw-room__media::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c) 18%, transparent) 55%, transparent 100%);
  opacity: 0;
  transition: opacity .6s var(--aw-ease-out);
  pointer-events: none;
}
.aw-room:hover .aw-room__media::before,
.aw-room:focus-visible .aw-room__media::before { opacity: 1; }
/* Same colour line as the frontpage tiles (stays as it is on hover) */
.aw-room__media::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  height: 3px;
  background: var(--c);
}

/* "Ab 16 Jahren" label on the photo (rooms with the Toolset checkbox "16-jahre") */
.aw-room__badge {
  position: absolute;
  z-index: 3;
  top: .9rem; left: .9rem;
  padding: .3em .75em;
  border: 1px solid var(--aw-red);
  border-radius: 999px;
  background: var(--aw-black);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.aw-title-row { display: flex; align-items: center; gap: .6rem .8rem; flex-wrap: wrap; }
.aw-title-row > :is(h1, h2) { margin: 0; }
/* Age badge "16+" (Toolset checkbox "16-jahre"), like an age rating sticker */
.aw-age {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 2.4em;
  height: 2.4em;
  padding: .15em .45em 0;
  border: 2px solid var(--aw-red);
  border-radius: 999px;
  background: rgb(200 0 0 / .14);
  color: var(--aw-white);
  font-family: var(--aw-font-display);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
}
.aw-room .aw-age { font-size: .8rem; }   /* card: no taller than the title, so the facts line up across cards */
.aw-room-hero .aw-age { font-size: clamp(1.1rem, .9rem + .8vw, 1.5rem); }
.aw-room-hero .aw-title-row { margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); }
.aw-room-hero .aw-title-row .aw-page-hero__title { margin-bottom: 0; }
.aw-room__body { display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem 1.35rem 1.4rem; }
.aw-room__title { margin: 0; font-size: clamp(1.9rem, 1.6rem + .6vw, 2.3rem); }
/* Hover: round button in the middle of the photo – colour outline, colour arrow */
.aw-room__go {
  position: absolute;
  z-index: 3;
  left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  border: 2px solid var(--c);
  border-radius: 50%;
  background: rgb(0 0 0 / .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--c);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
  transition: opacity var(--aw-dur) var(--aw-ease-out), transform var(--aw-dur) var(--aw-ease-spring);
}
.aw-room__go svg { width: 22px; height: 22px; }
.aw-room:hover .aw-room__go,
.aw-room:focus-visible .aw-room__go { opacity: 1; transform: translate(-50%, -50%); }

/* Facts: difficulty, duration, players (shared with the single room) */
.aw-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; list-style: none; color: #d5d9e0; font-size: .92rem; }
.aw-facts li { display: inline-flex; align-items: center; gap: .45rem; }
.aw-facts svg { width: 17px; height: 17px; color: var(--aw-mute); }
.aw-locks { display: inline-flex; gap: 3px; }
.aw-locks svg { width: 15px; height: 15px; color: rgb(255 255 255 / .2); }
.aw-locks svg.is-on { color: var(--aw-red-light); }

/* Single room: uses the page hero (page-hero.css); only the extras here ---- */
.aw-room-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: clamp(2.25rem, 1.75rem + 1.5vw, 3.25rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / .14);
}
/* Teko sits low in its line box: give the kicker a line height of 1 so pill and link share one centre */
.aw-room-hero__top .aw-room-hero__kicker { line-height: 1; }
.aw-room-hero__top .aw-room-hero__kicker a { padding-top: .12em; }
.aw-room-hero__kicker { margin: 0; font-size: 1.35rem; letter-spacing: .08em; }
.aw-room-hero__count {
  padding: .2em .75em;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  border-radius: 999px;
  color: #d5d9e0;
  font-size: var(--aw-step--1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.aw-room-hero__kicker a { display: inline-flex; align-items: center; gap: .5rem; color: var(--aw-mute); text-decoration: none; transition: color var(--aw-dur-fast), gap var(--aw-dur) var(--aw-ease-out); }
.aw-room-hero__kicker a:hover { color: var(--aw-white); gap: .8rem; }
.aw-room-hero__kicker svg { width: 18px; height: 18px; }
.aw-room-hero .aw-page-hero__title { margin-bottom: .45em; }
.aw-room-hero .aw-facts { margin-bottom: 2rem; font-size: 1rem; }
.aw-room-hero .aw-facts > li > svg { color: #d5d9e0; }   /* Clock and person icons only: the locks keep their on/off colours */

.aw-room-gallery { padding-block: clamp(1rem, .5rem + 2vw, 2.5rem) clamp(3rem, 2rem + 4vw, 6rem); }

/* Previous / next room: one line each – arrow, position (3 / 14), name.
   Long names are shortened with "…"; on phones the two links stack, full width. */
.aw-roomnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.aw-roomnav__link {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
  padding: .9rem 1.1rem;
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-m);
  background: var(--aw-ink);
  text-decoration: none;
  transition: border-color var(--aw-dur-fast);
}
.aw-roomnav__link.is-next { justify-content: flex-end; text-align: right; }
.aw-roomnav__link:hover { border-color: color-mix(in srgb, var(--c) 70%, transparent); color: inherit; }
.aw-roomnav__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 2px solid var(--c);
  border-radius: 50%;
  transition: background var(--aw-dur) var(--aw-ease-out);
}
.aw-roomnav__arrow svg { width: 18px; height: 18px; transition: transform var(--aw-dur) var(--aw-ease-out); }
.aw-roomnav__link:hover .aw-roomnav__arrow { background: var(--c); }
.aw-roomnav__link:hover .aw-roomnav__arrow svg { transform: translateX(-3px); }
.aw-roomnav__link.is-next:hover .aw-roomnav__arrow svg { transform: translateX(3px); }
.aw-roomnav__num {
  flex: none;
  color: var(--aw-mute);
  font-size: var(--aw-step--1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.aw-roomnav__name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--aw-font-display);
  font-size: clamp(1.35rem, 1.2rem + .5vw, 1.7rem);
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .aw-roomnav { grid-template-columns: 1fr; gap: .6rem; }
  .aw-roomnav > span:empty { display: none; }
  .aw-roomnav__link.is-next { order: -1; }   /* stacked: "next room" on top, "previous" below */
}
