/* =========================================================================
   SarayVision Global Stylesheet (Production Architecture for All Pages)
   ========================================================================= */

/* ۱. متغیرها و تنظیمات پایه سیستم (Reset & Base) */
:root { 
    --primary: #047857; 
    --primary-dark: #064e3b; 
    --bg: #f8fafc; 
    --text: #1e293b; 
    --white: #ffffff; 
    --border: #e2e8f0; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Vazirmatn', sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
    scroll-behavior: smooth; 
    position: relative; 
}

/* ۲. معماری هدر و منوی سرتاسری (Global Header Navigation) */
header { 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(10px); 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 100; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

.nav-container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 10px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap;
}

.logo img { 
    height: 45px; 
    width: auto;
    display: block;
}

.main-menu { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
    margin-right: 30px; 
}

.main-menu a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: bold; 
    font-size: 0.95rem; 
    transition: 0.3s; 
}

.main-menu a:hover { 
    color: var(--primary); 
}

/* دکمه‌های کنترل هویت دسکتاپ */
.btn-login { 
    background: var(--primary); 
    color: white; 
    padding: 10px 24px; 
    border-radius: 10px; 
    font-weight: bold; 
    cursor: pointer; 
    border: none; 
    font-family: inherit; 
    text-decoration: none; 
    display: inline-block; 
    text-align: center; 
    transition: 0.3s;
}

.btn-login:hover { 
    background: var(--primary-dark); 
}

.btn-logout { 
    color: #ef4444; 
    cursor: pointer; 
    font-size: 0.85rem; 
    background: none; 
    border: none; 
    font-family: inherit; 
    font-weight: bold; 
    margin-right: 15px;
}

#userInfo { 
    display: none; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 10px;
}

.user-name { 
    font-weight: bold; 
    color: var(--primary-dark); 
    font-size: 0.9rem; 
    margin-left: 5px; 
}

.wallet-badge { 
    background: #ecfdf5; 
    color: var(--primary-dark); 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-weight: bold; 
    border: 1px solid var(--primary); 
    font-size: 0.85rem; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.btn-upgrade { 
    background: var(--primary); 
    color: white; 
    padding: 4px 10px; 
    border-radius: 5px; 
    font-size: 0.75rem; 
    text-decoration: none; 
    transition: 0.3s; 
}

.btn-upgrade:hover { 
    background: var(--primary-dark); 
}

/* ۳. سیستم ناوبری همبرگری موبایل (Mobile Adaptive Sidebar) */
.mobile-menu-toggle { 
    display: none; 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    width: 55px; 
    height: 55px; 
    border-radius: 50%; 
    font-size: 22px; 
    cursor: pointer; 
    z-index: 1001; 
    box-shadow: 0 4px 15px rgba(4,120,87,0.3); 
    justify-content: center; 
    align-items: center; 
}

.sidebar-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.4); 
    z-index: 99; 
    backdrop-filter: blur(2px); 
}

.mobile-sidebar { 
    position: fixed; 
    top: 0; 
    right: 0; 
    height: 100vh; 
    width: 280px; 
    background: var(--white); 
    z-index: 100; 
    box-shadow: -5px 0 25px rgba(0,0,0,0.15); 
    transform: translateX(100%); 
    transition: transform 0.3s ease; 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.mobile-sidebar.open { 
    transform: translateX(0); 
}

/* اصلاح شد: پنهان شدن دکمه بستن در دسکتاپ */
.close-sidebar-btn { 
    display: none; 
    width: 100%;
    text-align: left; 
    background: none; 
    border: none; 
    color: #ef4444; 
    font-size: 20px; 
    cursor: pointer; 
    font-weight: bold; 
    margin-bottom: 15px;
}

.mobile-menu-links { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    margin-top: 10px; 
    border-bottom: 1px dashed var(--border); 
    padding-bottom: 20px; 
}

.mobile-menu-links a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: bold; 
    font-size: 1rem; 
}

.mobile-menu-links a:hover { 
    color: var(--primary); 
}

/* ۴. پاپ‌آپ‌های احراز هویت و مالی (Global Modals) */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center; 
    backdrop-filter: blur(5px);
}

.modal-box { 
    background: white; 
    padding: 30px; 
    border-radius: 20px; 
    width: 95%; 
    max-width: 400px; 
    text-align: center; 
    position: relative;
}

.modal-close { 
    position: absolute; 
    top: 20px; 
    left: 20px; 
    background: #f1f5f9; 
    border: none; 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    font-weight: bold; 
    cursor: pointer; 
    color: #ef4444; 
    font-size: 1.2rem; 
    transition: 0.3s;
}

.modal-close:hover { 
    background: #fee2e2; 
}

.modal-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #e2e8f0; 
    border-radius: 10px; 
    margin-bottom: 12px; 
    font-family: inherit; 
    text-align: center; 
    direction: ltr;
}

.sv-btn { 
    width: 100%; 
    padding: 12px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 1rem; 
    cursor: pointer; 
    margin-top: 10px; 
    transition: 0.3s;
}

.sv-btn:hover { 
    background: var(--primary-dark); 
}

.msg-box { 
    font-size: 0.85rem; 
    margin-top: 15px; 
    display: none; 
    text-align: center; 
    font-weight: bold; 
    padding: 10px; 
    border-radius: 8px; 
    animation: fadeIn 0.3s ease-in-out; 
}

.msg-error { 
    background: #fee2e2; 
    color: #b91c1c; 
    border: 1px solid #fca5a5; 
}

.msg-success { 
    background: #d1fae5; 
    color: #047857; 
    border: 1px solid #6ee7b7; 
}

.fullpage-loader { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--bg); 
    z-index: 99999; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    animation: fadeIn 0.4s; 
}

.spinner { 
    width: 60px; 
    height: 60px; 
    border: 5px solid #e2e8f0; 
    border-top-color: var(--primary); 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin-bottom: 25px; 
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ۵. استایل‌های اختصاصی صفحه اصلی (index.html) */
.hero { 
    padding: 160px 20px 80px; 
    text-align: center; 
    max-width: 900px; 
    margin: 0 auto; 
}

.hero h1 { 
    font-size: 2.8rem; 
    color: var(--primary-dark); 
    margin-bottom: 20px; 
    font-weight: 900; 
}

.hero p { 
    color: #64748b; 
    font-size: 1.2rem; 
    margin-bottom: 40px; 
}

.hero-buttons { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
    flex-wrap: wrap;
}

.steps-section { 
    padding: 60px 20px; 
    background: var(--white); 
    text-align: center; 
    border-top: 1px solid var(--border); 
    border-bottom: 1px solid var(--border);
}

.steps-section h2, .gallery-section h2, .features h2, .testimonials h2, .faq-section h2 { 
    font-size: 2rem; 
    color: var(--primary-dark); 
    margin-bottom: 40px; 
}

.steps-grid { 
    max-width: 1000px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
}

.step-card { 
    padding: 20px; 
}

.step-icon { 
    font-size: 2.5rem; 
    background: #ecfdf5; 
    width: 80px; 
    height: 80px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    margin: 0 auto 20px; 
    color: var(--primary); 
}

.step-card h3 { 
    color: var(--primary-dark); 
    margin-bottom: 10px; 
}

.step-card p { 
    color: #64748b; 
    font-size: 0.95rem; 
}

/* =========================================
   اسلایدر قبل و بعد (نمایش سینمایی و عریض)
   ========================================= */
.gallery-section { 
    padding: 100px 20px; 
    background: #f8fafc; 
    text-align: center; 
}

.gallery-container { 
    max-width: 1000px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
}

.main-demo-viewer {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    border: 1px solid var(--border);
}

.demo-slider { 
    position: relative; 
    width: 100%; 
    border-radius: 20px; 
    overflow: hidden; 
    aspect-ratio: 16/9; /* نسبت تصویر سینمایی و عریض */
    background-color: #e2e8f0; 
}

.demo-slider img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* خط لغزنده سفید مدرن */
.demo-slider input { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent; 
    cursor: ew-resize; 
    z-index: 10; 
    outline: none;
}

/* خط لغزنده به همراه آیکون دوطرفه مدرن */
.demo-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px; /* عریض‌تر شدن برای جا دادن آیکون دایره‌ای */
    height: 2000px; 
    /* ترکیب یک دایره SVG به همراه خط سفید عمودی در پس‌زمینه */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='white'/%3E%3Cpath d='M17 14L11 20L17 26Z' fill='%23047857'/%3E%3Cpath d='M23 14L29 20L23 26Z' fill='%23047857'/%3E%3C/svg%3E") center center no-repeat,
                linear-gradient(to right, transparent 18.5px, white 18.5px, white 21.5px, transparent 21.5px);
    /* اعمال سایه یکپارچه روی آیکون و خط */
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.5));
    cursor: ew-resize;
    border: none;
}

.demo-slider input::-moz-range-thumb {
    width: 40px;
    height: 2000px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='white'/%3E%3Cpath d='M17 14L11 20L17 26Z' fill='%23047857'/%3E%3Cpath d='M23 14L29 20L23 26Z' fill='%23047857'/%3E%3C/svg%3E") center center no-repeat,
                linear-gradient(to right, transparent 18.5px, white 18.5px, white 21.5px, transparent 21.5px);
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.5));
    cursor: ew-resize;
    border: none;
}

/* تنظیمات جایگاه لیبل‌ها برای حرکت هماهنگ از راست به چپ */
.slider-label { 
    position: absolute; 
    top: 25px; 
    background: rgba(255, 255, 255, 0.2); 
    color: white; 
    padding: 8px 24px; 
    border-radius: 30px; 
    font-size: 1rem; 
    font-weight: bold; 
    z-index: 5; 
    pointer-events: none; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    /* لیبل "قبل" در سمت چپ قرار می‌گیرد */
    left: 25px; 
    right: auto;
}

.label-after { 
    /* لیبل "بعد" در سمت راست قرار می‌گیرد */
    right: 25px; 
    left: auto; 
    background: rgba(4, 120, 87, 0.7); 
    border-color: rgba(4, 120, 87, 0.9);
}

/* حالت اولیه عکس روی پنهانِ کامل تنظیم می‌شود تا انیمیشن از صفر شروع شود */
.demo-slider .img-after { 
    clip-path: inset(0 0 0 100%); 
}
/* =========================================
   بج‌های نوع اتاق و سبک (روی اسلایدر دمو)
   ========================================= */
.demo-badge {
    position: absolute;
    bottom: 25px;
    background: rgba(255, 255, 255, 0.85); /* پس‌زمینه شیشه‌ای روشن */
    color: var(--primary-dark);
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: bold;
    z-index: 5;
    pointer-events: none; /* تا مزاحم کلیک و کشیدن اسلایدر نشود */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* قرارگیری در دو سمت پایین عکس */
.badge-room {
    right: 25px; /* گوشه پایین راست */
}

.badge-style {
    left: 25px; /* گوشه پایین چپ */
}

/* هماهنگی با حالت تاریک (Dark Mode) */
body.dark-mode .demo-badge {
    background: rgba(30, 41, 59, 0.85);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}
/* =========================================
   عکس‌های بندانگشتی (Thumbnails)
   ========================================= */
.demo-thumbnails {
    display: flex;
    justify-content: center;
    gap: 15px;
    overflow-x: auto;
    padding: 10px;
}

.thumb-card {
    width: 120px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.thumb-card:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.thumb-card.active {
    border-color: var(--primary);
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 10px 20px rgba(4,120,87,0.3);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.dark-mode .gallery-section { background: var(--bg); }
body.dark-mode .main-demo-viewer { border-color: var(--border); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }

.features { 
    padding: 80px 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

.f-card { 
    background: white; 
    padding: 40px; 
    border-radius: 20px; 
    text-align: center; 
    border: 1px solid var(--border); 
    transition: 0.3s; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.02); 
}

.f-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
}

.f-card h3 { 
    color: var(--primary); 
    margin-bottom: 15px; 
}

.f-card p { 
    color: #64748b; 
}

.testimonials { 
    padding: 80px 20px; 
    background: var(--primary-dark); 
    color: white; 
    text-align: center; 
}

.testimonials h2 { 
    color: white; 
    margin-bottom: 50px; 
}

.testim-grid { 
    max-width: 1100px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.testim-card { 
    background: rgba(255,255,255,0.1); 
    padding: 30px; 
    border-radius: 20px; 
    text-align: right; 
    backdrop-filter: blur(5px); 
    border: 1px solid rgba(255,255,255,0.2); 
}

.stars { 
    color: #fbbf24; 
    margin-bottom: 15px; 
    font-size: 1.2rem; 
}

.testim-card p { 
    font-style: italic; 
    margin-bottom: 20px; 
    font-size: 0.95rem; 
    line-height: 1.8; 
}

.testim-user { 
    font-weight: bold; 
    font-size: 1.1rem; 
}

.testim-role { 
    font-size: 0.85rem; 
    color: #cbd5e1; 
}

.faq-section { 
    padding: 80px 20px; 
    max-width: 800px; 
    margin: 0 auto; 
}

details { 
    background: var(--white); 
    margin-bottom: 15px; 
    padding: 20px; 
    border-radius: 15px; 
    border: 1px solid var(--border); 
    cursor: pointer; 
    transition: 0.3s; 
}

details[open] { 
    border-color: var(--primary); 
    box-shadow: 0 5px 15px rgba(4, 120, 87, 0.1); 
}

summary { 
    font-weight: bold; 
    color: var(--text); 
    outline: none; 
    font-size: 1.1rem; 
    list-style: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

summary::-webkit-details-marker { 
    display: none; 
}

summary::after { 
    content: '+'; 
    color: var(--primary); 
    font-size: 1.5rem; 
}

details[open] summary::after { 
    content: '-'; 
}

details p { 
    margin-top: 15px; 
    color: #64748b; 
    line-height: 1.8; 
    font-size: 0.95rem; 
    border-top: 1px dashed var(--border); 
    padding-top: 15px; 
}

/* ۶. استایل‌های اختصاصی استودیو طراحی (dashboard.html) */

/* اصلاح شد: پنهان‌سازی هوشمند تب‌های غیرفعال */
.tab-content { 
    display: none; 
    animation: fadeIn 0.4s ease-in-out; 
}

.tab-content.active { 
    display: block; 
}

.dashboard-layout { 
    display: flex; 
    max-width: 1400px; 
    margin: 80px auto 0; 
    min-height: calc(100vh - 80px); 
}

.sidebar { 
    width: 250px; 
    background: var(--white); 
    border-left: 1px solid var(--border); 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    position: sticky; 
    top: 80px; 
    height: calc(100vh - 80px); 
    transition: transform 0.3s ease; 
}

.sidebar-btn { 
    padding: 12px 20px; 
    border-radius: 12px; 
    font-weight: bold; 
    color: #64748b; 
    cursor: pointer; 
    transition: 0.3s; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    border: none; 
    background: transparent; 
    text-align: right; 
    font-family: inherit; 
    font-size: 1rem;
}

.sidebar-btn:hover { 
    background: #f8fafc; 
    color: var(--primary); 
}

.sidebar-btn.active { 
    background: #ecfdf5; 
    color: var(--primary-dark); 
    border: 1px solid #d1fae5; 
}

.main-content { 
    flex: 1; 
    padding: 30px; 
}

.sv-main { 
    max-width: 900px; 
    margin: 0 auto; 
    background: var(--white); 
    border-radius: 20px; 
    padding: 30px; 
    border: 1px solid var(--border); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.sv-upload-box { 
    border: 2px dashed #cbd5e1; 
    border-radius: 15px; 
    padding: 40px; 
    text-align: center; 
    cursor: pointer; 
    background: #f8fafc; 
    transition: 0.3s;
}

.sv-upload-box:hover { 
    border-color: var(--primary); 
    background: #f0fdf4;
}

.sv-controls { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-top: 20px; 
}

.sv-select, .sv-textarea { 
    width: 100%;
    padding: 12px; 
    border-radius: 10px; 
    border: 1px solid #e2e8f0; 
    font-family: inherit; 
    font-size: 0.95rem; 
    outline: none;
    background-color: var(--white);
}

.sv-textarea { 
    grid-column: span 2; 
    min-height: 80px; 
    resize: vertical;
}

.advanced-options { 
    grid-column: span 2; 
    background: #f8fafc; 
    padding: 15px; 
    border-radius: 10px; 
    border: 1px solid var(--border); 
}

.advanced-options summary { 
    font-weight: bold; 
    color: var(--primary-dark); 
    cursor: pointer; 
    list-style: none; 
    font-size: 0.9rem; 
    display: flex; 
    justify-content: space-between;
}

.options-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px dashed #cbd5e1; 
}

.toggle-label { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.85rem; 
    color: #64748b; 
    cursor: pointer;
}

.sv-btn-process { 
    grid-column: span 2; 
    padding: 15px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 1.1rem; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 10px; 
    width: 100%;
}

.sv-btn-process:hover {
    background: var(--primary-dark);
}

.sv-btn-process:disabled { 
    background: #94a3b8; 
    cursor: not-allowed; 
}

.sv-btn-download { 
    grid-column: span 2; 
    padding: 12px; 
    background: #0284c7; 
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 15px; 
    width: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
}

.sv-btn-download:hover { 
    background: #0369a1; 
}

.loading-box { 
    display: none; 
    text-align: center; 
    padding: 40px 20px; 
    margin-top: 20px; 
    background: #f0fdf4; 
    border-radius: 15px; 
    border: 1px dashed var(--primary); 
    animation: pulse 2s infinite; 
}

.sv-slider { 
    position: relative; 
    width: 100%; 
    margin-top: 30px; 
    border-radius: 15px; 
    overflow: hidden; 
    line-height: 0; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#svImgOriginal, #svImgModified { 
    width: 100%; 
    display: block;
}

#svImgModified { 
    position: absolute; 
    top:0; 
    left:0; 
    height:100%; 
    object-fit: cover; 
    clip-path: inset(0 0 0 50%); 
}

.sv-slider input { 
    position: absolute; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    opacity:0; 
    cursor: ew-resize; 
    z-index: 10; 
}

.feedback-box { 
    background: #f8fafc; 
    border: 1px solid var(--border); 
    border-radius: 15px; 
    padding: 20px; 
    margin-top: 20px; 
    text-align: center; 
}

.feedback-box h4 { 
    color: var(--primary-dark); 
    margin-bottom: 15px; 
}

.star-rating { 
    direction: ltr; 
    font-size: 2rem; 
    color: #cbd5e1; 
    cursor: pointer; 
    margin-bottom: 15px; 
    display: inline-block; 
}

.star-rating span { 
    transition: 0.2s; 
}

.star-rating span:hover, .star-rating span.active { 
    color: #fbbf24; 
}

.feedback-box textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    font-family: inherit; 
    font-size: 0.9rem; 
    resize: vertical; 
    min-height: 80px; 
    margin-bottom: 10px; 
    outline: none; 
}

.feedback-box textarea:focus { 
    border-color: var(--primary); 
}

.btn-feedback { 
    background: #f59e0b; 
    color: white; 
    border: none; 
    padding: 10px 25px; 
    border-radius: 10px; 
    font-weight: bold; 
    cursor: pointer; 
    font-family: inherit; 
    font-size: 1rem; 
    transition: 0.3s; 
}

.btn-feedback:hover { 
    background: #d97706; 
}


/* =========================================
   طراحی شبکه‌ای هوشمند (جایگزین Masonry برای رفع فضای خالی)
   ========================================= */
.history-grid { 
    display: grid !important; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 25px; 
    align-items: start; /* این دستور حیاتی است: باعث می‌شود عکس‌ها بدون کراپ شدن، ارتفاع طبیعی خود را داشته باشند */
}

.history-card { 
    background: white; 
    border-radius: 15px; 
    overflow: hidden; 
    border: 1px solid var(--border); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
    transition: 0.3s;
    width: 100%;
}

.history-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 20px rgba(0,0,0,0.08); 
}

/* اصلاح چیدمان متن و تاریخ در زیر عکس‌ها */
.history-info { 
    padding: 15px; 
    font-size: 0.85rem; 
    color: #64748b; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; /* تراز از بالا: تا اگر متن دو خطی شد، تاریخ پایین نیاید */
    gap: 15px;
}

.history-info span:first-child {
    flex: 1; /* اختصاص فضای کافی به نام پرامپت */
    line-height: 1.6;
}

.history-info span:last-child {
    white-space: nowrap; /* جلوگیری از دو خطی شدن تاریخ */
    margin-top: 2px;
}

/* ۷. استایل‌های اختصاصی صفحه قیمت‌ها (pricing.html) */
.pricing-section { 
    padding: 160px 20px 60px; 
    max-width: 1200px; 
    margin: 0 auto; 
    text-align: center; 
}

.pricing-section h1 { 
    font-size: 2.5rem; 
    color: var(--primary-dark); 
    margin-bottom: 15px; 
    font-weight: 900; 
}

.pricing-section p.subtitle { 
    color: #64748b; 
    font-size: 1.1rem; 
    margin-bottom: 50px; 
}

.pricing-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    align-items: stretch; 
    margin-bottom: 60px;
}

.price-card { 
    background: var(--white); 
    border-radius: 20px; 
    padding: 40px 30px; 
    border: 1px solid var(--border); 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    transition: 0.3s; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); 
}

.price-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); 
}

.price-card.popular { 
    border: 2px solid var(--primary); 
}

.popular-badge { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--primary); 
    color: white; 
    padding: 4px 20px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: bold; 
}

.price-title { 
    font-size: 1.3rem; 
    color: var(--primary-dark); 
    font-weight: bold; 
    margin-bottom: 20px; 
}

.price-amount { 
    font-size: 2.2rem; 
    font-weight: 900; 
    color: var(--text); 
    margin-bottom: 25px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px;
    font-family: 'Vazirmatn', sans-serif; 
    font-feature-settings: "ss01" on; 
}

.price-amount span { 
    font-size: 1rem; 
    color: #64748b; 
    font-weight: normal; 
}

.price-features { 
    list-style: none; 
    text-align: right; 
    margin-bottom: 35px; 
    border-top: 1px dashed var(--border); 
    padding-top: 25px;
    font-family: 'Vazirmatn', sans-serif; 
    font-feature-settings: "ss01" on; 
}

.price-features li { 
    margin-bottom: 12px; 
    color: #475569; 
    font-size: 0.95rem; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.price-features li::before { 
    content: "✓"; 
    color: var(--primary); 
    font-weight: bold; 
}

.buy-btn { 
    background: #f1f5f9; 
    color: var(--text); 
    text-align: center; 
    padding: 14px; 
    border-radius: 12px; 
    font-weight: bold; 
    text-decoration: none; 
    transition: 0.3s; 
    display: block; 
    border: none; 
    cursor: pointer; 
    width: 100%; 
    font-family: inherit; 
    font-size: 1rem; 
}

.buy-btn:hover { 
    background: #e2e8f0; 
}

.popular .buy-btn { 
    background: var(--primary); 
    color: white; 
}

.popular .buy-btn:hover { 
    background: var(--primary-dark); 
}

.trust-section { 
    background: var(--white); 
    border-radius: 20px; 
    padding: 30px; 
    border: 1px solid var(--border); 
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap; 
    gap: 30px; 
    max-width: 900px; 
    margin: 0 auto; 
}

.trust-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    text-align: right; 
    max-width: 250px; 
}

.trust-icon { 
    font-size: 2rem; 
    background: #f0fdf4; 
    width: 50px; 
    height: 50px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 12px; 
    color: var(--primary); 
}

/* ۸. استایل‌های اختصاصی صفحه اطلاعات (about.html) */
.about-container { 
    max-width: 800px; 
    margin: 150px auto 100px; 
    padding: 40px; 
    background: white; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    border: 1px solid var(--border);
}

.about-container h1 { 
    color: var(--primary-dark); 
    margin-bottom: 20px; 
    font-size: 2.2rem;
}

.about-container h2 { 
    color: var(--primary); 
    margin-top: 30px; 
    margin-bottom: 15px; 
    font-size: 1.5rem;
}

.about-container p { 
    margin-bottom: 15px; 
    font-size: 1.05rem; 
    color: #475569; 
    text-align: justify;
}

/* ۹. استایل فوتر سرتاسری پروژه (Global Footer Footer) */
.footer { 
    background: var(--bg); 
    color: #64748b; 
    padding: 40px 20px; 
    border-top: 1px solid var(--border); 
}

.footer-content { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.footer-text { 
    text-align: right; 
    font-size: 0.95rem; 
}

/* ۱۰. مدیاکوئری‌های یکپارچه موبایل و ریسپانسیو (Responsive Overrides) */
@media (max-width: 768px) {
    .mobile-menu-toggle { 
        display: flex; 
    }
    
    .nav-container { 
        padding: 15px 20px; 
    }
    
    .main-menu { 
        display: none !important; 
    }
    
    #authSection { 
        display: none !important; 
    }
    
    /* باز شدن منوی کشویی در صفحات عمومی */
    .mobile-sidebar.open { 
        transform: translateX(0); 
    }
    
    /* اعمال چیدمان عمودی در داشبورد */
    .dashboard-layout { 
        flex-direction: column; 
        margin-top: 150px; 
    }
    
    .sidebar { 
        position: fixed; 
        top: 0; 
        right: 0; 
        height: 100vh; 
        width: 280px; 
        z-index: 100; 
        box-shadow: -5px 0 25px rgba(0,0,0,0.15); 
        transform: translateX(100%); 
        padding-top: 20px;
    }
    
    .sidebar.open { 
        transform: translateX(0); 
    }
    
    /* اصلاح شد: نمایش دکمه بستن در موبایل */
    .close-sidebar-btn { 
        display: block; 
    }
    
    .main-content { 
        padding: 15px; 
    }
    
    .sv-controls, .options-grid { 
        grid-template-columns: 1fr; 
    }
    
    .sv-textarea, .advanced-options, .sv-btn-process, .sv-btn-download { 
        grid-column: span 1; 
    }
    
    .hero { 
        padding-top: 150px; 
    }
    
    .pricing-section { 
        padding-top: 150px; 
    }
    
    .about-container { 
        margin: 160px 20px 60px; 
        padding: 25px; 
    }
    
    .footer-content { 
        flex-direction: column; 
        justify-content: center; 
        text-align: center; 
    }
    
    .footer-text { 
        text-align: center; 
    }
}
/* =========================================
   انیمیشن اسکن لیزری برای هوش مصنوعی
   ========================================= */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 2px solid var(--primary);
}

.scanner-img {
    width: 100%;
    display: block;
    filter: grayscale(50%) blur(2px) brightness(0.8); /* افکت در حال پردازش */
}

.laser-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #10b981; 
    box-shadow: 0 0 15px 5px rgba(16, 185, 129, 0.6);
    animation: scan-laser 2s infinite ease-in-out alternate;
    z-index: 10;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.2) 0%, transparent 15%);
    animation: scan-laser-overlay 2s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes scan-laser {
    0% { top: 0%; }
    100% { top: 100%; }
}

@keyframes scan-laser-overlay {
    0% { top: 0%; height: 0%; }
    100% { top: 100%; height: 100%; background: linear-gradient(to top, rgba(16, 185, 129, 0.2) 0%, transparent 15%); }
}
/* =========================================
   پوسته تاریک (Dark Mode)
   ========================================= */
body.dark-mode { 
    --primary: #10b981; /* سبز روشن‌تر برای درخشش روی پس‌زمینه تیره */
    --primary-dark: #059669; 
    --bg: #0f172a; /* سرمه‌ای بسیار تیره برای پس‌زمینه کل سایت */
    --text: #f8fafc; /* رنگ متن سفید/خاکستری */
    --white: #1e293b; /* رنگ کارت‌ها، پاپ‌آپ‌ها و منوها */
    --border: #334155; /* رنگ حاشیه‌ها */
}

/* تنظیمات اختصاصی برای هماهنگی بیشتر اجزا در حالت تاریک */
body.dark-mode header { background: rgba(30, 41, 59, 0.9); }
body.dark-mode .modal-input, 
body.dark-mode .sv-select, 
body.dark-mode .sv-textarea { 
    background: #0f172a; 
    color: #f8fafc; 
    border-color: var(--border); 
}
body.dark-mode .sv-upload-box { background: #0f172a; border-color: #334155; }
body.dark-mode .sv-upload-box:hover { background: rgba(16, 185, 129, 0.05); border-color: var(--primary); }
body.dark-mode .loading-box { background: rgba(16, 185, 129, 0.05); border-color: var(--primary-dark); }
body.dark-mode .wallet-badge { background: rgba(16, 185, 129, 0.1); border-color: var(--primary-dark); color: var(--primary); }
body.dark-mode .history-info { color: #cbd5e1; }
body.dark-mode .step-icon, body.dark-mode .trust-icon { background: rgba(16, 185, 129, 0.1); }
body.dark-mode .formula-box, body.dark-mode .compare-card.good { background: rgba(16, 185, 129, 0.05); }
body.dark-mode .compare-card.bad { background: rgba(239, 68, 68, 0.05); border-color: #991b1b; color: #fca5a5; }

/* استایل دکمه تغییر تم */
.theme-toggle-btn {
    background: none; 
    border: none; 
    font-size: 1.4rem; 
    cursor: pointer; 
    padding: 5px; 
    margin-left: 10px; 
    transition: 0.3s;
}
.theme-toggle-btn:hover { transform: scale(1.1); }
/* حل مشکل لوگو در حالت تاریک - کادر روشن */
body.dark-mode .logo img {
    mix-blend-mode: normal; /* غیرفعال کردن حالت ادغام */
    background-color: rgba(255, 255, 255, 0.85); /* پس‌زمینه سفید نیمه‌شفاف */
    padding: 4px 4px; /* فاصله دادن به اطراف لوگو */
    border-radius: 12px; /* گرد کردن ملایم گوشه‌ها */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
/* ۱۱. استایل‌های اختصاصی مجله دکوراسیون (blog.html) */
.blog-header { text-align: center; padding: 140px 20px 60px; max-width: 800px; margin: 0 auto; }
.blog-header h1 { font-size: 2.5rem; color: var(--primary-dark); font-weight: 900; margin-bottom: 15px; }
.blog-header p { color: #64748b; font-size: 1.1rem; }

.blog-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border); background: var(--white); color: #64748b; font-family: inherit; font-weight: bold; cursor: pointer; transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.blog-grid { max-width: 1200px; margin: 0 auto 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; padding: 0 20px; }
.blog-card { background: var(--white); border-radius: 16px; border: 1px solid var(--border); overflow: hidden; transition: 0.3s; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.05); }
.blog-img-wrapper { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #e2e8f0; }
.blog-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-img-wrapper img { transform: scale(1.05); }
.category-badge { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.9); color: var(--primary-dark); padding: 4px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: bold; backdrop-filter: blur(4px); }
.blog-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.blog-content h3 { font-size: 1.25rem; color: var(--text); margin-bottom: 10px; line-height: 1.5; }
.blog-content h3 a { color: inherit; text-decoration: none; transition: color 0.2s; }
.blog-content h3 a:hover { color: var(--primary); }
.blog-content p { color: #64748b; font-size: 0.95rem; margin-bottom: 20px; line-height: 1.7; flex: 1; }
.blog-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border); padding-top: 15px; font-size: 0.85rem; color: #94a3b8; }
.read-more { color: var(--primary); font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.read-more:hover { color: var(--primary-dark); }

/* ۱۲. استایل‌های اختصاصی صفحه داخلی مقاله (article.html) */
.article-wrapper { max-width: 850px; margin: 120px auto 80px; padding: 0 20px; }
.article-meta-header { text-align: center; margin-bottom: 30px; }
.article-category { display: inline-block; background: #ecfdf5; color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; margin-bottom: 15px; }
.article-title { font-size: 2.5rem; color: var(--primary-dark); line-height: 1.4; margin-bottom: 20px; font-weight: 900; }
.article-author-info { display: flex; justify-content: center; align-items: center; gap: 15px; color: #64748b; font-size: 0.95rem; }
.article-hero-img { width: 100%; border-radius: 20px; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); background: #e2e8f0; }
.article-body { font-size: 1.1rem; color: #334155; line-height: 1.9; }
.article-body h2 { font-size: 1.8rem; color: var(--text); margin: 40px 0 20px; }
.article-body h3 { font-size: 1.4rem; color: var(--text); margin: 30px 0 15px; }
.article-body p { margin-bottom: 20px; text-align: justify; }
.article-body img { width: 100%; border-radius: 12px; margin: 30px 0; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.article-body blockquote { border-right: 4px solid var(--primary); background: #f8fafc; padding: 20px; margin: 30px 0; border-radius: 10px 0 0 10px; font-style: italic; color: var(--primary-dark); }
.article-cta-box { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); border-radius: 20px; padding: 40px; text-align: center; color: white; margin-top: 60px; box-shadow: 0 15px 30px rgba(4, 120, 87, 0.2); }
.article-cta-box h3 { font-size: 1.8rem; margin-bottom: 15px; color: white; }
.article-cta-box p { font-size: 1.1rem; margin-bottom: 25px; opacity: 0.9; }
.btn-cta-white { background: white; color: var(--primary-dark); padding: 12px 30px; border-radius: 12px; font-weight: bold; text-decoration: none; display: inline-block; transition: 0.3s; }
.btn-cta-white:hover { background: #f1f5f9; transform: translateY(-2px); }

@media (max-width: 768px) {
    .blog-header { padding-top: 140px; }
    .article-title { font-size: 1.8rem; }
    .article-hero-img { aspect-ratio: 4/3; border-radius: 12px; }
    .article-cta-box { padding: 30px 20px; }
}
/* =========================================
   تایپوگرافی لوکس برای تیترهای اصلی
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Lalezar&display=swap');

/* اعمال فونت نمایشی (Display Font) روی تیترهای مهم سایت */
h1, h2, 
.hero h1, 
.steps-section h2, 
.gallery-section h2, 
.testimonials h2, 
.faq-section h2,
.pricing-section h1, 
.about-container h1, 
.guide-header h1,
.blog-header h1,
.article-title {
    font-family: 'Lalezar', 'Vazirmatn', sans-serif !important;
    font-weight: 400; /* فونت لاله‌زار به صورت پیش‌فرض ضخامت بالایی دارد */
    letter-spacing: 0.5px; /* فاصله‌گذاری ملایم برای القای حس لوکس‌تر */
}

/* بهینه‌سازی سایز تیتر اصلی صفحه خانه برای این فونت */
.hero h1 { 
    font-size: 3.5rem !important; 
    line-height: 1.4;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.6rem !important; }
}
/* =========================================
   میکرو اینتراکشن‌ها و افکت‌های شناور (Micro-interactions)
   ========================================= */

/* ارتقای انیمیشنِ پایه برای تمام دکمه‌های اصلی */
.btn-login, .sv-btn, .sv-btn-process, .sv-btn-download, .btn-upgrade, .btn-action {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* افکت درخشش (Glow) و بالا آمدن دکمه‌ها در زمان هاور */
.btn-login:hover, 
.sv-btn:hover, 
.sv-btn-process:hover:not(:disabled), 
.btn-action:hover {
    transform: translateY(-2px); /* حرکت نرم به سمت بالا */
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.35); /* سایه درخشان با رنگ سبز برند */
}

/* افکت درخشش آبی برای دکمه دانلود */
.sv-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35); /* سایه درخشان آبی */
}

/* افکت درخشش طلایی برای دکمه‌های فیدبک */
.btn-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

/* افکت دکمه‌های خرید در صفحه تعرفه‌ها */
.buy-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08); /* سایه ملایم برای دکمه‌های طوسی */
}
.popular .buy-btn:hover {
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.35); /* سایه سبز برای پکیج ویژه */
}

/* تعاملی کردن کارت‌های مراحل کار (Step Cards) و ویژگی‌ها در صفحه اصلی */
.step-card, .trust-item {
    transition: all 0.3s ease;
}
.step-card:hover, .trust-item:hover {
    transform: translateY(-4px);
}