/* ============================================
   Premium Articles Widget – CSS v2.0
============================================ */

.lcart-wrap {
    --art-primary: #0e9cc0;
    --art-secondary: #3eb692;
    --art-text: #3c3e3d;
    --art-text-secondary: #6b6d6c;
    --art-text-light: #9a9c9b;
    --art-card-bg: #ffffff;
    --art-radius: 16px;
    --art-radius-pill: 50px;
    --art-shadow: 0 2px 12px rgba(60, 62, 61, 0.06);
    --art-shadow-hover: 0 8px 30px rgba(14, 156, 192, 0.12);
    --art-border: 1px solid rgba(14, 156, 192, 0.08);
    --art-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --art-transition-fast: 0.2s ease;
    font-family: 'Heebo', sans-serif;
    color: var(--art-text);
    direction: rtl;
    overflow: hidden;
}

/* Container */
.lcart-wrap .lcart-container { max-width: 1100px; margin: 0 auto; }

/* ---- Header ---- */
.lcart-wrap .lcart-header { text-align: center; margin-bottom: 36px; }

.lcart-wrap .lcart-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 22px; border-radius: var(--art-radius-pill);
    background: var(--art-primary); color: #fff;
    font-size: 0.85rem; font-weight: 500; margin-bottom: 20px;
    transition: all var(--art-transition);
}
.lcart-wrap .lcart-badge i,
.lcart-wrap .lcart-badge svg { font-size: 16px; width: 16px; height: 16px; }

.lcart-wrap .lcart-header h2 {
    font-family: 'Rubik', 'Heebo', sans-serif;
    font-size: 2.3rem; font-weight: 700; color: var(--art-text);
    margin: 0 0 14px; line-height: 1.25;
}
.lcart-wrap .lcart-subtitle {
    font-size: 1rem; color: var(--art-text-secondary); font-weight: 300; line-height: 1.7; margin: 0;
}

/* ---- Toolbar ---- */
.lcart-wrap .lcart-toolbar {
    display: flex; flex-wrap: wrap; gap: 16px;
    align-items: center; justify-content: space-between; margin-bottom: 28px;
}

/* ---- Tabs with drag-scroll ---- */
.lcart-wrap .lcart-tabs-wrap {
    flex: 1; min-width: 0; overflow: hidden; position: relative;
}

/* Fade edges when scrollable */
.lcart-wrap .lcart-tabs-wrap.has-overflow::before,
.lcart-wrap .lcart-tabs-wrap.has-overflow::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 30px; z-index: 2; pointer-events: none;
}
.lcart-wrap .lcart-tabs-wrap.has-overflow::before {
    right: 0; background: linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(244,243,239,0.9) 100%);
}
.lcart-wrap .lcart-tabs-wrap.has-overflow::after {
    left: 0; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(244,243,239,0.9) 100%);
}
.lcart-wrap .lcart-tabs-wrap.scroll-start::before { opacity: 0; }
.lcart-wrap .lcart-tabs-wrap.scroll-end::after { opacity: 0; }

.lcart-wrap .lcart-tabs {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    cursor: grab; user-select: none; -webkit-user-select: none;
    scroll-behavior: smooth; padding: 4px 0;
}
.lcart-wrap .lcart-tabs::-webkit-scrollbar { display: none; }
.lcart-wrap .lcart-tabs.grabbing { cursor: grabbing; scroll-behavior: auto; }

.lcart-wrap .lcart-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 22px; border: var(--art-border); border-radius: var(--art-radius-pill);
    background: transparent; font-family: inherit; font-size: 0.88rem;
    font-weight: 500; color: var(--art-text-secondary); cursor: pointer;
    transition: all var(--art-transition); white-space: nowrap; flex-shrink: 0;
}
.lcart-wrap .lcart-tab:hover { border-color: var(--art-primary); color: var(--art-primary); }
.lcart-wrap .lcart-tab.active {
    background: var(--art-primary); color: #fff; border-color: transparent;
}

.lcart-wrap .lcart-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; border-radius: 12px;
    background: rgba(255,255,255,0.28); font-size: 0.72rem; font-weight: 700; padding: 0 7px;
}
.lcart-wrap .lcart-tab:not(.active) .lcart-tab-count {
    background: rgba(14, 156, 192, 0.08); color: var(--art-primary);
}

/* ---- Search ---- */
.lcart-wrap .lcart-search-wrap { position: relative; min-width: 200px; flex: 0 0 260px; }
.lcart-wrap .lcart-toolbar--search-only .lcart-search-wrap { flex: 1 1 100%; }

.lcart-wrap .lcart-search {
    width: 100%; padding: 12px 44px 12px 40px;
    border: var(--art-border); border-radius: var(--art-radius-pill);
    background: var(--art-card-bg); font-family: inherit; font-size: 0.9rem;
    color: var(--art-text); outline: none; transition: all var(--art-transition);
}
.lcart-wrap .lcart-search::placeholder { color: var(--art-text-light); }
.lcart-wrap .lcart-search:focus {
    border-color: var(--art-primary);
    box-shadow: 0 0 0 3px rgba(14, 156, 192, 0.1);
}

.lcart-wrap .lcart-search-icon {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--art-text-light); pointer-events: none;
}
.lcart-wrap .lcart-search-clear {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; border: none; background: none;
    color: var(--art-text-light); cursor: pointer; opacity: 0;
    transition: opacity var(--art-transition-fast); padding: 0;
}
.lcart-wrap .lcart-search-clear svg { width: 18px; height: 18px; }
.lcart-wrap .lcart-search-clear.visible { opacity: 1; }

/* ---- Grid ---- */
.lcart-wrap .lcart-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}

/* ---- Card ---- */
.lcart-wrap .lcart-card {
    position: relative; background: var(--art-card-bg); border: var(--art-border);
    border-radius: var(--art-radius); box-shadow: var(--art-shadow);
    overflow: hidden; transition: all var(--art-transition);
    display: flex; flex-direction: column;
}
.lcart-wrap .lcart-card:hover {
    box-shadow: var(--art-shadow-hover); transform: translateY(-3px);
    border-color: rgba(14, 156, 192, 0.18);
}
.lcart-wrap .lcart-card.hidden { display: none; }

/* ---- Card Image ---- */
.lcart-wrap .lcart-card-image {
    position: relative; height: 200px; overflow: hidden;
}
.lcart-wrap .lcart-card-image a { display: block; width: 100%; height: 100%; }
.lcart-wrap .lcart-card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.lcart-wrap .lcart-card:hover .lcart-card-image img { transform: scale(1.05); }

/* Placeholder (no featured image) */
.lcart-wrap .lcart-placeholder { display: block; width: 100%; height: 100%; background: #eef5fa; }

/* ---- Reading Time (on image) ---- */
.lcart-wrap .lcart-card-image .lcart-reading-time {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: var(--art-primary); font-size: 0.82rem; font-weight: 500; line-height: 1;
}
.lcart-wrap .lcart-reading-time i,
.lcart-wrap .lcart-reading-time svg { font-size: 20px; width: 20px; height: 20px; opacity: 0.85; flex-shrink: 0; }

/* Reading Time inline (no image) */
.lcart-wrap .lcart-rt-inline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 10px;
    background: rgba(14, 156, 192, 0.06);
    color: var(--art-primary); font-size: 0.82rem; font-weight: 500;
    margin-bottom: 14px; align-self: flex-start;
}

/* ---- Card Body ---- */
.lcart-wrap .lcart-card-body {
    padding: 28px 28px 24px; display: flex; flex-direction: column; flex: 1;
}

/* ---- Category Badge on image ---- */
.lcart-wrap .lcart-cat-badge {
    position: absolute; bottom: 14px; left: 14px; z-index: 2;
    padding: 4px 12px; border-radius: 6px;
    background: var(--art-primary); color: #fff;
    font-size: 0.75rem; font-weight: 500;
}
.lcart-wrap .lcart-cat-inline {
    position: static; display: inline-block; margin-bottom: 10px;
}

/* ---- Date ---- */
.lcart-wrap .lcart-date { display: block; font-size: 0.8rem; color: var(--art-text-light); margin-bottom: 8px; }

/* ---- Card Title ---- */
.lcart-wrap .lcart-card-title {
    font-family: 'Rubik', 'Heebo', sans-serif;
    font-size: 1.12rem; font-weight: 600; line-height: 1.45;
    margin: 0 0 12px; color: var(--art-text);
    transition: color var(--art-transition-fast);
}
.lcart-wrap .lcart-card-title a { color: inherit; text-decoration: none; }
.lcart-wrap .lcart-card:hover .lcart-card-title a { color: var(--art-primary); }

/* ---- Excerpt ---- */
.lcart-wrap .lcart-card-excerpt {
    font-size: 0.9rem; line-height: 1.75; color: var(--art-text-secondary);
    margin: 0 0 20px; font-weight: 300; flex: 1;
}

/* ---- Read More ---- */
.lcart-wrap .lcart-read-more {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--art-primary); font-size: 0.88rem; font-weight: 600;
    text-decoration: none; transition: all var(--art-transition-fast);
    margin-top: auto; align-self: flex-start;
}
.lcart-wrap .lcart-read-more:hover { gap: 10px; }
.lcart-wrap .lcart-rm-icon {
    display: inline-flex; align-items: center;
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}
.lcart-wrap .lcart-card:hover .lcart-rm-icon { transform: translateX(-5px); }
.lcart-wrap .lcart-rm-icon i,
.lcart-wrap .lcart-rm-icon svg { font-size: 14px; width: 14px; height: 14px; }

/* ---- No Results ---- */
.lcart-wrap .lcart-no-results {
    display: none; text-align: center; padding: 60px 20px;
    color: var(--art-text-light); grid-column: 1 / -1;
}
.lcart-wrap .lcart-no-results.visible { display: block; }
.lcart-wrap .lcart-no-results svg { width: 56px; height: 56px; color: var(--art-primary); margin-bottom: 16px; opacity: 0.35; }
.lcart-wrap .lcart-no-results h4 { font-family: 'Rubik', 'Heebo', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--art-text-secondary); margin-bottom: 6px; }
.lcart-wrap .lcart-no-results p { font-size: 0.9rem; margin-bottom: 16px; }
.lcart-wrap .lcart-reset-btn {
    display: inline-block; padding: 10px 28px; border-radius: var(--art-radius-pill);
    background: var(--art-primary); color: #fff; font-weight: 500; font-size: 0.88rem;
    border: none; cursor: pointer; font-family: inherit;
    transition: transform var(--art-transition-fast), box-shadow var(--art-transition-fast);
}
.lcart-wrap .lcart-reset-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14, 156, 192, 0.35); }

/* ---- Animations ---- */
.lcart-wrap .lcart-header,
.lcart-wrap .lcart-toolbar,
.lcart-wrap .lcart-card {
    opacity: 0; transform: translateY(16px);
    animation: lcartFadeIn 0.5s ease forwards;
}
.lcart-wrap .lcart-toolbar { animation-delay: 0.1s; }
.lcart-wrap .lcart-card:nth-child(1) { animation-delay: 0.15s; }
.lcart-wrap .lcart-card:nth-child(2) { animation-delay: 0.22s; }
.lcart-wrap .lcart-card:nth-child(3) { animation-delay: 0.29s; }
.lcart-wrap .lcart-card:nth-child(4) { animation-delay: 0.36s; }
.lcart-wrap .lcart-card:nth-child(5) { animation-delay: 0.43s; }
.lcart-wrap .lcart-card:nth-child(6) { animation-delay: 0.50s; }
.lcart-wrap .lcart-card:nth-child(7) { animation-delay: 0.57s; }
.lcart-wrap .lcart-card:nth-child(8) { animation-delay: 0.64s; }

@keyframes lcartFadeIn { to { opacity: 1; transform: translateY(0); } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .lcart-wrap .lcart-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    .lcart-wrap .lcart-grid { grid-template-columns: 1fr !important; }
    .lcart-wrap .lcart-toolbar { flex-direction: column; align-items: stretch; }
    .lcart-wrap .lcart-search-wrap { min-width: 100%; flex: 1 1 auto; }
    .lcart-wrap .lcart-search { max-width: 100%; box-sizing: border-box; }
    .lcart-wrap .lcart-tabs-wrap { max-width: 100%; }
    .lcart-wrap .lcart-toolbar { overflow: hidden; }
    .lcart-wrap .lcart-header h2 { font-size: 1.7rem; }
    .lcart-wrap .lcart-card-body { padding: 20px; }
    .lcart-wrap .lcart-card-image { height: 180px; }
}
@media (max-width: 480px) {
    .lcart-wrap .lcart-header h2 { font-size: 1.4rem; }
    .lcart-wrap .lcart-tab { padding: 8px 16px; font-size: 0.82rem; }
    .lcart-wrap .lcart-card-body { padding: 16px; }
    .lcart-wrap .lcart-card-image { height: 150px; }
}
