/* ==========================================================================
   Drama Online — Redesigned Single Actor Profile (/actors/<slug>/) v2.0
   Luxury Dark Cinema Aesthetic (#0b0f19 + #f5c16c Gold) — RTL Native
   ========================================================================== */

.do-actor-page {
  --do-gold: #f5c16c;
  --do-gold-2: #dca042;
  --do-gold-soft: rgba(245, 193, 108, 0.14);
  --do-gold-border: rgba(245, 193, 108, 0.34);
  --do-surface: rgba(16, 22, 36, 0.86);
  --do-card-bg: #111827;
  --do-border: rgba(255, 255, 255, 0.08);
  --do-text: #f8fafc;
  --do-muted: #94a3b8;
  direction: rtl;
  padding: 4px calc(var(--bs-gutter-x, 1.5rem) * 0.5) 60px;
}

body.single-actors .site-content.mt-4 {
  margin-top: 1.15rem !important;
}

/* ---------- Cinematic Blurred-Backdrop Star Hero ---------- */
.do-ap-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 28px 28px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #101727 0%, #0a0f1c 100%);
  border: 1px solid rgba(245, 193, 108, 0.16);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.45);
}

.do-ap-hero-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center 20%;
  filter: blur(44px) saturate(135%);
  opacity: 0.16;
  pointer-events: none;
  transform: scale(1.08);
}

.do-ap-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 260px at 88% 0%, rgba(245, 193, 108, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(11, 15, 25, 0.45) 0%, rgba(11, 15, 25, 0.90) 100%);
  pointer-events: none;
}

.do-ap-hero-inner {
  position: relative;
  z-index: 2;
}

.do-ap-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--do-muted);
  margin-bottom: 20px;
}
.do-ap-breadcrumb a {
  color: var(--do-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.do-ap-breadcrumb a:hover { color: var(--do-gold); }
.do-ap-breadcrumb .sep { opacity: 0.45; }
.do-ap-breadcrumb .current { color: var(--do-gold); font-weight: 600; }

.do-ap-stage {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Portrait Box */
.do-ap-portrait-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #0d1322;
  border: 2px solid rgba(245, 193, 108, 0.30);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.do-ap-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.do-ap-portrait-gender {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.do-ap-portrait-gender.is-female {
  background: rgba(244, 114, 182, 0.24);
  border-color: rgba(244, 114, 182, 0.5);
  color: #fbcfe8;
}
.do-ap-portrait-gender.is-male {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.46);
  color: #bae6fd;
}

/* Star Dossier Info */
.do-ap-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.do-ap-kicker-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.do-ap-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--do-gold-soft);
  border: 1px solid var(--do-gold-border);
  color: var(--do-gold);
  font-size: 12px;
  font-weight: 700;
}

.do-ap-orig-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
}

.do-ap-title {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
}
.do-ap-title span {
  background: linear-gradient(120deg, #ffffff 40%, #f5c16c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Facts Cards Row */
.do-ap-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.do-ap-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
a.do-ap-fact:hover {
  border-color: rgba(245, 193, 108, 0.4);
  background: rgba(245, 193, 108, 0.08);
}

.do-ap-fact-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 193, 108, 0.12);
  border: 1px solid rgba(245, 193, 108, 0.24);
  color: #f5c16c;
  flex: 0 0 34px;
}

.do-ap-fact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.do-ap-fact-label {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.25;
}
.do-ap-fact-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.do-ap-fact-val.is-gold { color: #f5c16c; }

/* Biography Box */
.do-ap-bio-card {
  padding: 15px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.do-ap-bio-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #f5c16c;
}

.do-ap-bio-text {
  font-size: 14px;
  line-height: 1.85;
  color: #cbd5e1;
}
.do-ap-bio-text p { margin: 0 0 8px; }
.do-ap-bio-text p:last-child { margin-bottom: 0; }
.do-ap-bio-text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.do-ap-bio-toggle {
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 193, 108, 0.3);
  background: rgba(245, 193, 108, 0.09);
  color: #f5c16c;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* Aliases Chips */
.do-ap-aliases {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.do-ap-aliases-label {
  font-size: 11.5px;
  color: #94a3b8;
  margin-left: 4px;
}
.do-ap-alias-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11.5px;
}

/* ---------- Section Headers ---------- */
.do-ap-section {
  margin-top: 30px;
}

.do-ap-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.do-ap-sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}
.do-ap-sec-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(180deg, #f5c16c, #dca042);
  box-shadow: 0 0 12px rgba(245, 193, 108, 0.45);
}

.do-ap-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(245, 193, 108, 0.16);
  border: 1px solid rgba(245, 193, 108, 0.34);
  color: #f5c16c;
  font-size: 12.5px;
  font-weight: 800;
}

.do-ap-sec-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.do-ap-works-search {
  position: relative;
  width: 230px;
  max-width: 100%;
}
.do-ap-works-search svg {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
}
.do-ap-works-search input {
  width: 100%;
  height: 36px !important;
  padding: 0 34px 0 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: rgba(16, 22, 36, 0.9) !important;
  color: #f8fafc !important;
  font-size: 12.5px !important;
  font-family: inherit;
  outline: none;
}
.do-ap-works-search input:focus {
  border-color: rgba(245, 193, 108, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(245, 193, 108, 0.12) !important;
}

.do-ap-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(245, 193, 108, 0.10);
  border: 1px solid rgba(245, 193, 108, 0.28);
  color: #f5c16c !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.do-ap-more-link:hover {
  background: #f5c16c;
  color: #0b0f19 !important;
}

/* ---------- Luxury Local Drama Works Grid (matches /genre/ & /episodes/) ---------- */
.do-actor-page .do-drama-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 18px 16px;
  width: 100%;
}
@media (max-width: 1279.98px) {
  .do-actor-page .do-drama-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 991.98px) {
  .do-actor-page .do-drama-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px 12px; }
}
@media (max-width: 575.98px) {
  .do-actor-page .do-drama-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 10px; }
}

.do-actor-page .do-drama-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--do-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}
.do-actor-page .do-drama-card.is-hidden { display: none !important; }
.do-actor-page .do-drama-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 193, 108, 0.44);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.52);
}
.do-actor-page .do-drama-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}
.do-actor-page .do-drama-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  overflow: hidden;
  background: #0b101d;
}
.do-actor-page .do-drama-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.do-actor-page .do-drama-card:hover .do-drama-poster img { transform: scale(1.06); }
.do-actor-page .do-drama-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.35) 0%, transparent 32%, transparent 56%, rgba(11, 15, 25, 0.94) 100%);
  pointer-events: none;
}
.do-actor-page .do-drama-badge-top-r {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 193, 108, 0.42);
  color: #f5c16c;
}
.do-actor-page .do-drama-badge-top-r.is-status {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}
.do-actor-page .do-drama-badge-top-l {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}
.do-actor-page .do-drama-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 193, 108, 0.94);
  color: #0b0f19;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.do-actor-page .do-drama-card:hover .do-drama-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.do-actor-page .do-drama-poster-meta {
  position: absolute;
  bottom: 8px;
  right: 9px;
  left: 9px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.do-actor-page .do-drama-country { color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.do-actor-page .do-drama-eps { color: #f5c16c; flex-shrink: 0; }
.do-actor-page .do-drama-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px 12px;
  flex: 1 1 auto;
}
.do-actor-page .do-drama-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s ease;
}
.do-actor-page .do-drama-card:hover .do-drama-title { color: #f5c16c; }
.do-actor-page .do-drama-ar {
  font-size: 12px;
  color: #b4c0d2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 16px;
}
.do-actor-page .do-drama-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #94a3b8;
}
.do-actor-page .do-drama-tag-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.do-actor-page .do-drama-views { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- TMDB Global Credits Filmography Grid ---------- */
.do-ap-credits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 767.98px) {
  .do-ap-credits-grid { grid-template-columns: 1fr; }
}

.do-ap-credit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--do-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
a.do-ap-credit-card:hover {
  border-color: rgba(245, 193, 108, 0.42);
  background: rgba(245, 193, 108, 0.07);
  transform: translateY(-2px);
}

.do-ap-credit-poster {
  width: 56px;
  height: 82px;
  flex: 0 0 56px;
  border-radius: 9px;
  overflow: hidden;
  background: #0c1220;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.do-ap-credit-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.do-ap-credit-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.do-ap-credit-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.do-ap-credit-card:hover .do-ap-credit-title { color: #f5c16c; }

.do-ap-credit-role {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.do-ap-credit-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
}
.do-ap-credit-yr {
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-weight: 700;
}
.do-ap-credit-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #f5c16c;
  font-weight: 700;
}
.do-ap-credit-watch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Other Actors Carousel ---------- */
.do-ap-carousel-wrap {
  position: relative;
}

.do-ap-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.do-ap-carousel-track::-webkit-scrollbar { display: none; }

.do-ap-mini-actor {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  border-radius: 13px;
  overflow: hidden;
  background: var(--do-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.do-ap-mini-actor:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 193, 108, 0.42);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.do-ap-mini-portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
  background: #0c1220;
}
.do-ap-mini-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transition: transform 0.35s ease;
}
.do-ap-mini-actor:hover .do-ap-mini-portrait img { transform: scale(1.06); }

.do-ap-mini-name {
  padding: 9px 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.do-ap-mini-actor:hover .do-ap-mini-name { color: #f5c16c; }

.do-ap-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(245, 193, 108, 0.28);
  background: rgba(16, 22, 36, 0.9);
  color: #f5c16c;
  cursor: pointer;
  transition: all 0.18s ease;
}
.do-ap-nav-btn:hover {
  background: #f5c16c;
  color: #0b0f19;
}

.do-ap-empty {
  text-align: center;
  padding: 36px 20px;
  border-radius: 14px;
  background: var(--do-surface);
  border: 1px solid var(--do-border);
  color: var(--do-muted);
  font-size: 14px;
}

/* ---------- Responsive Mobile / Tablet ---------- */
@media (max-width: 991.98px) {
  .do-ap-stage {
    grid-template-columns: 195px minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767.98px) {
  .do-actor-page { padding: 4px 12px 44px; }
  .do-ap-hero { padding: 18px 16px 20px; border-radius: 15px; margin-bottom: 22px; }
  .do-ap-stage {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .do-ap-portrait-wrap {
    max-width: 210px;
    margin: 0 auto;
  }
  .do-ap-kicker-row { justify-content: center; }
  .do-ap-title { text-align: center; }
  .do-ap-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .do-ap-works-search { width: 100%; }
  .do-ap-sec-tools { width: 100%; }
  .do-ap-mini-actor { flex: 0 0 128px; }
}
