/*
Theme Name: RahFilm | FilmWay
Theme URI: https://filmway.ir
Author: RahFilm
Description: Custom WordPress theme for RahFilm (FilmWay) platform.
Version: 1.0
Text Domain: rahfilm-filmway
*/

/* =========================================
   Base / Reset
   ========================================= */

:root {
  --rf-bg-light: #ffffff;
  --rf-text-dark: #111111;
  --rf-text-soft: #5f6670;
  --rf-white: #ffffff;
  --rf-accent: #F97316;
  --rf-brand-dark: #173F4F;
  --rf-brand-mid: #5D7084;
  --rf-header-z: 9998;
  --rf-menu-z: 9999;
}

@font-face{
  font-family:'Doran';
  src:url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Regular.ttf') format('truetype');
  font-weight:400;
}

@font-face{
  font-family:'DoranFaNum';
  src:url('/wp-content/themes/rahfilm-filmway/assets/fonts/DoranFaNum-Regular.ttf') format('truetype');
  font-weight:400;
}

@font-face{
  font-family:'DoranFaNum';
  src:url('/wp-content/themes/rahfilm-filmway/assets/fonts/DoranFaNum-Bold.ttf') format('truetype');
  font-weight:700;
}

@font-face{
  font-family:'DoranFaNum';
  src:url('/wp-content/themes/rahfilm-filmway/assets/fonts/DoranFaNum-ExtraBold.ttf') format('truetype');
  font-weight:800;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Thin.ttf') format('truetype');
  font-weight: 100;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Light.ttf') format('truetype');
  font-weight: 300;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Medium.ttf') format('truetype');
  font-weight: 500;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-Bold.ttf') format('truetype');
  font-weight: 700;
}

@font-face {
  font-family: 'Doran';
  src: url('/wp-content/themes/rahfilm-filmway/assets/fonts/Doran-ExtraBold.ttf') format('truetype');
  font-weight: 800;
}
html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  direction: rtl;
  text-align: right;
  font-family: 'Doran', sans-serif;
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

a {
  text-decoration: none;
}

.container,
.rf-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================
   Generic Sections / Buttons
   ========================================= */

section {
  padding: 80px 0;
}

.hero {
  background: #ffffff;
  color: #111111;
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero-buttons a {
  display: inline-block;
  margin: 10px;
  padding: 12px 25px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.hero-buttons a:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--rf-accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--rf-brand-dark);
  color: var(--rf-brand-dark);
}

/* =========================================
   Header / Navigation Safety
   ========================================= */

header,
.site-header,
.rf-header,
nav,
.rf-nav,
.main-navigation,
.menu,
.menu > li {
  overflow: visible;
}

header,
.site-header,
.rf-header {
  position: relative;
  z-index: var(--rf-header-z);
}

/* =========================================
   Stable Dropdown Hover Area
   حل مشکل ناپدید شدن سریع زیرمنو
   ========================================= */

nav .menu-item-has-children {
  position: relative;
  padding-bottom: 22px;   /* افزایش ناحیه hover */
  margin-bottom: -22px;   /* جلوگیری از به‌هم‌ریختگی layout */
}

nav .menu-item-has-children > .sub-menu {
  position: absolute;
  top: calc(100% - 6px);  /* نزدیک‌تر کردن زیرمنو به والد */
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  list-style: none;
  display: none;
  z-index: var(--rf-menu-z);
}

/* باز ماندن زیرمنو روی hover/focus */
nav .menu-item-has-children:hover > .sub-menu,
nav .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

/* پل نامرئی بین والد و زیرمنو */
nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  height: 28px;
  background: transparent;
}

/* =========================================
   Optional submenu visual safety
   اگر استایل زیرمنو در هدر اصلی هست، این بخش فقط پایداری می‌دهد
   ========================================= */

nav .sub-menu li {
  margin: 0;
  padding: 0;
}

nav .sub-menu li a {
  display: block;
  white-space: nowrap;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 991px) {
  .hero {
    padding: 72px 0;
  }

  .hero h1 {
    font-size: 28px;
  }

  section {
    padding: 56px 0;
  }

  .container,
  .rf-container {
    width: calc(100% - 24px);
  }
}


body{
  font-weight:400;
}

h1,h2,h3,h4,h5{
  font-weight:800;
}

strong,b,
.rf-btn,
button{
  font-weight:700;
}

small,
.rf-muted{
  font-weight:300;
}



/* Global bilingual text direction */
html,
body {
  direction: rtl;
  unicode-bidi: isolate;
}

body {
  text-align: right;
}

*:where(p, li, a, span, div, h1, h2, h3, h4, h5, h6, button, label, input, textarea) {
  unicode-bidi: plaintext;
}

input,
textarea {
  direction: auto;
  text-align: start;
}

[dir="ltr"],
[lang="en"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

[dir="rtl"],
[lang="fa"],
[lang="ar"] {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
}

.rf-num,
.rf-num *{
  font-family:'DoranFaNum', sans-serif !important;
}
.rf-projectPopup__meta,
.rf-projectPopup__meta span,
.rf-projectBox__meta,
.rf-projectBox__code,
.rf-projectPopup__facts strong,
.rf-projectPopup__festival span{
  font-family:'DoranFaNum', sans-serif !important;
}
