/* --- تنظیمات اولیه و متغیرها --- */
:root {
    --primary-color: #0d6efd; /* رنگ اصلی قابل تغییر */
    --font-family: 'Vazirmatn', sans-serif;
    
    /* متغیرهای تم روشن (پیش‌فرض) */
    --background-color: #f4f4f9;
    --secondary-color: #ffffff;
    --border-color: #dee2e6;
    --text-color: #343a40; /* متن اصلی کمی تیره‌تر برای خوانایی */
    --heading-color: #212529;
}

body.dark-mode {
    --background-color: #121212;
    --secondary-color: #1e1e1e;
    --border-color: #343a40;
    --text-color: #adb5bd;
    --heading-color: #ffffff;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

* { box-sizing: border-box; }

/* با تغییر رنگ اصلی، تیترها و لینک‌ها هم تغییر می‌کنند */
h1, h2, h3, .tool-icon, .logo {
    color: var(--primary-color);
    transition: color 0.3s;
}

.section-title h2 { color: var(--heading-color); } /* تیتر سکشن‌ها رنگ ثابت دارند */
.service-card h3 { color: var(--heading-color); }


.container { max-width: 1100px; margin: auto; padding: 0 20px; }
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 10px; }

/* --- هدر و منو --- */
header { background: rgba(30, 30, 30, 0.85); backdrop-filter: blur(10px); position: fixed; width: 100%; top: 0; z-index: 100; }
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
nav .logo { font-weight: bold; font-size: 1.5rem; text-decoration: none; }
.nav-list { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-list li a { color: white; text-decoration: none; padding: 10px 15px; transition: color 0.3s; }
.nav-list li a:hover { color: var(--primary-color); }
.nav-controls { display: flex; align-items: center; gap: 15px; }
.theme-toggle-btn { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.menu-toggle { display: none; }

/* --- انتخاب‌گر رنگ --- */
.color-picker { display: flex; gap: 8px; }
.color-swatch { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; transition: transform 0.2s; }
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.active { box-shadow: 0 0 0 3px var(--primary-color); }

/* --- بخش Hero --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; color: white; position: relative; padding: 0; }
#particles-js { position: absolute; width: 100%; height: 100%; background-color: #1a1a2e; }
.hero-content { z-index: 1; }
.hero-content h1 { font-size: 3.5rem; }
.hero-content h2 { font-size: 1.5rem; font-weight: 300; }

/* --- بخش‌های عمومی --- */
.about-section { background-color: var(--secondary-color); }
.about-content { display: flex; align-items: center; gap: 40px; }
.about-image img { max-width: 250px; border-radius: 50%; }

.smart-tools-section, .services-section { background-color: var(--background-color); }
.tools-grid, .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.tool-card, .service-card { background: var(--secondary-color); border-radius: 10px; border: 1px solid var(--border-color); overflow: hidden; text-align: center; transition: transform 0.3s, box-shadow 0.3s; }
.tool-card:hover, .service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.tool-card { padding: 30px; text-decoration: none; color: var(--text-color); }
.service-card img { width: 100%; height: 180px; object-fit: cover; }
.service-card-content { padding: 20px; }

/* --- فوتر و دکمه شناور (سایز جدید) --- */
footer { background: #1e1e1e; color: #aaa; text-align: center; padding: 40px 0; }
.footer-social-links a { color: #aaa; text-decoration: none; margin: 0 15px; font-size: 24px; transition: color 0.3s; }
.footer-social-links a:hover { color: var(--primary-color); }

.fab-container { position: fixed; bottom: 30px; left: 30px; z-index: 1000; }
.fab-main-button { width: 60px; height: 60px; font-size: 26px; }
.fab-item { width: 55px; height: 55px; font-size: 22px; }

.fab-main-button { background-color: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.3s, background-color 0.3s; }
.fab-menu { position: absolute; bottom: 75px; left: 0; display: flex; flex-direction: column; gap: 15px; visibility: hidden; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; }
.fab-item { color: var(--primary-color); background-color: var(--secondary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: all 0.2s; }
.fab-item:hover { transform: scale(1.15); color: white; background-color: var(--primary-color); }
.fab-container.active .fab-main-button { transform: rotate(45deg); }
.fab-container.active .fab-menu { visibility: visible; opacity: 1; transform: translateY(0); }

/* --- واکنش‌گرایی --- */
@media (max-width: 768px) {
    .nav-list { display: none; flex-direction: column; width: 100%; background: #1e1e1e; position: absolute; top: 70px; left: 0; padding: 10px 0; }
    .nav-list.active { display: flex; }
    .menu-toggle { display: block; font-size: 24px; cursor: pointer; color: white; }
    .hero-content h1 { font-size: 2.5rem; }
    .about-content { flex-direction: column; text-align: center; }
}