/* ==========================================================================
   HALL VIII · IIT KANPUR  -  rooms.css  (common-rooms.html only)

   Loaded after styles.css and gallery.css (page heading, breadcrumbs, .g-ar arrows).
   01. Room cards
   02. Room panel (media + details)
   03. Guidelines & rules
   04. Overview table
   ========================================================================== */

/* 01. ROOM CARDS ---------------------------------------------------------- */
/* One simple card per room: icon picture (emoji while the picture is missing) and name. */
.r-hint {
  margin: 0 0 14px;
  color: var(--mute);
}
.r-cards {
  list-style: none;
  margin: 28px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.r-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  height: 100%;
  padding: 22px 12px 16px;
  text-align: center;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.r-card:hover,
.r-card:focus-visible {
  border-color: var(--acc);
}
.r-card[aria-current="true"] {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 10%, var(--panel));
  box-shadow: inset 0 -3px 0 var(--acc);
}
.r-ic {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  line-height: 1;
}
.r-ic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.r-nm {
  font: 700 15px var(--d);
}

/* 02. ROOM PANEL ---------------------------------------------------------- */
.r-panel {
  padding: 28px;
  margin-top: 8px;
  scroll-margin-top: 80px;
}
/* The panel is focused from script so screen readers announce the room; it is not a control, so no ring */
.r-panel:focus {
  outline: none;
}
.r-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: start;
}
.r-slider,
.r-ph {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.r-slider {
  background: #071a33;
}
.r-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.r-cap {
  position: absolute;
  inset: auto 0 0;
  padding: 24px 14px 10px;
  color: #fff;
  font: 500 13px var(--b);
  background: linear-gradient(transparent, rgba(4, 16, 31, 0.85));
}
/* Placeholder shown while a room has no photos */
.r-ph {
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  background: repeating-linear-gradient(
    45deg,
    var(--grid) 0 12px,
    transparent 12px 24px
  );
}
.r-ph span {
  font-size: 56px;
}
.r-ph b {
  font: 700 20px var(--d);
}
.r-ph small {
  font: 400 12px var(--m);
  color: var(--mute);
}
.r-tagl {
  margin: 0 0 4px;
  font: 500 12px var(--m);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hot);
}
.r-info h2 {
  margin: 0 0 10px;
  font: 700 clamp(26px, 4vw, 36px) / 1.15 var(--d);
  letter-spacing: -0.02em;
}
.r-info h2::after {
  content: none;
}
.r-info h3,
.r-rules h3 {
  margin: 20px 0 8px;
  font: 700 15px var(--d);
}
.r-glance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}
.r-glance div {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.r-glance dt {
  font: 400 11px var(--m);
  color: var(--mute);
  text-transform: uppercase;
}
.r-glance dd {
  margin: 2px 0 0;
  font: 700 16px var(--d);
}
.r-ticks {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.r-ticks li {
  position: relative;
  padding-left: 24px;
  margin: 6px 0;
}
.r-ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

/* 03. GUIDELINES & RULES -------------------------------------------------- */
.r-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 26px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.r-rules ul {
  margin: 0;
  padding-left: 20px;
  color: var(--mute);
}
.r-rules li {
  margin: 6px 0;
}

/* 04. OVERVIEW TABLE ------------------------------------------------------ */
.r-over {
  margin: 40px 0 72px;
}
.r-over h2 {
  margin: 0 0 14px;
  font: 700 22px var(--d);
}
.r-over h2::after {
  content: none;
}
.r-over td a {
  color: var(--acc);
}
.r-over td a:hover {
  text-decoration: underline;
}
@media (max-width: 760px) {
  .r-panel {
    padding: 18px;
  }
  .r-grid,
  .r-rules {
    grid-template-columns: 1fr;
  }
}
