/* resources_index.php */

  /* ============================================================
     RESOURCES HUB STYLES
     [Maintainability Note]: All colors and spacing use global variables
     defined in head.php for easy site-wide updates.
     ============================================================ */


  /* ── Filter Bar ── */
  .res-filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--sand);
    position: sticky;
    top: 68px;
    z-index: 900;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  }
  .res-filter__inner {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .res-filter__inner::-webkit-scrollbar { display: none; }
  .res-filter__btn {
    border: none;
    background: transparent;
    padding: 1.2rem 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--grey-500);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: color var(--trans-fast), border-color var(--trans-fast);
    white-space: nowrap;
  }
  .res-filter__btn:hover {
    color: var(--grey-900);
  }
  .res-filter__btn.active {
    color: var(--orange-500);
    border-color: var(--orange-500);
  }

  /* ── Resource Grid & Cards ── */
  .res-grid-section {
    padding: var(--sp-2xl) 0;
    background: var(--grey-50);
  }
  .res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem 2rem;
  }
  
  .res-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--trans-med), box-shadow var(--trans-med);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid var(--sand);
  }
  .res-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
  
  /* Bottom animated border on hover */
  .res-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--orange-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .res-card:hover::after {
    transform: scaleX(1);
  }

  .res-card__media {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: var(--grey-100);
  }
  .res-card__media img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .res-card:hover .res-card__media img {
    transform: scale(1.05);
  }
  
  .res-card__badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: var(--navy-700);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
  }
  .res-card__badge--news { background: var(--navy-700); }
  .res-card__badge--blog { background: var(--orange-500); }
  .res-card__badge--download { background: var(--grey-700); }

  .res-card__body {
    padding: 1.8rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .res-card__meta {
    font-size: 0.8rem;
    color: var(--grey-500);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .res-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--grey-900);
    line-height: 1.4;
    margin-bottom: 1rem;
    transition: color var(--trans-fast);
  }
  .res-card:hover .res-card__title {
    color: var(--orange-500);
  }
  .res-card__excerpt {
    font-size: 0.9rem;
    color: var(--grey-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
  }
  .res-card__link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
  }
  .res-card__link svg {
    width: 14px; height: 14px;
    transition: transform var(--trans-fast);
  }
  .res-card:hover .res-card__link svg {
    transform: translateX(4px);
  }

  /* ── Pagination ── */
  .res-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
  }
  .res-page-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--sand);
    background: var(--white);
    color: var(--grey-700);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--trans-fast);
    cursor: pointer;
  }
  .res-page-btn:hover {
    background: var(--grey-50);
    border-color: var(--grey-400);
  }
  .res-page-btn.active {
    background: var(--navy-700);
    color: var(--white);
    border-color: var(--navy-700);
  }
  
  @media (max-width: 768px) {
    .res-hero { min-height: 320px; }
    .res-grid { grid-template-columns: 1fr; }
  }
