* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0f172a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- لوگوی سایت --- */
.site-logo {
    position: fixed;
    top: 18px;
    left: 24px;
    z-index: 1001;
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
    pointer-events: none;
    user-select: none;
}

.site-logo span {
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (max-width: 767px) {
    .site-logo {
        top: 14px;
        left: 16px;
        font-size: 16px;
        letter-spacing: 1.5px;
    }
}

/* --- استایل منو در حالت دسکتاپ (پیش‌فرض) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.menu-list {
    display: flex;
    list-style: none;
    gap: 40px;
}

.menu-item a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* افکت هوور خفن دسکتاپ */
.menu-item a:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

.menu-item a i {
    font-size: 18px;
}

/* --- بخش هیرو (اول سایت) --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.18), transparent 45%),
        radial-gradient(circle at 80% 75%, rgba(168, 85, 247, 0.18), transparent 45%),
        #0f172a;
    z-index: -1;
}

.hero-title {
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 7vw, 62px);
    letter-spacing: 1px;
    min-height: 1.3em;
    background: linear-gradient(135deg, #38bdf8, #a855f7, #38bdf8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.hero-title.typing {
    animation: gradientMove 3s linear infinite;
}

.hero-title.typing::after {
    content: '|';
    color: #38bdf8;
    -webkit-text-fill-color: #38bdf8;
    animation: blink 0.8s step-end infinite;
}

@keyframes gradientMove {
    to { background-position: 200% center; }
}

@keyframes blink {
    50% { opacity: 0; }
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    color: #38bdf8;
    font-size: 22px;
    animation: bounceDown 1.8s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(12px); opacity: 1; }
}

/* --- عنوان مشترک بخش‌ها --- */
.section-heading {
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 5vw, 36px);
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-heading.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    margin: 14px auto 0;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    border-radius: 3px;
}

/* --- بخش درباره ما --- */
.about-section {
    padding: 100px 20px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: clamp(16px, 2.4vw, 19px);
    line-height: 1.9;
    color: #cbd5e1;
}

.about-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--d);
}

.about-text span.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- بخش محصولات --- */
.products-section {
    padding: 80px 20px 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.product-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 8;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.4);
}

.product-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.product-slider .slide.active {
    opacity: 1;
}

.product-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0b1120;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    transform: scale(1.2);
}

@media (max-width: 767px) {
    .product-slider {
        aspect-ratio: 4 / 5;
    }
}

/* --- بخش تماس با ما --- */
.contact-section {
    padding: 80px 20px 120px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-sub {
    color: #94a3b8;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-sub.in-view {
    opacity: 1;
    transform: translateY(0);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 22px;
    border-radius: 14px;
    transition: all 0.3s ease;
}

a.contact-line:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.contact-line i {
    color: #38bdf8;
}

/* --- فوتر --- */
.site-footer {
    padding: 40px 20px 120px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

.footer-logo {
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.footer-logo span {
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-footer p {
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 767px) {
    .site-footer {
        padding: 30px 20px 140px;
    }
}

/* --- استایل مخصوص موبایل (صفحه‌های زیر 768 پیکسل) --- */
@media (max-width: 767px) {
    .navbar {
        top: auto;
        bottom: 0; /* انتقال به پایین صفحه */
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 24px 24px 0 0;
        padding: 10px 0;
        background: rgba(15, 23, 42, 0.9);
    }

    .menu-list {
        width: 100%;
        justify-content: space-around;
        gap: 0;
        padding: 0 10px;
    }

    .menu-item a {
        flex-direction: column; /* آیکون بالا و متن پایین */
        gap: 5px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .menu-item a i {
        font-size: 22px;
    }

    .content {
        padding: 40px 20px 100px 20px; /* ایجاد فاصله در پایین برای منو */
    }
}
/* --- دکمه شناور چت --- */
.ai-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #38bdf8, #0369a1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-btn i {
    color: #fff;
    font-size: 26px;
}

/* اگر خواستی عکس بذاری، این استایل برای عکست هست */
.ai-chat-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    
}

.ai-chat-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.6);
}

/* --- پنجره چت هوش مصنوعی --- */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 340px;
    height: 460px;
    max-height: 65vh;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* حالت فعال شدن چت باکس */
.ai-chat-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* هدر چت */
.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #38bdf8;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ef4444;
}

/* بدنه چت (محل پیام‌ها) */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.ai-msg {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-msg {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 500;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* فوتر چت (محل تایپ) */
.chat-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px;
    color: #fff;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.chat-footer input:focus {
    border-color: #38bdf8;
}

.chat-footer button {
    background: #38bdf8;
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-footer button:hover {
    background: #0ea5e9;
}

/* --- هماهنگی با موبایل --- */
@media (max-width: 767px) {
    .ai-chat-btn {
        bottom: 90px; /* بالا بردن دکمه روی موبایل تا روی منوی پایین صفحه نیفتد */
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .ai-chat-window {
        bottom: 12px;
        right: 12px;
        left: 12px;
        top: 12px;
        width: auto;
        height: auto;
        max-height: none;
        border-radius: 20px;
    }

    .ai-chat-window.active {
        transform: translateY(0) scale(1);
    }
}
/* --- دکمه بالا برنده هوشمند (Progress Scroll) --- */
.progress-wrap {
    position: fixed;
    bottom: 30px;
    left: 30px; /* این دکمه سمت چپ قرار می‌گیرد تا با چت‌باکس که سمت راست است تداخل نداشته باشد */
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    border-radius: 50%;
    box-shadow: inset  0 0 0 2px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 200ms linear;
    background-color: rgba(30, 41, 59, 0.9);
}

/* حالت فعال شدن و دیدن شدن دکمه */
.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* آیکون فلش داخل دایره */
.progress-wrap i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 16px;
    color: #38bdf8; /* رنگ آیکون */
    transition: all 200ms linear;
}

/* افکت هاور (نگه داشتن موس روی دکمه) */
.progress-wrap:hover i {
    transform: translate(-50%, -60%); /* فلش کمی به سمت بالا حرکت می‌کند */
    color: #ffffff;
}

/* استایل‌دهی به مسیر دایره SVG */
.progress-wrap svg path { 
    fill: none; 
    stroke: #38bdf8; /* رنگ نوار پیشرفت دایره‌ای */
    stroke-width: 4; 
    box-sizing:border-box; 
    transition: all 200ms linear;
}

/* --- هماهنگی با موبایل --- */
@media (max-width: 767px) {
    .progress-wrap {
        bottom: 95px; /* بالا بردن دکمه روی موبایل تا بالای منوی پایینی قرار بگیرد */
        left: 20px;
        height: 42px;
        width: 42px;
    }
    
    .progress-wrap i {
        font-size: 14px;
    }
}
