/**
 * Posts View Shortcode Styles
 * Mirrors the GenerateBlocks query loop layout
 */

/* ── Outer wrapper ── */
.pv-outer {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ── Container ── */
.pv-container {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--gb-container-width);
    padding-left: 20px;
    padding-right: 20px;
}

/* ── Image grid ── */
.pv-grid {
    display: grid;
    grid-template-columns: repeat(var(--pv-columns, 3), minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 20px;
}

/* ── Card ── */
.pv-card {
    background-color: #fafafa;
}

.pv-card:is(:hover, :focus-within) {
    transform: scale(1.02);
    transition: transform 0.5s ease 0s;
}

/* ── Link wrapper ── */
.pv-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pv-link-wrapper:hover,
.pv-link-wrapper:focus {
    text-decoration: none;
    color: inherit;
}

/* ── Media container (aspect ratio crop) ── */
.pv-media {
    aspect-ratio: 296 / 197;
    overflow: hidden;
    position: relative;
}

/* ── Title bar (blue overlay) ── */
.pv-title-bar {
    background-color: var(--blue);
    margin-bottom: -50px;
    position: relative;
    width: fit-content;
    z-index: 10;
    padding: 10px 15px;
}

.pv-title {
    margin-bottom: 0;
    color: var(--base-3);
    font-size: 16px;
    font-weight: 700;
}

.pv-title:is(:hover, :focus) {
    color: var(--base-3);
}

/* ── Featured image ── */
.pv-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* ── Text list section ── */
.pv-text-outer {
    padding-bottom: 40px;
}

.pv-text-container {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--gb-container-width);
    padding-left: 20px;
    padding-right: 20px;
}

.pv-text-list {
    display: block;
    margin-top: 80px;
}

.pv-text-item-inner {
    overflow-x: hidden;
    overflow-y: hidden;
}

.pv-text-heading {
    margin-bottom: 10px;
    color: var(--contrast);
    font-weight: 700;
    font-size: 30px;
}

.pv-text-preview {
    margin-bottom: 10px;
}

.pv-text-more {
    color: #af0510;
    font-weight: 700;
}

.pv-text-more a {
    color: #af0510;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .pv-grid {
        grid-template-columns: 1fr;
    }
}
