/* Reset و فونت‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* استایل‌های پایه برای فارسی */
html[lang="fa"] body {
    font-family: 'Vazirmatn', 'Tanha', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    direction: rtl;
    text-align: right;
}

/* استایل‌های پایه برای انگلیسی */
html[lang="en"] body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    direction: ltr;
    text-align: left;
}

/* تضمین راست‌چین بودن المان‌های مهم در فارسی */
html[lang="fa"] .service-features,
html[lang="fa"] .service-subfeatures,
html[lang="fa"] .footer-content,
html[lang="fa"] .form-group,
html[lang="fa"] .hero-content,
html[lang="fa"] .about-content,
html[lang="fa"] .intro-content,
html[lang="fa"] .process-steps,
html[lang="fa"] .consultation-form,
html[lang="fa"] .service-item-detailed,
html[lang="fa"] .process-step {
    text-align: right;
}


/* تضمین چپ‌چین بودن المان‌های مهم در انگلیسی */
html[lang="en"] .service-features,
html[lang="en"] .service-subfeatures,
html[lang="en"] .footer-content,
html[lang="en"] .form-group,
html[lang="en"] .hero-content,
html[lang="en"] .about-content,
html[lang="en"] .intro-content,
html[lang="en"] .process-steps,
html[lang="en"] .consultation-form,
html[lang="en"] .service-item-detailed,
html[lang="en"] .process-step {
    text-align: left;
}



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

/* ===== بخش تاریخ و زمان جدید ===== */
.datetime-section-top {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin-top: 2px;	/*  فضای بالا صفحه */
    position: relative;
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.datetime-section-top.hidden {
    opacity: 0;
    visibility: hidden;
}

.datetime-section-top .datetime-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.persian-date {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    direction: rtl;
}

.english-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #475569;
    direction: ltr;
}

.live-time {
    font-family: 'Vazirmatn', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #2563eb;
    direction: ltr;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ===== بخش هیرو ===== */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* جهت‌دهی محتوای هیرو */
html[lang="fa"] .hero-content {
    text-align: right;
}

html[lang="en"] .hero-content {
    text-align: left;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* جهت دکمه‌ها */
html[lang="fa"] .hero-buttons {
    justify-content: flex-end;
}

html[lang="en"] .hero-buttons {
    justify-content: flex-start;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: #fff;
    color: #2563eb;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.placeholder-image {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 2px dashed rgba(255,255,255,0.3);
}

/* ===== بخش خدمات ===== */
.services-section {
    padding: 80px 0;
    background: #f8fafc;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2563eb;
    text-align: center;
}

/* جهت عنوان و توضیحات خدمات */
html[lang="fa"] .service-title,
html[lang="fa"] .service-description {
    text-align: right;
}

html[lang="en"] .service-title,
html[lang="en"] .service-description {
    text-align: left;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.service-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* جهت لیست ویژگی‌های خدمات برای فارسی */
html[lang="fa"] .service-features {
    list-style: none;
    margin-top: 1rem;
    text-align: right;
    padding-right: 0;
}

html[lang="fa"] .service-features li {
    padding: 0.3rem 0;
    color: #4b5563;
    position: relative;
    padding-right: 1.5rem;
}

html[lang="fa"] .service-features li:before {
    content: "✓";
    position: absolute;
    right: 0;
    color: #2563eb;
    font-weight: bold;
}

/* جهت لیست ویژگی‌های خدمات برای انگلیسی */
html[lang="en"] .service-features {
    list-style: none;
    margin-top: 1rem;
    text-align: left;
    padding-left: 0;
}

html[lang="en"] .service-features li {
    padding: 0.3rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
}

html[lang="en"] .service-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* ===== بهبود استایل‌های بخش آمار برای انیمیشن ===== */

/* استایل اصلی برای اعداد آمار */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    direction: ltr; /* برای نمایش صحیح اعداد */
    display: inline-block;
    min-width: 80px; /* جلوگیری از تغییر سایز هنگام انیمیشن */
}

/* تضمین نمایش صحیح اعداد فارسی */
html[lang="fa"] .stat-number {
    font-family: 'Vazirmatn', sans-serif;
    font-feature-settings: "numr";
}

html[lang="en"] .stat-number {
    font-family: 'Inter', sans-serif;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* انیمیشن برای آیتم‌های آمار */
.stat-item.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* انیمیشن ویژه برای اعداد */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-number.animating {
    animation: countUp 0.6s ease-out;
}

/* بهبود بخش آمار */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* افکت پس‌زمینه برای بخش آمار */
.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 2px 20px rgba(255, 255, 255, 0.4);
    }
}

.stat-number.final-value {
    animation: pulseGlow 2s ease-in-out;
}

/* ===== استایل‌های فرم ===== */
.contact-section {
    padding: 80px 0;
    background: #f8fafc;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 2rem;
    color: #1e293b;
}

.contact-details {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

/* جهت inputها بر اساس زبان */
html[lang="fa"] .form-group input,
html[lang="fa"] .form-group textarea,
html[lang="fa"] .form-group select {
    text-align: right;
    direction: rtl;
}

html[lang="en"] .form-group input,
html[lang="en"] .form-group textarea,
html[lang="en"] .form-group select {
    text-align: left;
    direction: ltr;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* استایل پیام موفقیت فرم */
.form-success {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

/* ===== صفحه درباره ما ===== */
.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 140px 0 60px;
    text-align: center;
    margin-top: 2px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.about-intro {
    padding: 80px 0;
    background: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* جهت محتوای درباره ما */
html[lang="fa"] .about-content {
    text-align: right;
}

html[lang="en"] .about-content {
    text-align: left;
}

.about-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 3rem;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.mission-card, .vision-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
}

/* جهت متن کارت‌های ماموریت و چشم‌انداز */
html[lang="fa"] .mission-card,
html[lang="fa"] .vision-card {
    text-align: right;
    border-right: 4px solid #2563eb;
    border-left: none;
}

html[lang="en"] .mission-card,
html[lang="en"] .vision-card {
    text-align: left;
    border-left: 4px solid #2563eb;
    border-right: none;
}

.mission-card .icon, .vision-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.mission-card h3, .vision-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== فوتر ===== */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

/* جهت فوتر برای فارسی */
html[lang="fa"] .footer-content {
    text-align: right;
}

/* جهت فوتر برای انگلیسی */
html[lang="en"] .footer-content {
    text-align: left;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #60a5fa;
}

.footer-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #60a5fa;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

.domain-links {
    margin-top: 1rem;
}

.domain-links a {
    color: #60a5fa;
    text-decoration: none;
    margin: 0 0.5rem;
}

/* ===== استایل‌های عمومی ===== */
.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* استایل‌های عمومی برای صفحه استراتژی */
.services-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item-detailed {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-item-detailed:hover {
    transform: translateY(-5px);
}

.service-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    text-align: center;
}

/* لیست‌های جزئی خدمات */
html[lang="fa"] .service-subfeatures {
    list-style: none;
    margin-top: 1rem;
    text-align: right;
    padding-right: 1.5rem;
}

html[lang="fa"] .service-subfeatures li {
    padding: 0.3rem 0;
    color: #4b5563;
    position: relative;
    padding-right: 1.2rem;
}

html[lang="fa"] .service-subfeatures li:before {
    content: "•";
    position: absolute;
    right: 0;
    color: #2563eb;
    font-weight: bold;
    font-size: 1.2rem;
}

html[lang="en"] .service-subfeatures {
    list-style: none;
    margin-top: 1rem;
    text-align: left;
    padding-left: 1.5rem;
}

html[lang="en"] .service-subfeatures li {
    padding: 0.3rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.2rem;
}

html[lang="en"] .service-subfeatures li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
    font-size: 1.2rem;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* استایل برای دکمه‌های غیرفعال */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* بهبود استایل‌های عمومی برای انگلیسی */
html[lang="en"] .service-card {
    text-align: left;
}

html[lang="en"] .service-card h3 {
    text-align: left;
}

html[lang="en"] .service-card p {
    text-align: left;
}

html[lang="en"] .footer-section {
    text-align: left;
}

html[lang="en"] .footer-links {
    text-align: left;
}

html[lang="en"] .contact-info {
    text-align: left;
}

html[lang="en"] .mission-card,
html[lang="en"] .vision-card {
    text-align: left;
}

html[lang="en"] .process-steps {
    text-align: left;
}

html[lang="en"] .process-step {
    text-align: left;
}

html[lang="en"] .process-step h3 {
    text-align: left;
}

html[lang="en"] .process-step p {
    text-align: left;
}

/* تیترهای اصلی وسط‌چین باقی بمانند */
html[lang="en"] .section-title,
html[lang="en"] .page-title,
html[lang="en"] .page-description {
    text-align: center;
}

/* تیترهای دسته‌بندی خدمات - وسط‌چین برای همه */
.service-category h2 {
    text-align: center !important;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: #1e293b;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2.5rem;
        min-width: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.5rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ================================================== */
/* رفع کامل مشکل DROPDOWN در نسخه فارسی */
/* ================================================== */

/* پایه‌ای برای تمام selectها در فارسی */
html[lang="fa"] select {
    direction: rtl;
    text-align: right;
    text-align-last: right; /* برای متن انتخاب شده */
}

/* استایل options در dropdown */
html[lang="fa"] select option {
    direction: rtl;
    text-align: right;
    padding: 12px 15px;
    font-family: 'Vazirmatn', sans-serif;
    background: white;
}

/* رفع مشکل موقعیت dropdown برای فرم‌های full-width */
html[lang="fa"] .form-group.full-width {
    position: relative;
    z-index: 10;
}

html[lang="fa"] .form-group.full-width select {
    position: relative;
    z-index: 11;
}

/* هنگام focus شدن dropdown */
html[lang="fa"] .form-group.full-width select:focus {
    z-index: 12;
    position: relative;
}

/* راه حل ویژه برای مرورگرهای مختلف */
html[lang="fa"] .consultation-form .form-group.full-width,
html[lang="fa"] .contact-form .form-group {
    transform: translateZ(0); /* ایجاد context جدید برای مرورگر */
}

/* برای موبایل و تبلت */
@media (max-width: 768px) {
    html[lang="fa"] .form-group.full-width {
        position: static;
    }
    
    html[lang="fa"] select {
        width: 100%;
        max-width: 100%;
    }
}

/* تضمین نمایش صحیح در همه حالت‌ها */
html[lang="fa"] .form-grid .form-group.full-width {
    grid-column: 1 / -1;
    position: relative;
}

/* رفع باگ موقعیت در Safari و iOS */
@supports (-webkit-touch-callout: none) {
    html[lang="fa"] .form-group.full-width select {
        -webkit-appearance: none;
        appearance: none;
    }
}