/**
 * استایل اصلی سایت
 * آلفاسیستم
 */

/* ===================================
   متغیرها و تنظیمات پایه
   =================================== */
:root {
    --primary: #1a365d;
    --primary-light: #2d4a7c;
    --secondary: #00b4d8;
    --accent: #ff6b35;
    --dark: #0a1628;
    --light: #f8fafc;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    
    --font-family: 'Vazirmatn', Tahoma, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--gray-800);
    background-color: #fff;
    overflow-x: hidden;
}

/* ===================================
   تایپوگرافی
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
    position: relative;
}

.top-bar {
    font-size: 0.875rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--secondary);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26, 54, 93, 0.4);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #ff8c5a);
    border: none;
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
    color: white;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    padding: 100px 0 150px;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    background-size: 200px;
}

.hero-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-title span {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
}

.min-vh-75 {
    min-height: 70vh;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
    background: white;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    margin-bottom: 2rem;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
}

/* ===================================
   Categories
   =================================== */
.category-card {
    display: block;
    background: white;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

.category-name {
    font-size: 1rem;
    color: var(--gray-800);
    margin: 0;
}

/* ===================================
   Products
   =================================== */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-title a {
    color: var(--gray-800);
}

.product-title a:hover {
    color: var(--secondary);
}

.product-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

/* بخش Products - اصلاح شده */
.product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-old {
    text-decoration: line-through;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.price-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);  /* ✅ تغییر از danger به primary */
}

/* بنر تخفیف */
.badge-discount {
    background: linear-gradient(135deg, #dc3545, #c82333);  /* قرمز فقط برای تخفیف */
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new {
    background: linear-gradient(135deg, #28a745, #20c997);  /* سبز برای جدید */
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===================================
   Services
   =================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-title {
    color: white;
    margin-bottom: 1rem;
}

.service-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.service-price {
    color: var(--accent);
    font-weight: 600;
    margin-top: 1rem;
}

.bg-gradient-primary .btn-outline-primary {
    color: white;
    border-color: white;
}

.bg-gradient-primary .btn-outline-primary:hover {
    background: white;
    color: var(--primary);
}

/* ===================================
   Features
   =================================== */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 1.75rem;
    color: white;
}

.feature-card h5 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray-600);
    margin: 0;
}

/* ===================================
   Articles
   =================================== */
.article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.article-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-date {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    margin-bottom: 0.75rem;
}

.article-title a {
    color: var(--gray-800);
}

.article-title a:hover {
    color: var(--secondary);
}

.article-excerpt {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ===================================
   Testimonials
   =================================== */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
}

.testimonial-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.testimonial-rating {
    color: var(--warning);
}

.testimonial-text {
    color: var(--gray-700);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar i {
    font-size: 2rem;
    color: var(--gray-500);
}

/* ===================================
   Footer
   =================================== */
.footer {
    font-size: 0.95rem;
}

.footer-title {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.footer-contact li {
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
}

.newsletter-section {
    background: rgba(255, 255, 255, 0.05);
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary);
    box-shadow: none;
    color: white;
}

/* ===================================
   Utilities
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.bg-light {
    background-color: var(--gray-100) !important;
}

.text-primary {
    color: var(--secondary) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.position-relative {
    position: relative;
}

/* ===================================
   Alerts
   =================================== */
.alert {
    border-radius: var(--border-radius-sm);
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* ===================================
   Forms
   =================================== */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* ===================================
   Cards
   =================================== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    gap: 5px;
}

.page-link {
    border-radius: var(--border-radius-sm);
    border: none;
    padding: 0.5rem 1rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--gray-100);
    color: var(--secondary);
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

.page-item.disabled .page-link {
    color: var(--gray-400);
}

/* ===================================
   Tables
   =================================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--gray-100);
    border: none;
    font-weight: 600;
    color: var(--gray-800);
    padding: 1rem;
}

.table tbody td {
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--gray-100);
}