/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --color-accent: #4f46e5;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --font-vazir: 'Vazirmatn', 'Tahoma', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
}

body {
    font-family: var(--font-vazir);
    direction: rtl;
    text-align: right;
    background-color: #ffffff;
    color: var(--color-gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.btn-primary:hover {
    background-color: var(--color-gray-800);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-gray-200);
    transition: var(--transition);
}

.site-header.transparent {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.sticky {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-primary);
}

.logo img {
    max-height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .primary-menu.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-cta {
        display: none;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #000000 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-gray-700);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center !important;
        width: 100%;
        display: block;
    }
    
    .hero-subtitle {
        text-align: center !important;
        width: 100%;
    }
    
    .hero-description {
        text-align: center !important;
        width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .hero-image {
        order: -1;
    }
}

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats-section {
    padding: 4rem 0;
    background-color: var(--color-gray-50);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--color-gray-600);
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--color-gray-600);
}

.text-center {
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background-color: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    color: var(--color-primary);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--color-gray-600);
    line-height: 1.8;
}

/* ==========================================================================
   Blocks Section
   ========================================================================== */

.blocks-section {
    padding: 6rem 0;
    background-color: var(--color-gray-50);
}

.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.block-card {
    padding: 2rem;
    background-color: white;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
}

.block-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.block-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.block-icon i {
    color: var(--color-accent);
}

.block-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.block-description {
    color: var(--color-gray-600);
    font-size: 0.95rem;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    padding: 6rem 0;
}

.faq-section h2,
.faq-section .section-header h2 {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    background-color: white;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background-color: transparent;
    border: none;
    text-align: right;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question span {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
}

.faq-question:hover {
    background-color: var(--color-gray-50);
}

.faq-toggle {
    width: 24px;
    height: 24px;
    position: relative;
}

.faq-toggle::before,
.faq-toggle::after {
    content: '';
    position: absolute;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.faq-toggle::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-toggle::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.faq-question[aria-expanded="true"] .faq-toggle::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--color-gray-600);
    line-height: 1.8;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif !important;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #000000 0%, #1f2937 100%);
    color: white;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.cta-buttons .btn {
    transition: all 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 11;
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    padding: 4rem 0 2rem;
    background-color: var(--color-gray-50);
}

.footer-widgets {
    margin-bottom: 3rem;
}

.footer-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-gray-200);
    border-radius: 50%;
    color: var(--color-gray-700);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-200);
}

.copyright {
    color: var(--color-gray-600);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-slide-up {
    animation: slideUp 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
