/* Base Styles */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    /* Modern Royal Blue */
    --primary-light: #60a5fa;
    /* Light Blue */
    --primary-dark: #1e40af;
    /* Dark Blue */

    /* Secondary Colors */
    --secondary-color: #f59e0b;
    /* Warm Orange */
    --secondary-light: #fcd34d;
    /* Light Yellow */
    --secondary-dark: #d97706;
    /* Dark Orange */

    /* Accent Colors */
    --accent-success: #059669;
    /* Emerald Green */
    --accent-info: #0891b2;
    /* Cyan */
    --accent-warning: #fbbf24;
    /* Amber */
    --accent-danger: #dc2626;
    /* Red */

    /* Neutral Colors */
    --neutral-50: #fafafa;
    /* Lightest Gray */
    --neutral-100: #f4f4f5;
    /* Light Gray */
    --neutral-200: #e4e4e7;
    /* Gray */
    --neutral-300: #d4d4d8;
    /* Medium Gray */
    --neutral-600: #52525b;
    /* Dark Gray */
    --neutral-700: #3f3f46;
    /* Darker Gray */
    --neutral-900: #18181b;
    /* Almost Black */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    --gradient-blue-green: linear-gradient(135deg, var(--primary-color), var(--accent-success));
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--neutral-700);
    background-color: var(--neutral-50);
}

/* Navbar Styles */
.navbar {
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid var(--neutral-200);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--neutral-200);
}

.navbar-brand {
    display: inline-block;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    color: var(--neutral-600) !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    right: auto;
    left: 0;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 500;
}

/* Card Styles */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1) !important;
}

.card img {
    transition: transform 0.5s ease;
    opacity: 1 !important;
}

.card:hover img {
    transform: scale(1.05);
}

/* Button Styles */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: var(--neutral-900);
}

.btn-secondary:hover {
    background: var(--gradient-secondary);
    color: var(--neutral-900);
    transform: translateY(-2px);
}

/* Hero Sections */
.hero,
.products-hero,
.projects-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--neutral-100);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-blue-green);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero .row {
    position: relative;
    z-index: 2;
}

/* Images */
img {
    opacity: 1 !important;
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* Statistics Section */
.statistics .display-4 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.statistics i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.statistics .col-md-3:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--secondary-color);
}

/* Footer Styles */
footer {
    background-color: var(--neutral-100);
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    border-top: 1px solid var(--neutral-200);
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neutral-100);
    color: var(--neutral-600);
    transition: all 0.3s ease;
}

.social-links a i {
    font-size: 1.25rem;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.1);
    background-color: #ffffff;
}

/* Form Styles */
.form-control {
    border: 2px solid var(--neutral-200);
    padding: 0.75rem;
    transition: all 0.3s ease;
    color: var(--neutral-700);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
    color: var(--neutral-400);
}

/* Badge Styles */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.badge-primary {
    background: var(--gradient-primary);
}

.badge-secondary {
    background: var(--gradient-secondary);
    color: var(--neutral-900);
}

.badge:hover {
    transform: scale(1.05);
}

/* Text Colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-success {
    color: var(--accent-success) !important;
}

.text-info {
    color: var(--accent-info) !important;
}

.text-warning {
    color: var(--accent-warning) !important;
}

.text-danger {
    color: var(--accent-danger) !important;
}

.text-muted {
    color: var(--neutral-600) !important;
}

/* Animation Classes */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.fade-in:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 35px;
    }

    .display-4 {
        font-size: calc(1.525rem + 2.1vw);
    }

    .statistics .col-md-3 {
        margin-bottom: 2rem;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .nav-link::after {
    right: auto;
    left: 0;
}

[dir="rtl"] .social-links {
    justify-content: flex-end;
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .btn {
        display: none !important;
    }

    body {
        color: var(--neutral-900);
        background: #ffffff;
    }

    .container {
        max-width: 100%;
        width: 100%;
    }
}