/*
Theme Name: یاشار فیلم
Theme URI: https://yasharfilme.ir
Author: جرشا نعمتی
Author URI: https://t.me/jarsha_nemati
Description: قالب حرفه‌ای عکاسی و فیلمبرداری یاشار فیلم | طراحی شده برای وردپرس و المنتور
Version: 1.0
License: GPL v2 or later
Text Domain: yasharfilm
*/

/* ══════════════════════════════════════════════════
   یاشار فیلم — استایل اصلی
══════════════════════════════════════════════════ */

:root {
  --clr-bg:        #0a0a0a;
  --clr-surface:   #111111;
  --clr-surface2:  #181818;
  --clr-border:    rgba(255,255,255,0.08);
  --clr-white:     #f5f0eb;
  --clr-white-60:  rgba(245,240,235,0.6);
  --clr-white-30:  rgba(245,240,235,0.3);
  --clr-gold:      #c9a96e;
  --clr-gold-dim:  rgba(201,169,110,0.15);
  --clr-rose:      #d4a5a5;
  --ff-fa:         'Vazirmatn', sans-serif;
  --ff-display:    'Playfair Display', serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.5rem;
  --fs-xl:   2rem;
  --fs-2xl:  2.8rem;
  --fs-hero: clamp(2.6rem, 8vw, 6rem);
  --radius-sm: 4px;
  --radius:    10px;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --z-loader: 9999;
  --z-nav:    1000;
  --z-canvas: 1;
  --z-hero-content: 10;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--clr-bg);
  color: var(--clr-white);
  font-family: var(--ff-fa);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  direction: rtl;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-gold); border-radius: 2px; }

/* ═══════ LOADER ═══════ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader);
  transition: opacity 0.6s, visibility 0.6s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.loader-lens {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--clr-gold);
  display: flex; align-items: center; justify-content: center;
  animation: lensPulse 2s ease-in-out infinite;
}
.loader-aperture {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--clr-white-60);
  animation: apertureClose 2s ease-in-out infinite;
}
@keyframes lensPulse {
  0%, 100% { transform: scale(1); border-color: var(--clr-gold); }
  50% { transform: scale(1.06); border-color: var(--clr-rose); }
}
@keyframes apertureClose {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(0.4) rotate(180deg); }
}
.loader-text {
  font-family: var(--ff-fa);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--clr-white);
}
.loader-bar {
  width: 160px; height: 1px;
  background: var(--clr-border);
  overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-rose));
  width: 0%;
  animation: loaderFill 1.8s var(--ease-out) forwards;
}
@keyframes loaderFill { to { width: 100%; } }

/* ═══════ NAVIGATION ═══════ */
#navbar {
  position: fixed; top: 0; right: 0; left: 0;
  z-index: var(--z-nav);
  padding: 1.25rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s, padding 0.4s;
}
#navbar.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--clr-border);
}
.nav-logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-fa { font-weight: 700; font-size: var(--fs-md); color: var(--clr-white); }
.logo-en {
  font-family: var(--ff-display);
  font-size: var(--fs-xs);
  color: var(--clr-gold);
  letter-spacing: 0.12em;
}
.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-white-60);
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -3px; right: 0;
  width: 0; height: 1px;
  background: var(--clr-gold);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--clr-white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--clr-white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════ HERO ═══════ */
.section-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#webgl-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: var(--z-canvas);
}
.hero-content {
  position: relative;
  z-index: var(--z-hero-content);
  text-align: center;
  padding: 0 1.5rem;
  max-width: 800px;
}
.hero-eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  color: var(--clr-gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
}
.hero-title {
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
}
.hero-title .accent-text {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  color: var(--clr-gold);
}
.hero-sub {
  font-size: var(--fs-md);
  color: var(--clr-white-60);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(16px);
}
.btn-primary {
  display: inline-block;
  padding: 0.875rem 2.5rem;
  border: 1px solid var(--clr-gold);
  color: var(--clr-gold);
  font-family: var(--ff-fa);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
  transition: background 0.3s, color 0.3s;
  opacity: 0;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--clr-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.btn-primary:hover::before { transform: scaleX(1); transform-origin: left; }
.btn-primary:hover { color: var(--clr-bg); }

.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  z-index: var(--z-hero-content);
}
.hero-scroll-hint span {
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  color: var(--clr-white-30);
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--clr-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

/* ═══════ STORY ═══════ */
.section-story { padding: 6rem 0; }
.story-track { display: flex; flex-direction: column; gap: 0; }
.story-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90vh;
  overflow: hidden;
}
.story-panel--reverse { direction: ltr; }
.story-panel--reverse .story-panel-text { direction: rtl; }
.story-panel-img { position: relative; overflow: hidden; }
.story-panel-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 0.8s var(--ease-out);
}
.story-panel:hover .story-panel-img img { transform: scale(1.04); }
.panel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.story-panel-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem 4rem;
  background: var(--clr-surface);
  position: relative; overflow: hidden;
}
.story-panel-text::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, var(--clr-gold-dim) 0%, transparent 60%);
  pointer-events: none;
}
.panel-number {
  font-family: var(--ff-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--clr-gold-dim);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}
.story-panel-text h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  position: relative;
}
.story-panel-text p {
  font-size: var(--fs-md);
  color: var(--clr-white-60);
  line-height: 2;
  position: relative;
  max-width: 38ch;
}

/* ═══════ SHARED ═══════ */
.section { position: relative; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 0.75rem;
}
.section-title { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.2; }

/* ═══════ SERVICES ═══════ */
.section-services { padding: 7rem 0; background: var(--clr-surface); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  border: 1.5px solid var(--clr-border);
}
.service-card {
  background: var(--clr-bg);
  padding: 2.5rem 2rem;
  border: 1px solid var(--clr-border);
  transition: background 0.35s, border-color 0.35s;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--clr-rose), var(--clr-gold));
  transition: width 0.45s var(--ease-out);
}
.service-card:hover { background: var(--clr-surface2); border-color: rgba(201,169,110,0.25); }
.service-card:hover::after { width: 100%; }
.service-icon {
  width: 48px; height: 48px;
  color: var(--clr-gold);
  margin-bottom: 1.25rem;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { font-size: var(--fs-md); font-weight: 700; margin-bottom: 0.75rem; }
.service-card p { font-size: var(--fs-sm); color: var(--clr-white-60); line-height: 1.9; }

/* ═══════ GALLERY ═══════ */
.section-gallery { padding: 7rem 0; }
.gallery-masonry {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 1.5rem;
}
.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 3/2;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.7s var(--ease-out), filter 0.4s;
  filter: brightness(0.85) saturate(0.9);
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1.05);
}
.gallery-caption {
  position: absolute; bottom: 0; right: 0; left: 0;
  padding: 2rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-white);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }

/* ═══════ ABOUT ═══════ */
.section-about { padding: 7rem 0; background: var(--clr-surface); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}
.about-img-wrap { position: relative; }
.about-img-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(20%);
}
.about-badge {
  position: absolute; bottom: -1.5rem; left: -1.5rem;
  background: var(--clr-gold);
  color: var(--clr-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.badge-num { display: block; font-size: var(--fs-2xl); font-weight: 900; line-height: 1; }
.badge-label { font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.06em; }
.about-text { display: flex; flex-direction: column; gap: 1.25rem; }
.about-text h2 { font-size: var(--fs-xl); font-weight: 700; line-height: 1.4; }
.about-badge-line {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--clr-gold);
  flex-wrap: wrap;
}
.medal { font-size: 1.25rem; }
.manager-name { color: var(--clr-white-60); }
.about-text p { color: var(--clr-white-60); line-height: 2; font-size: var(--fs-md); }
.about-stats {
  display: flex; gap: 2.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--clr-border);
  padding-top: 1.5rem;
}
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num { font-size: var(--fs-xl); font-weight: 900; color: var(--clr-gold); line-height: 1; }
.stat-label { font-size: var(--fs-xs); color: var(--clr-white-60); letter-spacing: 0.06em; }

/* ═══════ CONTACT ═══════ */
.section-contact { padding: 7rem 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}
.contact-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-card {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
a.contact-card:hover {
  border-color: var(--clr-gold);
  background: var(--clr-surface2);
  transform: translateX(-4px);
}
.contact-card.no-link { cursor: default; }
.contact-icon {
  font-size: 1.5rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-gold-dim);
  border-radius: 50%;
  flex-shrink: 0;
}
.contact-info { display: flex; flex-direction: column; gap: 0.2rem; }
.contact-label { font-size: var(--fs-xs); color: var(--clr-gold); letter-spacing: 0.08em; }
.contact-value { font-size: var(--fs-sm); font-weight: 500; color: var(--clr-white); word-break: break-word; }

.contact-map { display: flex; flex-direction: column; gap: 0.75rem; }
.map-wrapper {
  width: 100%; height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  filter: invert(90%) hue-rotate(180deg) contrast(0.85) saturate(0.7);
}
.map-link-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--clr-white-60);
  transition: color 0.3s, border-color 0.3s;
  align-self: flex-start;
}
.map-link-btn:hover { color: var(--clr-gold); border-color: var(--clr-gold); }

/* ═══════ FOOTER ═══════ */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-align: center;
}
.footer-brand { font-size: var(--fs-lg); font-weight: 700; color: var(--clr-white); margin-bottom: 0.5rem; }
.footer-copy { font-size: var(--fs-xs); color: var(--clr-white-30); }
.footer-credit { font-size: var(--fs-xs); color: var(--clr-white-30); margin-top: 0.25rem; }
.designer-link { color: var(--clr-gold); transition: color 0.2s; }
.designer-link:hover { color: var(--clr-rose); }

/* ══════════════════════════════════════════════════
   افکت لایت‌باکس
══════════════════════════════════════════════════ */
@keyframes fadeInLB {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ══════════════════════════════════════════════════
   RESPOSIVE
══════════════════════════════════════════════════ */

/* ─── عکس مدیریت در موبایل ─── */
@media (max-width: 768px) {
  .about-img-wrap img {
    aspect-ratio: 4/5 !important;
    max-height: 500px !important;
    object-fit: cover !important;
    width: 100% !important;
  }
  
  .about-grid {
    gap: 2rem !important;
  }
  
  .about-badge {
    bottom: -0.5rem !important;
    left: -0.5rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  .badge-num {
    font-size: var(--fs-lg) !important;
  }
  
  .story-panel-img img {
    border-radius: 16px !important;
  }
  
  .gallery-item img {
    border-radius: 14px !important;
  }
}

/* ─── دکمه‌های لایت‌باکس در موبایل ─── */
@media (max-width: 480px) {
  #custom-lightbox button {
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
  }
  
  #custom-lightbox button:first-child {
    top: 12px !important;
    left: 12px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
  
  #custom-lightbox img {
    max-width: 95vw !important;
    max-height: 75vh !important;
  }
  
  .story-panel-img img {
    border-radius: 12px !important;
  }
  
  .gallery-item img {
    border-radius: 10px !important;
  }
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-img-wrap img { aspect-ratio: 3/2; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --fs-hero: clamp(2rem, 10vw, 3.5rem); }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 280px;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 2rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-left: 1px solid var(--clr-border);
    z-index: calc(var(--z-nav) - 1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: var(--fs-lg); color: var(--clr-white); }
  .story-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .story-panel-img { aspect-ratio: 16/9; }
  .story-panel--reverse { direction: rtl; }
  .story-panel-text { padding: 3rem 1.5rem; }
  .panel-number { font-size: 3rem; }
  .story-panel-text h2 { font-size: var(--fs-lg); }
  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1rem;
  }
  .services-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 1.5rem; flex-wrap: wrap; }
  .map-wrapper { height: 260px; }
  #navbar { padding: 1rem 1.25rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .section-services, .section-gallery, .section-about, .section-contact { padding: 4rem 0; }
  .section-title { font-size: var(--fs-xl); }
  .about-badge { bottom: -1rem; left: -0.75rem; padding: 1rem 1.25rem; }
  .badge-num { font-size: var(--fs-xl); }
  .gallery-masonry { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}