/* ============================================================
   Comics Index  (all rules scoped under .comics-index)
   ============================================================ */
.comics-index {

  /* ── Hero ─────────────────────────────────────────────── */
  & .hero {
    position: relative;
    overflow: hidden;
    background-color: var(--color-primary);
    margin-top: calc(-1 * var(--site-pad-y));
    margin-left: calc(-1 * var(--site-pad-x));
    margin-right: calc(-1 * var(--site-pad-x));
    margin-bottom: 24px;
    border-bottom: 4px solid var(--color-secondary);

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: url("../images/flower-pattern.png");
      background-repeat: repeat;
      opacity: var(--home-hero-pattern-opacity);
      pointer-events: none;
    }
  }

  & .hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  & .hero-copy {
    color: var(--color-white);
    border-radius: 4px;
    padding: 20px;
    text-align: center;

    & h1 {
      color: var(--color-white);
      margin-bottom: 10px;
    }

    & p {
      color: var(--color-white);
      margin: 0;
    }
  }

  /* ── Grid ─────────────────────────────────────────────── */
  & .grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
  }

  /* ── Card ─────────────────────────────────────────────── */
  & .card {
    background: var(--color-card-background);
    flex: 1 1 calc(50% - 10px);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  & .card-image-link {
    display: block;
  }

  & .card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  /* ── Card body ────────────────────────────────────────── */
  & .card-body {
    padding: 40px;
    color: var(--color-secondary);
    font-size: var(--text-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  & .spacer {
    flex: 1 1 auto;
  }

  & .card-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-tertiary);
  }

  & .byline {
    margin: 0 0 6px;
    font-style: italic;

    & a {
      color: var(--color-tertiary);
      text-decoration: underline;
    }
  }

  & .updates {
    margin: 0 0 10px;
    font-style: italic;
  }

  & .blurb {
    margin-bottom: 10px;
  }

  /* ── Action links ─────────────────────────────────────── */
  & .links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
  }

  & .button {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--color-tertiary);
    color: var(--color-white);
    text-decoration: none;
    text-align: center;

    &:hover {
      text-decoration: none;
      opacity: 0.9;
    }
  }
}
