/* =========================================
   TarjomehPro - Luxury & Readable Theme
   ========================================= */

:root {
    /* متغیرهای حالت شب */
    --bg-base: #0f172a; 
    --bg-surface: #1e293b; 
    --bg-card: #1e293b;
    --accent-primary: #0ea5e9; 
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    --accent-glow: rgba(14, 165, 233, 0.4);
    --text-primary: #f8fafc; 
    --text-secondary: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    
    --success: #10b981;
    --danger: #ef4444;
}

body.pro-light-theme {
    /* متغیرهای حالت روز */
    --bg-base: #f8fafc; 
    --bg-surface: #ffffff; 
    --bg-card: #ffffff;
    --accent-primary: #2563eb; 
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #6d28d9 100%);
    --accent-glow: rgba(37, 99, 235, 0.2);
    --text-primary: #0f172a; 
    --text-secondary: #475569;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

html { scroll-behavior: smooth; }

/* در اینجا فونت فمیلی را برداشتیم تا روی آیکون‌ها تداخل ایجاد نکند */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif; /* فونت را فقط به بدنه سایت اعمال کردیم */
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.8; 
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ================= HEADER ================= */
.glass-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0; z-index: 1000;
    box-shadow: var(--glass-shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand-icon { color: var(--accent-primary); font-size: 22px; }
.brand-text .highlight { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Navigation */
.nav-list { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-list > li > a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 8px;
}
.nav-list > li > a:hover { color: var(--accent-primary); background: rgba(128, 128, 128, 0.05); }

/* دکمه منوی همبرگری موبایل */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.mobile-menu-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
}

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%; right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 250px;
    padding: 10px;
    box-shadow: var(--glass-shadow);
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}
.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(5px); }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-primary); text-decoration: none;
    padding: 12px; border-radius: 8px; font-size: 14px;
}
.dropdown-menu a:hover { background: var(--accent-primary); color: #fff; }
.dropdown-menu a:hover i { color: #fff; }
.dropdown-menu i { color: var(--accent-primary); width: 20px; }

/* Buttons */
.header-actions { display: flex; gap: 10px; align-items: center; }
.btn-secondary-dark {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 20px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.btn-secondary-dark:hover { background: rgba(128, 128, 128, 0.1); }
.btn-primary-gradient {
    background: var(--accent-gradient); color: white; border: none;
    padding: 8px 24px; border-radius: 8px; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ================= MAIN CONTENT ================= */
.main-workspace { max-width: 1200px; margin: 40px auto; padding: 0 24px; width: 100%; flex-grow: 1; display: flex; flex-direction: column; gap: 30px; }

/* Tools */
.tools-dashboard { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
.tool-card {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    padding: 15px 20px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
    color: var(--text-primary); font-weight: 600; cursor: pointer;
    box-shadow: var(--glass-shadow); transition: transform 0.3s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--accent-primary); }
.tool-icon { color: var(--accent-primary); font-size: 18px; }

.credit-card {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    padding: 15px 20px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
    box-shadow: var(--glass-shadow);
}
.credit-icon { color: var(--success); font-size: 18px; }
.credit-details { display: flex; flex-direction: column; }
.credit-label { font-size: 12px; color: var(--text-secondary); }
.credit-value { font-weight: bold; font-size: 14px; }

/* Translation Core */
.translator-core-card {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 20px; box-shadow: var(--glass-shadow); overflow: hidden;
}
.controls-bar {
    display: flex; justify-content: space-between; padding: 15px 25px;
    border-bottom: 1px solid var(--border-color); background: rgba(128, 128, 128, 0.03);
}
.pro-select {
    background: var(--bg-base); color: var(--text-primary);
    border: 1px solid var(--border-color); padding: 10px 15px;
    border-radius: 8px; outline: none;
    font-family: inherit;
}
.text-panels-container { display: flex; min-height: 400px; }
.text-panel { flex: 1; display: flex; flex-direction: column; }
.panel-divider { width: 1px; background: var(--border-color); }
textarea {
    flex-grow: 1; background: transparent; border: none;
    color: var(--text-primary); padding: 25px; font-size: 16px;
    resize: none; outline: none;
    font-family: inherit;
}
textarea::placeholder { color: var(--text-secondary); opacity: 0.7; }
.panel-footer { display: flex; justify-content: space-between; padding: 15px 25px; border-top: 1px solid var(--border-color); }

.btn-translate-magic {
    background: var(--accent-gradient); color: white; border: none;
    padding: 15px 40px; font-size: 18px; font-weight: bold; border-radius: 30px;
    cursor: pointer; margin: -25px auto 0; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 10px 25px var(--accent-glow);
    font-family: inherit;
}

/* Footer */
.pro-footer {
    margin-top: auto; padding: 40px 24px; text-align: center;
    border-top: 1px solid var(--border-color); background: var(--bg-surface);
}

/* Content Pages (For Articles/Books) */
.single-content-box {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 40px; box-shadow: var(--glass-shadow);
    max-width: 900px; margin: 0 auto;
}
.single-title {
    font-size: 28px; font-weight: 800; color: var(--text-primary);
    margin-bottom: 20px; text-align: center;
}
.single-text {
    font-size: 16px; line-height: 2; color: var(--text-secondary); text-align: justify;
}
.translation-compare {
    display: flex; gap: 20px; margin-top: 30px;
    background: var(--bg-base); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color);
}
.translation-compare div { flex: 1; padding: 15px; }
.translation-compare .source { border-left: 1px solid var(--border-color); }
.translation-compare h4 { color: var(--accent-primary); margin-bottom: 10px; }

/* ================= RESPONSIVE (MOBILE) ================= */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block !important; 
    }
    .header-content {
        flex-wrap: wrap;
        position: relative;
    }
    .main-nav {
        order: 3;
        width: 100%;
        display: block;
    }
    .nav-list {
        display: none; 
        flex-direction: column;
        width: 100%;
        background: var(--bg-surface);
        border-radius: 12px;
        padding: 10px 0;
        margin-top: 15px;
        border: 1px solid var(--border-color);
        gap: 0;
    }
    .nav-list.active {
        display: flex !important; 
    }
    .nav-list > li {
        width: 100%;
    }
    .nav-list > li > a {
        display: block;
        padding: 12px 20px;
        border-radius: 0;
    }
    
    .has-dropdown .dropdown-menu {
        position: static;
        display: none;
        background: rgba(128, 128, 128, 0.05);
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        padding-right: 20px;
        visibility: visible;
        opacity: 1;
        transform: none;
        width: 100%;
    }
    .has-dropdown.active .dropdown-menu {
        display: block !important;
    }
    .nav-arrow {
        float: left;
        margin-top: 5px;
        transition: transform 0.3s;
    }
    .has-dropdown.active .nav-arrow {
        transform: rotate(180deg);
    }

    .tool-card, .credit-card {
        flex: 1 1 calc(50% - 15px);
        min-width: 140px;
        justify-content: center;
        text-align: center;
    }

    .controls-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .lang-selector {
        width: 100%;
        justify-content: space-between;
    }
    .lang-selector select {
        width: 42%;
    }
    .tone-selector {
        width: 100%;
        justify-content: space-between;
    }
    .tone-selector select {
        width: 100%;
    }
    
    .text-panels-container {
        flex-direction: column;
    }
    .panel-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    textarea {
        padding: 15px;
        min-height: 180px;
    }
    .btn-translate-magic {
        padding: 12px 30px;
        font-size: 16px;
        margin: 15px auto 0;
    }
}




/* =========================================
   VIP Grid Layouts (Articles & Books)
   ========================================= */

.vip-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.vip-page-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.vip-page-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ساختار شبکه‌ای (Grid) برای چیدمان شیک */
.vip-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* کارت‌های نمایش (Cards) با طراحی مینیمال و لوکس */
.vip-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.vip-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); /* افکت سایه سینمایی */
}

body.pro-light-theme .vip-card:hover {
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

.vip-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    background: #111; /* پس‌زمینه تیره برای تصاویری که کامل پر نمی‌کنند */
}

/* اگر کارت مربوط به کتاب باشد، تصویر را کامل نشان می‌دهیم */
.vip-card.book-card .vip-card-image {
    height: 350px;
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
}

.vip-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vip-card-category {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.vip-card-title {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.5;
}

.vip-card-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    flex-grow: 1;
}

.vip-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    color: var(--text-secondary);
    font-size: 13px;
}

.vip-btn-read {
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s;
}

.vip-card:hover .vip-btn-read {
    color: var(--accent-primary);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .vip-grid-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}


/* =========================================
   VIP Article & Translation Layouts
   ========================================= */

/* استایل کلی متن مقالات */
.vip-article-content {
    max-width: 850px;
    margin: 0 auto;
}

.vip-article-content p {
    font-size: 18px;
    line-height: 2.2;
    color: var(--text-secondary);
    margin-bottom: 25px;
    text-align: justify;
}

/* استایل تیترهای داخل مقاله */
.vip-article-content h2 {
    font-size: 26px;
    color: var(--text-primary);
    margin: 50px 0 20px;
    position: relative;
    padding-right: 15px;
}

.vip-article-content h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 5px;
    background: var(--accent-gradient);
    border-radius: 5px;
}

/* استایل نقل‌قول‌های برجسته (Blockquote) */
.vip-blockquote {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.05) 0%, transparent 100%);
    border-right: 4px solid var(--accent-primary);
    padding: 25px 30px;
    margin: 40px 0;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* =========================================
   باکس ترجمه خیره‌کننده (مبدا بالا، مقصد پایین)
   ========================================= */
.stunning-translation-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    margin: 40px 0;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.stunning-translation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--accent-glow);
    border-color: rgba(14, 165, 233, 0.3);
}

/* افکت نوری گوشه باکس */
.stunning-translation-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--accent-gradient);
}

/* متن مبدا (انگلیسی) */
.st-source {
    font-family: 'Georgia', 'Times New Roman', serif; /* فونت کلاسیک برای انگلیسی */
    font-size: 20px;
    line-height: 1.9;
    color: var(--text-secondary);
    text-align: left;
    margin-bottom: 25px;
    font-style: italic;
}

/* جداکننده گرافیکی وسط */
.st-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--accent-primary);
    font-size: 20px;
    opacity: 0.7;
}

.st-divider::before, .st-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border-color);
}

.st-divider::before { left: 0; }
.st-divider::after { right: 0; }

/* متن مقصد (فارسی) */
.st-target {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 22px; /* کمی بزرگتر برای خوانایی عالی */
    line-height: 2.2;
    color: var(--text-primary);
    text-align: justify;
    font-weight: 500;
}

