/* صفحه «پرامپت عکس»؛ بعد از ph.css و listing.css بارگذاری می‌شود */

.pg .pg-sec {
    padding-top: 44px;
}

/* ---------- کارت جنسیت‌ها ---------- */
.pg-genders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.pg-gcard {
    position: relative;
    isolation: isolate;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: var(--ph-r-md);
    background: #dfe4ec;
    box-shadow: 0 14px 30px -22px rgba(15, 23, 43, .5);
}

    .pg-gcard img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position:top;
        transition: transform .4s cubic-bezier(.2, .8, .2, 1);
    }

    .pg-gcard::after {
        content: "";
        position: absolute;
        inset: 45% 0 0;
        z-index: 1;
        background: linear-gradient(to top, rgba(15, 23, 43, .85), transparent);
    }

    .pg-gcard:hover img {
        transform: scale(1.05);
    }

.pg-gcard-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 14px;
    color: #fff;
}

    .pg-gcard-body b {
        display: block;
        font-size: 15px;
        line-height: 1.6;
    }

    .pg-gcard-body small {
        display: inline-block;
        margin-top: 4px;
        padding: 1px 9px;
        border-radius: 99px;
        background: rgba(255, 255, 255, .18);
        backdrop-filter: blur(6px);
        font-size: 12px;
    }

/* ---------- دسته‌های موضوعی ---------- */
.pg-topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.pg-topic {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 8px 8px 12px;
    border-radius: var(--ph-r-md);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    transition: border-color .15s, transform .15s;
}

    .pg-topic:hover {
        border-color: var(--ph-teal);
        transform: translateY(-2px);
    }

.pg-topic-media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 10px;
    border-radius: 13px;
    background: var(--ph-paper);
    color: var(--ph-muted);
}

    .pg-topic-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .pg-topic-media .ph-badge {
        position: absolute;
        top: 8px;
        right: 8px;
    }

.pg-topic b {
    overflow: hidden;
    padding: 0 4px;
    font-size: 13.5px;
    line-height: 1.7;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pg-topic small {
    padding: 0 4px;
    color: var(--ph-muted);
    font-size: 12px;
}

/* ---------- ابزارها ---------- */
.pg-tools {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 132px;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
}

    .pg-tools::-webkit-scrollbar {
        display: none;
    }

.pg-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 12px;
    border-radius: var(--ph-r-md);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
    text-align: center;
    scroll-snap-align: start;
    transition: border-color .15s;
}

    .pg-tool:hover {
        border-color: var(--ph-teal);
    }

    .pg-tool img,
    .pg-tool-ph {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 13px;
        object-fit: cover;
        background: var(--ph-paper);
    }

.pg-tool-ph {
    display: grid;
    place-items: center;
    color: var(--ph-muted);
}

.pg-tool span:last-child {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.7;
}

/* ---------- راهنما و سوالات ---------- */
.pg-guide {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.pg-card {
    padding: 26px 28px;
    border-radius: var(--ph-r-lg);
    background: var(--ph-card);
    border: 1px solid var(--ph-line);
}

    .pg-card h2 {
        margin: 0 0 12px;
        font-size: 19px;
        font-weight: bold;
        color: var(--ph-ink);
    }

    .pg-card p {
        margin: 0 0 12px;
        color: #3b475c;
        font-size: 14px;
        line-height: 2.1;
    }

    .pg-card a {
        color: var(--ph-teal-ink);
        font-weight: bold;
    }

.pg-faq details {
    border-bottom: 1px solid var(--ph-line);
}

    .pg-faq details:last-child {
        border-bottom: 0;
    }

.pg-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    list-style: none;
    cursor: pointer;
}

    .pg-faq summary::-webkit-details-marker {
        display: none;
    }

    .pg-faq summary::after {
        content: "+";
        flex: none;
        display: grid;
        place-items: center;
        width: 26px;
        height: 26px;
        border-radius: 8px;
        background: var(--ph-teal-soft);
        color: var(--ph-teal-ink);
        font-size: 17px;
        font-weight: bold;
        line-height: 1;
    }

.pg-faq details[open] summary::after {
    content: "−";
}

.pg-faq summary h3 {
    margin: 0;
    color: var(--ph-ink);
    font-size: 14.5px;
    font-weight: bold;
    line-height: 1.8;
}

.pg-faq details p {
    margin: -4px 0 14px;
}

/* ---------- تبلت ---------- */
@media (max-width: 900px) {
    .pg-guide {
        grid-template-columns: 1fr;
    }
}

/* ---------- موبایل ---------- */
@media (max-width: 600px) {
    .pg .pg-sec {
        padding-top: 32px;
    }

    .pg-genders {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .pg-topics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pg-topic {
        padding: 6px 6px 10px;
    }

        .pg-topic b {
            font-size: 12px;
            white-space: normal;
        }

    .pg-tools {
        grid-auto-columns: 112px;
    }

    .pg-card {
        padding: 20px 18px;
    }
}
