/* ===== news/article + small gallery + lightbox ===== */

.news-article {
    font-family: 'Yekan', sans-serif;
    color: #1a2a3a;
    padding: 28px 0;
}

.article-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.article-head {
    margin-bottom: 18px;
    text-align: right;
}

.article-title {
    font-size: 1.8rem;
    margin: 0;
    color: #1a2a3a;
    font-weight: 800;
}

.article-meta {
    color: #6b7785;
    margin-top: 6px;
    font-size: 0.95rem;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    direction: rtl;
}

.article-meta time {
    color: #6b7785;
}

.article-body {
    margin-top: 14px;
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
    text-align: justify;
}


/* quote */

.quote {
    border-right: 4px solid rgba(68, 114, 196, 0.12);
    padding: 12px 16px;
    background: #fbfdff;
    border-radius: 8px;
    margin: 12px 0;
    color: #16324b;
}


/* CTA aside */

.article-cta {
    margin-top: 18px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #0f172a;
    text-align: right;
}


/* gallery */

.gallery-title {
    font-size: 1.05rem;
    margin: 22px 0 12px 0;
    color: #1a2a3a;
    text-align: right;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    align-items: stretch;
}


/* each thumbnail pane (پنجره‌ای) */

.pane {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(23, 40, 80, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 150px;
}

.pane img {
    width: 100%;
    height: calc(100% - 0px);
    object-fit: cover;
    display: block;
}

.pane figcaption {
    padding: 8px;
    font-size: 0.92rem;
    color: #374151;
    text-align: right;
}


/* hover/focus */

.pane:hover,
.pane:focus {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(23, 40, 80, 0.12);
    outline: none;
}


/* lightbox */

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 20, 0.7);
    z-index: 20000;
    padding: 20px;
}

.lightbox[aria-hidden="false"] {
    display: flex;
}

.lb-figure {
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lb-img {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}


/* caption */

.lb-caption {
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
}


/* close/prev/next buttons */

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: transform .12s;
    font-size: 22px;
}

.lb-close {
    top: 18px;
    left: 18px;
}

.lb-prev {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}


/* small screens */

@media (max-width: 780px) {
    .pane {
        height: 140px;
    }
    .gallery-grid {
        gap: 10px;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .lb-prev,
    .lb-next {
        display: none;
    }
    /* روی موبایل فقط بستن کافی است */
}