/* main.css - استایل‌های مشترک تمام صفحات */

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://bebinplus.com/fonts/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('https://bebinplus.com/fonts/Vazirmatn-Bold.woff2') format('woff2');
}

:root {
    --primary-color: #ffc107;
    --primary-hover: #ffca2c;
    --btn-text-color: #212529;
    --body-bg: #ffffff;
    --section-bg: #f8f9fa;
    --text-color: #333;
    --text-muted: #666;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --header-bg: rgba(255, 255, 255, 0.6);
    --footer-bg: #1c1c1c;
    --footer-text: #aaa;
    --header-border: rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-color);
    text-align: right;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; font-size: 1.1rem; color: var(--text-muted); }

/* Header & Navigation */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--header-border);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.logo .logo-text {
    color: var(--btn-text-color);
}
.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.nav-menu {
    display: flex;
    gap: 1rem;
    list-style: none;
}
.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--primary-color);
    color: var(--btn-text-color);
}
.nav-menu svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Main Content */
.main-content {
    padding: 8rem 0 4rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}
.btn-download {
    background-color: var(--primary-color);
    color: var(--btn-text-color);
    border: 2px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}
.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

/* Social Section */
.social-section {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--body-bg), var(--section-bg));
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.social-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.social-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    color: var(--btn-text-color);
    transform: translateY(-5px);
    border-color: transparent;
}

/* Changelog (صفحه اصلی) */
.changelog-section {
    background-color: var(--section-bg);
    padding: 4rem 0;
    text-align: center;
}
.changelog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    text-align: right;
}
.changelog-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}
.changelog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.version-tag {
    background-color: #fff8e1;
    color: #f57f17;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
}
.release-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.changes-list {
    list-style: none;
}
.changes-list li {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}
.change-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
}
.change-tag.mobile { background-color: #e3f2fd; color: #1565c0; }
.change-tag.tv { background-color: #e8f5e9; color: #2e7d32; }
.change-tag.general { background-color: #f5f5f5; color: #616161; }

/* FAQ (صفحه اصلی) */
.faq-section {
    padding: 4rem 0;
    text-align: center;
}
.faq-accordion {
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: right;
}
.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}
.faq-question:hover {
    color: var(--primary-color);
}
.faq-icon {
    transition: transform 0.3s;
}
.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}
.faq-answer {
    padding: 0 1rem 1.5rem 1rem;
}
.faq-answer p {
    margin: 0;
    font-size: 1rem;
}

/* AI Component (صفحه اصلی) */
.ai-component-section {
    padding: 3rem 0;
}
.ai-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.ai-card input,
.ai-card button {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
}
.ai-card button {
    background: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    border: none;
}
.ai-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--section-bg);
    border-radius: 8px;
    display: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}
.modal-content .btn {
    background: var(--primary-color);
    color: var(--btn-text-color);
    width: 100%;
    margin-bottom: 0.5rem;
}
.modal-content .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-bottom a {
    color: #fff;
    text-decoration: none;
}
.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    /* هدر: لوگو در راست، منو در چپ */
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    .logo .logo-text {
        display: none;
    }
    .logo {
        flex-shrink: 0;
    }
    .nav-menu {
        gap: 0.3rem;
    }
    .nav-menu a {
        padding: 0.4rem;
    }
    .nav-menu svg {
        width: 24px;
        height: 24px;
    }
    .nav-menu a span {
        display: none;
    }

    .main-content {
        padding-top: 7rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .changelog-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .changelog-grid {
        grid-template-columns: 1fr 1fr;
    }
}