/* ===== ملف الأنماط الأساسي للشريط المتحرك ===== */

/* الحاوية الرئيسية */
.lph-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 25px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--lph-bg-color, #ff0000) 0%, var(--lph-bg-color-dark, #cc0000) 100%);
}

/* الحاوية الداخلية */
.lph-marquee-container {
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

/* المسار المتحرك */
.lph-marquee-track {
    display: flex;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: running;
    width: max-content;
    gap: 25px;
    padding: 0 15px;
    will-change: transform;
}

/* حركة من اليمين لليسار */
.lph-marquee-track[data-direction="right"] {
    animation-name: lphMarqueeRightToLeft;
}

/* حركة من اليسار لليمين */
.lph-marquee-track[data-direction="left"] {
    animation-name: lphMarqueeLeftToRight;
}

/* العنصر الفردي في الشريط */
.lph-marquee-item {
    flex: 0 0 auto;
    width: 320px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.lph-marquee-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

/* الرابط الكامل للعنصر */
.lph-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* الصورة الكبيرة */
.lph-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.lph-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lph-marquee-item:hover .lph-thumbnail::after {
    opacity: 1;
}

.lph-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.lph-marquee-item:hover .lph-image {
    transform: scale(1.08);
}

/* محتوى النص */
.lph-content {
    padding: 20px;
    text-align: right;
}

.lph-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--lph-text-color, #ffffff);
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* التصنيف */
.lph-category {
    margin-bottom: 15px;
}

.lph-category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--lph-text-color, #ffffff) !important;
}

.lph-category-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}

.lph-category-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* البيانات الوصفية */
.lph-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lph-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.lph-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.lph-date,
.lph-author {
    transition: color 0.3s ease;
}

.lph-marquee-item:hover .lph-date,
.lph-marquee-item:hover .lph-author {
    color: var(--lph-text-color, #ffffff);
}

/* الرسوم المتحركة */
@keyframes lphMarqueeRightToLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 12.5px));
    }
}

@keyframes lphMarqueeLeftToRight {
    0% {
        transform: translateX(calc(-50% - 12.5px));
    }
    100% {
        transform: translateX(0);
    }
}

/* التصميم المتجاوب */
@media (max-width: 1400px) {
    .lph-marquee-item {
        width: 300px;
    }
    
    .lph-thumbnail {
        height: 180px;
    }
}

@media (max-width: 1200px) {
    .lph-marquee-item {
        width: 280px;
    }
    
    .lph-thumbnail {
        height: 160px;
    }
    
    .lph-title {
        font-size: 17px;
    }
}

@media (max-width: 992px) {
    .lph-marquee-wrapper {
        margin: 20px 0;
        border-radius: 10px;
    }
    
    .lph-marquee-item {
        width: 260px;
    }
    
    .lph-thumbnail {
        height: 150px;
    }
    
    .lph-content {
        padding: 15px;
    }
    
    .lph-title {
        font-size: 16px;
        min-height: 45px;
    }
}

@media (max-width: 768px) {
    .lph-marquee-wrapper {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .lph-marquee-item {
        width: 240px;
    }
    
    .lph-thumbnail {
        height: 140px;
    }
    
    .lph-title {
        font-size: 15px;
        min-height: 42px;
    }
    
    .lph-meta {
        gap: 10px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .lph-marquee-item {
        width: 220px;
    }
    
    .lph-thumbnail {
        height: 130px;
    }
    
    .lph-content {
        padding: 12px;
    }
    
    .lph-title {
        font-size: 14px;
        min-height: 40px;
    }
    
    .lph-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* تأثير التوقف عند مرور الماوس */
.lph-marquee-track.paused {
    animation-play-state: paused !important;
}

/* تأثير عند التحميل */
@keyframes lphFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lph-marquee-wrapper {
    animation: lphFadeIn 0.8s ease-out;
}