/* فونت های مربوط به متن های سایت */

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-ExtraBold.woff2') format('woff2'),
        url('/font/Pinar-ExtraBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Bold.woff2') format('woff2'),
        url('/font/Pinar-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Light.woff2') format('woff2'),
        url('/font/Pinar-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Medium.woff2') format('woff2'),
        url('/font/Pinar-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-Regular.woff2') format('woff2'),
        url('/font/Pinar-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('/font/Pinar-SemiBold.woff2') format('woff2'),
        url('/font/Pinar-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: 0.5s ease;
}

.loader-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

/* استایل مربوط به ورژن بار صفحه */

#version-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: opacity .4s ease, visibility .4s ease;
}

#version-popup.hidden {
    opacity: 0;
    visibility: hidden;
}

.ver-content {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 28px 32px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    color: #e1e3e7;
    animation: popIn .5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ver-content h2 {
    margin: 0 0 10px;
    color: #2563EB;
    font-size: 1.4rem;
}

.ver-content .status {
    color: #3b3e44;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.section h3 {
    font-size: 1rem;
    margin: 10px 0 4px;
    color: #2563eb;
}

.section ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 12px;
}

.section ul li {
    font-size: 0.88rem;
    color: rgb(0, 0, 0);
    margin: 3px 0;
    line-height: 1.5;
}

#close-popup {
    background: linear-gradient(145deg, #2563eb, #0f172a);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#close-popup:hover {
    background: radial-gradient(circle at top left, #0f172a, #2563eb);
    color: #fff;
    box-shadow: 0 0 15px rgba(130, 220, 255, 0.4);
    transition: all 1.5s ease;
}

/* ===== حالت موبایل ===== */
@media (max-width: 600px) {
    #version-popup {
        align-items: flex-end;
    }

    .ver-content {
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding: 24px 20px;
        margin: 0;
    }

    h2 {
        font-size: 1.2rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pinar';
    text-decoration: none;
}

.floating-controls {
    position: fixed;
    left: 20px;
    /* چون سایت فارسیه سمت چپ بهتره */
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.616);
}

.float-btn:hover {
    transform: translateY(-4px);
}



/* دکمه اسکرول اول مخفیه */
.scroll-top {
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* دارک مود */
body.dark .float-btn {
    background: #1e1e1e;
    color: #fff;
}

body {
    overscroll-behavior: none;
    background: #f8fafc;
    color: #0f172a;
    transition: background 0.8s, color 0.8s;
}

/* Chrome, Edge */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f172a;
}

/* دیزاین هدر */
.header {
    padding-top: 30px;
}

.header-inner {
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: auto;
    padding: 16px 24px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.308);

}

/* تیتر هدر */
.logo {
    font-size: 20px;
    color: #0f172a;
    transition: all 0.9s;
}

.logo:hover {
    transform: scale(1.2);
    transition: all 0.9s;
}



body.dark .logo {
    color: white;
}

/* منوی هدر */
.nav-links {
    list-style: none;
    display: flex;
    gap: 50px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    width: 0%;
    height: 2px;
    background: #2563eb;
    left: 0;
    bottom: -10px;
    /* فاصله از متن */
    transition: width 0.5s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* لینک فعال (Active page) */
.nav-links a.active {
    color: #2563eb;
    /* رنگ لینک فعال */
}

.nav-links a.active::after {
    width: 100%;
    background: #2563eb;
}

/* کنترل های سایت | زبان، روشنایی */
.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== دیزاین بخش تغییر زبان ===== */
.lang-switch {
    position: relative;
    display: flex;
    width: 110px;
    height: 36px;
    background: #1e293b;
    border-radius: 18px;
    overflow: hidden;
}

.lang-switch button {
    flex: 1;
    background: transparent;
    border: none;
    color: #cbd5f5;
    cursor: pointer;
    z-index: 2;
    font-weight: bold;
}

.lang-switch button.active {
    color: #0f172a;
}

.lang-slider {
    position: absolute;
    width: 50%;
    height: 100%;
    background: #38bdf8;
    border-radius: 18px;
    transition: transform 0.3s ease;
    z-index: 1;
}

/* ===== دیزاین دکمه روشنایی ===== */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #1e293b;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s, color 0.3s;
}

.theme-btn:hover {
    transform: rotate(20deg);
}

/* دیزاین حالت دارک مود */
body.dark {
    background: #020617;
    color: white;
}

body.dark .header-inner {
    background: #020617;
    color: white;
    box-shadow: 0 10px 60px #2564eb44;

}

body.dark .nav-links a {
    color: #cbd5f5;
}

body.dark .nav-links a:hover {
    color: white;
}

body.dark .lang-switch button.active {
    color: #020617;
}

body.light .lang-switch button.active {
    color: #ffffff;
}

body.dark .theme-btn {
    background: #facc15;
    color: #020617;
}

body.dark .hero-image img {
    box-shadow: 0 10px 60px #2564eb6e;

}

body.dark .service-card {
    background: #1e1e1e;
    color: #fff;
}

body.dark .service-card {
    background: #1e1e1e;
    color: #fff;
    box-shadow: 0 0px 30px #2564eb73;

}

body.dark .service-card:hover {
    box-shadow: 0 0 10px #2564eb73;
}

body.dark .project-card {
    box-shadow: 0 0px 30px #2564eb73;

}

body.dark .project-card:hover {
    box-shadow: 0 0 10px #2564eb73;
}

body.dark .project-card {
    background: #1e1e1e;
    color: #fff;
}

body.dark .social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    border-radius: 50%;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

body.dark .footer h3 {
    color: #ffffff;
}

body.dark .footer {
    position: relative;
}

body.dark .footer::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to left,
            transparent,
            rgb(255, 255, 255),
            transparent);
}

/* کانتینر و وسط‌چین */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    direction: start;
}

/* Header */
header {
    margin-bottom: 40px;
    padding: 20px;
    /* پس‌زمینه سفید برای هدر */
    border-radius: 8px;
}

header h1 {
    color: #007bff;
    /* آبی اصلی */
    margin-bottom: 10px;
    font-size: 2.5em;
    text-align: center;
}

header p {
    color: #000000;
    font-size: 1.1em;
    text-align: center;
}

body.dark header p {
    color: white;
}

/* Contact Section */
.contact-section {
    display: flex;
    flex-wrap: wrap;
    /* برای ریسپانسیو شدن */
    gap: 30px;
    margin-bottom: 40px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark .contact-section {
    background-color: #1e1e1e;
}

.contact-form,
.contact-info {
    flex: 1;
    /* هر دو بخش مساوی فضا بگیرند */
    min-width: 300px;
    /* حداقل عرض برای ریسپانسیو */
}

.contact-form h2,
.contact-info h2,
.social-media h2,
.map-address-section h2 {
    color: #0056b3;
    /* آبی تیره‌تر برای عنوان‌ها */
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

body.dark .contact-form h2,
body.dark .contact-info h2,
body.dark .social-media h2,
body.dark .map-address-section h2 {
    color: #ffffff;
    /* آبی تیره‌تر برای عنوان‌ها */
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}


/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

body.dark .form-group label {
    color: white;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    /* آبی هنگام فوکوس */
    outline: none;
    /* حذف اوت‌لاین پیش‌فرض */
}

.form-group textarea {
    resize: vertical;
    /* فقط امکان تغییر ارتفاع */
}

.btn {
    display: inline-block;
    background-color: #007bff;
    /* آبی اصلی */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
    /* آبی تیره‌تر */
}

/* Contact Info Styling */
.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.contact-info i {
    color: #007bff;
    /* آبی اصلی برای آیکون‌ها */
    margin-left: 10px;
    /* فاصله بین آیکون و متن */
}

.contact-info a {
    color: #333;
    /* رنگ لینک‌ها */
    text-decoration: none;
    transition: color 0.3s ease;
}

body.dark .contact-info a {
    color: white;
}

body.dark .contact-info a:hover {
    color: #007bff;
}

.contact-info a:hover {
    color: #007bff;
    /* آبی اصلی */
}

/* Social Media Styling */
.social-media ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
    /* فاصله بین آیکون‌ها */
}

.social-media li a {
    color: #555;
    /* رنگ خاکستری برای آیکون‌ها */
    font-size: 1.8em;
    /* اندازه بزرگتر آیکون‌ها */
    transition: color 0.3s ease;
}

.social-media li a:hover {
    color: #007bff;
    /* آبی اصلی هنگام هاور */
}

/* Map and Address Section */
.map-address-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

body.dark .map-address-section {
    background-color: #1e1e1e;
}

.map-container,
.address {
    flex: 1;
    min-width: 300px;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    /* ارتفاع نقشه */
    border-radius: 5px;
    border: none;
    /* حذف کردن border پیش‌فرض iframe */
}

.address p {
    font-size: 1.1em;
    color: #555;
}

body.dark .address p {
    color: white;
}









.footer {
    padding: 30px 0 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.253);
    direction: start;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
}

.footer h3 {
    font-size: 22px;
    margin-bottom: 30px;
    color: #0f172a;
}

.footer p {
    opacity: 0.7;
    line-height: 2;
    text-align: justify;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    border-radius: 50%;
    transition: 0.3s;
    color: inherit;
    text-decoration: none;
}

.social-icons a:hover {
    transform: translateY(-5px);
}

.contact-phone {
    margin-top: 20px;
}

.contact-phone a {
    margin-top: -20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
    transition: 0.3s;
    font-size: 14px;
}

.contact-phone a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
}

.footer-bottom p {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}



/* ریسپانسیو */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

.mobile-menu {
    display: none;
}

.menu-toggle {
    display: none;
}


.has-dropdown {
    position: relative;
}

/* --- استایل‌های مربوط به زیرمنو --- */

.desktop-nav .has-dropdown {
    position: relative;
    /* برای موقعیت‌دهی absolute زیرمنو */
}

.desktop-nav .dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    /* حذف padding پیش‌فرض */
    color: inherit;
    /* رنگ را از nav-link به ارث می‌برد */
    font-size: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.desktop-nav .dropdown-toggle .arrow {
    font-size: 0.8em;
    /* اندازه آیکون فلش */
    transition: transform 0.3s ease;
    /* انیمیشن چرخش */
    margin-left: 8px;
    /* فاصله بین متن و آیکون */
    display: inline-block;
    /* برای اعمال transition */
}

/* زیرمنو (لیست آیتم‌ها) */
.desktop-nav .dropdown {
    position: absolute;
    top: 100%;
    /* زیر دکمه اصلی قرار می‌گیرد */
    right: 0;
    /* در سمت راست هم‌تراز می‌شود */
    background-color: #ffffff;
    color: #0f172a;
    /* رنگ پس‌زمینه زیرمنو (تم تیره) */
    border-radius: 8px;
    list-style: none;
    padding: 15px;
    margin-top: 6px;
    min-width: 180px;
    /* حداقل عرض زیرمنو */
    display: none;
    /* پنهان در حالت پیش‌فرض */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    /* سایه برای عمق بیشتر */
    animation: fadeInDropdown 0.25s ease forwards;
    /* انیمیشن باز شدن */
    z-index: 1000;
    /* اطمینان از روی بقیه عناصر بودن */
}

body.dark .desktop-nav .dropdown {
    background-color: #0f172a;
    color: white;
}

/* استایل آیتم‌های داخل زیرمنو */
.desktop-nav .dropdown li {
    margin: 0;
}

.desktop-nav .dropdown a {
    color: #0f172a;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    /* برای پر کردن عرض */
    white-space: nowrap;
    /* جلوگیری از شکستن متن */
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.desktop-nav .dropdown a:hover {
    background-color: #005eff;
    color: white;
    /* رنگ پس‌زمینه در حالت هاور */
    /* افکت حرکت کوچک */
}

/* نمایش زیرمنو وقتی والد آن کلاس 'open' دارد */
.desktop-nav .has-dropdown.open .dropdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* چرخش فلش در حالت باز شده */
.desktop-nav .has-dropdown.open .arrow {
    transform: rotate(180deg);
    /* چرخش ۱۸۰ درجه برای نشان دادن بسته شدن */
}

/* انیمیشن fade-in برای زیرمنو */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* اگر استایل active دارید، برای آیتم های دراپدان هم مشابه اعمال کنید */
.desktop-nav .dropdown a.active {
    background-color: #005eff;
}

.nav-link .arrow {
    font-size: 0.8em;
    margin-left: 8px;
    /* فاصله از متن */
    /* استایل‌های دیگه در صورت نیاز */
}







@media screen and (max-width: 1000px) {

    /* ===== هدر موبایل ===== */
    header {
        width: 100%;
        padding: 14px 16px;
        border-radius: 0;
        margin: 0;

    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1;
    }

    footer .footer-about,
    footer .footer-links,
    footer .footer-social {
        display: none;
    }

    .footer {
        border-top: 0px solid rgba(0, 0, 0, 0.253);
    }

    /* ===== منوی دسکتاپ کاملاً مخفی ===== */
    .desktop-nav {
        display: none !important;
    }

    /* ===== لوگو + کنترل‌ها ===== */
    .logo-area {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo-area h1 {
        font-size: 16px;
        white-space: nowrap;
    }

    /* دکمه زبان و دارک مود */
    .controls {
        display: none;
        gap: 6px;
    }

    .lang-switch,
    .theme-toggle {
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
        font-size: 13px;
    }

    .menu-toggle {
        display: block;
        order: 2;
        font-size: 26;
    }

    .nav {
        display: none;
    }

    .mobile-menu {
        font-family: 'Pinar';
        position: fixed;
        top: 0;
        left: 0;
        width: 100dvw;
        height: 100dvh;
        overflow-y: auto;
        /* این مهمه */

        background: #0f172a;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        transform: translateX(100%);
        transition: 0.4s ease;
        z-index: 99999;
    }

    .mobile-menu.active {
        transform: translateX(0);
        color: #00e0ff;
    }

    /* آیتم‌ها */
    .menu-items {
        width: 80%;
        max-width: 400px;
    }

    .menu-items a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        /* 👈 فاصله آیکن و متن */

        background: #2563eb;
        border-radius: 12px;
        padding: 15px;
        margin: 15px 0;

        text-decoration: none;
        color: white;
        font-size: 18px;

        transition: 0.3s;
    }



    /* دکمه بستن */
    .close-menu {
        gap: 8px;
        font-family: 'Pinar';
        margin-top: 40px;
        padding: 12px 30px;
        background: #ffffff;
        color: #2563eb;
        font-weight: bold;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
    }

    /* ===== فاصله محتوا از منوی پایین ===== */


    body {
        padding-bottom: 70px;
    }

    header h1 {
        font-size: 2em;
    }

    .contact-section,
    .map-address-section {
        flex-direction: column;
        /* در صفحات کوچکتر، ستون‌ها روی هم قرار بگیرند */
    }

    .contact-form,
    .contact-info,
    .map-container,
    .address {
        width: 100%;
        /* عرض کامل بگیرند */
    }

}