/* 
 * Elementor Likes Carousel Style Sheet
 * بر اساس متغیرهای پویا انتخاب شده در پنل تنظیمات پیشرفته
 */

:root {
    --el-primary-color: #12463a;
    --el-secondary-color: #64748b;
    --el-bg-card: #ffffff;
    --el-text-heading: #1e293b;
    --el-text-body: #475569;
    --el-border-radius: 12px;
    --el-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* راست‌چین کردن اسلایدر بر اساس جهت متن وردپرس */
.el-carousel-wrapper {
    direction: rtl;
    position: relative;
    width: 100%;
    margin: 40px auto;
    padding: 10px 0 25px;
    overflow: visible;
}

.el-carousel-track-container {
    width: 100%;
    overflow: hidden;
    padding: 15px 0;
}

.el-carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    cursor: grab;
}

.el-carousel-track:active {
    cursor: grabbing;
}

/* استایل های کارت محصول */
.el-carousel-card {
    flex: 0 0 calc((100% - ((3 - 1) * 16px)) / 3);
    box-sizing: border-box;
    background: var(--el-bg-card);
    border-radius: var(--el-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--el-transition);
}

/* ریپسانسیو بر اساس اندازه ستون‌های کاروسل */
@media (max-width: 1024px) {
    .el-carousel-card {
        flex: 0 0 calc((100% - 16px) / 2) !important;
    }
}

@media (max-width: 640px) {
    .el-carousel-card {
        flex: 0 0 100% !important;
    }
}

/* افکت‌های هاور کارت بر اساس تنظیمات انتخابی کاربر */
.el-carousel-card:hover {
    transform: translateY(-10px) 1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

/* باکس تصویر مقاله */
.el-card-image-box {
    position: relative;
    width: 100%;
    padding-top: 58%; /* نسبت تصویر 16:9 عالی */
    overflow: hidden;
    background: #e2e8f0;
}

.el-card-image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.el-carousel-card:hover .el-card-image-box img {
    transform: scale(1.08);
}

.el-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--el-primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* محتوای متنی کارت */
.el-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.el-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.5;
}

.el-card-title a {
    color: var(--el-text-heading);
    text-decoration: none;
    transition: var(--el-transition);
}

.el-card-title a:hover {
    color: var(--el-primary-color);
}

.el-card-excerpt {
    font-size: 13px;
    color: var(--el-text-body);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* بخش پایانی کارت شامل ادامه مطلب و لایک */
.el-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px dashed #f1f5f9;
}

.el-read-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--el-primary-color);
    text-decoration: none;
    transition: var(--el-transition);
}

.el-read-more-btn svg {
    transition: transform 0.2s ease;
    transform: scaleX(-1); /* راست به چپ */
}

.el-read-more-btn:hover {
    gap: 10px;
}

/* دکمه لایک پویای وردپرس */
.el-like-button {
    background: #fdf2f8;
    color: #12463a;
    border: 1px solid #fbcfe8;
    border-radius: 30px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: var(--el-transition);
    position: relative;
    outline: none;
}

.el-like-button:hover {
    background: #12463a !important;
    transform: scale(1.05);
}
.el-like-button:focus {
    background: #12463a !important;
    transform: scale(1.05);
}

.el-like-button.liked {
    background: #12463a;
    color: #ffffff;
    border-color: #0b2c24;
    animation: heartThrow 0.2s ease-in-out;
}

.el-like-button.liked svg {
    fill: #currentColor;
}

.el-heart-svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

@keyframes heartThrow {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* دکمه های اسلایدر کاروسل */
.el-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--el-transition);
}

.el-carousel-btn:hover:not(:disabled) {
    background: var(--el-primary-color);
    color: #ffffff;
    border-color: var(--el-primary-color);
}

.el-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* قبلی و بعدی بر اساس جهت RTL */
.el-prev-btn {
    right: -20px;
}

.el-next-btn {
    left: -20px;
}

/* برای موبایل‌ها دکمه‌ها داخل‌تر قرار می‌گیرند */
@media (max-width: 768px) {
    .el-prev-btn { right: 5px; }
    .el-next-btn { left: 5px; }
    .el-carousel-btn { width: 36px; height: 36px; }
}

/* نقاط موقعیت کاروسل */
.el-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.el-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--el-transition);
}

.el-dot.active {
    background: var(--el-primary-color);
    width: 20px;
    border-radius: 4px;
}

/* ذرات انفجاری لایک */
.el-like-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    animation: explodeParticle 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    top: 50%;
    left: 50%;
}

@keyframes explodeParticle {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0);
        opacity: 0;
    }
}

.el-like-button.processing {
    pointer-events: none;
    opacity: 0.7;
}

.el-like-button.processing svg {
    animation: elSpin 1s linear infinite;
}

@keyframes elSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.el-no-posts-found {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: var(--el-border-radius);
    color: var(--el-secondary-color);
}
