/**
 * فایل CSS پایه سیستم تابلو سبز
 * 
 * این فایل شامل:
 * - CSS Variables (متغیرهای سراسری)
 * - Reset و Base styles  
 * - Typography (قلم‌ها و متون)
 * - Button styles (استایل دکمه‌ها)
 * - Utility classes (کلاس‌های کمکی)
 * 
 * @author تابلو سبز
 * @version 1.0
 */

/* 
متغیرهای CSS سراسری
=====================
تعریف رنگ‌ها، سایه‌ها و مقادیر مشترک در کل سایت
*/
:root {
    /* رنگ‌های اصلی */
    --primary: #10b981;        /* سبز اصلی */
    --primary-dark: #059669;   /* سبز تیره */
    --secondary: #f3f4f6;      /* خاکستری روشن */
    --accent: #3b82f6;         /* آبی تاکیدی */
    
    /* رنگ‌های متن */
    --text-dark: #111827;      /* متن اصلی */
    --text-gray: #6b7280;      /* متن خاکستری */
    --text-light: #9ca3af;     /* متن روشن */
    --white: #ffffff;
    --border: #e5e7eb;
    
    /* سایه‌ها */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* شعاع‌ها و انتقال‌ها */
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 
Reset و Styles پایه
===================
تنظیمات اولیه و کلی برای همه المان‌ها
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تنظیمات اصلی body */
body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: #fafafa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section */
.section {
    margin-bottom: 5rem;
    padding: 3rem 0;
    position: relative;
}

/* Alternating section backgrounds */
.section:nth-child(odd) {
    background: var(--white);
    border-radius: var(--radius);
    margin: 0 -2rem 5rem -2rem;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-sm);
}

.section:nth-child(even) {
    background: transparent;
}

/* Section separator line */
.section::after {
    content: '';
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section:last-of-type::after {
    display: none;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    margin: 0 auto;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    min-width: 200px;
}

.view-all-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Center the button container */
.view-all-container {
    text-align: center;
    margin-top: 2rem;
}

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

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

/* نوار قیمت‌گذاری در صفحه اصلی */
.home-price-update-note {
    margin: 2rem auto;
    text-align: center;
    max-width: 600px;
}

.home-price-update-banner {
    background: #ffd700 !important;
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffb300 100%) !important;
    border: 2px solid #ffa500 !important;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #b45309 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4) !important;
    position: relative;
    overflow: hidden;
    display: inline-block;
    min-width: 280px;
    animation: pulseHomeBanner 3s ease-in-out infinite;
}

.home-price-update-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmerHomeBanner 2s infinite;
}

.home-price-update-banner i {
    margin-left: 6px;
    color: #b45309 !important;
    animation: tickHomeBanner 1.5s infinite ease-in-out;
}

@keyframes shimmerHomeBanner {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes tickHomeBanner {
    0%, 50%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes pulseHomeBanner {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(255, 193, 7, 0.6);
    }
}

/* Responsive Design برای نوار قیمت‌گذاری در صفحه اصلی */
@media (max-width: 768px) {
    .home-price-update-note {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .home-price-update-banner {
        font-size: 13px;
        padding: 10px 14px;
        min-width: 250px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .home-price-update-banner {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 200px;
        max-width: 95%;
        word-spacing: -1px;
    }
    
    .home-price-update-banner i {
        margin-left: 4px;
    }
}

@media (max-width: 360px) {
    .home-price-update-banner {
        font-size: 11px;
        padding: 7px 10px;
        min-width: 180px;
        max-width: 98%;
        line-height: 1.3;
    }
}