/* Horizontal flow arrows for show-dev flow chart */
.arrow-horizontal {
  width: 96px;
  height: 2px;
  background: #333;
  position: relative;
  margin: 0 1rem;
  display: inline-block;
  vertical-align: middle;
  border-radius: 1px;
}
.arrow-horizontal.arrow-right::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #333;
}
.arrow-horizontal.arrow-left::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #333;
}
.cantguarddylan-profile-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.cantguarddylan-profile-card,
.cantguarddylan-bio-card {
  flex: 1 1 320px;
  max-width: 460px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cantguarddylan-bio-card p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: #374151;
  text-align: left;
}

.fiction-factory-video-wrapper {
  margin-top: 20px;
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
}
/* Match Fiction Factory video size to TikTok embeds */
.fiction-factory-video-wrapper video {
  width: 100%;
  aspect-ratio: 9/16;
  min-width: 220px;
  max-width: 340px;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(16,24,40,0.10);
  background: transparent;
  display: block;
}
/* Ensure three videos in a row for Fiction Factory */
.fiction-tiktok-row-3 {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
@media (max-width: 1100px) {
  .fiction-tiktok-row-3 {
    gap: 1rem;
  }
}
@media (max-width: 900px) {
  .fiction-tiktok-row-3 {
    flex-wrap: wrap;
    gap: 1rem;
  }
}
.highlight-bg {
  display: inline-block;
  position: relative;
  padding: 0.2em 0.6em;
}
.highlight-bg::before {
  content: "";
  position: absolute;
  left: -50%;
  top: 57%;
  width: 200%;
  height: 2.6em;
  transform: translateY(-50%);
  background: url('../assets/images/visual-assets/aa-highlight.png') no-repeat center/cover;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
}
.highlight-bg h2 {
  position: relative;
  z-index: 1;
}

.hcw-highlight-bg {
  display: inline-block;
  position: relative;
  padding: 0.2em 0.6em;
}
.hcw-highlight-bg::before {
  content: "";
  position: absolute;
  left: -50%;
  top: 57%;
  width: 200%;
  height: 2.6em;
  transform: translateY(-50%);
  background: url('../assets/images/visual-assets/hcw-highlight.png') no-repeat center/cover;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
}
.hcw-highlight-bg h2 {
  position: relative;
  z-index: 1;
}


@media (max-width: 640px) {
  .arrow { height: 64px; }
  .arrow::after { border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 7px solid #333; }
}
.authorized-flow {
  margin: 6px 6px 3rem 0;
  text-align: center;
}
.flow-title {
  font-size: 1.6rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.flow-title em { font-style: italic; }

.top-video .video-wrapper,
.flow-item .video-wrapper {
  max-width: 840px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Flow layout */
.flow-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Small flow arrows between items (thin vertical line with triangular tip) */

/* Make .arrow match .blurb-arrow size and style */
.arrow {
  width: 2px;
  height: 96px;
  background: #333;
  margin: 1.5rem auto;
  position: relative;
  border-radius: 1px;
}
.arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #333;
}

/* Remove arrow shrinking on small screens so all arrows stay large */
@media (max-width: 640px) {
  /* .arrow stays full size */
}

/* Fade-in animation for items */
.flow-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
  width: 100%;
}
.flow-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Row-style flow entries: left text, right image */
.flow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 960px;
  width: 96%;
  margin: 1rem auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
  box-sizing: border-box;
}
.flow-row.visible { opacity: 1; transform: translateY(0); }
.flow-left { flex: 1 1 auto; text-align: left; }
.flow-left h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.flow-left p { margin: 0; color: #333; line-height: 1.4; }
.flow-right { flex: 0 0 360px; max-width: 360px; }
.placeholder-img { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; color: #888 }
.placeholder-img img { width: 100%; height: 100%; object-fit: scale-down; display: block; }

/* Video in .placeholder-img size for flow-right videos */
.flow-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

@media (max-width: 820px) {
  .flow-row {
    flex-direction: column;
    align-items: stretch;
    max-width: 98vw;
    width: 99%;
    margin-left: 1vw;
    margin-right: 1vw;
  }
  .flow-right { flex: 0 0 auto; width: 100%; max-width: 100%; }
  .placeholder-img { height: 160px; }
  .arrow { margin: 0.75rem auto; }
}
@media (max-width: 640px) {
  .flow-row {
    max-width: 100vw;
    width: 95%;
    margin-left: 8vw;
    margin-right: 8vw;
  }
}

/* Small screens */
@media (max-width: 640px) {
  .video-wrapper { max-width: 100%; padding: 0 1rem; box-sizing: border-box; }
  .flow-title { font-size: 1.25rem; }
}

/* Blurb under top video */
.video-blurb {
  max-width: 840px;
  margin: 1rem auto 0;
  padding: 0 1rem;
  box-sizing: border-box;
  text-align: left;
}
.blurb-text {
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Thin arrow connector from blurb down to flow title */
.blurb-arrow {
  width: 2px;
  height: 96px; /* restored length */
  background: #666;
  margin: 1.5rem auto; /* restored gap */
  position: relative;
  border-radius: 1px;
}
.blurb-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #666;
}

@media (max-width: 640px) {
  .blurb-arrow, .arrow { height: 64px; }
  .blurb-arrow::after, .arrow::after { border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 7px solid #666; }
}

/* Page-specific arrow colors 
body[data-page="authorized-account.html"] .blurb-arrow {
  background: #e8741c;
}
body[data-page="authorized-account.html"] .blurb-arrow::after {
  border-top-color: #e8741c;
  border-left-color: transparent;
  border-right-color: transparent;
}

body[data-page="how-crime-works.html"] .blurb-arrow {
  background: #000;
}
body[data-page="how-crime-works.html"] .blurb-arrow::after {
  border-top-color: #000;
  border-left-color: transparent;
  border-right-color: transparent;
}

/* Page-specific colors for flow arrows 
body[data-page="authorized-account.html"] .arrow { background: #e8741c; }
body[data-page="authorized-account.html"] .arrow::after { border-top-color: #e8741c; }

body[data-page="how-crime-works.html"] .arrow { background: #000; }
body[data-page="how-crime-works.html"] .arrow::after { border-top-color: #000; }
*/
/* TikTok section styles */
.tiktok-section { max-width: 980px; margin: 2rem auto; padding: 0 1rem; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; }
.tiktok-section .flow-title { text-align: center; }
.tiktok-grid { display: flex; gap: 1rem; align-items: center; justify-content: center; width: 100%; }
.tiktok-embed { flex: 1 1 420px; }
.tiktok-list { flex: 1 1 360px; }
.tiktok-table { width: 100%; border-collapse: collapse; }
.tiktok-table th, .tiktok-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #eee; }
.tiktok-table thead th { font-weight: 600; }
.btn { display: inline-block; padding: 0.4rem 0.6rem; background: #1a73e8; color: #fff; text-decoration: none; border-radius: 4px; font-size: 0.95rem; }

/* Make TikTok table buttons wider, prevent label wrapping, and center text vertically */
.tiktok-table .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.45rem 0.9rem;
  min-width: 150px;
  line-height: 1;
}

@media (max-width: 480px) {
  .tiktok-table .btn { white-space: normal; min-width: auto; }
}

/* Desktop: make title column wider so long titles fit in two lines */
@media (min-width: 1000px) {
  .tiktok-table { table-layout: fixed; }
  .tiktok-table th:first-child, .tiktok-table td:first-child { width: 30%; }
  .tiktok-table th:nth-child(2), .tiktok-table td:nth-child(2) { width: 14%; white-space: nowrap; }
  .tiktok-table th:nth-child(3), .tiktok-table td:nth-child(3) { width: 20%; text-align: right; }
}

/* Smaller screens: allow natural wrapping */
@media (max-width: 999px) {
  .tiktok-table { table-layout: auto; }
  .tiktok-table th:first-child, .tiktok-table td:first-child { width: auto; }
  .tiktok-table th:nth-child(2), .tiktok-table td:nth-child(2) { width: auto; white-space: normal; }
  .tiktok-table th:nth-child(3), .tiktok-table td:nth-child(3) { width: auto; text-align: left; }
}

@media (max-width: 820px) {
  .tiktok-grid { flex-direction: column; }
  .tiktok-embed, .tiktok-list { width: 100%; }
}

/* (replaced) Subtle divider — unified below */

/* Fiction Factory section styles and divider to TikTok */
.fiction-section { max-width: 980px; margin: 2rem auto; padding: 0 1rem; box-sizing: border-box; text-align: center; }
.fiction-section .flow-title { text-align: center; }
/* (replaced) Fiction divider unified below */

/* Instagram embed fixes: constrain width, preserve aspect, and prevent horizontal stretching */
.instagram-embed { max-width: 540px; margin: 0 auto; display: block; }
.instagram-embed blockquote { width: 100% !important; max-width: 540px !important; box-sizing: border-box; }
.instagram-embed img, .instagram-embed video, .instagram-embed iframe { width: 100% !important; height: auto !important; object-fit: cover !important; }
.instagram-embed .instagram-media, .instagram-embed blockquote { aspect-ratio: 9/16; }

/* Unified subtle divider between sections (centered and constrained) */
.fiction-section + .tiktok-section::before,
.tiktok-section + .authorized-flow::before {
  content: "";
  display: block;
  height: 1px;
  background: #ececec;
  max-width: 980px;
  width: 100%;
  margin: 1.5rem auto;
}

/* Ensure fiction divider uses same visual as tiktok/shorts divider */
.fiction-section + .tiktok-section::before {
  background: #ececec;
}

/* Fixed pager bar at bottom so arrows don't overlap content */
:root { --pager-height: 64px; }
.pager {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--pager-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid #e6e6e6;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.03);
  z-index: 999;
}
.pager a { margin: 0 0.75rem; }

/* Ensure page content has enough bottom padding so it isn't hidden behind the pager */
main.container,
.authorized-flow,
.tiktok-section,
.fiction-section {
  padding-bottom: calc(var(--pager-height) + 1rem);
}

@media (max-width: 480px) {
  :root { --pager-height: 72px; }
  .pager { height: var(--pager-height); }
  main.container, .authorized-flow, .tiktok-section, .fiction-section { padding-bottom: calc(var(--pager-height) + 1rem); }
}
