/*
Theme Name: سينما محلية (Local Cinema)
Theme URI: https://example.com
Author:
Description: قالب ووردبريس أنيق لعرض الأفلام المحلية، يدعم رفع الفيديو مباشرة وتقسيم الفيلم إلى أجزاء متعددة تُعرض في نفس الصفحة، بتصميم داكن سينمائي فاخر.
Version: 2.0
Text Domain: local-cinema
*/

/* =========================================
   Design tokens
   ========================================= */
:root {
  --bg: #0d0d10;
  --surface: #17171b;
  --surface-raised: #1e1e23;
  --border: #29292f;
  --text: #f3f1ec;
  --text-muted: #98968d;
  --gold: #d9a94f;
  --gold-soft: #e8c47f;
  --gold-dim: #a97f36;
  --radius: 8px;
  --radius-lg: 16px;
  --font-display: 'Rakkas', serif;
  --font-body: 'Tajawal', sans-serif;
  --maxw: 1180px;
  --shadow: 0 18px 40px rgba(0,0,0,0.45);
  --ease: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(217,169,79,0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   Header
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13,13,16,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(217,169,79,0.18), rgba(217,169,79,0.04));
  border: 1px solid rgba(217,169,79,0.35);
  font-size: 17px;
}

.site-title {
  display: block;
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--gold-soft);
  letter-spacing: 0.5px;
}

.site-tagline {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* =========================================
   Hero (featured movie)
   ========================================= */
.hero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: flex-end;
  background-color: var(--surface);
  background-size: cover;
  background-position: center;
  margin-bottom: 64px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(13,13,16,0.98) 8%, rgba(13,13,16,0.6) 50%, rgba(13,13,16,0.15) 100%),
    linear-gradient(to left, rgba(13,13,16,0.15), transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 54px 0 50px;
  max-width: 660px;
  animation: rise .7s var(--ease) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--text);
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.hero-excerpt {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 54ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-dim));
  color: #1a1408;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 10px 24px rgba(217,169,79,0.18);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(217,169,79,0.28);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Movie grid
   ========================================= */
.section-heading {
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--text);
  margin: 0 0 28px;
  padding-right: 16px;
  border-right: 3px solid var(--gold);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

@media (max-width: 900px) {
  .movie-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.movie-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217,169,79,0.45);
  box-shadow: var(--shadow);
}

.movie-card .poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface-raised);
}

.movie-card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.movie-card:hover .poster img { transform: scale(1.06); }

.poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #1a1408;
  background: rgba(217,169,79,0.92);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: auto;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  padding-inline-start: 3px;
}

.movie-card:hover .poster-play { opacity: 1; transform: scale(1); }

.movie-card .card-body {
  padding: 14px 16px 18px;
}

.movie-card .movie-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.movie-card .movie-meta {
  color: var(--text-muted);
  font-size: 12.5px;
}

.empty-state {
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 46px;
  text-align: center;
  margin-bottom: 64px;
}

/* =========================================
   Single movie page
   ========================================= */
.movie-single { padding: 44px 0 76px; max-width: 920px; }

.movie-single .movie-title-full {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  margin: 0 0 26px;
  color: var(--text);
}

.movie-single .movie-views {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.movie-single .movie-views .views-icon {
  font-size: 15px;
  opacity: .8;
}

.player-wrap {
  margin-bottom: 34px;
}

.movie-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.part-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s var(--ease);
}

.part-btn:hover {
  color: var(--text);
  border-color: rgba(217,169,79,0.4);
}

.part-btn.active {
  color: #1a1408;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-dim));
  border-color: transparent;
}

.player-wrap video {
  width: 100%;
  display: block;
  max-height: 640px;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-single .movie-desc {
  color: var(--text-muted);
  max-width: 72ch;
  font-size: 15.5px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.movie-single .movie-desc p:first-child { margin-top: 0; }

.no-video-note {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  padding: 30px;
  text-align: center;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
