/* استایل‌های اصلی */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
    background-color: #f9fafb;
}

.gradient-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
}

/* انیمیشن‌ها */
.battery-animation {
    animation: batteryPulse 3s ease-in-out infinite;
}

@keyframes batteryPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.lightning-animation {
    animation: lightning 1.5s ease-in-out infinite;
}

@keyframes lightning {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(5deg); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-in;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-in;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-in;
    will-change: transform, opacity;
}

@keyframes fadeInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.floating-btn {
    animation: float 3s ease-in-out infinite;
    right: 1.5rem;
    left: auto;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.counter-animation {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 15px;
    top: 15px;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

body.modal-open {
    overflow: hidden;
}

/* اسلایدشو */
.slideshow-container {
    position: relative;
    max-width: 100%;
    height: 60vh;
    margin: auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hero-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: slideTransition 0.5s ease-in-out;
}

.hero-slide.active {
    display: block;
}

@keyframes slideTransition {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-overlay h2 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-overlay p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e3a8a;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(251, 191, 36, 0.4);
}

.progress-bar {
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 2s ease-in-out;
}

.battery-icon {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.pulse-border {
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* استایل برای باکس‌های برند */
.brand-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 180px;
}

.brand-box:hover {
    box-shadow: 0 10px 15px rgba(59, 130, 246, 0.1);
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.brand-icon {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.brand-box:hover .brand-icon {
    transform: scale(1.1);
}

.brand-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.brand-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.25;
}

/* لینک‌های برند */
.brand-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.brand-link:hover {
    transform: translateY(-5px);
}

.brand-link .brand-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.brand-link:hover .brand-box::before {
    transform: scaleX(1);
}

/* آکاردئون FAQ */
.accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: white;
}

.accordion-header {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #1e3a8a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border: none;
    width: 100%;
    text-align: right;
}

.accordion-header:hover {
    background-color: #e0e7ff;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-content p {
    padding: 1rem 1.5rem;
    margin: 0;
    text-align: right;
    line-height: 1.6;
    color: #4b5563;
}

.accordion-icon {
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

/* استایل گرید محصولات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
    background: #f8fafc;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-desc {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    min-height: 2.5rem;
}

.product-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.product-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* استایل گرید نظرات */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.review-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 4rem;
    color: #3b82f6;
    opacity: 0.1;
    font-family: serif;
    line-height: 1;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.review-info {
    flex: 1;
}

.review-name {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.review-stars {
    color: #f59e0b;
    font-size: 0.9rem;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: right;
    position: relative;
    z-index: 1;
}

/* استایل‌های عمومی */
section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

h2, h3 {
    margin-top: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* هدر منو */
.nav-menu {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

/* تنظیمات کلی RTL و پایه */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* هدر و هیرو */
header, .hero {
    padding: 1rem;
    text-align: center;
}

.hero h1, .hero h2 {
    font-size: 2rem;
    word-break: break-word;
}

/* ناوبری */
nav ul, .contact-links {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 1rem;
}

/* ویدیو و آمار */
video, .stats {
    max-width: 100%;
    height: auto;
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* Media Query برای موبایل (تا 768px) */
@media (max-width: 768px) {
    /* هدر و هیرو */
    .hero-overlay h2 {
        font-size: 1.8rem !important;
    }
    
    .hero-overlay p {
        font-size: 1.1rem !important;
    }
    
    header, .hero {
        padding: 0.5rem;
    }
    
    /* ناوبری */
    nav ul, .contact-links {
        flex-direction: column;
        align-items: flex-end;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.3rem;
        width: 100%;
        text-align: center;
    }
    
    /* گریدهای محصولات */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* مودال */
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    /* برند باکس در موبایل */
    .brand-box {
        min-height: 140px;
        padding: 1rem 0.75rem;
    }
    
    .brand-title {
        font-size: 0.9rem;
    }
    
    .brand-desc {
        font-size: 0.75rem;
    }
    
    .brand-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* آکاردئون */
    .accordion-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .accordion-content p {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* Media Query برای tablet (768px تا 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-overlay h2 {
        font-size: 2.5rem;
    }
    
    .modal-content {
        width: 85%;
    }
}

/* برای نمایش موبایل کوچک */
@media (max-width: 480px) {
    .grid {
        gap: 0.5rem;
    }
    
    .brand-box {
        min-height: 120px;
        padding: 0.75rem 0.5rem;
    }
    
    .brand-title {
        font-size: 0.8rem;
    }
    
    .brand-desc {
        font-size: 0.7rem;
    }
    
    .brand-icon {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 98%;
        padding: 15px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        text-align: center;
    }
    
    .review-avatar {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
    
    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* استایل‌های اضافی برای بهبود ظاهر */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

/* مخفی کردن iframe Cloudflare برای جلوگیری از پرش */
iframe[style*="visibility: hidden"] {
    display: none !important;
}
/* ازا اینجا به بعد میتونه حذف بشه
/* ======================================================= */
/* SELECTOR نهایی و قوی برای تضمین عملکرد روی چندین سکشن */
/* ======================================================= */

/* هدف قرار دادن کانتینرهای محتوای باز شده در هر دو سکشن */
div#saba1-container.expanded-content,
div#services-container.expanded-content {
    /* ارتفاع را روی یک مقدار بسیار بزرگ تنظیم می‌کنیم تا مطمئن شویم محتوا باز می‌شود */
    max-height: 5000px !important; 
    
    /* مطمئن می‌شویم که محتوای اضافی مخفی نشود */
    overflow: visible !important; 
}

/* پنهان کردن گرادینت محو کننده در حالت گسترده برای هر دو سکشن */
div#saba1-container.expanded-content #saba1-fade,
div#services-container.expanded-content #services-fade {
    opacity: 0 !important;
    visibility: hidden !important;
}
/* استایل‌های دکمه شناور */
.rotate-icon i {
    transition: transform 0.3s ease-in-out;
}
#main-fab.rotate-icon i {
    transform: rotate(45deg); /* افکت چرخشی برای آیکون اصلی */
}
/* استایل ساده برای نمایش tooltip (اختیاری) */
.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    z-index: 10;
}
.tooltip:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}