/* =========================================================
   MIND POWER ARTISTS
   SPOTLIGHT + BLOG
   ---------------------------------------------------------
   Builds on home.css (hero, sections, buttons, tokens).
========================================================= */


/* ===== PAGE HERO ===== */

.page-hero {
    min-height: 460px;

    text-align: center;
}

.page-hero-inner {
    position: relative;
    z-index: 2;

    max-width: 860px;
}

.page-hero .hero-text {
    max-width: 660px;

    margin-inline: auto;
}

.post-hero {
    min-height: 340px;
}

.post-back {
    display: inline-block;

    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 6px 18px;

    margin: 20px 0 0;

    color: var(--mpa-orange-light);
    font-size: 15px;
    font-weight: 600;
}

.post-meta[hidden] {
    display: none;
}


/* ===== LOADING / EMPTY / ERROR ===== */

.posts-state {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 16px;

    max-width: 640px;

    margin: 0 auto;

    padding: 48px 24px;

    border: 1px dashed rgba(244,123,32,0.35);
    border-radius: var(--radius-lg);

    background: rgba(244,123,32,0.04);

    color: var(--mpa-text);
    text-align: center;
}

.posts-state[hidden],
.posts-state [hidden] {
    display: none;
}

.posts-state p {
    margin: 0;
}

.posts-state-loader {
    width: 28px;
    height: 28px;

    border: 3px solid rgba(244,123,32,0.25);
    border-top-color: var(--mpa-orange);
    border-radius: 50%;

    animation: posts-spin 0.9s linear infinite;
}

@keyframes posts-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ===== CARD GRID ===== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--mpa-border);
    border-radius: var(--radius-lg);

    background: var(--mpa-card);
}

.post-card-media {
    aspect-ratio: 16 / 9;

    background: linear-gradient(145deg, rgba(244,123,32,0.2), rgba(255,255,255,0.02));
}

.post-card-media img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;

    gap: 10px;

    padding: 22px;
}

.post-date {
    color: var(--mpa-orange-light);
    font-size: 13px;
    font-weight: 600;
}

.post-card h3 {
    margin: 0;

    font-size: 20px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.post-card h3 a {
    color: #fff;
}

.post-card h3 a:hover {
    color: var(--mpa-orange-light);
}

.post-card p {
    margin: 0;

    color: var(--mpa-text);
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.post-card-link {
    margin-top: auto;
    padding-top: 6px;
}

.posts-more {
    display: flex;
    justify-content: center;

    margin-top: 40px;
}

.posts-more[hidden] {
    display: none;
}


/* ===== DETAIL ===== */

.post-article {
    display: grid;

    gap: 32px;

    max-width: 860px;

    margin-inline: auto;
}

.post-article[hidden],
.post-article [hidden] {
    display: none;
}

.post-cover {
    display: block;

    width: 100%;
    height: auto;

    border-radius: var(--radius-lg);
}

.post-video {
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: var(--radius-lg);

    background: #000;
}

.post-video iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}

.post-body p {
    margin: 0 0 18px;

    color: var(--mpa-text);
    font-size: 17px;
    line-height: 1.8;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-gallery-title {
    margin: 0 0 16px;

    font-size: 22px;
}

.post-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.post-thumb {
    display: block;

    width: 100%;
    padding: 0;

    overflow: hidden;

    border: 1px solid var(--mpa-border);
    border-radius: 14px;

    background: none;

    cursor: zoom-in;
}

.post-thumb img {
    display: block;

    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.post-thumb:hover img {
    transform: scale(1.04);
}


/* ===== LIGHTBOX ===== */

.post-lightbox {
    width: min(94vw, 1100px);
    max-width: none;
    max-height: 92vh;

    padding: 52px 0 0;

    overflow: hidden;

    border: 0;

    background: transparent;
}

.post-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.9);
}

.post-lightbox img {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(92vh - 116px);

    margin-inline: auto;

    border-radius: 14px;

    object-fit: contain;
}

.post-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 16px;

    padding-top: 16px;

    color: #fff;
    font-size: 15px;
}

.post-lightbox-btn {
    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    background: var(--mpa-orange);

    color: #111;
    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}

.post-lightbox-btn[hidden] {
    display: none;
}

.post-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
}

.post-lightbox-count {
    min-width: 64px;

    text-align: center;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 950px) {

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 680px) {

    .post-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}
