/* تنظیمات پایه و متغیرها */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #38bdf8;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* هدر */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: var(--gray);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

.nav-btn {
    background-color: var(--primary);
    color: white !important;
    padding: 8px 18px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.nav-btn:hover {
    background-color: var(--primary-dark);
}

/* بخش اصلی (Hero) */
.hero {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.badge {
    display: inline-block;
    background: #dbeafe;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

.highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    border-color: var(--gray);
}

/* افکت دکوراتیو هندسی متحرک با CSS */
.hero-shape {
    position: absolute;
    top: 20%;
    left: -5%;
    width: 450px;
    height: 450px;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.1), rgba(56, 189, 248, 0.15));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; transform: rotate(180deg); }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(360deg); }
}

/* عمومی بخش‌ها */
.section {
    padding: 90px 0;
}

.section-title {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.section-title p {
    color: var(--gray);
}

/* محصولات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.product-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    margin-bottom: 25px;
}

.features-list li {
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.card-btn {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    transition: gap 0.2s;
}

.card-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* درباره من */
.about-section {
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 30px;
}

.stats-box {
    display: flex;
    gap: 40px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ظاهر شبیه‌ساز کد (Code Box) بدون نیاز به عکس */
.code-preview {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 20px;
    color: #e2e8f0;
    font-family: monospace;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-title {
    margin-right: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.code-preview pre {
    direction: ltr;
    text-align: left;
    font-size: 0.9rem;
    overflow-x: auto;
}

.keyword { color: #f472b6; }
.title { color: #60a5fa; }
.function { color: #34d399; }
.params { color: #fbbf24; }
.comment { color: #64748b; }
.string { color: #a3e635; }

/* بخش تماس */
.contact-card-box {
    background: white;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.contact-info {
    display: flex;
    justify-content: space-around;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    font-size: 2rem;
}

.info-item h4 {
    font-size: 0.9rem;
    color: var(--gray);
}

.info-item p {
    font-weight: 600;
}

/* فوتر */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* انیمیشن ظاهر شدن تدریجی (Fade In) با جاوااسکریپت کنترل می‌شود */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .about-container { grid-template-columns: 1fr; }
    .contact-info { flex-direction: column; gap: 20px; }
    .main-nav { display: none; } /* در نسخه کامل موبایل منو هم اضافه میشه */
}
