/* فایل CSS اصلی با حذف کدهای زائد */

:root {
    --font-fa: Vazir, 'Tanha', 'Samim', Tahoma, sans-serif;
    --font-en: 'Roboto', 'Open Sans', Arial, sans-serif;
    --primary-color: #4da6e7;
    --secondary-color: #ff6b35;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #eaeaea;
}

/* استایل‌های عمومی و تایپوگرافی */
* {
    font-family: var(--font-fa) !important;
}

body {
    font-family: var(--font-fa) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    text-align: right;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 70px;
    transition: background-color 0.3s, color 0.3s;
}

/* حالت تیره */
body.dark-theme {
    background: #121212;
    color: #f0f0f0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-fa) !important;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; color: #666; text-transform: uppercase; letter-spacing: 1px; }

p {
    font-size: 1.0625rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: #555;
    text-align: justify;
    text-justify: inter-word;
}

/* سیستم امتیازدهی ستاره‌ای */
.rating-container {
    max-width: 500px;
    margin: 0 auto;
}

.rating-stars {
    text-align: center;
    margin-bottom: 30px;
}

.stars {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 10px;
    cursor: pointer;
    display: inline-block;
}

.stars span {
    margin: 0 5px;
    transition: all 0.3s;
}

.stars span:hover,
.stars span:hover ~ span {
    color: #ffd700;
}

.stars span.active {
    color: #ffd700;
}

.rating-text {
    font-size: 1.1rem;
    color: #666;
}

.rating-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
}

.rating-avg,
.rating-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.rating-avg i {
    color: #ffd700;
}

.rating-count i {
    color: var(--primary-color);
}

.submit-rating {
    display: block;
    margin: 0 auto;
    padding: 12px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-rating:hover:not(:disabled) {
    background: #3a8bc8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 166, 231, 0.3);
}

.submit-rating:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* سیستم دیدگاه‌ها */
.comments-form {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.comments-form h4 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-comment {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.submit-comment:hover {
    background: #3a8bc8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 166, 231, 0.3);
}

.comments-list {
    margin-bottom: 30px;
}

.comment-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.comment-author {
    display: flex;
    gap: 15px;
    align-items: center;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 0.9rem;
    color: #666;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.reply-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.reply-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.comment-body {
    margin-bottom: 15px;
}

.comment-body p {
    margin: 0;
    line-height: 1.6;
}

.comment-reply {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-right: 3px solid var(--primary-color);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reply-header strong {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reply-date {
    font-size: 0.9rem;
    color: #666;
}

.admin-reply {
    margin-top: 15px;
}

.comments-pagination {
    text-align: center;
}

.load-more {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more:hover {
    background: var(--primary-color);
    color: white;
}

/* چت‌بات شناور و دکمه حالت تیره */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(77, 166, 231, 0.3);
    transition: all 0.3s;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(77, 166, 231, 0.4);
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* دکمه حالت تیره بالای چت */
.theme-toggle-btn {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #333;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 1000;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn i {
    transition: all 0.3s;
}

body.dark-theme .theme-toggle-btn {
    background: #ffd700;
    color: #333;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--secondary-color);
}

.message-content {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 15px;
    position: relative;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    border-radius: 15px 15px 0 15px;
}

.message-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: #999;
    display: block;
    text-align: left;
}

.user-message .message-time {
    color: rgba(255,255,255,0.8);
    text-align: right;
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#chatbotInput {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 40px;
}

#chatbotInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#chatbotSend {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

#chatbotSend:hover {
    background: #3a8bc8;
    transform: scale(1.05);
}

/* حالت تیره برای چت‌بات */
body.dark-theme .chatbot-window {
    background: #1e1e1e;
    color: #f0f0f0;
}

body.dark-theme .message-content {
    background: #2a2a2a;
    color: #f0f0f0;
}

body.dark-theme #chatbotInput {
    background: #2a2a2a;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-theme .chatbot-input-area {
    border-color: #444;
}

/* پنل مدیریت */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.admin-panel.active {
    display: flex;
}

.admin-panel-content {
    background: white;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.admin-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    flex: 1;
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.comments-management {
    display: grid;
    gap: 15px;
}

.comment-manage-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.comment-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-actions-admin {
    display: flex;
    gap: 10px;
}

.btn-approve {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-reject {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-reply {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.reply-form {
    margin-top: 10px;
    display: none;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* حالت تیره برای پنل مدیریت */
body.dark-theme .admin-panel-content {
    background: #1e1e1e;
    color: #f0f0f0;
}

body.dark-theme .comment-manage-item {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-theme .admin-tabs {
    border-bottom-color: #444;
}

body.dark-theme .admin-tab {
    color: #ccc;
}

body.dark-theme .admin-tab.active {
    color: var(--primary-color);
}

body.dark-theme .comments-form {
    background: #252525;
}

body.dark-theme .comment-item {
    background: #1e1e1e;
    border-color: #444;
}

body.dark-theme .comment-reply {
    background: #2a2a2a;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-theme .reply-btn {
    border-color: #444;
    color: #ccc;
}

body.dark-theme .reply-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-theme .rating-info {
    background: #252525;
}

body.dark-theme .rating-text {
    color: #ccc;
}

/* بخش نظرسنجی و امتیازدهی در صفحه اصلی */
.site-rating-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    margin: 60px 0;
    border-radius: 20px;
}

.site-rating-section .section-heading {
    margin-bottom: 40px;
}

.site-rating-section .section-heading h4 {
    font-size: 2rem;
    color: var(--text-color);
}

body.dark-theme .site-rating-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

body.dark-theme .site-rating-section .section-heading h4 {
    color: #f0f0f0;
}

/* بخش دیدگاه‌ها در صفحه اصلی */
.site-comments-section {
    padding: 80px 0;
}

.site-comments-section .section-heading {
    margin-bottom: 40px;
}

.site-comments-section .section-heading h4 {
    font-size: 2rem;
    color: var(--text-color);
}

body.dark-theme .site-comments-section .section-heading h4 {
    color: #f0f0f0;
}

/* استایل برای تصویر پروفایل در شناسنامه */
.about-card-modern-avatar-img img.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.4s ease;
    border: 3px solid rgb(202, 236, 9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-card-modern:hover .about-card-modern-avatar-img img.profile-photo {
    transform: scale(1.2);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

/* استایل جایگزین برای زمانی که از آیکون استفاده نمی‌کنیم */
.about-card-modern-avatar-img {
    background: none !important; /* حذف گرادینت پس‌زمینه */
}

/* حالت ریسپانسیو برای تصویر پروفایل */
@media (max-width: 768px) {
    .about-card-modern-avatar-img img.profile-photo {
        width: 60px;
        height: 60px;
    }
}

/* قفل کامل Font Awesome */
.fa,
.fas,
.far,
.fab,
.fa-solid,
.fa-regular,
.fa-brands {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
}

.fa-brands {
    font-family: "Font Awesome 6 Brands";
}

/* استایل‌های جدید برای دکمه ورود مدیر و فوتر */
.admin-login-menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px;
    margin-right: 15px;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-login-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white !important;
}

.admin-login-menu i {
    font-size: 16px;
}

/* استایل‌های جدید برای فوتر */
.footer-contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.footer-contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.footer-contact-icon i {
    font-size: 18px;
}

.footer-contact-text {
    display: flex;
    flex-direction: column;
}

.footer-contact-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 3px;
}

.footer-contact-value {
    font-size: 14px;
    font-weight: 500;
}

.footer-social-media {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

/* استایل برای آیکون‌های پیامرسان‌ها در فوتر */
.footer-social-media .messenger-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.footer-social-media .telegram-icon {
    background: linear-gradient(135deg, #0088cc 0%, #00b2ff 100%);
}

.footer-social-media .eitaa-icon {
    background: linear-gradient(135deg, #00b894 0%, #00d8a7 100%);
}

.footer-social-media .rubika-icon {
    background: linear-gradient(135deg, #6c5ce7 0%, #8a7cff 100%);
}

.footer-social-media .shad-icon {
    background: linear-gradient(135deg, #fd79a8 0%, #ff9ac1 100%);
}

.footer-social-media .messenger-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .footer-contact-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .admin-login-menu {
        padding: 6px 15px !important;
        font-size: 14px;
        margin-right: 10px;
    }
    
    .footer-contact-item {
        width: 100%;
        max-width: 300px;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .admin-login-menu {
        padding: 5px 12px !important;
        font-size: 12px;
        margin-right: 5px;
    }
    
    .admin-login-menu span {
        display: none;
    }
    
    .admin-login-menu i {
        margin: 0;
    }
    
    .footer-social-media {
        gap: 10px;
    }
    
    .footer-social-media .messenger-icon {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .section-heading h4 { font-size: 1.6rem; }
    .nav li a { font-size: 1rem; }
    body { padding-top: 130px; }
    
    .chatbot-window {
        width: 300px;
        height: 400px;
        left: 10px;
        bottom: 70px;
    }
    
    .theme-toggle-btn {
        bottom: 60px;
        width: 50px;
        height: 50px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
}

@keyframes spinner-border { to { transform: rotate(360deg); } }