/* صفحه‌ی فیلم — woocommerce/content-single-product.php */
.tf-page{
  --bg:var(--tf-c-navy); --surface:var(--tf-c-navy-2); --surface-2:rgba(255,255,255,0.05);
  --teal-light:var(--tf-c-slate); --orange:var(--tf-c-orange); --orange-light:var(--tf-c-orange-light);
  --text:#ffffff; --text-muted:var(--tf-c-slate); --line: rgba(255,255,255,0.1);
  background:var(--bg); color:var(--text); font-family:'Vazirmatn','Tahoma',sans-serif;
  line-height:1.9; overflow-x:hidden; margin-top:-1px;
}
.tf-page *{box-sizing:border-box;}
.tf-page h1,.tf-page h2{font-family:'Vazirmatn','Tahoma',sans-serif !important;color:var(--text) !important;}
.tf-page .tf-mono{font-family:Consolas,Monaco,'Vazirmatn',monospace;letter-spacing:0.5px;}
.tf-wrap{max-width:1180px;margin:0 auto;padding:0 24px;}

/* ===================== بالای صفحه: مسیر، تیتر، برچسب‌ها ===================== */
.tf-film{padding:34px 0 0;}
.tf-film-crumbs{display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;font-size:13.5px;color:var(--text-muted);margin-bottom:18px;}
.tf-film-crumbs::before{content:'●';color:var(--tf-c-red);font-size:10px;margin-inline-end:4px;}
.tf-film-crumbs a{color:var(--text-muted);text-decoration:none;}
.tf-film-crumbs a:hover{color:var(--orange-light);}
.tf-film-crumbs .sep{opacity:.45;}
.tf-film-crumbs [aria-current]{color:var(--tf-c-mist);}

.tf-film-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px 32px;flex-wrap:wrap;margin-bottom:26px;}
.tf-film-head h1{margin:0;font-size:var(--tf-h1);font-weight:800;line-height:1.3;}
.tf-film-subtitle{margin:8px 0 0;font-size:17px;color:var(--tf-c-mist);}
.tf-film-tags{display:flex;flex-wrap:wrap;gap:8px;}
.tf-film-tags a{display:inline-block;font-size:13px;padding:6px 14px;border:1px solid var(--line);border-radius:999px;color:var(--tf-c-mist);text-decoration:none;transition:.2s;}
.tf-film-tags .is-cat a{border-color:rgba(217,138,61,.55);color:var(--orange-light);}
.tf-film-tags a:hover{border-color:var(--orange-light);color:var(--orange-light);}

/* ===================== قاب اصلی + نوار رسانه ===================== */
/* ۴:۳ — عکس‌های سایت ۸۰۰×۶۰۰ هستند؛ ویدیوی ۱۶:۹ داخل همین قاب با نوار بالا/پایین می‌نشیند */
.tf-film-frame{position:relative;aspect-ratio:4/3;background:#050a12;border:1px solid var(--line);overflow:hidden;}
.tf-film-frame iframe,.tf-film-frame video{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#000;}
.tf-film-frame.type-image{background:#050a12;}
.tf-film-zoom{display:block;width:100%;padding:0;margin:0;border:0;background:none;cursor:zoom-in;}
.tf-film-frame .tf-film-zoom{height:100%;}
.tf-film-frame .tf-film-zoom img{width:100%;height:100%;object-fit:contain;display:block;}

.tf-film-strip-wrap{position:relative;margin-top:10px;}
/* اسکرول‌بار مخفی — جابه‌جایی با فلش‌ها، چرخ ماوس/ترک‌پد یا کشیدن انگشت */
.tf-film-strip{display:flex;gap:10px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior-x:contain;}
.tf-film-strip::-webkit-scrollbar{display:none;}
/* محو شدن لبه‌ای که پشتش عکس بیشتری هست */
.tf-film-strip-wrap::before,
.tf-film-strip-wrap::after{content:'';position:absolute;top:0;bottom:0;width:56px;pointer-events:none;opacity:0;transition:opacity .2s;z-index:1;}
.tf-film-strip-wrap::before{inset-inline-start:0;background:linear-gradient(to left,var(--bg),transparent);}
.tf-film-strip-wrap::after{inset-inline-end:0;background:linear-gradient(to right,var(--bg),transparent);}
.tf-film-strip-wrap:dir(ltr)::before{background:linear-gradient(to right,var(--bg),transparent);}
.tf-film-strip-wrap:dir(ltr)::after{background:linear-gradient(to left,var(--bg),transparent);}
.tf-film-strip-wrap.can-prev::before,
.tf-film-strip-wrap.can-next::after{opacity:1;}
.tf-film-strip-nav{
  position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:34px;height:34px;padding:0;
  display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;
  background:rgba(5,10,18,.85);border:1px solid rgba(255,255,255,.2);color:#fff;transition:background .2s,border-color .2s;
}
.tf-film-strip-nav[hidden]{display:none;}
.tf-film-strip-nav:hover{background:var(--orange);border-color:var(--orange);color:var(--tf-c-ink);}
.tf-film-strip-nav svg{width:16px;height:16px;display:block;}
.tf-film-strip-nav.is-prev{inset-inline-start:6px;}
.tf-film-strip-nav.is-next{inset-inline-end:6px;}
.tf-film-strip-nav:dir(ltr) svg{transform:scaleX(-1);}
.tf-film-strip button{flex:0 0 112px;aspect-ratio:4/3;position:relative;padding:0;border:1px solid var(--line);background:var(--surface);cursor:pointer;overflow:hidden;opacity:.72;transition:opacity .2s,border-color .2s;}
.tf-film-strip button:hover{opacity:1;}
.tf-film-strip button.is-active{opacity:1;border-color:var(--orange);box-shadow:inset 0 -3px 0 var(--orange);}
.tf-film-strip img{width:100%;height:100%;object-fit:cover;display:block;}
.tf-film-strip-play{position:absolute;inset:0;margin:auto;width:28px;height:28px;border-radius:50%;background:rgba(5,10,18,.7);pointer-events:none;}
.tf-film-strip-play::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-35%,-50%);border-style:solid;border-width:6px 0 6px 10px;border-color:transparent transparent transparent #fff;}

/* ===================== نوار مشخصات (کلاکت) ===================== */
.tf-film-slate{margin-top:26px;background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--orange);} /* خط نارنجی برند، مثل جدول عوامل */
/* خطوطِ بینِ خانه‌ها با box-shadow هر خانه، نه پس‌زمینه‌ی ظرف — تا خانه‌های خالیِ ردیفِ آخر خاکستری نشن */
.tf-film-slate dl{margin:0;display:grid;grid-template-columns:repeat(var(--tf-slate-cols,4),minmax(0,1fr));gap:1px;overflow:hidden;} /* تعداد ستون = min(تعداد، ۴) از قالب */
.tf-film-spec{background:var(--surface);box-shadow:0 0 0 1px var(--line);padding:18px 22px;min-width:0;}
.tf-film-spec dt{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-muted);margin:0 0 6px;}
.tf-film-spec-icon{flex:0 0 auto;display:inline-flex;}
.tf-film-spec-icon svg{width:16px;height:16px;color:var(--orange-light);display:block;}
.tf-film-spec dd{margin:0;font-size:19px;font-weight:700;color:var(--text);line-height:1.5;overflow-wrap:anywhere;}
.tf-film-spec.is-logo .tf-film-spec-icon img{width:30px;height:30px;object-fit:contain;background:#fff;border-radius:6px;padding:3px;display:block;}
.tf-film-spec.is-logo dt{margin-bottom:8px;}

/* ===================== توضیحات ===================== */
.tf-film-desc{margin-top:46px;}
.tf-film-desc-body{font-size:16px;line-height:2.1;color:var(--tf-c-mist);}
.tf-film-desc-body p{margin:0 0 16px;}
.tf-film-desc-body p:last-child{margin-bottom:0;}
.tf-film-desc-body strong{color:var(--text);}
.tf-film-desc-body img{max-width:100%;height:auto;}
.tf-film-desc.is-collapsed .tf-film-desc-body{max-height:340px;overflow:hidden;-webkit-mask-image:linear-gradient(180deg,#000 70%,transparent);mask-image:linear-gradient(180deg,#000 70%,transparent);}
.tf-film-desc-toggle{margin-top:14px;background:none;border:0;padding:0;font:inherit;font-size:14.5px;font-weight:600;color:var(--orange-light);cursor:pointer;}
.tf-film-desc-toggle:hover{text-decoration:underline;}

/* ===================== عوامل ===================== */
.tf-film-credits h2{margin:0 0 18px;font-size:22px;font-weight:800;line-height:1.3;} /* هم‌اندازه‌ی «پروژه‌های مشابه» */
.tf-film-credits dl{margin:0;display:grid;gap:1px;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--orange);}
.tf-film-credits dl > div{background:var(--surface);box-shadow:0 0 0 1px var(--line);}
.tf-film-credits dt{font-size:12.5px;color:var(--text-muted);}
.tf-film-credits dd{margin:0;font-size:15.5px;font-weight:700;color:var(--text);}

/* دسکتاپ: عوامل سمت راست، قاب و نوار رسانه سمت چپ (ستون‌های grid در RTL از راست شروع می‌شن) */
@media(min-width:961px){
  .tf-film-top.has-credits{display:grid;grid-template-columns:minmax(300px,5fr) minmax(0,7fr);grid-template-areas:"credits stage";gap:0 36px;align-items:start;}
  .tf-film-top.has-credits .tf-film-stage{grid-area:stage;padding-top:calc(var(--tf-h2) * 1.3 + 18px);} /* هم‌تراز با بالای کادر عوامل، زیر تیتر «عوامل» */
  .tf-film-top.has-credits .tf-film-credits{grid-area:credits;}
  .tf-film-credits dl > div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:14px 18px;}
  .tf-film-credits dt{margin:0;flex:0 0 auto;}
  .tf-film-credits dd{text-align:left;}
}

/* تبلت و موبایل: ظرف ردیف بالا حذف می‌شه (display:contents) و عوامل مثل قبل بعد از توضیحات میاد */
@media(max-width:960px){
  .tf-film-main{display:flex;flex-direction:column;}
  .tf-film-top{display:contents;}
  .tf-film-credits{order:1;margin-top:46px;}
  .tf-film-credits dl{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));}
  .tf-film-credits dl > div{padding:16px 20px;}
  .tf-film-credits dt{margin:0 0 4px;}
}

/* ===================== رسانه‌های پروژه ===================== */
.tf-film-media{margin:70px 0 0;}
.tf-film-media h2{margin:0 0 18px;font-size:var(--tf-h2);font-weight:800;}

.tf-lightbox.is-single .tf-lightbox-nav{display:none;}

@media(max-width:640px){
  .tf-film{padding-top:22px;}
  .tf-film-head{margin-bottom:18px;}
  .tf-film-subtitle{font-size:15px;}
  .tf-film-strip button{flex-basis:88px;}
  .tf-film-slate dl{grid-template-columns:repeat(2,1fr);}
  .tf-film-slate dl > div:last-child:nth-child(odd){grid-column:1 / -1;}
  .tf-film-spec{padding:14px 16px;}
  .tf-film-spec dd{font-size:16px;}
  .tf-film-credits dl{grid-template-columns:1fr;}
  .tf-film-credits dl > div{display:flex;justify-content:space-between;gap:16px;align-items:baseline;padding:13px 16px;}
  .tf-film-credits dt{margin:0;}
  .tf-film-credits dd{text-align:left;}
  .tf-film-media{margin:50px 0 0;}
}

/* هر رسانه یک کارت جدا با فاصله و حاشیه‌ی داخلی */
.tf-pv-video-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.tf-pv-video-grid-item{
  background:var(--surface);min-width:0;padding:12px;border:1px solid var(--line);border-radius:8px;
  display:flex;flex-direction:column;transition:border-color .2s;
}
.tf-pv-video-grid-item:hover{border-color:rgba(217,138,61,.45);}
.tf-pv-video-grid-item > iframe,.tf-pv-video-grid-item > video,.tf-pv-video-grid-item > img,.tf-pv-video-grid-item > .tf-video-facade{border-radius:5px;overflow:hidden;}
/* ۴:۳ مثل عکس‌های سایت (۸۰۰×۶۰۰) تا همه‌ی خانه‌های گرید هم‌قد باشند؛ عکس کامل پر می‌کند،
   ویدیوی ۱۶:۹ با contain بریده نمی‌شود (نوار بالا/پایین) */
.tf-pv-video-grid-item iframe,.tf-pv-video-grid-item video,.tf-pv-video-grid-item img{width:100%;display:block;aspect-ratio:4/3;background:#000;border:0;object-fit:cover;}
.tf-pv-video-grid-item video{object-fit:contain;}
.tf-pv-video-grid-item .cap{padding:16px 6px 6px;}
.tf-pv-video-grid-item h3{margin:0;font-size:15px;font-weight:700;color:var(--text);}
.tf-pv-video-grid-item .sub{margin:4px 0 0;font-size:11px;color:var(--text-muted);opacity:.8;}
.tf-pv-video-grid-item .desc{margin:8px 0 0;font-size:13px;color:var(--text-muted);line-height:1.7;}

.tf-video-facade{width:100%;aspect-ratio:4/3;background:#000;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.tf-video-facade-play{
  width:52px;height:52px;border-radius:50%;background:var(--orange);color:var(--tf-c-ink);
  display:flex;align-items:center;justify-content:center;font-size:18px;transition:.2s;
}
.tf-video-facade:hover .tf-video-facade-play{background:var(--orange-light);transform:scale(1.08);}
@media(max-width:860px){.tf-pv-video-grid{grid-template-columns:1fr 1fr !important;gap:16px;}}
@media(max-width:560px){.tf-pv-video-grid{grid-template-columns:1fr !important;gap:14px;}.tf-pv-video-grid-item{padding:10px;}}

.tf-lightbox{
  display:none;position:fixed;inset:0;z-index:9999;background:rgba(11,31,58,0.92);
  align-items:center;justify-content:center;padding:40px;cursor:zoom-out;
}
.tf-lightbox.open{display:flex;}
.tf-lightbox img{max-width:100%;max-height:100%;display:block;border:1px solid var(--line);}
.tf-lightbox-close{
  position:absolute;top:20px;left:20px;width:42px;height:42px;border-radius:50%;
  background:rgba(255,255,255,0.1);border:none;color:#fff;font-size:22px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.tf-lightbox-nav{
  position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;
  background:rgba(255,255,255,0.1);border:none;color:#fff;font-size:22px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:.2s;
}
.tf-lightbox-nav:hover{background:var(--orange);color:var(--tf-c-ink);}
.tf-lightbox-prev{right:20px;}
.tf-lightbox-next{left:20px;}

/* ===================== پروژه‌های مشابه ===================== */
.tf-related{padding:0 0 90px;}
/* فاصله از توضیحات + جداکننده‌ی محو (وسط پررنگ، دو طرف محو) */
.tf-related > .tf-wrap{position:relative;padding-top:48px;margin-top:64px;}
.tf-related > .tf-wrap::before{content:'';position:absolute;top:0;left:24px;right:24px;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.16) 20%,rgba(217,138,61,.45) 50%,rgba(255,255,255,.16) 80%,transparent);}
.tf-related-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:30px;flex-wrap:wrap;}
.tf-related-head h2{margin:0;line-height:1.3;} /* بدون margin پیش‌فرض تا «مشاهده همه» هم‌خط تیتر بنشیند */
.tf-related-head .eyebrow{font-size:13px;color:var(--text-muted);margin-bottom:10px;display:flex;gap:12px;align-items:center;}
.tf-related-head .eyebrow b{color:var(--orange-light);font-family:Consolas,Monaco,monospace;}
.tf-related-head h2{font-size:22px;font-weight:800;}
.tf-related-all{color:var(--orange-light);font-size:14px;text-decoration:none;white-space:nowrap;}
.tf-related-all:hover{text-decoration:underline;}

/* بخش نظرات/امتیازدهی ووکامرس — هماهنگ با تم تیره، تو یه کادر مشخص */
.tf-pv-reviews-wrap{margin:60px 0 80px;}
.tf-pv-reviews{
  color:var(--text-muted);font-size:14.5px;
  background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:32px;
}
.tf-pv-reviews p{font-size:14.5px;margin:0 0 12px;}
.tf-pv-reviews #reviews_title,
.tf-pv-reviews .comment-reply-title,
.tf-pv-reviews #comment-nav-above{font-size:18px;font-weight:800;color:var(--text) !important;margin-bottom:20px;}
.tf-pv-reviews .commentlist{list-style:none;padding:0;margin:0 0 30px;}
.tf-pv-reviews .commentlist .comment{
  background:var(--bg);border:1px solid var(--line);border-radius:3px;padding:18px 20px;margin-bottom:10px;
}
.tf-pv-reviews .commentlist .comment:last-child{margin-bottom:0;}
.tf-pv-reviews .comment-text{color:var(--text-muted);font-size:14px;}
.tf-pv-reviews .comment-text p{font-size:14px;margin:8px 0 0;}
.tf-pv-reviews .woocommerce-review__author{color:var(--text);font-weight:700;font-size:14.5px;}
.tf-pv-reviews .woocommerce-review__dash{display:none;}
.tf-pv-reviews .woocommerce-review__published-date{color:var(--text-muted);font-size:12.5px;}
.tf-pv-reviews .woocommerce-review__published-date::before{content:':  در تاریخ ';}
.tf-pv-reviews .star-rating{color:var(--orange);font-size:14px;}
.tf-pv-reviews .star-rating::before{color:rgba(255,255,255,0.2);}
.tf-pv-reviews .star-rating span::before{color:var(--orange-light);}
.tf-pv-reviews p.stars a{color:var(--orange-light);}
.tf-pv-reviews .comment-form-rating label,
.tf-pv-reviews .comment-form-comment label,
.tf-pv-reviews .comment-form-author label,
.tf-pv-reviews .comment-form-email label{color:var(--text-muted);font-size:13.5px;display:block;margin-bottom:6px;}
.tf-pv-reviews input[type="text"],
.tf-pv-reviews input[type="email"],
.tf-pv-reviews textarea{
  width:100%;background:var(--bg);border:1px solid var(--line);border-radius:2px;
  padding:12px 16px;color:var(--text);font-family:'Vazirmatn','Tahoma',sans-serif;font-size:14.5px;
}
.tf-pv-reviews textarea{min-height:120px;}
.tf-pv-reviews .form-submit input[type="submit"]{
  background:var(--orange);color:var(--tf-c-ink);border:none;padding:13px 30px;border-radius:2px;
  font-family:'Vazirmatn','Tahoma',sans-serif;font-weight:700;font-size:14px;cursor:pointer;
}
.tf-pv-reviews .form-submit input[type="submit"]:hover{background:var(--orange-light);}
.tf-pv-reviews p.comment-notes,
.tf-pv-reviews p.comment-form-cookies-consent{font-size:13px;color:var(--text-muted);}
.tf-pv-reviews .woocommerce-noreviews{color:var(--text-muted);}

.tf-poster-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:1px;border:1px solid var(--line);}
.tf-poster-card{background:var(--surface);display:block;text-decoration:none;color:inherit;transition:.25s;}
.tf-poster-card:hover{background:var(--surface-2);}
.tf-poster-card .thumb{position:relative;aspect-ratio:4/3;overflow:hidden;}
.tf-poster-card .thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:.3s;}
.tf-poster-card:hover .thumb img{transform:scale(1.05);}
.tf-poster-duration{
  position:absolute;top:8px;left:8px;background:rgba(11,31,58,.85);color:var(--text);
  font-size:11px;font-family:Consolas,Monaco,monospace;padding:3px 7px;border-radius:3px;letter-spacing:.4px;
}
.tf-poster-card .cap{padding:14px 16px;}
.tf-poster-card h3{font-size:13.5px;font-weight:700;margin:0;color:var(--text);}
.tf-poster-tag{display:inline-block;margin-top:6px;font-size:11px;color:var(--text-muted);}

@media(max-width:960px){
  .tf-poster-grid{grid-template-columns:repeat(3,1fr);}
}
@media(max-width:640px){
  .tf-poster-grid{grid-template-columns:repeat(2,1fr);}
}
