
/* Teznevisan Main CSS */
:root {
    --primary-color: #1FA547;
    --primary-dark: #178A3A;
    --primary-light: #2FD65A;
    --bg-main: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6C757D;
    --border-color: #DEE2E6;
}

[data-theme="dark"] {
    --bg-main: #0D1117;
    --bg-secondary: #161B22;
    --text-primary: #F0F6FC;
    --text-secondary: #C9D1D9;
    --text-muted: #8B949E;
    --border-color: #30363D;
}

[data-theme="sepia"] {
    --bg-main: #F4ECD8;
    --bg-secondary: #EBE3D0;
    --text-primary: #3E2723;
    --text-secondary: #4E342E;
    --text-muted: #5D4037;
    --border-color: #BCAAA4;
}

* {
    box-sizing: border-box;
    font-family: inherit;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Vazirmatn", "IRANSans", tahoma, arial, sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.persian-content,
.persian-content * {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
    font-family: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
}

.main-content {
    margin-top: 70px;
    min-height: 50vh;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Content Sections */
.content-recommendations,
.key-takeaways,
.statistics-box,
.faq-section,
.citations-section,
.related-service-cta {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
}

.content-recommendations h4,
.key-takeaways h4,
.statistics-box h4,
.faq-section h4,
.citations-section h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
}

/* FAQ Styles */
.faq-item {
    background: var(--bg-main);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    text-align: right;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    color: var(--primary-color);
    background: rgba(31, 165, 71, 0.05);
}

.faq-answer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-family: inherit;
}

/* Statistics */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.stat-label {
    color: var(--text-secondary);
    font-family: inherit;
}

/* Recommendations */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.recommendation-item {
    background: var(--bg-main);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    border-color: var(--primary-color);
    background: rgba(31, 165, 71, 0.05);
}

.recommendation-item a {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.recommendation-item a:hover {
    color: var(--primary-color);
}

/* Citations */
.citations-list {
    list-style: decimal;
    padding-right: 2rem;
}

.citations-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-family: inherit;
}

.citations-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Related Service CTA */
.related-service-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.service-cta-header h4,
.service-cta-header h5 {
    color: white;
    margin-bottom: 1rem;
    font-family: inherit;
}

.service-cta-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-family: inherit;
}

.service-cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.service-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.service-cta-btn.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.service-cta-btn.secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.service-cta-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Author Box */
.author-box-enhanced {
    background: var(--bg-main);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.author-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.author-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-family: inherit;
}

.author-info h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.author-title {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: inherit;
}

.author-stats {
    display: flex;
    gap: 1.5rem;
}

.author-stats .stat-item {
    text-align: center;
}

.author-stats .number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: inherit;
}

.author-stats .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: inherit;
}

.author-description p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-family: inherit;
}

.author-actions {
    display: flex;
    gap: 1rem;
}

.author-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.author-btn.primary {
    background: var(--primary-color);
    color: white;
}

.author-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.author-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(31, 165, 71, 0.3);
}

.author-btn.primary:hover {
    background: var(--primary-dark);
    color: white;
}

.author-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Related Articles */
.related-article-card {
    background: var(--bg-main);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(31, 165, 71, 0.15);
}

.related-article-image {
    height: 200px;
    overflow: hidden;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article-content {
    padding: 1.5rem;
}

.related-article-content h4 {
    margin: 0 0 1rem 0;
    font-family: inherit;
}

.related-article-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-article-content h4 a:hover {
    color: var(--primary-color);
}

.related-article-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: inherit;
}

.related-article-content .read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.related-article-content .read-more:hover {
    transform: translateX(-3px);
}

/* Featured Images */
.featured-images-wrapper {
    margin: 2rem 0;
}

.featured-images-grid {
    display: grid;
    gap: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.featured-images-grid.single { grid-template-columns: 1fr; }
.featured-images-grid.double { grid-template-columns: 1fr 1fr; }
.featured-images-grid.triple { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.featured-images-grid.quad { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.featured-images-grid.triple .featured-image:first-child {
    grid-row: 1 / 3;
}

.featured-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Widget Styles */
.newsletter-widget-enhanced {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(31, 165, 71, 0.2);
}

.newsletter-header {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
}

.newsletter-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.newsletter-widget-enhanced .widget-title {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: inherit;
}

.newsletter-description {
    margin: 0;
    opacity: 0.9;
    font-family: inherit;
}

.sidebar-newsletter-form {
    padding: 0 1.5rem 1.5rem;
}

.newsletter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.newsletter-input-wrapper i {
    position: absolute;
    right: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input-wrapper input {
    flex: 1;
    padding: 1rem 3rem 1rem 3.5rem;
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
}

.newsletter-input-wrapper button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.newsletter-benefits {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-benefits .benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-family: inherit;
}

.newsletter-stats-mini {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    font-family: inherit;
}

/* Popular Posts Widget */
.popular-posts-widget-enhanced .widget-title {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.popular-posts-list-enhanced {
    padding: 1.5rem;
}

.popular-post-item-enhanced {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.post-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-thumbnail-sidebar {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail-sidebar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content-sidebar {
    flex: 1;
}

.post-meta-sidebar {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-title-sidebar {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-family: inherit;
}

.post-title-sidebar a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title-sidebar a:hover {
    color: var(--primary-color);
}

.post-excerpt-sidebar {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: inherit;
}

/* Contact CTA Widget */
.contact-cta-widget-enhanced {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    overflow: hidden;
}

.contact-cta-widget-enhanced .cta-header {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
}

.contact-cta-widget-enhanced .cta-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.contact-cta-widget-enhanced h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-family: inherit;
}

.contact-cta-widget-enhanced p {
    margin: 0;
    opacity: 0.9;
    font-family: inherit;
}

.cta-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cta-btn.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.cta-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.satisfaction-badge {
    text-align: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.satisfaction-stars {
    margin-bottom: 0.5rem;
}

.satisfaction-stars i {
    color: #FFD700;
    margin: 0 0.1rem;
}

.satisfaction-text {
    font-size: 0.8rem;
    opacity: 0.9;
    font-family: inherit;
}

/* Theme Mode Buttons */
.theme-mode-buttons {
    position: fixed;
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-main);
    padding: 15px 8px;
    border-radius: 0 15px 15px 0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 900;
    transition: left 0.3s ease;
}

.theme-mode-buttons:hover {
    left: 0;
}

.mode-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.mode-btn[data-theme="light"] {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
}

.mode-btn[data-theme="dark"] {
    background: linear-gradient(135deg, #2C3E50, #1a1a1a);
    color: white;
}

.mode-btn[data-theme="sepia"] {
    background: linear-gradient(135deg, #D4B996, #A67C52);
    color: #1a1a1a;
}

.mode-btn:hover {
    transform: scale(1.15);
}

.mode-btn.active {
    box-shadow: 0 0 20px rgba(31, 165, 71, 0.6);
    border: 3px solid var(--primary-color);
}

/* Accessibility Toolbar */
.accessibility-toolbar {
    position: fixed;
    top: 65%;
    right: -60px;
    transform: translateY(-50%);
    z-index: 900;
    transition: right 0.3s ease;
}

.accessibility-toolbar:hover {
    right: 0;
}

.accessibility-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-main);
    padding: 15px 8px;
    border-radius: 15px 0 0 15px;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
}

.a11y-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #17a2b8, #20c3e0);
    color: white;
    transition: all 0.3s ease;
}

.a11y-btn:hover {
    transform: scale(1.15);
}

/* Social Posts */
.social-posts-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.social-posts-container h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: inherit;
}

.social-post-embed {
    background: var(--bg-main);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.social-post-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.platform-name {
    font-weight: 600;
    color: var(--text-primary);
    font-family: inherit;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: inherit;
}

.social-post-content {
    padding: 1.5rem;
    color: var(--text-primary);
    font-family: inherit;
}

.social-post-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.social-post-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-images-grid.double,
    .featured-images-grid.triple,
    .featured-images-grid.quad {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .featured-images-grid.triple .featured-image:first-child {
        grid-row: auto;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-stats {
        justify-content: center;
    }
    
    .author-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions {
        gap: 0.5rem;
    }
    
    .newsletter-benefits {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .related-article-card {
        margin-bottom: 1.5rem;
    }
    
    .author-box-enhanced {
        padding: 1.5rem;
    }
    
    .social-post-embed {
        margin-bottom: 1rem;
    }
    
    .theme-mode-buttons,
    .accessibility-toolbar {
        display: none;
    }
}
