/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    direction: rtl;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.logo:hover {
    color: white;
    opacity: 0.9;
}

.logo-icon {
    font-size: 2.5rem;
    margin-left: 15px;
    color: var(--secondary-color);
}

.logo-text h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: white;
}

.logo-text span {
    font-size: 0.9rem;
    color: #ddd;
}

.domain-brand {
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
}

/* Date & Time Display */
.datetime-display {
    display: flex;
    gap: 20px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.date-item i {
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Navigation */
.main-nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 18px 20px;
    color: var(--dark-color);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.nav-menu a i {
    margin-left: 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.hero-image {
    flex: 1;
    max-width: 500px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 15px auto;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Lessons Section */
.popular-lessons {
    padding: 80px 0;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.lesson-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.lesson-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.lesson-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.lesson-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.lesson-card:hover .lesson-image img {
    transform: scale(1.05);
}

.lesson-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.lesson-content {
    padding: 20px;
}

.lesson-content h3 {
    margin-bottom: 10px;
}

.lesson-content h3 a {
    color: var(--dark-color);
}

.lesson-content h3 a:hover {
    color: var(--secondary-color);
}

.lesson-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.lesson-meta span i {
    margin-left: 5px;
}

/* Chatbot Section */
.chatbot-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.chatbot-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-avatar {
    font-size: 2.5rem;
    background-color: rgba(255,255,255,0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin-bottom: 5px;
    color: white;
}

.chatbot-info p {
    margin-bottom: 0;
    opacity: 0.9;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-color);
}

.status-indicator.active {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chatbot-messages {
    height: 300px;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message .message-content {
    background-color: white;
    border: 1px solid var(--border-color);
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-message .message-content {
    background-color: var(--secondary-color);
    color: white;
    align-self: flex-end;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}

.bot-message .message-time {
    align-self: flex-start;
}

.user-message .message-time {
    align-self: flex-end;
}

.chatbot-input {
    display: flex;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.chatbot-input button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-input button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.chatbot-suggestions {
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.chatbot-suggestions span {
    font-weight: 600;
    color: var(--dark-color);
}

.suggestion-btn {
    padding: 8px 15px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Articles Section */
.latest-articles {
    padding: 80px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.article-image {
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-category {
    display: inline-block;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-content h3 {
    margin-bottom: 10px;
}

.article-content h3 a {
    color: var(--dark-color);
}

.article-content h3 a:hover {
    color: var(--secondary-color);
}

.article-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-meta span i {
    margin-left: 5px;
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-logo h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.footer-logo p {
    color: #ddd;
    margin-bottom: 10px;
}

.domain-display {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-description {
    color: #bbb;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #ddd;
}

.contact-info i {
    color: var(--secondary-color);
    margin-left: 10px;
    margin-top: 3px;
}

.newsletter h5 {
    color: white;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-family: inherit;
}

.newsletter-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: #2980b9;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright p {
    margin-bottom: 0;
    color: #bbb;
}

.copyright strong {
    color: var(--secondary-color);
}

.footer-links-bottom {
    display: flex;
    gap: 20px;
}

.footer-links-bottom a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-bottom a:hover {
    color: var(--secondary-color);
}