/* FAQ Grid — enqueued only on FAQ template */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* Reset pg-section to not double-nest with .container */
.pg-section {
    padding: 2rem 0 3rem;
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 900px) {
    .pg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .pg-grid { grid-template-columns: 1fr; }
}

/* Card */
.pg-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

/* Thumbnail */
.pg-thumb-link {
    display: block;
    overflow: hidden;
}

.pg-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

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

.pg-placeholder {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #f0ede6 0%, #e8e4da 100%);
}

/* Card body */
.pg-card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Title */
.pg-title {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 2em !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 10px !important;
}

.pg-title a {
    color: #267f87 !important;
    text-decoration: none !important;
}

.pg-card:hover .pg-title a {
    color: #1d5f65 !important;
}

/* Excerpt */
.pg-excerpt {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.pg-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pg-pagination .page-numbers {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #444;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}

.pg-pagination .page-numbers:hover,
.pg-pagination .page-numbers.current {
    background: #f4f1eb;
    border-color: #bbb;
    color: #111;
}

/* Empty state */
.pg-empty {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #999;
    text-align: center;
    padding: 3rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .pg-card                        { background: #1e1e1c; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
    .pg-title a                     { color: #f0ede6 !important; }
    .pg-excerpt                     { color: #888 !important; }
    .pg-placeholder                 { background: linear-gradient(135deg, #2a2a27 0%, #232320 100%); }
    .pg-pagination .page-numbers    { color: #ccc; border-color: #333; }
    .pg-pagination .page-numbers:hover,
    .pg-pagination .page-numbers.current { background: #252523; border-color: #555; color: #eee; }
}
