/*
Theme Name: DarkFlix
Description: Ultimate cinematic WordPress theme – full image display (contain)
Version: 3.3
*/

/* === فونت وزیرمتن === */
@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700; font-display: swap;
}

/* === ریست === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: #050505;
    color: #fff;
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: #f5a623; text-decoration: none; transition: .3s; }
a:hover { color: #ffc107; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }

/* === ذرات پس‌زمینه === */
#particlesCanvas {
    position: fixed; top: 0; left: 0; z-index: -1;
    width: 100%; height: 100%; pointer-events: none;
}

/* === دکمه‌های نئونی === */
.btn, .btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 30px; border-radius: 40px; font-weight: bold;
    cursor: pointer; transition: all 0.3s ease; border: none;
    font-size: 1rem; position: relative; overflow: hidden;
}
.btn {
    background: linear-gradient(135deg, #f5a623 0%, #ff6b00 100%);
    color: #000; box-shadow: 0 0 20px rgba(245,166,35,0.5);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(245,166,35,0.8); }
.btn-outline {
    background: transparent; border: 2px solid #f5a623;
    color: #f5a623; box-shadow: 0 0 15px rgba(245,166,35,0.2);
}
.btn-outline:hover { background: #f5a623; color: #000; }

/* === هدر شیشه‌ای === */
.site-header {
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(30px);
    padding: 18px 0;
    border-bottom: 1px solid rgba(245,166,35,0.15);
    position: sticky; top: 0; z-index: 999;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    font-size: 2.5rem; filter: drop-shadow(0 0 12px #f5a623);
}
.logo-text {
    font-size: 1.9rem; font-weight: 700;
    background: linear-gradient(135deg, #f5a623, #ff8c00);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.main-nav .nav-menu { display: flex; list-style: none; gap: 2.5rem; }
.main-nav a {
    color: #ccc; font-weight: 500; position: relative;
    padding-bottom: 6px; transition: color 0.3s; font-size: 1.05rem;
}
.main-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: #f5a623; transition: width 0.3s;
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

/* دکمهٔ منوی موبایل */
.menu-toggle {
    display: none; background: none; border: none; color: #fff;
    font-size: 2.2rem; cursor: pointer; filter: drop-shadow(0 0 6px #f5a623);
}

/* جستجوی شناور */
.search-box { position: relative; }
.search-icon {
    background: none; border: none; color: #fff; font-size: 1.6rem;
    cursor: pointer; transition: transform 0.3s; filter: drop-shadow(0 0 6px #f5a623);
}
.search-icon:hover { transform: rotate(15deg) scale(1.15); }
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 1000;
    display: none; flex-direction: column; align-items: center; justify-content: center;
}
.search-overlay.active { display: flex; }
.search-overlay .close-search {
    position: absolute; top: 30px; right: 30px; background: none; border: none;
    color: #fff; font-size: 2.5rem; cursor: pointer; filter: drop-shadow(0 0 10px #f5a623);
}
.search-overlay form { width: 80%; max-width: 600px; }
.search-overlay input[type="search"] {
    width: 100%; padding: 20px; font-size: 1.8rem;
    background: transparent; border: none; border-bottom: 3px solid #f5a623;
    color: #fff; outline: none;
}

/* === اسلایدر (نمایش کامل تصویر با contain) === */
.hero-slider {
    width: 100%;
    height: 420px; /* ارتفاع ثابت */
    position: relative; overflow: hidden;
    border-radius: 0 0 40px 40px; margin-bottom: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    background-color: #000; /* پس‌زمینهٔ مشکی برای فضای خالی */
}
.slides-container { display: flex; height: 100%; transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); }
.slide {
    min-width: 100%; height: 100%;
    background-size: contain;       /* تصویر کامل دیده شود */
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #000;        /* پس‌زمینهٔ مشکی در صورت وجود فضای خالی */
    position: relative;
}
.slide::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, #000 5%, transparent 60%);
}
.slide-content {
    position: absolute; bottom: 40px; right: 60px; max-width: 600px;
    color: #fff; z-index: 2;
}
.slide-content h2 {
    font-size: 2.8rem; font-weight: 700; margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.slide-meta { color: #f5a623; margin-bottom: 20px; display: flex; gap: 25px; font-size: 1.2rem; }
.slide-desc { color: #ddd; margin-bottom: 25px; }
.slider-thumbs {
    position: absolute; bottom: 20px; left: 60px; display: flex; gap: 15px; z-index: 3;
}
.slider-thumbs img {
    width: 70px; height: 90px; object-fit: cover; border-radius: 10px;
    border: 2px solid transparent; cursor: pointer; transition: 0.3s; opacity: 0.6;
}
.slider-thumbs img.active { border-color: #f5a623; opacity: 1; transform: scale(1.15); box-shadow: 0 0 15px #f5a623; }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    background: rgba(0,0,0,0.7); border: none; color: #fff; font-size: 2.8rem;
    width: 60px; height: 60px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; box-shadow: 0 0 15px rgba(245,166,35,0.2);
}
.slider-arrow:hover { background: #f5a623; color: #000; }
.slider-arrow.right { right: 25px; }
.slider-arrow.left { left: 25px; }
.slider-progress {
    position: absolute; bottom: 0; left: 0; height: 4px; background: #f5a623;
    z-index: 3; transition: width 0.1s linear; box-shadow: 0 0 10px #f5a623;
}

/* === تب‌ها === */
.section-tabs {
    display: flex; gap: 15px; margin: 40px 0 25px;
    border-bottom: 1px solid #222; padding-bottom: 10px;
}
.tab-btn {
    background: none; border: none; color: #888; cursor: pointer;
    padding: 12px 30px; font-weight: 600; font-size: 1.15rem;
    position: relative; transition: all 0.3s;
}
.tab-btn.active { color: #f5a623; }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; background: #f5a623; border-radius: 3px;
    box-shadow: 0 0 10px #f5a623;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.6s; }

/* === کارت‌های فیلم (نمایش کامل تصویر با contain) === */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}
.movie-card {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(25px);
    border-radius: 28px; overflow: hidden; position: relative;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.movie-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 50px rgba(245,166,35,0.35);
    border-color: rgba(245,166,35,0.25);
}
.card-poster {
    position: relative;
    height: 300px;
    overflow: hidden;
    background-color: #000; /* پس‌زمینهٔ مشکی برای فضای خالی */
}
.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* کل تصویر نمایش داده شود */
    transition: transform 0.8s;
    background-color: #000;
}
.movie-card:hover .card-poster img { transform: scale(1.12); }
.card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    padding: 30px 20px; transform: translateY(100%);
    transition: transform 0.5s;
}
.movie-card:hover .card-overlay { transform: translateY(0); }
.imdb-badge {
    background: #f5a623; color: #000; font-weight: 700;
    padding: 6px 14px; border-radius: 25px; font-size: 0.9rem;
    margin-bottom: 15px; display: inline-block;
    box-shadow: 0 0 20px rgba(245,166,35,0.8);
}
.genre-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.genre-tags a {
    background: rgba(255,255,255,0.15); color: #fff; font-size: 0.8rem;
    padding: 4px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15);
    transition: 0.3s; backdrop-filter: blur(5px);
}
.genre-tags a:hover { background: #f5a623; color: #000; border-color: #f5a623; }
.play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 5rem; color: rgba(255,255,255,0.9); opacity: 0;
    transition: all 0.4s; text-shadow: 0 0 40px #f5a623, 0 0 80px #ff6b00;
    z-index: 2; pointer-events: none;
}
.movie-card:hover .play-icon { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.card-info { padding: 22px 18px; text-align: center; }
.card-info h3 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 600; }
.card-info h3 a { color: #fff; }
.year { color: #aaa; font-size: 0.95rem; }

/* === فوتر === */
.site-footer {
    background: #0a0a0a; border-top: 1px solid #222;
    padding: 40px 0; margin-top: 80px; text-align: center;
    color: #777; font-size: 0.95rem;
}

/* === انیمیشن‌ها === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(35px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === رسپانسیو (موبایل) === */
@media (max-width: 768px) {
    .hero-slider { height: 320px; }
    .slide-content { right: 20px; bottom: 20px; max-width: 90%; }
    .slide-content h2 { font-size: 2rem; }
    .main-nav .nav-menu {
        display: none; position: fixed; top: 0; right: 0; width: 280px; height: 100vh;
        background: rgba(10,10,10,0.96); backdrop-filter: blur(25px);
        flex-direction: column; padding: 80px 30px 30px; gap: 30px; z-index: 998;
        box-shadow: -5px 0 25px rgba(0,0,0,0.8);
    }
    .main-nav .nav-menu.active { display: flex; }
    .menu-toggle { display: block; z-index: 999; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .card-poster { height: 250px; }
    .play-icon { font-size: 3.5rem; }
}