.public-post-media-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
    text-align: left;
}

.public-post-media-button:focus-visible {
    outline: 3px solid #c8a55f;
    outline-offset: 4px;
}

.public-post-media-button::after {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 4;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.5);
    border-radius: 999px;
    background: rgb(15 33 61 / 0.82);
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
    color: white;
    content: 'Ampliar';
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.public-post-content {
    color: rgb(38 48 67 / 0.82);
    font-size: 1.05rem;
    line-height: 1.9;
}

.public-post-content > * + * {
    margin-top: 1.25rem;
}

.public-post-content h2,
.public-post-content h3,
.public-post-content h4 {
    color: #0f213d;
    font-weight: 900;
    line-height: 1.25;
}

.public-post-content h2 {
    margin-top: 2.4rem;
    font-size: clamp(1.55rem, 3vw, 2rem);
}

.public-post-content h3 {
    margin-top: 2rem;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

.public-post-content h4 {
    margin-top: 1.75rem;
    font-size: 1.15rem;
}

.public-post-content ul,
.public-post-content ol {
    padding-left: 1.5rem;
}

.public-post-content ul {
    list-style: disc;
}

.public-post-content ol {
    list-style: decimal;
}

.public-post-content li + li {
    margin-top: 0.45rem;
}

.public-post-content blockquote {
    padding: 1.1rem 1.35rem;
    border-left: 4px solid #c8a55f;
    border-radius: 0 1rem 1rem 0;
    background: #f6f0e5;
    color: #0f213d;
    font-size: 1.08em;
    font-style: italic;
}

.public-post-content a {
    color: #7f2337;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgb(127 35 55 / 0.35);
    text-underline-offset: 0.2em;
}

.public-post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.public-post-content th,
.public-post-content td {
    min-width: 8rem;
    padding: 0.8rem;
    border: 1px solid rgb(15 33 61 / 0.14);
    text-align: left;
}

.public-post-content th {
    background: #f6f0e5;
    color: #0f213d;
}

.public-post-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    width: 100%;
    max-width: none;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: white;
    box-shadow: none;
}

.public-post-lightbox[open] {
    display: grid;
    place-items: center;
}

.public-post-lightbox::backdrop {
    background: rgb(4 10 20 / 0.82);
    backdrop-filter: blur(8px);
}

.public-post-lightbox__panel {
    position: relative;
    width: min(96vw, 1180px);
    overflow: hidden;
    border-radius: 1.5rem;
    background: #08152a;
    box-shadow: 0 30px 90px rgb(0 0 0 / 0.42);
}

.public-post-lightbox__media {
    display: grid;
    place-items: center;
    min-height: min(72vh, 760px);
    background: linear-gradient(180deg, rgb(10 22 41 / 0.98), rgb(5 13 25 / 0.98));
}

.public-post-lightbox__image {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.public-post-lightbox__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.public-post-lightbox__caption {
    min-width: 0;
    color: rgb(255 255 255 / 0.78);
    font-size: 0.9rem;
}

.public-post-lightbox__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 0.25);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    color: white;
    cursor: pointer;
    font-weight: 800;
}

.public-post-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 0.2);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    color: white;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 180ms ease, transform 180ms ease;
}

.public-post-lightbox__nav:hover {
    background: rgb(255 255 255 / 0.2);
    transform: translateY(-50%) scale(1.03);
}

.public-post-lightbox__nav--prev {
    left: 0.85rem;
}

.public-post-lightbox__nav--next {
    right: 0.85rem;
}

@media (max-width: 640px) {
    .public-post-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    .public-post-lightbox {
        padding: 0.5rem;
    }

    .public-post-lightbox__panel {
        width: calc(100vw - 1rem);
        border-radius: 1rem;
    }

    .public-post-lightbox__media {
        min-height: 48vh;
    }

    .public-post-lightbox__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-post-lightbox__nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }

    .public-post-lightbox__nav--prev {
        left: 0.5rem;
    }

    .public-post-lightbox__nav--next {
        right: 0.5rem;
    }
}
