/* ============================================================
   GoalLord Post Grid  –  Frontend Styles
   ============================================================ */

.goallord-post-grid {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}
.goallord-post-grid *, .goallord-post-grid *::before, .goallord-post-grid *::after {
    box-sizing: inherit;
}

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

/* ── Filter pills ──────────────────────────────────── */
.goallord-pg-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.goallord-pg-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 50px;
    background: #ffffff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
}

.goallord-pg-pill:hover {
    border-color: #2a7f7f;
    color: #2a7f7f;
}

.goallord-pg-pill.active {
    background-color: #2a7f7f;
    border-color: #2a7f7f;
    color: #ffffff;
}

/* ── Sort ──────────────────────────────────────────── */
.goallord-pg-sort {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.goallord-pg-sort-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    pointer-events: none;
    white-space: nowrap;
}

.goallord-pg-sort-label strong {
    color: #2a7f7f;
    font-weight: 600;
}

.goallord-pg-sort-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 14px;
}

/* ── Grid ──────────────────────────────────────────── */
.goallord-pg-grid {
    display: grid;
    gap: 24px;
}

.goallord-pg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.goallord-pg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.goallord-pg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ──────────────────────────────────────────── */
.goallord-pg-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.goallord-pg-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* ── Card image ────────────────────────────────────── */
.goallord-pg-card-image-link {
    text-decoration: none;
    display: block;
}

.goallord-pg-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

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

.goallord-pg-card:hover .goallord-pg-card-image img {
    transform: scale(1.03);
}

.goallord-pg-placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

/* ── Badge ─────────────────────────────────────────── */
.goallord-pg-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #2a7f7f;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ── Card content ──────────────────────────────────── */
.goallord-pg-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Meta ──────────────────────────────────────────── */
.goallord-pg-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.goallord-pg-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.goallord-pg-meta svg {
    flex-shrink: 0;
    color: #999;
}

/* ── Title ─────────────────────────────────────────── */
.goallord-pg-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.goallord-pg-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.goallord-pg-title a:hover {
    color: #2a7f7f;
}

/* ── Excerpt ───────────────────────────────────────── */
.goallord-pg-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 16px 0;
    flex: 1;
}

/* ── Card footer ───────────────────────────────────── */
.goallord-pg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.goallord-pg-scripture {
    font-size: 14px;
    font-weight: 500;
    color: #2a7f7f;
}

.goallord-pg-read-more {
    font-size: 14px;
    font-weight: 600;
    color: #2a7f7f;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
    white-space: nowrap;
}

.goallord-pg-read-more:hover {
    gap: 8px;
}

/* ── Newsletter card ───────────────────────────────── */
.goallord-pg-newsletter-card {
    background-color: #2a7f7f;
    border-radius: 12px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.goallord-pg-newsletter-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
}

.goallord-pg-newsletter-heading {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.goallord-pg-newsletter-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0 0 20px 0;
}

.goallord-pg-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.goallord-pg-newsletter-email {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #333;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.goallord-pg-newsletter-email::placeholder {
    color: #999;
}

.goallord-pg-newsletter-btn {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    background: #ffffff;
    color: #2a7f7f;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.goallord-pg-newsletter-btn:hover {
    background: transparent;
    color: #ffffff;
}

.goallord-pg-newsletter-success {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 12px;
}

/* ── Pagination ────────────────────────────────────── */
.goallord-pg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.goallord-pg-page-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #2a7f7f;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    padding: 0;
}

.goallord-pg-page-btn:hover:not(.active):not(:disabled) {
    border-color: #2a7f7f;
    background: rgba(42,127,127,0.05);
}

.goallord-pg-page-btn.active {
    background-color: #2a7f7f;
    border-color: #2a7f7f;
    color: #ffffff;
}

.goallord-pg-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.goallord-pg-page-btn svg {
    width: 16px;
    height: 16px;
}

.goallord-pg-page-dots {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #888;
    letter-spacing: 2px;
}

/* ── No posts ──────────────────────────────────────── */
.goallord-pg-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #888;
}

/* ── Loading ───────────────────────────────────────── */
.goallord-pg-grid.loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
    .goallord-pg-cols-4,
    .goallord-pg-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .goallord-pg-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .goallord-pg-filter-pills {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .goallord-pg-filter-pills::-webkit-scrollbar {
        display: none;
    }

    .goallord-pg-cols-4,
    .goallord-pg-cols-3,
    .goallord-pg-cols-2 {
        grid-template-columns: 1fr;
    }

    .goallord-pg-sort {
        align-self: flex-end;
    }

    .goallord-pg-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
