/* ==========================================================================
   Card Component
   Reusable card patterns for stories, portfolios, galleries
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base Card Block
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover, 0 8px 30px rgba(0, 0, 0, 0.12));
  transform: translateY(-4px);
}

/* Card article wrapper for semantic HTML */
.card article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --------------------------------------------------------------------------
   Card Figure (Image)
   -------------------------------------------------------------------------- */
.card__figure {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--color-border);
}

.card__figure--landscape {
  aspect-ratio: 16 / 10;
}

.card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__figure img,
.card:focus-within .card__figure img {
  transform: scale(1.04);
}

/* Placeholder when no image */
.card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  color: var(--color-text-secondary);
}

.card__placeholder-icon {
  width: 3rem;
  height: 3rem;
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   Card Overlay
   -------------------------------------------------------------------------- */
.card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.card__overlay-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Card Meta (Text content below image)
   -------------------------------------------------------------------------- */
.card__meta {
  margin-top: 1.2rem;
  font-family: var(--font-body);
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  line-height: 1.2;
}

.card__subtitle {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   Card Content (Padding for text cards)
   -------------------------------------------------------------------------- */
.card__content {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Card Link (Full card clickable)
   -------------------------------------------------------------------------- */
.card__link {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* --------------------------------------------------------------------------
   Card Modifiers
   -------------------------------------------------------------------------- */

/* CTA Card - displays a call-to-action */
.card--cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(2.4rem, 4vw, 3rem);
  background: var(--color-surface);
  min-height: 100%;
}

.card--cta:hover,
.card--cta:focus-within {
  color: var(--color-accent-primary);
  border-color: rgba(8, 59, 16, 0.3);
}

/* Note Card - displays text with link */
.card--note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(2.2rem, 3.5vw, 2.8rem);
  background: var(--color-surface);
  box-shadow: none;
}

.card--note p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* Simple link card - just centered link */
.card--simple-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border: none;
  background: transparent;
}

.card--simple-link:hover {
  transform: none;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Card Date/Count (Galleries)
   -------------------------------------------------------------------------- */
.card__date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.card__date-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.card__count {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  background: var(--color-background);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
