/* ================================
   Case Study Card Component
   事例紹介カードコンポーネント
================================ */

/* ----- Case Study List ----- */
.case-study-list {
  /* Display & Box Model */
  margin-bottom: var(--space-lg);
}

.case-study-list__inner {
  /* Display & Box Model */
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ----- Case Study Card ----- */
.case-study-list__item {
  /* Display & Box Model */
  display: flex;
  flex: 0 0 calc((100% - var(--space-lg) * 2) / 3);
  flex-direction: column;

  /* Border & Background */
  background: var(--color-bg);

  /* Other */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.case-study-list__item a {
  /* Display & Box Model */
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;

  /* Border & Background */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);

  /* Typography */
  color: inherit;
}

.case-study-list__item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ----- Card Image ----- */
.case-study-list__image {
  /* Display & Box Model */
  overflow: hidden;
  aspect-ratio: 16/9;
}

.case-study-list__image img {
  /* Display & Box Model */
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Card Body ----- */
.case-study-list__body {
  /* Display & Box Model */
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--space-md);
}

.case-study-list__cat {
  /* Display & Box Model */
  display: flex;
  gap: var(--space-xs);
  margin: 0 0 var(--space-xs);

  /* Typography */
  font-size: var(--fz-sm);
  color: var(--color-text-light);
}

.case-study-cat {
  /* Display & Box Model */
  padding: var(--space-xxs) var(--space-xxs);

  /* Border & Background */
  background: var(--color-bg-alt);
  border-radius: var(--radius-xs);

  /* Typography */
  font-size: var(--fz-xxs);
  font-weight: 500;
  color: var(--color-primary);
}

.case-study-list__title {
  /* Display & Box Model */
  margin: 0 0 var(--space-md);

  /* Typography */
  font-size: var(--fz-rg);
  font-weight: 600;
  line-height: 1.3;
}

.case-study-list__text {
  /* Display & Box Model */
  flex: 1;
  margin-bottom: var(--space-xs);

  /* Typography */
  line-height: 1;
}

.case-study-list__text p {
  /* Display & Box Model */
  margin: 0 0 var(--space-sm);

  /* Typography */
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--color-text);
}

.case-study-list__text span {
  /* Display & Box Model */
  margin: 0;

  /* Typography */
  font-size: var(--fz-xs);
  color: var(--color-text-light);
}

/* ================================
   Responsive Styles
================================ */

@media (max-width: 1023px) {
  .case-study-list__item {
    flex: 0 0 calc((100% - var(--space-lg)) / 2);
  }
}

@media (max-width: 767px) {
  .case-study-list__inner {
    gap: var(--space-md);
  }

  .case-study-list__item {
    flex: 0 0 100%;
  }
}