/* css/misc.css — Misc/favorites page: card styles + 2-column layout */

/* ===== MISC PAGE ===== */
.misc-card {
  padding: 1rem 1.25rem;
}

.misc-card a:hover {
  display: inline-block; /* needed so transform works properly */
  animation: wiggle 0.6s ease-in-out;
}

.misc-card h2 {
  margin: 0.2rem 0 0.6rem;
  font-family: "Grandstander";
}

.misc-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.misc-card li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
}

.misc-card li img.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--ink);
  object-fit: cover;
  flex-shrink: 0;
}

.misc-card a {
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
  color: inherit;
}

/* ===== Misc page 2-col layout (people full width; media left, quotes right) ===== */
.misc-grid {
  display: grid;
  /* .wrap is already grid, but be explicit for clarity */
  grid-template-columns: 1fr;
  /* stack on mobile */
  gap: 18px;
  /* matches .wrap gap */
}

/* Desktop/tablet: two columns */
@media (min-width: 820px) {
  .misc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: dense;
    /* Force columns to ignore content width and align flush with container */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-items: stretch;
    grid-auto-rows: auto;
    gap: 18px;
  }

  /* 1) Favorite People spans both columns */
  .misc-grid .misc-card:nth-of-type(1) {
    grid-column: 1 / -1;
    height: auto;
  }

  /* 2) Favorite Quotes (2nd card) goes RIGHT column */
  .misc-grid .misc-card:nth-of-type(2) {
    order: 2;
    grid-column: 1;
  }

  /* 3) Favorite Media (3rd card) goes LEFT column */
  .misc-grid .misc-card:nth-of-type(3) {
    order: 1;
    grid-column: 2;
  }

  /* Bottom row — force equal height */
  .misc-grid .misc-card:nth-of-type(2),
  .misc-grid .misc-card:nth-of-type(3) {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* Ensure cards fill their grid tracks perfectly */
  .misc-grid .misc-card {
    width: 100%;
    height: 100%;
    display: flex;
    /* so the panel background/border fills */
    flex-direction: column;
  }

  /* Fix inner margins so they don't add extra gap */
  .misc-grid .misc-card:nth-of-type(2) > :last-child,
  .misc-grid .misc-card:nth-of-type(3) > :last-child {
    margin-bottom: 0;
  }
}
