/* =============================================
   V2 Post Query Block
   ============================================= */

/* ── Section ── */
.v2-pq-section {
    padding: 60px 0;
    position: relative;
}

/* ── Background presets ── */
.v2-pq-bg-white {
    background-color: #ffffff;
}

.v2-pq-bg-light-gray {
    background-color: #f8fafc;
}

.v2-pq-bg-dark {
    background-color: #0f172a;
}

/* ── Text color presets ── */
.v2-pq-text-dark {
    color: #1e293b;
}

.v2-pq-text-dark .v2-pq-card-title a {
    color: var(--primary-color);
}

.v2-pq-text-dark .v2-pq-card-date, .v2-pq-text-dark .v2-pq-card-author {
    color: #777;
}

.v2-pq-text-light {
    color: #f1f5f9;
}

.v2-pq-text-light .v2-pq-card-title a {
    color: #f1f5f9;
}

.v2-pq-text-light .v2-pq-card {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ── Header ── */
.v2-pq-header {
    text-align: center;
    margin-bottom: 35px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.v2-pq-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--primary-color);
}

.v2-pq-text-light .v2-pq-title {
    color: #f1f5f9;
}

/* ── Decorative line ── */
.v2-pq-decor-line {
    display: block;
    width: 35px;
    height: 6px;
    border-radius: 6px;
    background-color: #ea580c;
    margin: 0 auto;
}

/* ── Post count ── */
.v2-pq-post-count {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

/* ── Container — Flex layout ── */
.v2-pq-container {
    display: flex;
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 30px;
}

.v2-pq-cols-1 > .v2-pq-card {
    width: 100%;
}

.v2-pq-cols-2 > .v2-pq-card {
    width: calc(50% - 15px);
}

.v2-pq-cols-3 > .v2-pq-card {
    width: calc(33.333% - 20px);
}

.v2-pq-cols-4 > .v2-pq-card {
    width: calc(25% - 22.5px);
}

/* ── List layout override ── */
.v2-pq-layout-list .v2-pq-container {
    flex-direction: column;
    row-gap: 35px;
}

.v2-pq-layout-list .v2-pq-container > .v2-pq-card {
    width: 100%;
}

.v2-pq-layout-list .v2-pq-card {
    display: flex;
    flex-direction: row;
}

.v2-pq-layout-list .v2-pq-card-image {
    flex: 0 0 30%;
    max-width: 30%;
    border: 1px solid #ddd;
    padding: 5px;
}

.v2-pq-layout-list .v2-pq-read-more {
    background: #f15a24;
    color: #fff;
    padding: 10px 25px;
    border-radius: 3px;
}

.v2-pq-layout-list .v2-pq-read-more:hover {
    color: #ffffff;
}

.v2-pq-layout-list  .v2-pq-card-title {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 700;
}

.v2-pq-layout-list .v2-pq-card-image::after,
.v2-pq-layout-list .v2-pq-card-image::before {
   display: none;
}

.v2-pq-layout-list .v2-pq-card-excerpt {
    color: #777;
}

.v2-pq-layout-list .v2-pq-card-line {
    display: none;
}

.v2-pq-layout-list .v2-pq-card-content {
    flex: 1;
    padding: 0 20px 15px;
    display: flex;
    flex-direction: column;
}

/* ── Card ── */
.v2-pq-card {
    display: flex;
    flex-direction: column;
}

/* Card styles */
.v2-pq-card-style-bordered .v2-pq-card {
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.v2-pq-card-style-bordered .v2-pq-card:hover {
    border-color: var(--primary-color, #1e3a5f);
    box-shadow: none;
}

.v2-pq-card-style-shadow .v2-pq-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.v2-pq-card-style-shadow .v2-pq-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.v2-pq-card-style-minimal .v2-pq-card {
    box-shadow: none;
    background: transparent;
}

/* ── Card Image ── */
.v2-pq-card-image {
    overflow: hidden;
    position: relative;
}

.v2-pq-card-image a {
    display: block;
    height: 100%;
}

.v2-pq-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Image overlay on hover */
.v2-pq-card-image::after {
    font-size: 30px;
    color: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 300;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
    content: "\2b";
    font-family: 'FontAwesome';
}

.v2-pq-card-image::before {
    content: "";
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.v2-pq-card:hover .v2-pq-card-image::before,
.v2-pq-card:hover .v2-pq-card-image::after {
    opacity: 1;
}

/* ── Image aspect ratios ── */
.v2-pq-ratio-16x9 {
    aspect-ratio: 16 / 9;
}

.v2-pq-ratio-4x3 {
    aspect-ratio: 4 / 3;
}

.v2-pq-ratio-1x1 {
    aspect-ratio: 1 / 1;
}

.v2-pq-ratio-auto {
    aspect-ratio: auto;
}

/* ── Placeholder (no image) ── */
.v2-pq-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    background-color: #d1d5db;
    position: relative;
}

.v2-pq-placeholder::after {
    content: "\2b";
    font-family: 'FontAwesome';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
}

/* ── Card Content ── */
.v2-pq-card-content {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Category badges ── */
.v2-pq-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.v2-pq-cat-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ea580c;
    background-color: rgba(234, 88, 12, 0.08);
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.v2-pq-cat-badge:hover {
    background-color: rgba(234, 88, 12, 0.16);
    color: #ea580c;
}

/* ── Card Title ── */
.v2-pq-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 17px;
}

.v2-pq-card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.v2-pq-card-title a:hover {
    color: #6c98e1;
}

/* ── Decorative line under title ── */
.v2-pq-card-line {
    display: block;
    width: 35px;
    height: 6px;
    border-radius: 6px;
    background-color: #ea580c;
    margin-bottom: 16px;
}

/* ── Excerpt ── */
.v2-pq-card-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 22px;
}

.v2-pq-text-light .v2-pq-card-excerpt {
    color: #cbd5e1;
}

/* ── Meta row ── */
.v2-pq-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.v2-pq-card-date,
.v2-pq-card-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.v2-pq-date-icon {
    flex-shrink: 0;
    width: 20px;
    fill: var(--secondary-clr);
}

/* ── Tags ── */
.v2-pq-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v2-pq-tag {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
}

.v2-pq-tag:hover {
    color: #ea580c;
}

/* ── Read More ── */
.v2-pq-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #ea580c;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.v2-pq-read-more:hover {
    gap: 8px;
    color: #c2410c;
}

.v2-pq-read-more svg {
    transition: transform 0.2s ease;
}

.v2-pq-read-more:hover svg {
    transform: translateX(2px);
}

/* ── Pagination ── */
.v2-pq-pagination {
    margin-top: 48px;
    text-align: center;
}

.v2-pq-pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.v2-pq-pagination li {
    display: inline-block;
}

.v2-pq-pagination a,
.v2-pq-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.v2-pq-pagination a {
    color: #475569;
    background-color: #f1f5f9;
}

.v2-pq-pagination a:hover {
    background-color: var(--primary-color, #1e3a5f);
    color: #ffffff;
}

.v2-pq-pagination .current {
    background-color: var(--primary-color, #1e3a5f);
    color: #ffffff;
}

/* ── No results ── */
.v2-pq-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 16px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .v2-pq-cols-4 > .v2-pq-card {
        width: calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .v2-pq-section {
        padding: 40px 0;
    }

    .v2-pq-title {
        font-size: 28px;
    }

    .v2-pq-header {
        margin-bottom: 32px;
    }

    .v2-pq-cols-2 > .v2-pq-card,
    .v2-pq-cols-3 > .v2-pq-card,
    .v2-pq-cols-4 > .v2-pq-card {
        width: calc(50% - 10px);
    }

    .v2-pq-container {
        gap: 20px;
    }

    /* List layout stacks on mobile */
    .v2-pq-layout-list .v2-pq-card {
        flex-direction: column;
    }

    .v2-pq-layout-list .v2-pq-card-content {
        padding: 20px 0px 15px;
    }

    .v2-pq-layout-list .v2-pq-card-image {
        flex: unset;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .v2-pq-cols-2 > .v2-pq-card,
    .v2-pq-cols-3 > .v2-pq-card,
    .v2-pq-cols-4 > .v2-pq-card {
        width: 100%;
    }

    .v2-pq-card-title {
        font-size: 16px;
    }
}

/* =============================================
   Overlay Layout
   ============================================= */

/* ── Overlay Card ── */
.v2-pq-layout-overlay .v2-pq-container {
    gap: 30px;
}

.v2-pq-layout-overlay .v2-pq-cols-1 > .v2-pq-overlay-card {
    width: 100%;
}

.v2-pq-layout-overlay .v2-pq-cols-2 > .v2-pq-overlay-card {
    width: calc(50% - 15px);
}

.v2-pq-layout-overlay .v2-pq-cols-3 > .v2-pq-overlay-card {
    width: calc(33.333% - 20px);
}

.v2-pq-layout-overlay .v2-pq-cols-4 > .v2-pq-overlay-card {
    width: calc(25% - 22.5px);
}

.v2-pq-overlay-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: var(--pq-overlay-h, 340px);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

/* ── Background image ── */
.v2-pq-overlay-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.45s ease;
}

.v2-pq-overlay-card:hover .v2-pq-overlay-bg {
    transform: scale(1.05);
}

/* ── Gradient overlay ── */
.v2-pq-overlay-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--pq-overlay-bg, rgba(0, 46, 91, 0.6));
    transition: background 0.35s ease;
}

/* ── Content ── */
.v2-pq-overlay-content {
    position: relative;
    z-index: 2;
    padding: var(--pq-overlay-padding, 10px 40px 40px);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;

}

.v2-pq-overlay-content:has(.category-date-wrapper) {
    height: 100%;
    justify-content: space-between;
}

.v2-overlay-title-wrapper {
    display: flex;
    flex-direction: column;
}
/* ── Date badge ── */
.v2-pq-overlay-date {
    display: inline-block;
    background-color: #f15a24;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    padding: 7px 9px 6px;
    /* border-radius: 3px; */
    width: fit-content;
    margin-bottom: 4px;
}

/* ── Category ── */
.v2-pq-overlay-cat {
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* ── Title ── */
.v2-pq-overlay-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff;
    text-transform: capitalize;
    font-family: var(--heading-font);
    margin-bottom: 8px;
}

/* ── Read More button ── */
.v2-pq-overlay-read-more {
    display: inline-block;
    background: transparent;
    color: #f15a24;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    border: none;
    text-decoration: none;
    width: fit-content;
    transition: color 0.3s ease;
}

.v2-pq-overlay-card:hover .v2-pq-overlay-read-more {
    color: #ff6b35;
}

.category-date-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Style 2 Specific Styling ── */
.v2-pq-overlay-style_2 .v2-pq-overlay-cat {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
}

.v2-pq-overlay-style_2 .v2-pq-overlay-title {
    margin-bottom: 0;
}
/* ── No thumbnail fallback ── */
.v2-pq-overlay-card:not(:has(.v2-pq-overlay-bg)) {
    background-color: #1e293b;
}

/* ── Overlay responsive ── */
@media (max-width: 768px) {
    .v2-pq-layout-overlay .v2-pq-cols-3 > .v2-pq-overlay-card,
    .v2-pq-layout-overlay .v2-pq-cols-4 > .v2-pq-overlay-card {
        width: calc(50% - 15px);
    }

    .v2-pq-overlay-title {
        font-size: 16px;
    }

    .v2-pq-overlay-date {
        font-size: 12px;
        padding: 5px 10px;
    }

    .v2-pq-overlay-cat {
        font-size: 11px;
    }

    .v2-pq-overlay-read-more {
        font-size: 13px;
    }

    .v2-pq-overlay-style_2 .v2-pq-overlay-cat {
        font-size: 13px;
    }

    .v2-pq-overlay-style_2 .v2-pq-overlay-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .v2-pq-layout-overlay .v2-pq-cols-2 > .v2-pq-overlay-card,
    .v2-pq-layout-overlay .v2-pq-cols-3 > .v2-pq-overlay-card,
    .v2-pq-layout-overlay .v2-pq-cols-4 > .v2-pq-overlay-card {
        width: 100%;
    }
}
