/* @import "./variables.css";

:root {
  --resources-blog-max-width: 1240px;
} */

.resources-blog {
  background-color: #ffffff;
  padding: 40px 100px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.resources-blog__inner {
  width: 100%;
  max-width: 1440px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.resources-blog__header {
  display: flex;
  justify-content: center;
  width: 100%;
}

.resources-blog__eyebrow {
  text-align: center;
  max-width: 621px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resources-blog__title {
  font-family: var(--font-family);
  font-size: var(--font-size-h1-desktop);
  line-height: 120%;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary-100);
  margin: 0;
}

.resources-blog__subtitle {
  font-family: var(--font-family);
  font-size: var(--font-size-b1-desktop);
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--color-text-secondary-100);
  margin: 0;
}

.resources-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 60px;
  column-gap: 20px;
  width: 100%;
  max-width: 1240px;
}

.resources-card {
  /* background-color: #ffffff; */
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16.327px;
  position: relative;
  height: 353px;
  cursor: pointer;
}

.resources-card__link {
  display: flex;
  flex-direction: column;
  gap: 16.327px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  position: relative;
}

.resources-card__figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  /* border: 1px solid rgba(0, 0, 0, 0.14); */
  border: 1px solid #00000024;
  height: 260px;
  width: 100%;
  flex-shrink: 0;
}

/* Hide figure when post has no image */
.resources-card--no-image .resources-card__figure,
.resources-card__figure--hidden {
  display: none;
}

.resources-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.resources-card__link:hover .resources-card__image {
  transform: scale(1.1);
}

.resources-card__body {
  display: flex;
  flex-direction: column;
  gap: 8.163px;
  flex: 1;
  justify-content: flex-end;
  align-items: flex-start;
  position: relative;
  padding-right: 50px;
}

.resources-card__heading {
  font-family: var(--font-family);
  font-size: var(--font-size-h6-desktop);
  line-height: 120%;
  color: var(--color-heading);
  font-weight: var(--font-weight-medium);
  margin: 0;
}

.resources-card__meta {
  font-family: var(--font-family);
  font-size: var(--font-size-b2-desktop);
  line-height: 150%;
  color: var(--color-text-secondary-100);
  margin: 0;
}

.resources-card__action {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 36.735px;
  height: 36.735px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-text-primary-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
  pointer-events: none;
}

.resources-card__link:hover .resources-card__action {
  background-color: var(--color-text-primary-100 0.3);
}

.resources-card__action:hover img {
  transform: translateX(2px);
}

.resources-card__action img {
  width: 8px;
  height: 12px;
  transition: transform 0.3s ease;
}

@media (max-width: 1100px) {
  .resources-blog {
    padding: 40px;
  }

  .resources-blog__inner {
    gap: 40px;
  }

  .resources-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 50px;
    column-gap: 20px;
  }
}

@media (max-width: 830px) {
  .resources-blog {
    padding: 28px 24px;
  }

  .resources-blog__inner {
    gap: 32px;
  }

  .resources-blog__header {
    width: 100%;
  }

  .resources-blog__eyebrow {
    max-width: 100%;
    gap: 12px;
    text-align: center;
  }

  .resources-blog__title {
    font-size: 2rem;
    line-height: 1.2;
    text-align: center;
  }

  .resources-blog__subtitle {
    font-size: var(--font-size-b1-mobile);
    line-height: 1.5;
    text-align: center;
  }

  .resources-blog__grid {
    grid-template-columns: 1fr;
    /* row-gap: 60px;
    column-gap: 20px; */
    gap: 32px;
    width: 100%;
  }

  .resources-card {
    height: auto;
    min-height: auto;
    gap: 16px;
  }

  .resources-card__figure {
    height: 280px;
    border-radius: 20px;
  }

  .resources-card__body {
    gap: 10px;
    padding-right: 45px;
  }

  .resources-card__heading {
    font-size: var(--font-size-h3-mobile);
    line-height: 1.3;
    white-space: normal;
  }

  .resources-card__meta {
    font-size: var(--font-size-b2-mobile);
  }

  .resources-card__action {
    width: 32px;
    height: 32px;
    right: 0;
    bottom: 0;
  }

  .resources-card__action img {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 480px) {
  .resources-blog {
    padding: 24px;
  }

  .resources-blog__inner {
    gap: 24px;
  }

  .resources-blog__eyebrow {
    gap: 8px;
    text-align: center;
  }
  .resources-blog__title {
    font-size: 2rem;
    line-height: 1.2;
    text-align: center;
  }

  .resources-blog__subtitle {
    font-size: var(--font-size-b3-mobile);
    text-align: center;
  }

  .resources-blog__grid {
    /* row-gap: 60px;
    column-gap: 20px; */
    gap: 32px;
  }

  .resources-card__figure {
    height: 250px;
  }

  .resources-card__heading {
    font-size: var(--font-size-h3-mobile);
  }
}

/* ── Skeleton Loading Cards ── */

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 16.327px;
  height: 353px;
}

.skeleton-card__figure {
  height: 260px;
  width: 100%;
  border-radius: 20px;
  background-color: #e8e8e8;
  flex-shrink: 0;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.skeleton-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.skeleton-card__title {
  height: 18px;
  width: 80%;
  border-radius: 6px;
  background-color: #e8e8e8;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  animation-delay: 0.15s;
}

.skeleton-card__meta {
  height: 14px;
  width: 40%;
  border-radius: 6px;
  background-color: #e8e8e8;
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  animation-delay: 0.3s;
}

@media (max-width: 830px) {
  .skeleton-card {
    height: auto;
    min-height: auto;
    gap: 16px;
  }

  .skeleton-card__figure {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .skeleton-card__figure {
    height: 250px;
  }
}
