/* ==========================================
   CSS Reset & Base Styles
   ========================================== */

/* Import Vazir Matn Font for Persian */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0A1A2F;
    --cyan: #00C2D1;
    --light-cyan: #4DD4E0;
    --dark-navy: #061220;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Apply Vazir Matn font to Persian/RTL pages */
html[lang="fa"] body,
html[dir="rtl"] body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.nav-content {
    display: flex;
    align-items: center;
    padding: 1.25rem 0;
    gap: 0;
}

/* Logo Section */
.nav-logo {
    flex-shrink: 0;
    margin-right: 12rem;
}

[dir="rtl"] .nav-logo {
    margin-right: 0;
    margin-left: 12rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex: 1;
    margin-right: 16rem;
}

[dir="rtl"] .nav-menu {
    margin-right: 0;
    margin-left: 16rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--cyan);
}

.btn-nav {
    background: var(--cyan);
    color: var(--white) !important;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--light-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 194, 209, 0.3);
}

/* Language Switcher Section */
.nav-language {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 2rem;
    border-left: 1px solid var(--gray-200);
}

[dir="rtl"] .nav-language {
    margin-left: auto;
    margin-right: 0;
    padding-left: 0;
    padding-right: 2rem;
    border-left: none;
    border-right: 1px solid var(--gray-200);
}

.language-link {
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    border: 2px solid transparent;
    border-radius: 6px;
    background-color: var(--gray-100);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.language-link:hover {
    background-color: var(--gray-200);
    border-color: var(--cyan);
    transform: scale(1.1);
}

.language-link.active {
    background-color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 2px 8px rgba(0, 194, 209, 0.3);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: auto;
    margin-right: 1rem;
}

[dir="rtl"] .burger-menu {
    margin-left: 1rem;
    margin-right: auto;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--navy) 0%, #0D2847 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 194, 209, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(77, 212, 224, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--gray-300);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--cyan);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 194, 209, 0.3);
}

.btn-primary:hover {
    background: var(--light-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 194, 209, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-3px);
}

/* Hero Illustration */
.hero-illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--cyan);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--light-cyan);
    bottom: 15%;
    left: 5%;
    animation-delay: 5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--cyan);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ==========================================
   Technologies Section
   ========================================== */
.technologies {
    padding: 5rem 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.section-label {
    text-align: center;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.tech-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.tech-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.tech-logo svg,
.tech-logo i {
    color: var(--gray-700);
    transition: color 0.3s ease;
}

.tech-logo:hover svg,
.tech-logo:hover i {
    color: var(--cyan);
}

.tech-logo span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
}

/* ==========================================
   Services Section
   ========================================== */
.services {
    padding: 8rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.2rem;
    color: var(--gray-600);
    line-height: 1.7;
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(10, 26, 47, 0.12);
    border-color: var(--cyan);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--light-cyan) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}

.service-description {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ==========================================
   Workflow Section
   ========================================== */
.workflow {
    padding: 8rem 0;
    background: var(--gray-50);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 2rem;
}

.workflow-step {
    flex: 1;
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(10, 26, 47, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(10, 26, 47, 0.15);
}

.step-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--cyan);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}

.step-description {
    font-size: 1.05rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.workflow-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--light-cyan) 100%);
    position: relative;
    flex-shrink: 0;
}

.workflow-connector::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--light-cyan);
}

/* ==========================================
   Featured Section
   ========================================== */
.featured {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--navy) 0%, #0D2847 100%);
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.featured-label {
    display: inline-block;
    background: rgba(0, 194, 209, 0.2);
    color: var(--cyan);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.featured-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.featured-description {
    font-size: 1.15rem;
    color: var(--gray-300);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.featured-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.featured-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-200);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.featured-visual {
    position: relative;
    height: 500px;
}

.visual-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.visual-layer {
    position: absolute;
    border-radius: 16px;
    background: rgba(0, 194, 209, 0.1);
    border: 2px solid rgba(0, 194, 209, 0.3);
    transition: all 0.3s ease;
}

.layer-1 {
    width: 300px;
    height: 200px;
    top: 0;
    left: 0;
    animation: layer-float-1 8s infinite ease-in-out;
}

.layer-2 {
    width: 350px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: layer-float-2 10s infinite ease-in-out;
}

.layer-3 {
    width: 280px;
    height: 180px;
    bottom: 0;
    right: 0;
    animation: layer-float-3 12s infinite ease-in-out;
}

@keyframes layer-float-1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

@keyframes layer-float-2 {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(calc(-50% + 15px), calc(-50% - 15px)); }
}

@keyframes layer-float-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-15px, -15px); }
}

/* ==========================================
   Testimonials Section
   ========================================== */
.testimonials {
    padding: 8rem 0;
    background: var(--gray-50);
    overflow: hidden;
}

.testimonials-slider {
    position: relative;
    margin-top: 4rem;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.testimonial-card {
    flex: 0 0 calc(33.333% - 1.35rem);
    min-width: 0;
}

.testimonial-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(10, 26, 47, 0.08);
    height: 100%;
    position: relative;
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--cyan);
    opacity: 0.3;
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--white);
    transform: scale(1.1);
}

/* ==========================================
   CTA Section
   ========================================== */
.cta {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--navy) 0%, #0D2847 100%);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.3rem;
    color: var(--gray-300);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-large {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: var(--cyan);
    color: var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 194, 209, 0.3);
}

.btn-primary-large:hover {
    background: var(--light-cyan);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 194, 209, 0.4);
}

.btn-secondary-large {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary-large:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-3px);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--dark-navy);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.footer-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

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

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

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ==========================================
   Animations (AOS)
   ========================================== */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.95);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .featured-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .workflow-steps {
        flex-direction: column;
    }
    
    .workflow-connector {
        width: 2px;
        height: 60px;
        transform: rotate(0deg);
    }
    
    .workflow-connector::after {
        right: 50%;
        bottom: -8px;
        top: auto;
        transform: translateX(50%) rotate(90deg);
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .burger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 74px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 74px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        margin: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    [dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
        transition: right 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    [dir="rtl"] .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        font-size: 1.25rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--gray-200);
        width: 100%;
    }
    
    .nav-menu a.btn-nav {
        background: var(--cyan);
        color: var(--white) !important;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        text-align: center;
        border-bottom: none;
    }
    
    .nav-language {
        position: relative;
        padding: 0;
        margin: 0;
        border: none;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a:not(.btn-nav) {
        display: none;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        flex: 0 0 100%;
    }
    
    .cta-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
}
