/* CNPR Instagram — single post page. Self-contained, Instagram-like layout. */

.ig-post-layout {
    padding-top: 28px;
    padding-bottom: 56px;
}

.ig-post__back {
    max-width: 614px;
    margin: 16px auto 18px;
}

.ig-post__back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 13px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--muted, #516278);
    background: var(--panel, #fff);
    border: 1px solid var(--panel-strong, #d4dde9);
    border-radius: 999px;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ig-post__back-link:hover,
.ig-post__back-link:focus-visible {
    color: var(--accent, #1c4a7a);
    border-color: var(--accent, #1c4a7a);
    box-shadow: 0 6px 16px rgba(16, 32, 53, 0.12);
    outline: none;
}

.ig-post__back-arrow {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.ig-post__back-link:hover .ig-post__back-arrow,
.ig-post__back-link:focus-visible .ig-post__back-arrow {
    transform: translateX(-3px);
}

/* Instagram's web post column is ~614px wide. */
.ig-post {
    max-width: 614px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ig-post__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.ig-post__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 999px;
    color: #fff;
    /* Instagram brand gradient. */
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.ig-post__identity {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ig-post__username {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    text-decoration: none;
}

.ig-post__username:hover,
.ig-post__username:focus-visible {
    text-decoration: underline;
}

.ig-post__date {
    font-size: 12px;
    color: #94a3b8;
}

.ig-post__media {
    margin: 0;
    background: #000;
    line-height: 0;
}

.ig-post__media a {
    display: block;
    cursor: zoom-in;
}

.ig-post__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    margin: 0 auto;
}

.ig-post__body {
    padding: 18px 16px 20px;
}

.ig-post__title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
    color: #0f172a;
}

.ig-post__caption {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ig-post__caption-author {
    font-weight: 600;
    margin-right: 6px;
    color: #0f172a;
}

.ig-post__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ig-post__cta svg {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .ig-post-layout {
        padding-top: 16px;
    }

    .ig-post {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .ig-post__back {
        padding: 0 16px;
    }
}
