/* ========================================
   VARIABLES & RESET
======================================== */
:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f8;
    --text-primary: #0a0a1a;
    --text-secondary: #4a4a6a;
    --text-muted: #8888aa;
    --border-color: #e8ecf1;
    --border-light: #f0f2f7;
    --accent: #6c5ce7;
    --accent-dark: #5a4bd1;
    --accent-light: #a29bfe;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
    --shadow-xl: 0 30px 80px rgba(0,0,0,0.12);
    --gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-warm: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
    --header-bg: rgba(255,255,255,0.92);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3e;
    --bg-card-hover: #22224a;
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0d0;
    --text-muted: #666688;
    --border-color: #2a2a4a;
    --border-light: #1e1e3a;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-xl: 0 30px 80px rgba(0,0,0,0.6);
    --header-bg: rgba(10,10,26,0.92);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* ========================================
   CONTAINER
======================================== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HEADER
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.header.scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dot {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    font-size: 30px;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 8px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: #fff;
    background: var(--gradient);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lang-selector {
    position: relative;
}

.lang-toggle {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition);
}

.lang-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 130px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition);
}

.lang-dropdown li a:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 28px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: all var(--transition);
}

/* ========================================
   SECTIONS
======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-title .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   HERO
======================================== */
.hero {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: #00b894;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: 60px;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 48px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.8;
    margin-bottom: 36px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 24px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-secondary);
}

/* ========================================
   ABOUT
======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.about-image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

.about-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   SERVICES
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 36px 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 14px;
    background: var(--bg-secondary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========================================
   PROJECTS
======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-light);
}

.project-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 28px;
}

.project-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.project-tags .tag {
    background: var(--bg-secondary);
    font-size: 11px;
    padding: 3px 12px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
}

.project-link:hover {
    gap: 14px;
    color: var(--accent-dark);
}

/* ========================================
   BLOG
======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.blog-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-meta .date {
    background: var(--bg-secondary);
    padding: 2px 12px;
    border-radius: 50px;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ========================================
   CONTACT
======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.08);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(6px);
}

.contact-item-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.contact-item-content strong {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
}

.contact-item-content a,
.contact-item-content p {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-item-content a:hover {
    color: var(--accent);
}

.contact-highlight {
    background: var(--gradient) !important;
    border-color: transparent !important;
}

.contact-highlight .contact-item-icon {
    background: rgba(255,255,255,0.15);
}

.contact-highlight .contact-item-content strong {
    color: rgba(255,255,255,0.8);
}

.contact-highlight .contact-item-content a,
.contact-highlight .contact-item-content p {
    color: #fff;
}

/* ========================================
   FOOTER - جدید و حرفه‌ای
======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-light);
}

.footer-brand .logo-text {
    font-size: 24px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin: 16px 0 20px;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-card);
    border-radius: 50%;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition);
}

.footer-col ul a:hover {
    color: var(--accent);
    padding-left: 6px;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 44px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 34px;
    }
    
    .hero-subtitle {
        font-size: 20px;
        min-height: 36px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}