/* تعریف رنگ‌ها و متغیرها */
:root {
    --primary-color: #3A2E8B;  
    --accent-color: #FFEA00;   
    --text-on-dark: #fff;      
    --text-on-light: #333;     
    --light-bg: #f4f4f9;       
}

/* ۱. تعریف فونت ایران سنس (IranSans) - فقط TTF */
@font-face {
    font-family: 'IranSans';
    src: url('fonts/IRANSans.ttf') format('truetype'); 
    font-weight: normal;
    font-style: normal;
}
@font-face { 
    font-family: 'IranSans';
    src: url('fonts/IRANSans.ttf') format('truetype'); 
    font-weight: bold;
    font-style: normal;
}


/* تنظیمات پایه و ریست CSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IranSans', sans-serif; 
    line-height: 1.8; 
    background-color: var(--light-bg);
    color: var(--text-on-light);
    direction: rtl; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
.main-header {
    background: var(--primary-color);
    color: var(--text-on-dark);
    padding: 0.5rem 0;
    border-bottom: 3px solid var(--accent-color);
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    gap: 20px; 
}

/* لوگو: ۱۲۰ پیکسل */
.logo-wrapper { height: 120px; } 
.header-logo { height: 100%; width: auto; }

.main-nav ul { list-style: none; display: flex; }

.main-nav ul li a {
    color: var(--text-on-dark);
    text-decoration: none;
    padding: 0.5rem 0; 
    margin: 0 1rem; 
    border-bottom: 3px solid transparent; 
    transition: border-bottom 0.3s, color 0.3s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active-link {
    border-bottom: 3px solid var(--accent-color); 
    color: var(--accent-color); 
    background: none;
}

/* Button Style */
.btn-primary {
    display: inline-block;
    background: var(--accent-color); 
    color: var(--primary-color);
    padding: 12px 25px; 
    text-decoration: none;
    border-radius: 3px; 
    margin-top: 1rem;
    font-weight: bold;
    border: 2px solid var(--accent-color); 
    transition: background 0.4s, color 0.4s;
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    background: var(--text-on-dark);
    padding: 4rem 0; 
    text-align: center;
    min-height: 70vh; 
    display: flex;
    align-items: center; 
}

.hero-section .container {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    position: relative; 
    width: 100%;
}

/* ------------------------------------------------ */
/* استایل‌های اسلایدرهای عمومی */
/* ------------------------------------------------ */

.slider-container {
    position: relative;
    max-width: 900px; 
    width: 100%;
    margin: 0 auto;
    overflow: hidden; 
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); 
}

/* ⬅️ استایل اختصاصی برای اسلایدر محصولات (کوچکتر) */
.product-showcase-container {
    max-width: 600px; 
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15); 
    border: 1px solid var(--primary-color);
}


.product-slider {
    position: relative;
    width: 100%; 
}

.slide {
    min-width: 100%;
    display: none; /* ⬅️ این باعث پنهان شدن تمام اسلایدها می‌شود */
    position: relative;
}

.slide.active-slide {
    display: block; /* ⬅️ این باعث نمایش اسلایدر اصلی (Hero) می‌شود */
}

/* استایل تصویر اسلایدر اصلی (Hero) */
.product-img {
    width: 100%;
    height: auto;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(58, 46, 139, 0.8); 
    color: var(--accent-color);
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

/* ⬅️ استایل اسلاید محصول (کارت) - در Products Section */
/* ⚠️ در اینجا display: flex حذف شد تا با display: none تداخلی نداشته باشد */
.product-card-slide {
    padding: 40px; 
    background: #fff;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ⬅️ FIX: فقط اسلایدهای کارت فعال باید به صورت Flex نمایش داده شوند */
.product-card-slide.active-slide {
    display: flex; 
}

.product-slide-img { /* تصویر داخل اسلاید محصولات */
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 3px;
}
.product-caption {
    position: static;
    background: none;
    color: var(--primary-color); 
    padding: 0;
}
.product-caption h4 {
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}
.product-caption p {
    color: var(--text-on-light);
    padding: 0 20px;
}


/* دکمه‌های ناوبری اسلایدر */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(58, 46, 139, 0.6); 
    color: white;
    border: none;
    padding: 10px 15px; 
    cursor: pointer;
    font-size: 2rem; 
    line-height: 1; 
    z-index: 10;
    transition: background 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: var(--primary-color);
}

.prev-btn {
    right: 0; 
    border-radius: 0;
}

.next-btn {
    left: 0; 
    border-radius: 0;
}
/* ------------------------------------------------ */

/* About Section */
.about-section {
    background: var(--text-on-dark);
    padding: 5rem 0;
    text-align: center;
    border-top: 1px solid #eee;
}

.about-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Products Section */
.products-section { padding: 5rem 0; text-align: center; }

.products-section h3 { margin-bottom: 3rem; color: var(--primary-color); }


/* Guide Info Section */
.guide-info {
    text-align: center;
    padding: 5rem 0;
    background: var(--light-bg);
}

/* Footer */
.main-footer {
    background: var(--primary-color);
    color: var(--text-on-dark);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* ---------------------- */
/* استایل‌های صفحه راهنمای نصب */
/* ---------------------- */
.important-note {
    background: #ffea0033; 
    border: 1px solid var(--accent-color);
    padding: 15px;
    border-radius: 3px; 
    color: var(--primary-color);
    font-weight: bold;
}
.guide-content { padding: 4rem 0; }


/* ---------------------- */
/* Responsive Design (واکنش‌گرایی) */
/* ---------------------- */

@media (max-width: 768px) {
    .main-header .container { 
        flex-direction: column; 
        text-align: center; 
        gap: 0;
    }
    .main-nav ul { margin-top: 10px; flex-direction: column; }
    .main-nav ul li { margin-bottom: 5px; }
    
    .logo-wrapper { height: 90px; } 

    .hero-section { min-height: 50vh; padding: 2rem 0;}
    .hero-section .container { flex-direction: column; text-align: center; }
    
    .product-card-slide { padding: 20px; } 
    .product-caption p { padding: 0 5px; }
    
    .slider-container { max-width: 90%; }
}