/* Step29: gallery polish + cleaner news cards. No model changes. */

/* Gallery: calmer admin dots on photos */
.mediahub-photo-card {
    border-radius: 14px;
}

.mediahub-photo-wrap {
    overflow: hidden;
    border-radius: 14px;
    background: #f3f4f6;
}

.mediahub-photo-card img,
.mediahub-inline-grid img {
    border-radius: 14px;
}

.mediahub-dots--photo {
    top: 7px;
    right: 7px;
}

.mediahub-dots--photo > summary {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    letter-spacing: -2px;
    color: rgba(17, 24, 39, .72);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .12);
    backdrop-filter: blur(8px);
}

.mediahub-dots--photo > summary:hover,
.mediahub-dots--photo[open] > summary {
    color: #111827;
    background: rgba(255, 255, 255, .96);
}

.mediahub-dots--album > summary {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    color: rgba(17, 24, 39, .74);
}

.mediahub-dots-menu {
    top: 36px;
    min-width: 190px;
    border-radius: 13px;
}

.mediahub-photo-card .mediahub-admin-meta {
    margin-top: 6px;
    font-size: .74rem;
    color: #a1a8b2;
}

.mediahub-admin-panel {
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.mediahub-admin-panel button {
    min-height: 44px;
}

/* News cards: label on photo, date near text, calm title */
.news-card-link {
    position: relative;
}

.news-card-media {
    position: relative;
}

.news-card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 5px;
    border: 1px solid rgba(185, 28, 28, .26);
    background: rgba(255, 255, 255, .92);
    color: #b91c1c;
    font-size: .72rem;
    line-height: 1;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.news-card-body {
    padding-top: 12px;
}

.news-meta-clean {
    margin: 0 0 8px !important;
    color: #7b828c !important;
    font-size: .92rem !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.news-card-title {
    margin: 0 0 8px !important;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400 !important;
    color: #1f2937 !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em;
}

.news-card-clean:hover .news-card-title,
.news-card-link:hover .news-card-title {
    color: #b91c1c !important;
}

.news-card-clean .news-preview {
    margin-top: 10px;
}

@media (max-width: 720px) {
    .mediahub-dots--photo > summary {
        width: 26px;
        height: 26px;
        font-size: .92rem;
    }

    .mediahub-dots--photo {
        top: 6px;
        right: 6px;
    }

    .news-card-badge {
        left: 10px;
        top: 10px;
        min-height: 24px;
        padding: 0 8px;
        font-size: .68rem;
    }

    .news-card-title {
        font-size: clamp(1.7rem, 7vw, 2.35rem) !important;
    }
}

/* Step30: remove generic material label, calmer meta, full gallery lightbox. */
.story-meta--clean .feed-type,
.story-meta .feed-type:empty {
    display: none !important;
}

.story-meta--clean {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    color: #7b828c;
    font-size: .92rem;
    font-weight: 400;
    letter-spacing: 0;
}

.story-meta--clean .meta-category {
    color: #b91c1c;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.story-meta--clean .meta-date,
.story-meta--clean .meta-sep {
    color: #7b828c;
    font-weight: 400;
}

.mediahub-lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: inherit;
}

.mediahub-lightbox-trigger img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mediahub-dots--photo {
    top: 6px;
    right: 6px;
}

.mediahub-dots--photo > summary {
    width: 22px;
    height: 22px;
    font-size: .72rem;
    line-height: 1;
    letter-spacing: -1px;
    color: rgba(255, 255, 255, .92);
    background: rgba(17, 24, 39, .35);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .18);
}

.mediahub-dots--photo > summary:hover,
.mediahub-dots--photo[open] > summary {
    color: #fff;
    background: rgba(17, 24, 39, .62);
}

.mediahub-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    color: #f8fafc;
}

.mediahub-lightbox.is-open {
    display: block;
}

.mediahub-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .92);
    backdrop-filter: blur(12px);
}

.mediahub-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 28px));
    height: min(92vh, 900px);
    margin: 4vh auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
    background: rgba(2, 6, 23, .78);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
    overflow: hidden;
}

.mediahub-lightbox__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.mediahub-lightbox__counter {
    font-size: .95rem;
    color: #e5e7eb;
}

.mediahub-lightbox__tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mediahub-lightbox__tools button,
.mediahub-lightbox__tools a {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.mediahub-lightbox__tools button:hover,
.mediahub-lightbox__tools a:hover {
    background: rgba(255, 255, 255, .18);
}

.mediahub-lightbox__stage {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 58px;
    overflow: hidden;
}

.mediahub-lightbox__stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transform: rotate(var(--mediahub-rotate, 0deg)) scale(var(--mediahub-scale, 1));
    transition: transform .18s ease;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
}

.mediahub-lightbox.is-zoomed .mediahub-lightbox__stage img {
    cursor: zoom-out;
}

.mediahub-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, .58);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.mediahub-lightbox__nav:hover {
    background: rgba(37, 99, 235, .75);
}

.mediahub-lightbox__nav--prev { left: 14px; }
.mediahub-lightbox__nav--next { right: 14px; }

.mediahub-lightbox__caption {
    display: grid;
    gap: 4px;
    padding: 12px 18px 14px;
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.mediahub-lightbox__caption strong {
    font-size: 1rem;
    font-weight: 650;
}

.mediahub-lightbox__caption span,
.mediahub-lightbox__caption small {
    color: #cbd5e1;
}

.mediahub-lightbox__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, .14);
}

.mediahub-lightbox__thumbs button {
    flex: 0 0 70px;
    width: 70px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    opacity: .72;
}

.mediahub-lightbox__thumbs button.is-active {
    border-color: #3b82f6;
    opacity: 1;
}

.mediahub-lightbox__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.mediahub-lightbox-lock {
    overflow: hidden;
}

@media (max-width: 720px) {
    .mediahub-dots--photo > summary {
        width: 21px;
        height: 21px;
        font-size: .68rem;
    }

    .mediahub-lightbox__panel {
        width: 100vw;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
        border: 0;
    }

    .mediahub-lightbox__stage {
        padding: 10px 44px;
    }

    .mediahub-lightbox__nav {
        width: 36px;
        height: 36px;
    }

    .mediahub-lightbox__nav--prev { left: 6px; }
    .mediahub-lightbox__nav--next { right: 6px; }

    .mediahub-lightbox__thumbs button {
        flex-basis: 58px;
        width: 58px;
        height: 44px;
    }
}
