*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
   font-family: 'Vazirmatn', Tahoma, sans-serif;
}

html{
    overflow-x: hidden;
}
.container-article{
    display: flex;
    flex-direction:row;
    justify-content: space-between;
    margin-top: 40px;
    width: 100%;
   height: 80vh;
    background: #F7F5F2;
}

.wrapper-arti {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0px 20px 10px;
    max-height: 100vh;
}

.wrapper-arti .outer{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.wrapper-arti .card-arti{
    background: white;
    width: 430px;
    display: flex;
    padding: 14px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    border-radius: 20px ;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    animation:  animate 15s linear infinite;
    animation-delay:  calc(3s *var(--delay));
}

.outer:hover .card-arti{
    animation-play-state: paused;
}
.wrapper-arti .card-arti:last-child{
    animation-delay: calc(-3s * var(--delay));
}

@keyframes animate {
    0%{
        opacity: 0;
        transform: translateY(100%) scale(0.5);
    }
     5%,20%{
        opacity: 0.4;
        transform: translateY(100%) scale(0.7);
    }
     25%,40%{
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0%) scale(1);
    }
     45%,60%{
        opacity: 0.4;
       
        transform: translateY(-100%) scale(0.7);
    }

     65%,100%{
        opacity: 0;
       
        transform: translateY(-100%) scale(0.5);
    }
}
.card-arti .content-arti{
    display: flex;
    align-items: center;
    width: 100%; 
}
.wrapper-arti .card-arti .img{
    height: 120px;
    width: 120px;
    position: absolute;
    right: -12px;
    background: white;
    border-radius: 10%;
    padding: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);

}
.card-arti .img img{
    height: 100%;
    width: 100%;
    object-fit: cover;
}



.details .info-arti{
   
   display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 70%;
   
}


.info-arti p{
      font-weight: 500;
    font-size: 16px;
    margin: 6px auto;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* محدود کردن به ۲ خط */
    line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4; 
    max-height: 2.8em; 
    min-height: 1em; 
    width: 100%; 
    text-align: center; 
}
.info-arti a{
    width: 69px;
    text-decoration: none;
    padding: 7px;
    text-align: center;
    border-radius: 25px;
    color: #ffffff;
    margin-top: 10px;
   background: #9C2D2D;
    transition:  all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-arti a:hover{
    transform: scale(0.94);
}


.card-arti .active {
    transform: scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
    z-index: 10;
    transition: all 0.3s ease;
}

/* استایل برای محتوای سمت چپ */
.left-article {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
   text-align: right;
   margin: 20px auto;
    background: #9C2D2D;
   color: #ffffff;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    padding-right: 10px;
    border-radius: 20px;
  
    max-height: 70vh;
    overflow-y: auto;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
 
  
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.active-card-content {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.active-name {
    color: #FFFFFf;
    font-size: 1.7rem;
    margin-bottom: 10px;
  border: 2px solid rgb(167, 221, 19);
    padding-bottom: 8px;
}

.active-title {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.active-description {
    color: #444;
    line-height: 1.7;
    font-size: 16px;
}

.default-message {
    text-align: center;
    color: #888;
    padding: 20px;
}

.default-message h3 {
    color: #ffffff;
    font-size: 2rem;

    margin-bottom: 10px;
}

.left-article .btn-left-article{
   margin: 20px auto;

}
.left-article a{
    text-decoration: none;
    padding: 7px 18px;
    margin-top: 60px;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 25px;
   background: #ffffff;
   color: #9C2D2D;
 
}

.left-article a:hover{
   
font-size: 2.2rem;


}
/* تبلت - صفحه متوسط (1024px به پایین) */
@media screen and (max-width: 1024px) {
    .container-article {
        height: 80vh;
    }
    
    .wrapper-arti {
        width: 50%;
        margin: 0 auto;
    }
    
    .wrapper-arti .card-arti .img{
    height: 100px;
    width: 100px;
    

}
   
    .left-article {
        width: 50%;
    }
    
    .wrapper-arti .card-arti {
        width: 310px;
        max-height: 100px;
      
       padding: 5px;
    }
   
    .info-arti p {
        font-size: 16px;
    }
    
    .left-article a {
        font-size: 1.8rem;
        padding: 6px 16px;
    }
}

/* تبلت کوچک (768px به پایین) */
@media screen and (max-width: 768px) {
    .container-article {
        display: flex;
        flex-direction: row;
       
       
        
        padding-bottom: 40px;
    }
    
    .wrapper-arti {
        width: 90%;
        margin: 20px auto;
        height: 400px;
        order: 1;
    
    }
    
    .left-article {
        width: 90%;
        margin: 20px auto;
        order: 2;
        max-height: 400px;
        margin-top: 30px;
    }
    
    .wrapper-arti .card-arti {
        width: 350px;
        height: 180px;
        padding: 15px;
    }
    
    .wrapper-arti .card-arti .img {
        height: 100px;
        width: 100px;
    }
    
    .info-arti p {
        font-size: 16px;
    }
    
    .info-arti a {
        font-size: 1.5rem;
    }
    
    .left-article a {
        font-size: 1.7rem;
        margin-top: 30px;
        padding: 8px 20px;
    }
    
    .left-article a:hover {
        font-size: 1.8rem;
    }
}

/* موبایل بزرگ (480px به پایین) */
@media screen and (max-width: 480px) {
   
    .container-article{
        display: flex;
        flex-direction:column !important;
        
   
        padding: 0;
        margin: 0;
    
    }

    
    .wrapper-arti {
        width: 100%;
       
     
    }
    
    .left-article {
        width: 95%;
        max-height: 270px;
       
    }
    
    .wrapper-arti .card-arti {
        width: 290px;
        max-height: 100px;
       
       
    }
    
    .wrapper-arti .card-arti .img {
        height: 92px;
        width: 92px;
       
    }
    
    .details .info-arti {
        gap: 6px;
    }
    
    .info-arti p {
        font-size: 14px;
        margin: 4px auto;
    }
    
    .info-arti a {
        width: 60px;
        padding: 5px;
        font-size: 1.3rem;
        margin-top: 8px;
    }
    
    /* استایل برای محتوای left-article در موبایل */
    
     .left-article{
       overflow: hidden;
       display: none;
     }
    
    .left-article > div {
        padding: 15px;
    }
    
    .default-message h3 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .left-article a {
        font-size: 1.5rem;
        padding: 7px 18px;
        margin-top: 20px;
    }
    
    .left-article a:hover {
        font-size: 1.6rem;
    }
}

/* موبایل کوچک (360px به پایین) */
@media screen and (max-width: 360px) {
    .wrapper-arti .card-arti {
        width: 250px;
        height: 150px;
        padding: 10px;
        
    }
    
    .wrapper-arti .card-arti .img {
        height: 90px;
        width: 90px;
    }
    
    .info-arti p {
        font-size: 13px;
    }
    
    .info-arti a {
        font-size: 1.2rem;
        width: 55px;
        padding: 4px;
    }
    
    .left-article {
        width: 98%;
    }
    
    .default-message h3 {
        font-size: 1.6rem;
    }
    
    .left-article a {
        font-size: 1.4rem;
        padding: 6px 16px;
    }
    
    .left-article a:hover {
        font-size: 1.5rem;
    }
}

/* تنظیمات خاص برای ارتفاع کم */
@media screen and   (min-width: 481px) and (max-width: 730px){
     .wrapper-arti {
        width: 90%;
        margin: 20px auto;
        height: 400px;
        order: 1;
    
    }
    
    .left-article {
        width: 90%;
        margin: 20px auto;
        order: 2;
        max-height: 400px;
        margin-top: 30px;
    }
    
    .wrapper-arti .card-arti {
        width: 250px;
        height: 90px;
        padding: 5px;
    }
    
    .wrapper-arti .card-arti .img {
        height: 85px;
        width: 85px;
    }
    .info-arti p {
        font-size: 13px;
      
    }
   
    .left-article a {
        font-size: 1.5rem;
        padding: 7px 18px;
        margin:0 auto
    }
   
    
}
