/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007BFF; /* آبی */
    --secondary-color: #343A40; /* مشکی ملایم */
    --light-bg: #f8f9fa; /* خاکستری روشن */
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --border-color: #dee2e6;
    --container-width: 1100px;
}

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

html {
    scroll-behavior: smooth; 
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--white);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

ul { list-style: none; }
a { text-decoration: none; color: var(--primary-color); }
img { max-width: 100%; height: auto; }
p { margin-bottom: 1rem; }

/* --- Utility Classes --- */
.section-padding {
    padding: 4rem 0;
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700; 
    margin-bottom: 3rem;
    color: var(--secondary-color);
}
.bg-light {
    background-color: var(--light-bg);
}

/* --- Buttons --- */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.3rem;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
}
.btn-primary:hover {
    background: #0056b3;
}

.btn-cta {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.btn-cta:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.3rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* --- 1. Header / Navigation --- */
.main-header {
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem; 
}
.logo i {
    color: var(--primary-color); 
    font-size: 1.4rem; 
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
}
.nav-menu a:hover {
    color: var(--primary-color);
}
.nav-menu a.btn-primary {
    color: var(--white);
}
.nav-menu a.btn-primary:hover {
    color: var(--white);
    background: #0056b3; 
}

/* --- 2. Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    min-height: 450px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}
.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
    font-weight: 300;
}

/* --- 3. Features / Services (Grid) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem; 
}
.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color); 
    font-weight: 700;
}

/* --- 4. About Us (Flexbox) --- */
.about-flex {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.about-text {
    flex: 1; 
}
.about-text .section-title {
    text-align: right; 
}
.about-image {
    flex: 1; 
}
.about-image img {
    border-radius: 8px;
    width: 100%; 
    height: 300px; 
    object-fit: cover; 
}

/* --- 5. Portfolio (Grid) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; 
}
.portfolio-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.portfolio-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    display: block; 
}
.portfolio-info {
    padding: 1.25rem;
}
.portfolio-info h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.portfolio-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* --- 6. Pricing Plans (Grid) --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.price-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}
.price-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.1);
}
.price-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
}
.price-card .price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}
.price-card .price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}
.price-card ul {
    margin: 1.5rem 0;
}
.price-card li {
    margin-bottom: 0.75rem;
}
.price-card .btn-outline,
.price-card .btn-primary {
    margin-top: 1rem;
}

/* ============================================== */
/* --- بخش 7: استایل کروسل نظرات --- (جدید) --- */
/* ============================================== */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem 5rem; /* فضای بیشتر در کناره‌ها برای دکمه‌ها */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden; /* مهم */
    text-align: center;
}

.testimonial-slider {
    position: relative;
    width: 100%;
    /* ارتفاع ثابت برای جلوگیری از پرش صفحه */
    min-height: 220px; 
    display: flex;
    align-items: center;
}

.testimonial-slide {
    display: none; /* مخفی کردن همه اسلایدها */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    
    /* انیمیشن محو شدن (Fade) */
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.testimonial-slide.active {
    display: flex; /* نمایش اسلاید فعال */
    opacity: 1;
}

.testimonial-slide .avatar {
    font-size: 3.5rem; /* آیکون آواتار کاربر */
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.testimonial-slide .quote-icon {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--border-color);
    opacity: 0.7;
}

.testimonial-slide blockquote {
    font-size: 1.2rem; 
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.8;
}

.testimonial-slide cite {
    font-weight: 700;
    color: var(--secondary-color);
}

/* دکمه‌های ناوبری کروسل */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}
.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
/* دکمه‌ها برعکس برای فارسی (RTL) */
.prev-btn {
    right: 1rem; 
}
.next-btn {
    left: 1rem; 
}

/* --- 8. Footer (Grid) --- */
.main-footer {
    background: var(--secondary-color);
    color: #ccc;
    padding: 3rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.main-footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 700;
}
.main-footer p, .main-footer a {
    color: #ccc;
    margin-bottom: 0.5rem;
    font-weight: 300;
}
.main-footer a:hover {
    color: var(--white);
}
.main-footer ul li {
    margin-bottom: 0.5rem;
}
.social-links a {
    margin-left: 0.5rem;
}

/* --- Responsive (Mobile / Tablet) --- */
@media (max-width: 900px) {
    .features-grid,
    .pricing-grid,
    .portfolio-grid { 
        grid-template-columns: 1fr 1fr; 
    }
    .about-flex {
        flex-direction: column; 
        text-align: center;
    }
    .about-text .section-title {
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .nav-menu {
        display: none; 
    }
    .logo {
        width: 100%;
        justify-content: center;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .features-grid,
    .pricing-grid,
    .portfolio-grid, 
    .footer-grid {
        grid-template-columns: 1fr; 
    }
    .price-card.featured {
        transform: scale(1); 
    }
    .about-image img, .portfolio-item img {
        height: auto; 
    }

    /* کروسل در موبایل */
    .carousel-container {
        padding: 2rem 1rem; /* پدینگ کمتر */
    }
    .carousel-btn {
        /* دکمه‌ها را کوچکتر می‌کنیم */
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    .prev-btn { right: 0.5rem; }
    .next-btn { left: 0.5rem; }
    .testimonial-slide blockquote { font-size: 1rem; }
}