/* =========================================
   1. Fonts & Variables (UI/UX Pro Max)
   ========================================= */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.0.0/Vazirmatn-font-face.css');

:root {
    --primary-blue: #0f172a;
    --accent-blue: #0284c7;
    --light-blue: #e0f2fe;
    --accent-cyan: #06b6d4;

    /* بک‌گراند روشن سایت */
    --bg-light: #f8fafc;

    --text-dark: #1e293b;
    --text-muted: #475569;
    --white: #ffffff;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 50px;

    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.05);
    --shadow-hover: 0 25px 50px rgba(2, 132, 199, 0.1);
}

/* =========================================
   2. Reset, Background & Base Styles
   ========================================= */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background-color: var(--bg-light);

    /*
       بک‌گراند خطوط انتزاعی طوسی‌رنگ (شبیه طناب‌های رها شده).
       از منحنی‌های Bezier (C) استفاده شده تا خطوط نرم و کاملاً غیرهندسی باشند.
    */
    background-image: url("data:image/svg+xml,%3Csvg width='1400' height='2400' viewBox='0 0 1400 2400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke-width='2' opacity='0.35'%3E%3C!-- طناب اول: طوسی تیره تر، منحنی طولانی از راست به چپ --%3E%3Cpath stroke='%2394a3b8' stroke-dasharray='8 12' d='M 1400 200 C 900 300, 300 100, 150 800 C 0 1500, 700 1800, 900 2400' /%3E%3C!-- طناب دوم: طوسی روشن تر، رها شده در مرکز --%3E%3Cpath stroke='%23cbd5e1' stroke-dasharray='10 15' d='M -100 600 C 400 900, 1100 700, 1200 1300 C 1300 1900, 600 2100, 400 2400' /%3E%3C!-- طناب سوم: خیلی محو و کوتاه تر برای ایجاد عمق --%3E%3Cpath stroke='%23e2e8f0' stroke-dasharray='6 10' stroke-width='1.5' d='M 800 -100 C 600 400, 1200 1000, 900 1600 C 700 2000, 100 1900, -50 2200' /%3E%3C/g%3E%3C/svg%3E");

    /* ارتفاع زیاد (2400px) باعث می‌شود فاصله‌ها زیاد باشد و فشرده به نظر نرسد */
    background-size: 100% 2400px;
    background-repeat: repeat-y;
    background-position: center top;
}

.main-wrapper {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    width: 100%;
    display: block;
    padding: 100px 0;
    position: relative;
    background: transparent !important;
    z-index: 1;
}

.section-title {
    margin-bottom: 64px;
}

/* =========================================
   4. Animations (Global Components)
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* =========================================
   5. Header & Navigation
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: height 0.4s ease;
}

header.scrolled .nav-container { height: 70px; }

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo img{
    width: 70px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-blue); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.search-icon {
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.search-icon:hover { color: var(--accent-blue); }

.login-btn {
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* =========================================
   6. Expanded Footer
   ========================================= */
.site-footer {
    padding: 80px 0 30px;
    background-color: var(--primary-blue);
    color: #e2e8f0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.15rem;
    margin: 0 0 20px 0;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li { margin-bottom: 12px; }

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--accent-cyan);
    transform: translateX(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #64748b;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent-blue);
    color: var(--white);
    transform: translateY(-3px);
}

.map-container iframe {
    transition: filter 0.3s ease;
}
.map-container iframe:hover {
    filter: none !important;
}

/* =========================================
   7. Global Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-container { height: 70px; }
    header.scrolled .nav-container { height: 60px; }
    section { padding: 60px 0; }

    .site-footer .footer-grid {
        gap: 2rem;
    }
}


/* =========================================
   8. Mega Menu (Glassmorphism & Hub Architecture)
   ========================================= */

/* تنظیم کانتینر هدر برای قرارگیری مگامنو */
.nav-container {
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    position: relative;
}

/* آیکون فلش رو به پایین برای منوهای دراپ‌داون */
.has-mega-menu > a i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.has-mega-menu:hover > a i {
    transform: rotate(180deg);
}

/* کانتینر اصلی مگامنو */
.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 2rem;
}

/* نمایش مگامنو هنگام هاور */
.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* شبکه‌بندی داخلی مگامنو */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mega-menu-col h4 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-menu-col h4 i {
    color: var(--accent-blue);
}

.mega-menu-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-col ul li {
    margin-bottom: 0.8rem;
}

.mega-menu-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* افکت هاور لینک‌های داخلی مگامنو */
.mega-menu-col ul li a:hover {
    color: var(--accent-blue);
    transform: translateX(-5px); /* حرکت ریز به سمت چپ (برای زبان فارسی RTL) */
}

/* استایل برای لینک‌های ویژه (مثل CCTV یا صادرات رنگ) */
.mega-menu-col ul li a.highlight-link {
    color: var(--primary-blue);
    font-weight: 700;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-blue);
}

.mega-menu-col ul li a.highlight-link:hover {
    background: var(--light-blue);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}
