/************************************************************
 * CASTS.CSS — WCYD CAST MEMBER + CAST VIDEO (WP-LIKE)
 * - Cast member row: photo left, body right
 * - Cast video: thumbnail w/ play overlay + dotted ring
 * - Cast video layout: thumb left, text right (stacked)
 ************************************************************/

/************************************************************
 * CAST MEMBER — ROW LAYOUT
 ************************************************************/

.wcyd-cast-member__row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 0 0 24px;
}

.wcyd-cast-member__photo {
  flex: 0 0 184px; /* matches WP thumb width */
}

.wcyd-cast-member__photo img {
  width: 184px;
  height: auto;
  display: block;
}

.wcyd-cast-member__body {
  flex: 1;
  margin-left: 20px; /* space between image and text */
}

.wcyd-cast-member__name .field__item {
  font-weight: 700;
  font-style: normal;
}

.wcyd-cast-member__quote .field__item {
  font-weight: 400;
  font-style: italic;
}

/* Space between cast members */
.wcyd-cast-member {
  margin-bottom: 65px; /* WP-like vertical rhythm */
}

@media (max-width: 768px) {
  .wcyd-cast-member__row {
    flex-direction: column;
  }

  .wcyd-cast-member__photo {
    flex: 0 0 auto;
  }

  .wcyd-cast-member__photo img {
    width: 100%;
    max-width: 320px;
  }

  .wcyd-cast-member__body {
    margin-left: 0;
  }
}

/************************************************************
 * CAST LIST TYPOGRAPHY — match WP (Open Sans, 16px, 27.2px)
 ************************************************************/

.wcyd-cast-member,
.wcyd-cast-member .field__item,
.wcyd-cast-member .text-content,
.wcyd-cast-member .text-content p {
  font-family: "Open Sans", Helmet, Freesans, sans-serif;
  font-size: 16px;
  line-height: 27.2px; /* WP: 1.7 * 16px */
  color: #333;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

/* Bio/body: remove default paragraph margins (WP had 0) */
.wcyd-cast-member__bio .text-content p {
  margin: 0;
}

/* Optional: if bio has multiple paragraphs and you want spacing */
.wcyd-cast-member__bio .text-content p + p {
  margin-top: 12px;
}

/************************************************************
 * CAST VIDEO — FORCE "LEARN MORE" TO LOOK LIKE A LINK
 ************************************************************/

.wcyd-cast-video__learnmore,
.wcyd-cast-video__learnmore .field__item {
  color: #0580a3;            /* match your site link color */
  font-weight: 600;
  text-decoration: none;
}

.wcyd-cast-video__learnmore:hover,
.wcyd-cast-video__learnmore:hover .field__item {
  text-decoration: underline;
}


/************************************************************
 * CAST VIDEO — UPDATED FOR NEW MARKUP
 * Markup now:
 * .wcyd-cast-video
 *   .wcyd-cast-video__row (layout container)
 *     a.wcyd-cast-video__thumb (contains Drupal thumbnail field)
 *     .wcyd-cast-video__text
 *       a.wcyd-cast-video__learnmore (contains link text field)
 *       .wcyd-cast-video__note (contains note field)
 ************************************************************/

/* If the raw video field is still rendered somewhere, hide it (safe). */
.wcyd-cast-video .field--name-field-cast-video {
  display: none !important;
}

/* Layout: thumb left, text right */
.wcyd-cast-video .wcyd-cast-video__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 10px; /* optional */
}

/* Thumb column sizing */
.wcyd-cast-video .wcyd-cast-video__thumb {
  display: block;
  flex: 0 0 210px;   /* WP-like thumb column */
  width: 210px;
  text-decoration: none;
}

/* Text column */
.wcyd-cast-video .wcyd-cast-video__text {
  flex: 1;
  min-width: 0;
}

/* Learn-more link: keep it looking like WP */
.wcyd-cast-video .wcyd-cast-video__learnmore {
  display: inline-block;
  text-decoration: none;
  color: #0580a3 !important; /* adjust if you use a different link color */
  font-weight: 600;
}

.wcyd-cast-video .wcyd-cast-video__learnmore:hover {
  text-decoration: underline;
}

/* Note spacing */
.wcyd-cast-video .wcyd-cast-video__note {
  margin-top: 6px;
}

/* Mobile: stack thumb above text */
@media (max-width: 768px) {
  .wcyd-cast-video .wcyd-cast-video__row {
    flex-direction: column;
  }

  .wcyd-cast-video .wcyd-cast-video__thumb {
    width: 100%;
    flex-basis: auto;
    max-width: 320px; /* optional */
  }
}

/************************************************************
 * CAST VIDEO THUMB — PLAY OVERLAY (SCOPED TO NEW ANCHOR)
 ************************************************************/

/* The media wrapper is inside the anchor now */
.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image {
  position: relative;
  display: block;
  width: 210px;
  height: 118.125px; /* 16:9-ish WP-like */
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
}

/* Make media responsive on mobile when anchor stretches */
@media (max-width: 768px) {
  .wcyd-cast-video
  .wcyd-cast-video__thumb
  .media.media--type-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* modern browsers; keeps WP-like crop */
  }
}

/* Ensure image fills/crops */
.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hover dark overlay on the inner image field wrapper */
.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image
.field--name-field-media-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image
.field--name-field-media-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 2;
  pointer-events: none;
}

.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image:hover
.field--name-field-media-image::before {
  opacity: 1;
}

/* Dotted ring */
.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px dotted rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.15);
  z-index: 3;
  pointer-events: none;
}

/* Play triangle */
.wcyd-cast-video
.wcyd-cast-video__thumb
.media.media--type-image::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #ffffff;
  z-index: 4;
  pointer-events: none;
}


/************************************************************
 * CAST VIDEO THUMB — PLAY OVERLAY (PURE CSS)
 * Uses:
 * - media wrapper ::after  => dotted ring
 * - media wrapper ::before => play triangle
 * - inner field ::before   => hover dark overlay
 ************************************************************/

/* Anchor on the media wrapper that contains the image field */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image {
  position: relative;
  display: block;   /* fill the 210px column */
  width: 210px;
  height: 118.125px; /* WP-like */
  overflow: hidden;  /* crop */
  line-height: 0;
  cursor: pointer;
}

/* Ensure image fills the box and crops nicely */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Put hover overlay on the inner image field wrapper */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image
.field--name-field-media-image {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Dark hover overlay */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image
.field--name-field-media-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 2;
  pointer-events: none;
}

.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image:hover
.field--name-field-media-image::before {
  opacity: 1;
}

/* Dotted ring (centered) */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px dotted rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.15);
  z-index: 3;
  pointer-events: none;
}

/* Play triangle (centered) */
.paragraph--type--cast-video
.field--name-field-cast-video-thumbnail
.media.media--type-image::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #ffffff;
  z-index: 4;
  pointer-events: none;
}
