.text span {
    display: block;
    opacity: 0;
    animation: fade 1s forwards;
    position: relative; /* یا absolute اگر خواستی دقیق‌تر */
    z-index: 0;         /* پایین‌تر از همبرگر */
  }
  
  .text span:nth-child(1) { animation-delay: 3.2s; }
  .text span:nth-child(3) { animation-delay: 3.4s; }
  .text span:nth-child(5) { animation-delay: 3.6s; }
  .text span:nth-child(7) { animation-delay: 3.8s; }
  .text span:nth-child(9) { animation-delay: 4s; }
  .text span:nth-child(11) { animation-delay: 4.2s; }
  .text span:nth-child(13) { animation-delay: 4.4s; }
  .text span:nth-child(15) { animation-delay: 4.6s; }
  @keyframes fade {
    to {
      opacity: 1;
    }
  }
  
.reveal-text {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: reveal 10s ease forwards;
    animation-delay: 3s;
  }
  
  @keyframes reveal {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }
  
#typing-text{
    color: beige;
    text-align: center;
    margin: 20px;
    font-weight: 300;
}
body{
    background-color: black;
}
.head {
    align-items: center;
    display: flex;
    text-decoration: none;
    direction: rtl;
    margin-right: 10px;
    margin-left: 20px;
    margin-top: 0%;
    color: aliceblue;
    font-weight: bold;
    font-size: large;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 900px) {
    .split-section {
        flex-direction: column; /* گروه‌ها زیر هم */
    }
    .group {
        width: 100%;
        text-align: center;
    }
}
/* CSS Navbar چسبان */
header {
    position: sticky;
    top: 0;              /* فاصله از بالای صفحه وقتی چسبید */
    z-index: 1000;       /* همیشه بالای بقیه عناصر */
}
.menu {
    display: grid;
    grid-template-columns: repeat(11, 1fr) ;
    grid-template-rows: 1fr 1fr;
    grid-gap: 0px;
    padding-bottom: 20px;
    margin: auto;
    align-items: center;
    background-color: #D4A85F;
    height: 30px;
    padding-top: 10px;
    border-radius: 15px;
    position: sticky;
    z-index: 10;  
}
.icon{
    display: none;
}

.head:hover{
    font-weight: bolder;
    color: rgb(0, 0, 0);
    transition: 1s;
}
@media (max-width: 1100px) {
    .menu{
        grid-template-columns: 1fr 1fr 1fr;
    }
    .item-menu{
        display: none;
    }
    .icon{
        display: block;
        grid-column: 3/4;
        max-width: 44px;
        text-align: right;
    }
    .i{
        grid-column: 3/4;
        margin-left: 200px;
    }
 }
@media(max-width:780px){
    .i{
        margin-left: 150px ;
    }
}
@media(max-width:640px){
    .i{
        margin-left: 100px;
    }
}
@media(max-width:540px){
    .menu{
        grid-template-columns: 1fr 1fr;

    }
    .i{
        grid-column: 2/3;
        margin-left: 160px;
    }
}
@media(max-width:430px){
    .menu{
        grid-template-columns: 1fr 1fr;

    }
    .i{
        grid-column: 2/3;
        margin-left: 120px;
    }
}
@media(max-width:400px){
    .menu{
        grid-template-columns: 1fr 1fr;

    }
    .i{
        grid-column: 2/3;
        margin-left: 90px;
    }
}
@media (max-width: 1100px) {
    /* منوی موبایل */
    .menu {
        display: flex;
        flex-direction: column; /* آیتم‌ها زیر هم */
        align-items: flex-start; 
        position: relative;    }

    .icon {
        align-items: flex-end;
        display: block;
        position: absolute;
        top: 6px;
        right: 10px;
        cursor: pointer;
        z-index: 1001;
    }

    .item-menu { /* همبرگر نو بار بالا */
        align-self: flex-end;
        display: none; /* ابتدا مخفی */
        text-align: center;
        padding-bottom: 15px;
        margin-top: 20px; /* فاصله بین آیتم‌ها */
        background-color: #2C2C2C;
        border-radius: 15px;
        padding-left: 20px;
        padding-right: 25px;
    }

    /* وقتی باز شد */
    .item-menu.open {
        display: block;

    }
}
.typewriter-container {
    font-size: x-small;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: px 0; /* فاصله بالا و پایین */
    /* height: calc(100vh - 100px); حذف شود */
}

#typewriter {
    color: rgb(255, 255, 255);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.8em;
    text-align: center;
    direction: rtl;
    white-space: nowrap;
    overflow: hidden;

}
.item-menu{
    margin-right: none;
}
/* وقتی عرض صفحه کمتر از 840px شد */
@media (max-width: 840px) {
    #typewriter {
        white-space: normal; /* اجازه شکست خط */
        width: 80%; /* یا هر اندازه که دوست داری */
    }
}
/* ==== Preloader ==== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 9999;
}

.preloader-logo {
    width: 250px;
    opacity: 0;
    transform: translateX(-150%);
    animation: slideIn 1.8s ease forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-150%);
    }
    60% {
        opacity: 1;
        transform: translateX(10%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.preloader-hide {
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}
.text span {
    margin-top: 10px;
    display: block;
    opacity: 0;
    animation: fade 1s forwards;
    position: relative; /* یا absolute اگر خواستی دقیق‌تر */
    z-index: 0;         /* پایین‌تر از همبرگر */
  }
  
  .text span:nth-child(1) { animation-delay: 2.2s; }
  .text span:nth-child(3) { animation-delay: 2.2s; }
  .text span:nth-child(5) { animation-delay: 2.2s; }
  .text span:nth-child(7) { animation-delay: 2.2s; }
  .text span:nth-child(9) { animation-delay: 2.2s; }
  .text span:nth-child(11) { animation-delay: 2.2s; }
  .text span:nth-child(13) { animation-delay: 2.2s; }
  .text span:nth-child(15) { animation-delay: 2.2s; }
  @keyframes fade {
    to {
      opacity: 1;
    }
  }
  hr{
    border: 1px solid #111;
}
