/**
 * @file
 * Card component styles
 */

.card {
  position: relative;
  border-radius: 12px;
  padding: var(--spacing-lg);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Background image - takes precedence over background color */
.card__background-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow: hidden;
}

.card__background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card--has-bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.card--has-bg-image .card__wrapper {
  position: relative;
  z-index: 3;
}

/* When background image exists, override background color completely */
.card--has-bg-image {
  background-color: transparent;
}

.card--has-bg-image.paragraph--bg-primary,
.card--has-bg-image.paragraph--bg-secondary,
.card--has-bg-image.paragraph--bg-primary-dark,
.card--has-bg-image.paragraph--bg-secondary-dark,
.card--has-bg-image.paragraph--bg-accent,
.card--has-bg-image.paragraph--bg-bg-dark,
.card--has-bg-image.paragraph--bg-footer-dark,
.card--has-bg-image.paragraph--bg-black,
.card--has-bg-image.paragraph--bg-staff-gradient-start,
.card--has-bg-image.paragraph--bg-staff-gradient-end,
.card--has-bg-image.paragraph--bg-light-blue,
.card--has-bg-image.paragraph--bg-white,
.card--has-bg-image.paragraph--bg-bg-light,
.card--has-bg-image.paragraph--bg-faq-light-blue,
.card--has-bg-image.paragraph--bg-form-gray,
.card--has-bg-image.paragraph--bg-header-light-blue {
  background-color: transparent;
}

.card__wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--spacing-md) 0;
  line-height: 1.2;
}

/* White text for cards with background image or dark backgrounds */
.card--has-bg-image .card__title,
.card.paragraph--bg-primary .card__title,
.card.paragraph--bg-secondary .card__title,
.card.paragraph--bg-primary-dark .card__title,
.card.paragraph--bg-secondary-dark .card__title,
.card.paragraph--bg-accent .card__title,
.card.paragraph--bg-bg-dark .card__title,
.card.paragraph--bg-footer-dark .card__title,
.card.paragraph--bg-black .card__title,
.card.paragraph--bg-staff-gradient-start .card__title,
.card.paragraph--bg-staff-gradient-end .card__title,
.card.paragraph--bg-light-blue .card__title {
  color: #FFFFFF;
}

.card__body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  flex: 1;
}

/* White text for cards with background image or dark backgrounds */
.card--has-bg-image .card__body,
.card.paragraph--bg-primary .card__body,
.card.paragraph--bg-secondary .card__body,
.card.paragraph--bg-primary-dark .card__body,
.card.paragraph--bg-secondary-dark .card__body,
.card.paragraph--bg-accent .card__body,
.card.paragraph--bg-bg-dark .card__body,
.card.paragraph--bg-footer-dark .card__body,
.card.paragraph--bg-black .card__body,
.card.paragraph--bg-staff-gradient-start .card__body,
.card.paragraph--bg-staff-gradient-end .card__body,
.card.paragraph--bg-light-blue .card__body {
  color: rgba(255, 255, 255, 0.95);
}

.card__icon-links {
  margin-top: auto;
  padding-top: var(--spacing-md);
}

/* Responsive */
@media (max-width: 767px) {
  .card {
    min-height: 200px;
    padding: var(--spacing-md);
  }

  .card__title {
    font-size: 1.25rem;
  }
}

