/*
Theme Name: StreamVid Child
Theme URI: https://streamvid.jwsuperthemes.com
Template: streamvid
Author: the JWSThemes team
Author URI: https://jwsuperthemes.com
Description: Child theme for the Arabic short-drama presentation of StreamVid.
Tags: one-column,flexible-header,accessibility-ready,custom-colors,custom-menu,custom-logo,editor-style,featured-images,footer-widgets,rtl-language-support,sticky-post,threaded-comments,translation-ready
Version: 8.0.5
*/

:root {
  --main: #8b67ff;
  --secondary: #f4b67c;
  --light: #ffffff;
  --dark: #050718;
  --heading: #f8f7ff;
  --body: #d0d1df;
  --body2: #a4a7bb;
  --bodybg: #07091b;
  --btn-bgcolor: #8b67ff;
  --btn-color: #ffffff;
  --btn-bgcolor2: #6e7cff;
  --btn-color2: #ffffff;
  --btn-bgcolor3: #7053ea;
  --input-background: #14172b;
  --input-background2: #20243a;
  --background-item: #11152b;
  --background-body: #07091b;
  --border-color: rgba(255,255,255,.09);
  --border-color2: rgba(255,255,255,.2);
  --sv-bg: #07091b;
  --sv-surface: #10142a;
  --sv-accent: #8b67ff;
  --sv-accent-soft: #b9a5ff;
  --sv-muted: #a4a7bb;
  --sv-white: #f8f7ff;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body,
button,
input,
select,
textarea { font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { background: var(--sv-bg); color: var(--sv-white); }
body.rtl { text-align: right; }
body a { color: inherit; }
body a:hover { color: var(--sv-accent-soft); }

/* A calm, centered logo with the StreamVid off-canvas trigger on the right and search on the left. */
#masthead { position: relative; z-index: 80; }
#masthead .elementor-74 .elementor-element-d530df6 {
  position: relative;
  min-height: 72px;
  background: rgba(7,9,27,.92);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#masthead .elementor-74 .elementor-element-d530df6 > .e-con-inner,
#masthead .elementor-74 .elementor-element-d530df6 > .elementor-container {
  position: relative;
  width: 100%;
  min-height: 72px;
  max-width: none;
  padding-inline: clamp(16px, 3.5vw, 46px);
}
#masthead .elementor-74 .elementor-element-a2e163c { position: static !important; width: 100%; }
#masthead .elementor-74 .elementor-element-bc2a4f8 {
  position: absolute !important;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: auto !important;
  max-width: 42vw;
  transform: translate(-50%, -50%);
}
#masthead .elementor-74 .elementor-element-bc2a4f8 img,
#masthead .elementor-74 .elementor-element-8e64d5a img { width: auto; max-height: 38px; object-fit: contain; }
#masthead .elementor-74 .elementor-element-a452315 {
  position: absolute !important;
  z-index: 10;
  right: 14px;
  top: 50%;
  display: flex !important;
  align-items: center;
  transform: translateY(-50%);
}
#masthead .elementor-74 .elementor-element-d80906f {
  position: absolute !important;
  z-index: 10;
  left: 14px;
  top: 50%;
  display: flex !important;
  align-items: center;
  width: auto !important;
  transform: translateY(-50%);
}
#masthead .elementor-74 .elementor-element-a452315 .elementor-widget-container,
#masthead .elementor-74 .elementor-element-d80906f .elementor-widget-container { margin: 0; }
#masthead .elementor-74 .elementor-element-a452315 button,
#masthead .elementor-74 .elementor-element-d80906f button,
#masthead .elementor-74 .elementor-element-d80906f .jws-search-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-white);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: rgba(255,255,255,.045);
}
#masthead .elementor-74 .elementor-element-4c65899,
#masthead .elementor-74 .elementor-element-e0445b2,
#masthead .elementor-74 .elementor-element-cfed217,
#masthead .elementor-74 .elementor-element-af287fb { display: none !important; }
#masthead .elementor-74 .elementor-element-a452315 .jws-offcanvas,
#masthead .elementor-74 .elementor-element-a452315 .jws-menu-toggle { cursor: pointer; }

#masthead .elementor-74 .elementor-element-d80906f .jws-search-form { overflow: visible; }
#masthead .elementor-74 .elementor-element-d80906f form.searchform {
  position: relative;
  display: block;
  width: 42px !important;
  height: 42px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#masthead .elementor-74 .elementor-element-d80906f input.s {
  position: absolute !important;
  z-index: 120;
  top: calc(100% + 9px);
  left: 0;
  width: min(280px, calc(100vw - 76px)) !important;
  height: 46px;
  padding: 0 14px;
  color: var(--sv-white) !important;
  border: 1px solid rgba(255,255,255,.17) !important;
  border-radius: 12px !important;
  outline: none;
  background: #11152b !important;
  direction: rtl;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
#masthead .elementor-74 .elementor-element-d80906f form.sv-search-open input.s {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#masthead .elementor-74 .elementor-element-d80906f .searchsubmit {
  position: absolute !important;
  z-index: 121;
  top: 0;
  left: 0;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--sv-white) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.045) !important;
}
#masthead .elementor-74 .elementor-element-d80906f input.s::placeholder { color: #aaaec4; opacity: 1; }

/* Homepage hero and rails. */
.sv-home-main { direction: rtl; overflow: clip; background: var(--sv-bg); }
.sv-home-shell { width: min(1440px, calc(100% - 56px)); margin-inline: auto; }
.sv-home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 56vw, 720px);
  overflow: hidden;
  background: radial-gradient(ellipse at 76% 28%, #38255f 0%, #11152f 40%, #07091b 78%);
}
.sv-home-hero__image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.sv-home-hero__shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,9,27,.08) 0%, rgba(7,9,27,.34) 40%, rgba(7,9,27,.96) 100%), linear-gradient(0deg, rgba(7,9,27,.78), transparent 42%);
}
.sv-home-hero__content { width: min(700px, 100%); padding: clamp(36px, 6vw, 84px); }
.sv-home-hero__eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; color: #d3c7ff; font-size: 14px; font-weight: 700; }
.sv-home-hero__eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--sv-accent); box-shadow: 0 0 16px rgba(139,103,255,.75); }
.sv-home-hero h1 { max-width: 680px; margin: 0 0 14px; color: var(--sv-white); font-size: clamp(34px, 5.3vw, 64px); font-weight: 800; line-height: 1.2; }
.sv-home-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; color: #dedced; font-size: 14px; }
.sv-home-hero__meta span { padding: 5px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.07); }
.sv-home-hero__description { max-width: 570px; margin: 0 0 26px; color: #d5d5e1; font-size: 16px; line-height: 1.9; }
.sv-home-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sv-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 20px; border-radius: 12px; font-weight: 800; text-decoration: none !important; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.sv-button:hover { transform: translateY(-2px); }
.sv-button--primary { color: #fff !important; background: linear-gradient(135deg, #9a7aff, #7351e8); box-shadow: 0 10px 30px rgba(111,75,227,.28); }
.sv-button--quiet { color: #f4f2ff !important; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.055); }
.sv-button__play { font-size: 12px; }
.sv-home-empty { min-height: 340px; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 40px 24px; text-align: center; }
.sv-home-empty h1 { margin: 0; font-size: clamp(30px, 5vw, 52px); }
.sv-home-empty p { color: var(--sv-muted); }

.sv-home-section { padding-top: 28px; }
.sv-home-section__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sv-home-section__heading h2 { margin: 0; color: var(--sv-white); font-size: clamp(20px, 2.4vw, 27px); font-weight: 800; line-height: 1.4; }
.sv-home-section__heading > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; color: #c7baff; font-size: 14px; font-weight: 700; text-decoration: none; }
.sv-home-section__heading > a:hover { color: #fff; }
.sv-home-section__note { color: var(--sv-muted); font-size: 13px; }
.sv-home-rail { width: 100%; overflow-x: auto; overflow-y: hidden; direction: rtl; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sv-home-rail::-webkit-scrollbar { display: none; }
.sv-home-rail__track { display: flex; flex-direction: row; align-items: flex-start; gap: 14px; width: max-content; min-width: 100%; padding: 2px 1px 10px; }
.sv-drama-card { flex: 0 0 clamp(132px, 16vw, 196px); width: clamp(132px, 16vw, 196px); min-width: 0; scroll-snap-align: start; }
.sv-drama-card__poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: #14172b; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.sv-drama-card__poster > img,
.sv-drama-card__poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.sv-drama-card__poster:hover img { transform: scale(1.04); }
.sv-drama-card__poster .jws-post-image,
.sv-drama-card__poster .post-image,
.sv-drama-card__poster .post-media { width: 100%; height: 100%; }
.sv-drama-card__copy { padding: 10px 2px 0; }
.sv-drama-card__copy h3 { display: -webkit-box; overflow: hidden; margin: 0; color: var(--sv-white); font-size: 15px; font-weight: 700; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sv-drama-card__copy h3 a { color: inherit; text-decoration: none; }
.sv-drama-card__copy p { margin: 3px 0 0; color: var(--sv-muted); font-size: 12px; line-height: 1.5; }
.sv-home-shell > .sv-home-section:last-child { padding-bottom: 52px; }
.sv-history-progress { position: absolute; right: 10px; bottom: 11px; left: 10px; z-index: 3; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.46); }
.sv-history-progress i { display: block; height: 100%; border-radius: inherit; background: #9b7aff; }
.sv-history-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #fff; font-size: 16px; opacity: 0; background: rgba(6,8,23,.34); transition: opacity .2s ease; }
.sv-drama-card--history .sv-drama-card__poster:hover .sv-history-play { opacity: 1; }

/* Focused Arabic genre landing pages. */
.sv-category-page { min-height: 65vh; padding: clamp(30px, 5vw, 66px) 0 70px; direction: rtl; }
.sv-category-page__intro { margin-bottom: 30px; }
.sv-category-page__eyebrow { margin: 0 0 8px; color: #b8a6ff; font-size: 14px; font-weight: 700; }
.sv-category-page__intro h1 { margin: 0 0 10px; color: var(--sv-white); font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.sv-category-page__intro p:last-child { max-width: 720px; margin: 0; color: var(--sv-muted); line-height: 1.8; }
.sv-category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 16px; }
.sv-category-grid .sv-drama-card { width: 100%; }
.sv-category-pagination { margin-top: 34px; }
.sv-category-pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sv-category-pagination .page-numbers { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--sv-surface); }
.sv-category-pagination .page-numbers.current { color: #fff; border-color: var(--sv-accent); background: var(--sv-accent); }
.sv-category-empty { padding: 42px 18px; border: 1px solid var(--border-color); border-radius: 16px; color: var(--sv-muted); background: var(--sv-surface); }

/* Gentle spacing and Arabic labels on existing StreamVid drama/player screens; player markup stays untouched. */
body.single-drama .jws-category-extra a,
body.single-drama_ep .jws-category-extra a { border-radius: 999px; }
body.single-drama .jws-category-extra,
body.single-drama_ep .jws-category-extra { direction: rtl; }
body.single-drama .jws-comment-form,
body.single-drama_ep .jws-comment-form { border-radius: 16px; }

@media (max-width: 1024px) {
  .sv-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sv-home-hero { min-height: 500px; }
  .sv-home-hero__content { width: min(620px, 100%); }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 74px; }
  #masthead .elementor-74 .elementor-element-d530df6,
  #masthead .elementor-74 .elementor-element-d530df6 > .e-con-inner,
  #masthead .elementor-74 .elementor-element-d530df6 > .elementor-container { min-height: 66px; }
  #masthead .elementor-74 .elementor-element-bc2a4f8 img,
  #masthead .elementor-74 .elementor-element-8e64d5a img { max-height: 32px; max-width: 132px; }
  #masthead .elementor-74 .elementor-element-a452315 { right: 10px; }
  #masthead .elementor-74 .elementor-element-d80906f { left: 10px; }
  #masthead .elementor-74 .elementor-element-a452315 button,
  #masthead .elementor-74 .elementor-element-d80906f button,
  #masthead .elementor-74 .elementor-element-d80906f .jws-search-icon { width: 40px; height: 40px; min-width: 40px; }
  .sv-home-shell { width: calc(100% - 32px); }
  .sv-home-hero { min-height: 525px; align-items: flex-end; }
  .sv-home-hero__image { object-position: center 24%; }
  .sv-home-hero__shade { background: linear-gradient(0deg, rgba(7,9,27,1) 0%, rgba(7,9,27,.83) 24%, rgba(7,9,27,.12) 74%), linear-gradient(270deg, rgba(7,9,27,.3), transparent); }
  .sv-home-hero__content { width: 100%; padding: 30px 20px 34px; }
  .sv-home-hero__eyebrow { margin-bottom: 11px; }
  .sv-home-hero h1 { margin-bottom: 10px; font-size: clamp(30px, 9vw, 42px); }
  .sv-home-hero__meta { gap: 7px; margin-bottom: 12px; font-size: 12px; }
  .sv-home-hero__description { margin-bottom: 18px; font-size: 14px; line-height: 1.75; }
  .sv-button { min-height: 45px; padding: 9px 15px; border-radius: 11px; font-size: 14px; }
  .sv-home-section { padding-top: 24px; }
  .sv-home-section__heading { margin-bottom: 13px; }
  .sv-home-section__heading h2 { font-size: 20px; }
  .sv-home-section__heading > a { gap: 5px; font-size: 12px; }
  .sv-home-section__note { max-width: 42%; font-size: 11px; text-align: left; }
  .sv-home-rail__track { gap: 11px; }
  .sv-drama-card { flex-basis: clamp(126px, 38vw, 158px); width: clamp(126px, 38vw, 158px); }
  .sv-drama-card__poster { border-radius: 12px; }
  .sv-drama-card__copy { padding-top: 8px; }
  .sv-drama-card__copy h3 { font-size: 14px; }
  .sv-drama-card__copy p { font-size: 11px; }
  .sv-category-page { padding-top: 32px; }
  .sv-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .sv-category-grid .sv-drama-card { width: 100%; }
  .sv-home-shell > .sv-home-section:last-child { padding-bottom: 38px; }
}

@media (max-width: 360px) {
  .sv-home-shell { width: calc(100% - 24px); }
  .sv-home-hero { min-height: 500px; }
  .sv-drama-card { flex-basis: 122px; width: 122px; }
  .sv-home-section__heading h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
