/* تنظیمات پایه برای جلوگیری از ایجاد اسکرول افقی مخفی */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


*, *:before, *:after {
    box-sizing: inherit;
}

/* ==========================================
   بخش ویدیو تیزر خوش‌آمدگویی (پوشش ۱۰۰٪ واقعی و لبه‌به‌لبه مانیتور)
   ========================================== */
.welcome-video-container {
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background-color: #000;
    line-height: 0;
}

.brand-gif {
    width: 100% !important;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================
   اصلاح فواصل سکشن‌ها به دلیل صفر شدن پدینگ والد اصلی
   ========================================== */
.product-request-section,
.main-services,
.about-us-short,
.partners-section {
    padding: 60px 5% !important;
    width: 100%;
    box-sizing: border-box;
}

/* --- بخش درخواست محصول (اعلام نیاز) - اصلاح شده و پایدار --- */
.product-request-section {
    background-color: #f7f8fa;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e1e4e8;
}

.request-container {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e4e8;
    max-width: 650px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.request-container h3 {
    color: #24292e;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 700;
}

.request-container p {
    color: #586069;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

.request-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

.request-form input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #d1d5da;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    text-align: right;
    direction: rtl;
    box-sizing: border-box;
}

.request-form input:focus {
    border-color: var(--primary-color, #043e59);
    box-shadow: 0 0 0 3px rgba(4, 62, 89, 0.2);
}

.request-form button {
    width: 100%;
    padding: 14px 25px;
    background-color: #043e59;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
    box-sizing: border-box;
}

.request-form button:hover {
    background-color: #056c9c;
}

.request-form button:active {
    transform: scale(0.98);
}

/* --- بخش همکاران / دانشگاه‌ها --- */
.partners-section {
    text-align: center;
    background-color: #f8f9fa;
}

.partners-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    direction: rtl;
    text-align: center;
}

.partners-slider {
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
    direction: ltr;
}

.logo-track {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 45px;
    width: max-content;
    animation: scrollLogos 22s linear infinite;
}

@media (hover: hover) {
    .partners-slider:hover .logo-track {
        animation-play-state: paused;
    }
}

.partner-logo {
    width: 110px;
    flex-shrink: 0;
}

.partner-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    mix-blend-mode: multiply;
}

.partner-logo img:hover {
    filter: grayscale(0%);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --- بخش خدمات اصلی (۲ ستونه دسکتاپ، تک‌ستونه موبایل) --- */
.main-services {
    background-color: #fff;
    direction: rtl;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 10px 0;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card.banner-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    padding: 0;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card.banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(5, 108, 156, 0.15);
}

.service-card.banner-card .card-banner {
    width: 100%;
    overflow: hidden;
}

.service-card.banner-card .card-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.service-card.banner-card:hover .card-banner img {
    transform: scale(1.04);
}

.service-card.banner-card h3 {
    text-align: center;
    padding: 18px 10px;
    margin: 0;
    color: #24292e;
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- مزایای رقابتی --- */
.competitive-advantages {
    width: 100%;
    background-color: #043e59;
    color: #fff;
    padding: 50px 5% !important;
    box-sizing: border-box;
}

.advantages-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.advantage-box {
    text-align: center;
    width: 200px;
    transition: transform 0.3s;
}

.advantage-box:hover {
    transform: translateY(-3px);
}

.adv-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.advantage-box h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 700;
}

/* --- درباره ما --- */
.about-us-short {
    background-color: rgba(247, 248, 250, 0.96);
    text-align: center;
    direction: rtl;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.85;
    color: #444;
    text-align: justify;
}

/* --- استایل‌های عمومی بخش‌ها --- */
.section-title {
    text-align: center;
    color: #056c9c;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: #056c9c;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* انیمیشن محو و اسکرول ملایم بارگذاری صفحه */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   بخش استایل‌های پویای تبلت و موبایل (Responsive)
   ========================================== */
@media screen and (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brand-gif {
        aspect-ratio: 16 / 10;
    }

    .request-container {
        padding: 30px 20px;
    }
}

@media screen and (max-width: 480px) {
    .brand-gif {
        aspect-ratio: 4 / 3;
    }

    .product-request-section,
    .main-services,
    .about-us-short,
    .partners-section {
        padding: 40px 15px !important; /* فشرده‌تر شدن فواصل در موبایل برای زیبایی بیشتر */
    }

    .request-container h3 {
        font-size: 1.2rem;
    }

    .request-form input,
    .request-form button {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}
