/**
 * Taevas Speaker Card paragraph.
 *
 * Purple-framed vertical card: portrait photo inset on top with rounded
 * corners, name + designation below in white. Designed to match the brand
 * "speaker / dignitary" card mockup.
 *
 * Heights: Bootstrap rows stretch their columns to equal height. By giving
 * every wrapper between the column and the card `height: 100%`, the card
 * grows to match its sibling column (e.g. a long bio block). The photo
 * keeps its natural aspect ratio — only the empty purple area below the
 * title text absorbs the extra height.
 */

/* Make the Drupal paragraph wrapper fill its column so the card can
 * stretch to match siblings in the same row (e.g. a long bio block). */
.paragraph--type--speaker-card {
  height: 100%;
}

.speaker-card {
  display: flex;
  flex-direction: column;
  background: var(--taevas-blue, #5519e6);
  border-radius: 30px;
  padding: 18px 18px 26px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(85, 25, 230, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  max-width: 420px;
  margin: 1rem auto;
  width: 100%;
  box-sizing: border-box;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.speaker-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(85, 25, 230, 0.28);
}

/* --- Photo (top, inset inside the purple frame) --- */

.speaker-card__image {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #e9eaf3 0%, #dde0f0 100%);
  border-radius: 22px;
}

.speaker-card__image img,
.speaker-card__image .field--name-field-speaker-image,
.speaker-card__image .field__item {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
}

/* --- Body (below the photo, on the purple) --- */

.speaker-card__body {
  padding: 22px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  text-align: left;
}

.speaker-card__name {
  padding-bottom: 14px;
  font-family: "Clash Display";
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.speaker-card__name .field--name-field-speaker-name,
.speaker-card__name .field__item {
  display: inline;
}

.speaker-card__title {
  font-family: "Archivo", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
}

.speaker-card__title p {
  margin: 0;
}

.speaker-card__title p + p {
  margin-top: 2px;
}

/* --- Optional bio (only shows if editor filled it in) --- */

.speaker-card__bio {
  font-family: "Archivo", sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 12px;
}

.speaker-card__bio p:first-child { margin-top: 0; }
.speaker-card__bio p:last-child { margin-bottom: 0; }

.speaker-card__bio a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Responsive tightening on phones --- */

@media (max-width: 480px) {
  .speaker-card {
    border-radius: 24px;
    padding: 14px 14px 22px;
    margin: 0.5rem auto;
  }
  .speaker-card__image,
  .speaker-card__image img {
    border-radius: 18px;
  }
  .speaker-card__body {
    padding: 18px 8px 2px;
  }
  .speaker-card__name {
    font-size: 1.3rem;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .speaker-card__title {
    font-size: 0.95rem;
  }
}

/* --- Inside a Bootstrap row column: card fills both width AND height of
 * the column, so it visually matches the height of any sibling content
 * (e.g. a long bio paragraph). The card's flex-column body absorbs the
 * extra height as purple padding below the title — image is untouched. */

.row > [class^="col-"] .speaker-card,
.row > [class*=" col-"] .speaker-card {
  margin: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
}
