/* =====================================================
   DQ Meta News Widget — dq-meta-news.css
   dailyqudrat.pk — RTL/Urdu optimised
   ===================================================== */

/* ── Grid ─────────────────────────────────────────── */
.dq-news-grid {
    --dq-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--dq-cols), 1fr);
    gap: 20px;
    direction: rtl;
}

@media (max-width: 1024px) {
    .dq-news-grid {
        --dq-cols: var(--dq-cols-tablet, 2);
    }
}

@media (max-width: 767px) {
    .dq-news-grid {
        --dq-cols: var(--dq-cols-mobile, 1);
    }
}

/* ── Section Heading ──────────────────────────────── */
.dq-section-heading {
    direction: rtl;
    margin-bottom: 20px;
}

.dq-section-title {
    display: inline-block;
    margin: 0 0 6px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.dq-section-title-bar {
    display: block;
    width: 60px;
    height: 3px;
    background: #c0392b;
    border-radius: 2px;
}

/* ── Card Base ────────────────────────────────────── */
.dq-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    direction: rtl;
    text-align: right;
    position: relative;
}

.dq-news-card.dq-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

/* ── Image Wrapper ────────────────────────────────── */
.dq-card-image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 default */
    background: #f0f0f0;
    text-decoration: none;
}

.dq-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.dq-news-card:hover .dq-card-img {
    transform: scale(1.04);
}

.dq-card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    font-size: 2.5rem;
}

/* ── Card Body ────────────────────────────────────── */
.dq-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* ── Category Badge ───────────────────────────────── */
.dq-card-cat {
    display: inline-block;
    align-self: flex-start;
    background: #c0392b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s;
    line-height: 1.8;
    direction: rtl;
}

.dq-card-cat:hover {
    opacity: 0.85;
    color: #fff;
}

/* ── Title ─────────────────────────────────────────── */
.dq-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 700;
    color: #1a1a1a;
}

.dq-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.dq-card-title a:hover {
    color: #c0392b;
}

/* ── Date ──────────────────────────────────────────── */
.dq-card-date {
    display: block;
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}

/* ── Excerpt ───────────────────────────────────────── */
.dq-card-excerpt {
    font-size: 0.88rem;
    color: #555;
    margin: 0;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* ── Read More ─────────────────────────────────────── */
.dq-card-readmore {
    display: inline-block;
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c0392b;
    text-decoration: none;
    transition: color 0.2s;
}

.dq-card-readmore:hover {
    color: #922b21;
    text-decoration: underline;
}

/* ── No Posts ──────────────────────────────────────── */
.dq-no-posts {
    padding: 20px;
    background: #f8f8f8;
    border-left: 4px solid #c0392b;
    color: #555;
    direction: rtl;
    text-align: right;
}

/* =======================================================
   LAYOUT VARIANTS
   ======================================================= */

/* ── Overlay Layout ─────────────────────────────────── */
.dq-layout-overlay .dq-card-image-wrap.dq-overlay-wrap {
    padding-bottom: 56.25%;
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.dq-layout-overlay .dq-overlay-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
    transition: background 0.3s;
    direction: rtl;
    text-align: right;
    gap: 5px;
}

.dq-layout-overlay .dq-news-card:hover .dq-overlay-body {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.1) 100%);
}

.dq-layout-overlay .dq-card-title {
    color: #fff;
    font-size: 0.95rem;
    margin: 0;
}

.dq-layout-overlay .dq-card-title span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.dq-layout-overlay .dq-card-date {
    color: rgba(255,255,255,0.75);
    font-size: 0.72rem;
}

.dq-layout-overlay .dq-card-cat {
    align-self: flex-start;
}

/* ── Side-by-Side Layout ────────────────────────────── */
.dq-layout-side .dq-news-card.dq-card-side {
    flex-direction: row;
    align-items: stretch;
}

.dq-layout-side .dq-card-image-wrap {
    width: 38%;
    min-width: 38%;
    padding-bottom: 0;
    position: relative;
    aspect-ratio: 4/3;
}

.dq-layout-side .dq-card-body {
    flex: 1;
    padding: 12px 14px;
}

@media (max-width: 480px) {
    .dq-layout-side .dq-news-card.dq-card-side {
        flex-direction: column;
    }
    .dq-layout-side .dq-card-image-wrap {
        width: 100%;
        padding-bottom: 56.25%;
    }
}

/* =======================================================
   ELEMENTOR EDITOR — preview placeholders
   ======================================================= */
.elementor-editor-active .dq-news-grid {
    min-height: 120px;
}
