/* Resources index page styles */

section#pg-resources {
  background: var(--bg);
  color: var(--text);

  .resources-header {
    text-align: center;

    .subtitle {
      font-size: var(--h4);
      color: var(--text-2);
    }
  }

  .resources-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--lg);
  }

  .resource-card {
    display: block;
    background: var(--bg-2);
    padding: var(--lg);
    border: 1px solid var(--border);
    transition: all var(--normal);
    max-width: 500px;
    flex: 1 1 400px;
    text-decoration: none;
    color: inherit;

    &:hover {
      background: var(--white-10);
      border-color: var(--accent);
      text-decoration: none;
    }

    &:hover * {
      text-decoration: none;
    }

    h2 {
      margin: 0 0 var(--sm) 0;
      font-size: var(--h3);
      font-weight: var(--bold);
      color: var(--text);
    }

    .resource-image {
      margin-bottom: var(--sm);
      overflow: hidden;
      border-radius: 4px;

      img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        transition: transform var(--normal);
      }
    }

    &:hover .resource-image img {
      transform: scale(1.03);
    }

    .excerpt {
      color: var(--text-2);
      font-size: 1rem;
      font-weight: normal;
    }

    .read-more {
      color: var(--accent);
      font-weight: var(--bold);
    }
  }

  /* Responsive */
  @media (max-width: 768px) {
    .resources-list {
      gap: var(--md);
    }

    .resource-card {
      flex: 1 1 100%;
      max-width: 100%;
    }
  }

  @media (max-width: 480px) {
    .resources-header .subtitle {
      font-size: 1rem;
    }

    .resource-card {
      padding: var(--md);
    }

    .resource-card h2 {
      font-size: 1.375rem;
    }
  }

  @media (max-width: 320px) {
    .resource-card {
      padding: 1.25rem;
    }

    .resource-card .excerpt {
      font-size: var(--small);
    }
  }
}
