@font-face {
    font-display: swap;
    font-family: kooh;
    font-style: normal;
    font-weight: 400;
    src: url('../font/kooh.woff2') format("woff"),
        url(../font/kooh.ttf) format("truetype")
}


* {
    font-family: kooh, serif;
    letter-spacing: normal !important
}

body {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    direction: rtl;

}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.my-16 {
    margin-top: 250px;
    margin-bottom: 250px;
}

.sec-title {
    font-size: 3rem !important;
}

.inner-sec-title {
    font-size: 2.5rem !important;
}

#darkModeToggle {
    border-color: #e5e5e5 !important;
    border-radius: 20px;

}

#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 2s ease-in-out;
    margin-top: 100px
}

.hero-wrapper::after {
    content: "";
    position: absolute;
    bottom: -60px;
    /* چقدر بیاد پایین */
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    /* بزرگتر از عرض عکس برای طبیعی‌تر شدن */
    height: 150px;
    /* ضخامت ابر */
    background: rgba(255, 255, 255, 0.9);
    /* رنگ در لایت مد */
    filter: blur(18px);
    /* میزان محو */
    border-radius: 50%;
    /* گرد کردن لبه‌ها برای حالت ابری */
    z-index: 3;
    /* زیر عکس بمونه */
}



.overlay-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    -webkit-mask-image: linear-gradient(to bottom, white 5%, transparent 70%);
    mask-image: linear-gradient(to bottom, white 5%, transparent 70%);
    pointer-events: none;
    user-select: none;
    width: 100vw;
    height: 100vh;
    /* animation: fadeIn 2s ease-in-out; */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='50' height='50' fill='none' stroke='rgba(0,0,0,0.04)'><path d='M0 .5H31.5V32'/></svg>");
    background-repeat: repeat;
}

nav.navbar {
    background-color: transparent;
    z-index: 10;
    /* position: fixed; */
    /* حتماً relative باشه تا z-index اعمال بشه */
    left: 0;
    right: 0;
}

#navbarNav .nav-link {
    border-radius: 10px;
    transition: all 400ms;
}

#navbarNav .nav-link:hover {
    background-color: #eee;
}


h1 {
    font-size: 6rem;
    font-weight: bolder;
}

.lead {
    max-width: 64rem;
    color: #6d6b6b;
    margin: 0 auto;
}

.text-gradient {
    background: linear-gradient(90deg, var(--from, #be598a), var(--to, #ff6a55));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* برای بعضی مرورگرها */
}


/** ECMPower **/
#ecmPowerDesc {
    max-width: 600px;
    margin: 0 auto;
}

.ecmpower-box {
    background-color: #fafafa;
    border-radius: 20px;
}

.dotted-back {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='16' height='16' fill='none'%3e%3ccircle fill='rgb(0 0 0 / 0.2)' id='pattern-circle' cx='10' cy='10' r='1.6257413380501518'%3e%3c/circle%3e%3c/svg%3e");
    padding: 15px;
    border-radius: 20px;
    height: 170px;
}

.inner-box {
    border-radius: 10px;
}

.document-image {
    --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, #00000040);
    padding: 0.25rem;
    background-color: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    position: relative;
    transform-origin: right bottom 10px;
    transform: scale(1.05);
    right: 12px;
    top: 12px;
    position: absolute;
    right: -38px;
    top: 32px;
    transition: all 300ms;
}

.document-image:hover {
    transform: scale(1.1);
}

.document-image img {
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid #737373;
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}

.documentation {
    overflow: hidden;
}

.arrange-box {
    height: 300px !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.arrange-box img {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 15px;
    border: 10px solid #fafafa;
    z-index: 100;
}

.arrange-box img:nth-child(2) {
    bottom: -10px;
    z-index: 99;
    border: 1px solid #e0e0e0;
}

.arrange-box img:nth-child(3) {
    bottom: 0px;
    z-index: 98;
    border: 1px solid #e0e0e0;

}

.arrange-box img:nth-child(4) {
    bottom: 10px;
    z-index: 97;
    border: 1px solid #e0e0e0;

}

.icon-list-up,
.icon-list-down {
    height: 595px;
    /* ارتفاع لیست */
    overflow: hidden;
    position: relative;
}

.icon-list-up::before,
.icon-list-up::after,
.icon-list-down::before,
.icon-list-down::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 140px;
    pointer-events: none;
    /* کلیک رد بشه */
    z-index: 5;
}

.icon-list-up::before,
.icon-list-down::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.icon-list-up::after,
.icon-list-down::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.icon-list-up ul,
.icon-list-down ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.icon-list-up li,
.icon-list-down li {
    font-size: 2rem;
    padding: 10px 0;
}

/* حرکت رو به بالا */
.icon-list-up ul {
    display: inline-block;
    animation: scroll-up 70s linear infinite;
}

/* حرکت رو به پایین */
.icon-list-down ul {
    display: inline-block;
    animation: scroll-down 70s linear infinite;
}

.tab-image {
    transition: all 400ms;
}

.tab-image:hover {
    transform: scale(1.06);
}

/* keyframes */
@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes scroll-down {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

#animatedIcons {
    height: unset !important;
    width: 100%;
}

.tab-content-box {
    background-color: #fafafa;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 15px;
}

#projects .nav-link {
    width: 250px !important;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333 !important;
    margin-bottom: 10px;
}

#projects .nav-link:hover {
    background-color: #eee !important;
}

#projects .nav-link.active {
    background-color: #2a85ff1a !important;
    color: #2a85ff !important;
}

#projects .nav-link.active svg {
    fill: #2a85ff !important;
}


.tech-box {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    transition: transform 0.2s ease;
    position: relative;

}

.tech-image {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 64px;
    height: 64px;
}

.tech-title {
    font-size: 1.1rem;
    text-align: right;
    font-weight: bolder;
}

.tech-desc {
    color: #737373;
    text-align: right;

}

.customize {
    border-radius: 20px;
    background-color: #f5f5f5;
}

#responsible {
    margin-top: 70px;
}

.mobile-wrapper {
    display: inline-block;
    transition: transform 0.4s ease;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    /*max-height: 450px;*/
    /*max-width: 300px;*/
}

.mobile-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 180px;
    /* ارتفاع افکت مه */
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    pointer-events: none;
    /* روی کلیک تصویر تاثیری نداشته باشه */
    border-radius: 0 0 1rem 1rem;
    /* هم‌اندازه با گوشه‌های تصویر */
}

.mobile-wrapper:hover {
    transform: translateY(-10px);
}

.mobile-img {
    height: auto;
    max-width: 100%;
}

.rtl-wrapper {
    display: inline-block;
    transition: transform 0.4s ease;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    max-height: 450px;
}

.rtl-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 180px;
    /* ارتفاع افکت مه */
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    pointer-events: none;
    /* روی کلیک تصویر تاثیری نداشته باشه */
    border-radius: 0 0 1rem 1rem;
    /* هم‌اندازه با گوشه‌های تصویر */
}

.rtl-wrapper:hover {
    transform: translateY(-10px);
}

.rtl-img {
    height: auto;
    max-width: 100%;
}

#map-svg {
    left: -50px;
    transform: scale(1.1);
}

#ir-flag {
    top: 65px;
    left: 120px;
    right: 0;
    margin: 0 auto;
}
#sa-flag {
    top: 40px;
    left: 0;
    right: 0;
    margin: 0 auto;
}

#us-flag {
    top: 60px;
    left: 40px;
}

#cn-flag {
    top: 80px;
    right: 80px;
}

#es-flag {
    top: 180px;
    left: 100px;
}

.flag-icon {
    transition: all 400ms;
}

.flag-icon:hover {
    transform: scale(1.1);
}

#mapSection {
    background: url('../img/map.png') no-repeat 100%/cover;
    height: 300px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin: auto;
}

.grid-box {
    background-color: #fff;
    /* خاکستری روشن */
    border-radius: 20px;
    padding: 30px 0;
    text-align: center;
    border: 1px solid #ccc;
    transition: all 400ms;
    cursor: pointer;
}

.grid-box:hover {
    background-color: #fafafa;
}

.grid-box .icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.grid-box .title {
    font-size: 14px;
    font-weight: bold;
}

#copyright {
    margin-top: 100px;
}

.component-title {
    position: absolute;
    right: 15px;
    text-align: right;
    max-width: 50%;
    top: 20px;
    direction: rtl;

}

.component-title h2 {
    max-width: 600px;
    text-align: right;
}

.aurora-bg {
    background: repeating-linear-gradient(100deg,
            #fff 0%,
            #fff 7%,
            transparent 10%,
            transparent 12%,
            #fff 16%),
        repeating-linear-gradient(100deg,
            #d8b4fe 10%,
            #f0abfc 15%,
            #f9a8d4 20%,
            #fda4af 25%,
            #c4b5fd 30%);
    background-size: 300% 200%;
    filter: blur(20px);
    animation: auroraMove 80s linear infinite;
}

/* انیمیشن حرکت گرادیان */
@keyframes auroraMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#typing-header span {
    opacity: 0;
    /* مخفی کردن اولیه */
    display: inline-block;
    transition: filter 0.3s, opacity 0.3s;
    /* برای انیمیشن بلور و ظاهر شدن */
}


/* منوی موبایل مخفی اولیه */
.mobile-menu {
    background-color: #ffffff;
    width: 250px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1050;
}

/* وقتی فعال شد */
.mobile-menu.active {
    transform: translateX(0);
}

/* Overlay */
#mobileOverlay.active {
    display: block;
}

/* همبرگر همیشه سمت راست */
.navbar-toggler {
    border: none;
    z-index: 1100;
}

#mobileOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1040;
}

#mobileOverlay.active {
    display: block;
}

/* حالت عادی Navbar */
.navbar {
    transition: all 1s ease;
}

/* وقتی اسکرول شد */
.navbar-scrolled {
    position: fixed !important;
    top: 20px;
    left: 0px;
    right: 0;
    margin: 0 auto;
    width: 95%;
    background-color: #fff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    border-radius: 20px;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

#prepare {
    border-radius: 20px;
}

.change-color {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.change-color.active {
    position: relative;
    width: 30px;
    height: 30px;
}

.change-color.active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: red;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;

    /* تیک داخل دایره */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='white' fill='none' stroke-width='2' viewBox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center/60% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='white' fill='none' stroke-width='2' viewBox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center/60% no-repeat;
    background-color: white;
    /* رنگ آیکون */
}

.change-color.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid white;
    border-radius: 50%;
}

#darkModeButton {
    display: none;
}

.switch-mode {
    cursor: pointer;
}

@media (min-width:992px) {
    .tech-box::after {
        content: '';
        position: absolute;
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
        border: 20px solid #eee;
        border-radius: 30px;
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
        z-index: 0;
    }

    .tech-box:hover::after {
        opacity: 1;
        /* transform: scale(1); */
    }

    html[data-bs-theme="dark"] .tech-box::after {
        border-color: #404040 !important;
    }

}

@media (max-width:991px) {
    #typing-header {
        font-size: 25px !important;
    }

    #component-section {
        margin-top: 20px;
    }

    .my-16 {
        margin-top: 100px;
        margin-bottom: 100px;
    }

    .mobile-img {
        margin-top: 30px;
    }

    #mapSection {
        width: 100%;
    }

    #mapContainer {
        padding: 15px !important;
    }

    .component-title,
    .component-title h2 {
        position: relative;
        max-width: unset;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    #copyright {
        margin-top: 15px;
    }

    .tech-wrapper {
        margin-bottom: 20px;
    }

}

html[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #fff !important
}

html[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    color: #fff !important;
}

html[data-bs-theme="dark"] #navbarNav .nav-link:hover {
    background-color: #404040 !important;
}

html[data-bs-theme="dark"] #darkModeToggle {
    border-color: #4a4a4a !important;
}

html[data-bs-theme="dark"] .navbar-scrolled {
    background-color: #262626 !important;
    border: 1px solid #333
}

html[data-bs-theme="dark"] .ecmpower-box {
    background-color: #262626 !important;
}

html[data-bs-theme="dark"] .bg-white {
    background-color: #262626 !important;
}

html[data-bs-theme="dark"] .dotted-back {
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='16' height='16' fill='none'%3e%3ccircle fill='rgb(255 255 255 / 0.2)' id='pattern-circle' cx='10' cy='10' r='1.6257413380501518'%3e%3c/circle%3e%3c/svg%3e");
}

html[data-bs-theme="dark"] .text-white-in-dark {
    color: #fff !important;
}


html[data-bs-theme="dark"] .document-image {
    background-color: unset;
    border: unset;
}

html[data-bs-theme="dark"] .arrange-image {
    border: unset;
}

/* حالت دارک مد */
html[data-bs-theme="dark"] .icon-list-up::before,
html[data-bs-theme="dark"] .icon-list-down::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(38, 38, 38, 1), rgba(38, 38, 38, 0));
}

html[data-bs-theme="dark"] .icon-list-up::after,
html[data-bs-theme="dark"] .icon-list-down::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(38, 38, 38, 1), rgba(38, 38, 38, 0));
}


html[data-bs-theme="dark"] #projects .nav-link {
    color: #fff !important;
}

html[data-bs-theme="dark"] .tab-content-box {
    background-color: transparent;
    border-color: #191c1e;
}

html[data-bs-theme="dark"] .tech-image {
    background-color: #404040;
}

html[data-bs-theme="dark"] .tech-box {
    background-color: #333;
    border-color: #404040;

}

html[data-bs-theme="dark"] .customize {
    background-color: #262626;
}

html[data-bs-theme="dark"] #mapSection {
    background: url('../img/map-dark.png') no-repeat 100%/cover;
}

html[data-bs-theme="dark"] .grid-box:hover {
    background-color: #404040;
}
html[data-bs-theme="dark"] .grid-box {
    background-color: #262626;
    border-color: #404040;
}
html[data-bs-theme="dark"] .hero-wrapper::after {
    background: rgb(33 37 41)
}
/* aurora در حالت دارک مد */
html[data-bs-theme="dark"] .aurora-bg {
    background: repeating-linear-gradient(100deg,
            #262626 0%,    /* نزدیک به بک‌گراند */
            #262626 7%,
            transparent 10%,
            transparent 12%,
            #262626 16%),
        repeating-linear-gradient(100deg,
            #7c3aed 10%,   /* بنفش نئونی */
            #db2777 15%,   /* صورتی تیره */
            #2563eb 20%,   /* آبی نئونی */
            #f59e0b 25%,   /* نارنجی روشن */
            #10b981 30%    /* سبز فیروزه‌ای */
        );
    background-size: 300% 200%;
    filter: blur(25px);
    animation: auroraMove 80s linear infinite;
}


.text-with-phone-button{
    background: #fff;
    border-radius: 1rem;
    padding: 8px;
    margin: 20px;
    text-decoration: none;
    color: #3d3d3d;
    display: inline-grid;
}



.b2b-logo {
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out;
    border-radius: 10%!important;
}

.b2b-logo:hover {
    filter: grayscale(0%);
}
.matrix-box {
    position: relative;
    width: 400px;   /* هر سایزی خواستی */
    height: 300px;  /* هر سایزی خواستی */
    background: #000;
    overflow: hidden;
    border-radius: 12px; /* اختیاری */
}
.matrix-canvas {
    width: 100%;
    height: 100%;
    display: block;
}