/* بازارسازآنلاین - طراحی مدرن و حرفه‌ای */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --white: #ffffff;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.25);
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body,
body * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link:hover::after {
    width: 100%;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

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

.stat-box {
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    font-size: 3rem;
    line-height: 1;
}

/* Portfolio Cards */
.portfolio-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    min-height: 250px;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    transition: var(--transition);
    display: block;
    border-bottom: 1px solid #e9ecef;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.portfolio-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    line-height: 1;
}

/* Skill Cards */
.skill-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.skill-icon {
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* Content Area */
.content-area {
    font-size: 1.1rem;
    line-height: 1.9;
}

.content-area img {
    max-width: 100%;
    height: auto;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary);
}

/* Footer */
footer {
    margin-top: auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* بک‌گراند سه‌بعدی با لایه‌های متحرک */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: floatBackground 20s ease-in-out infinite;
    z-index: 0;
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 8s linear infinite;
    z-index: 0;
}

/* محتوای فوتر */
footer .container {
    position: relative;
    z-index: 1;
}

/* انیمیشن حرکت gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* انیمیشن شناور برای لایه‌های پس‌زمینه */
@keyframes floatBackground {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 1;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.9;
    }
}

/* انیمیشن درخشش */
@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

footer a {
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

footer a:hover {
    color: #fff !important;
    padding-right: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .service-card,
    .portfolio-card,
    .feature-box {
        margin-bottom: 1.5rem;
    }
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utilities */
.min-vh-50 {
    min-height: 50vh;
}

.text-decoration-none:hover {
    text-decoration: underline !important;
}

/* Dark Mode Styles */
body[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body[data-theme="dark"] .navbar {
    background-color: #2d2d2d !important;
    border-bottom: 1px solid #404040;
}

body[data-theme="dark"] .navbar-brand,
body[data-theme="dark"] .nav-link {
    color: #e0e0e0 !important;
}

body[data-theme="dark"] .nav-link:hover {
    color: var(--primary) !important;
}

body[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #e0e0e0;
}

body[data-theme="dark"] .stat-box,
body[data-theme="dark"] .service-card,
body[data-theme="dark"] .portfolio-card,
body[data-theme="dark"] .feature-box,
body[data-theme="dark"] .skill-card,
body[data-theme="dark"] .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body[data-theme="dark"] .service-card:hover,
body[data-theme="dark"] .portfolio-card:hover,
body[data-theme="dark"] .feature-box:hover,
body[data-theme="dark"] .skill-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.3);
}

body[data-theme="dark"] .portfolio-image {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-bottom-color: #404040;
}

body[data-theme="dark"] .portfolio-card:hover .portfolio-image {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
}

body[data-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}

body[data-theme="dark"] .text-secondary {
    color: #a0a0a0 !important;
}

body[data-theme="dark"] .bg-light {
    background-color: #2d2d2d !important;
    color: #e0e0e0;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: #1a1a1a;
    border-color: var(--primary);
    color: #e0e0e0;
}

body[data-theme="dark"] .form-control::placeholder {
    color: #808080;
}

body[data-theme="dark"] .breadcrumb-item.active {
    color: #a0a0a0;
}

body[data-theme="dark"] footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%) !important;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    border-top: 1px solid #404040;
}

body[data-theme="dark"] footer::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

body[data-theme="dark"] footer::after {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
}

body[data-theme="dark"] footer a:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

body[data-theme="dark"] .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

body[data-theme="dark"] .btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

body[data-theme="dark"] .btn-outline-secondary {
    border-color: #6c757d;
    color: #e0e0e0;
}

body[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Theme Toggle Button */
#themeToggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

/* Back to Top Button */
.back-to-top-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

body[data-theme="dark"] .back-to-top-btn {
    background-color: var(--primary);
    border-color: var(--primary);
}

#themeToggle:hover {
    transform: rotate(15deg) scale(1.1);
}

#themeIcon {
    font-size: 1.2rem;
    transition: var(--transition);
}
