/* =============================================
   Article Card Component — Overlapping Layout
   Photo (rectangular) + frosted-glass text panel
   ============================================= */

/* --- Grid wrapper: vertical stack --- */
.article-card-grid {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* --- Card --- */
.article-card {
  position: relative;
  min-height: 420px;
  overflow: visible;
  margin-bottom: 40px; /* space for text panel overhang */
}

/* --- Visual area --- */
.article-card__visual {
  width: 62%;
  position: relative;
}

/* --- Rectangular photo --- */
.article-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); */
}

.article-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Body (text panel — frosted glass, overlapping photo) --- */
.article-card__body {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: 674px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px 20px;
  /* box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); */
  z-index: 2;
}

/* --- Reverse layout (photo right, text left-bottom) --- */
.article-card--reverse .article-card__visual {
  margin-left: auto;
}

.article-card--reverse .article-card__body {
  right: auto;
  left: 0;
}

/* --- Number badge --- */
.article-card__num {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0px 16px;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  /* letter-spacing: 0.06em; */
  margin-bottom: 8px;
}

/* --- Title --- */
.article-card__title {
  /* font-family: var(--font-ja); */
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 16px;
}

/* --- Description --- */
.article-card__text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 24px;
  text-align: left;
}

/* --- VIEW MORE button alignment --- */
.article-card .btn--view-more {
  margin-left: auto;
  width: fit-content;
  min-width: 150px;
  padding: 0px 12px;
  white-space: nowrap;
}

/* --- Hover effect: red button when hovering body --- */
.article-card__body:hover .btn--view-more {
  background: var(--color-primary) !important;
  color: #fff !important;
  opacity: 1 !important;
}

.article-card__body:hover .btn--view-more .btn__circle-arrow {
  background: #fff !important;
  color: var(--color-primary) !important;
}

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

@media (max-width: 1160px) {
  .article-card__body {
    width: 55%;
    padding: 28px 32px;
  }
}

@media (max-width: 1024px) {
  .article-card-grid {
    gap: 60px;
  }

  .article-card {
    min-height: 340px;
  }

  .article-card__visual {
    width: 60%;
  }
}

@media (max-width: 769px) {
  .article-card-grid {
    gap: 48px;
  }

  .article-card {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* Override reverse on mobile — always stack vertically */
  .article-card--reverse {
    flex-direction: column;
  }

  .article-card__visual {
    width: 100%;
  }

  .article-card--reverse .article-card__visual {
    margin-left: 0;
  }

  .article-card__photo {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .article-card__body {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 24px 20px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    text-align: left;
    /* Keep frosted glass on mobile */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
  }

  .article-card--reverse .article-card__body {
    left: auto;
  }

  .article-card__text {
    text-align: left;
  }

  .article-card .btn--view-more {
    margin-left: auto;
  }
}
