/*
 * File page creator/material block — light page only.
 * Подключать последним CSS-файлом страницы.
 * Разметка намеренно не использует span внутри ссылок: на странице есть глобальный a span.
 */
.mf-file-explore {
    --mf-blue: #00a1f2;
    --mf-blue-dark: #087db7;
    --mf-text: #111820;
    --mf-muted: #687780;
    --mf-line: rgba(0, 161, 242, .13);
    position: relative;
    z-index: 10;
    padding: 44px 0 0;
    color: var(--mf-text);
}

.mf-file-explore,
.mf-file-explore * {
    box-sizing: border-box;
}

.mf-file-explore [hidden] {
    display: none !important;
}

.mf-file-explore .links-explore-main {
    width: 100%;
    max-width: 941px;
    margin: 0 auto;
}

.mf-explore-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 22px;
    text-align: left;
}

.mf-explore-heading-copy {
    min-width: 0;
}

.mf-explore-kicker {
    margin: 0 0 6px;
    color: #138fc8;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.mf-explore-head h2 {
    margin: 0;
    color: var(--mf-text) !important;
    font-family: Montserrat, sans-serif;
    font-size: 30px;
    line-height: 1.16;
    font-weight: 850;
    letter-spacing: -.045em;
    text-transform: none;
}

/* Compact owner link: replaces the old large owner banner. */
.mf-owner-inline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: auto;
    max-width: 100%;
    margin: 0 0 9px;
    padding: 5px 10px 5px 6px;
    border: 1px solid rgba(0, 161, 242, .18);
    border-radius: 12px;
    background: rgba(0, 161, 242, .055);
    color: var(--mf-text) !important;
    box-shadow: none;
    text-decoration: none !important;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.mf-owner-inline:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 161, 242, .38);
    background: rgba(0, 161, 242, .085);
}

.mf-owner-inline img {
    display: block;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    max-width: none;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(12, 103, 145, .16);
}

.mf-owner-inline-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.05;
}

.mf-owner-inline-copy small {
    margin: 0 0 3px;
    color: #168fc4;
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.mf-owner-inline-copy strong {
    display: block;
    overflow: hidden;
    max-width: 260px;
    color: var(--mf-text);
    font-size: 12px;
    line-height: 1.15;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mf-owner-inline-copy strong i {
    margin-left: 3px;
    color: #138fc8;
}

.mf-owner-inline > i {
    flex: 0 0 auto;
    color: #1798d0;
    font-size: 10px;
}

.mf-view-all {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    color: #1089c0 !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none !important;
}

.mf-view-all i {
    font-size: 10px;
    transition: transform .2s ease;
}

.mf-view-all:hover i {
    transform: translateX(3px);
}

.mf-explore-shuffle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    padding: 9px 14px;
    border: 1px solid rgba(0, 161, 242, .22);
    border-radius: 999px;
    background: #fff;
    color: #0f85bb;
    box-shadow: 0 7px 18px rgba(22, 119, 162, .07);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mf-explore-shuffle:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 161, 242, .42);
    box-shadow: 0 10px 24px rgba(22, 119, 162, .12);
}

/* Card: high specificity resets the old common-block rules. */
.mf-file-explore a.links-explore-block.common-block.mf-explore-card,
.mf-file-explore .mf-explore-card {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    width: 100% !important;
    height: calc(100% - 22px) !important;
    min-height: 300px !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    overflow: hidden !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: #fff !important;
    color: var(--mf-text) !important;
    box-shadow: 0 12px 30px rgba(19, 76, 103, .055) !important;
    text-align: left !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease !important;
}

/* The site's familiar blue gradient outline. */
.mf-file-explore a.links-explore-block.common-block.mf-explore-card::before,
.mf-file-explore .mf-explore-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;
    display: block !important;
    padding: 2px !important;
    border-radius: inherit !important;
    background: linear-gradient(300deg, #43ccff 4%, rgba(67, 204, 255, .15) 95%) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}

.mf-file-explore a.links-explore-block.common-block.mf-explore-card::after,
.mf-file-explore .mf-explore-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    display: block !important;
    border-radius: inherit !important;
    background: linear-gradient(0deg, rgba(0, 161, 242, .035), transparent 42%) !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.mf-file-explore a.links-explore-block.common-block.mf-explore-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 18px 38px rgba(16, 105, 145, .12) !important;
}

.mf-explore-card > * {
    position: relative;
    z-index: 1;
}

.mf-explore-media {
    position: relative !important;
    display: block !important;
    flex: 0 0 142px;
    width: 100%;
    height: 142px;
    overflow: hidden;
    background: #edf3f6;
}

.mf-explore-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(9, 35, 47, .22));
    pointer-events: none;
}

.mf-explore-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .3s ease;
}

.mf-explore-card:hover .mf-explore-media img {
    transform: scale(1.035);
}

.mf-explore-card.is-author .mf-explore-media {
    display: flex !important;
    flex-basis: 124px;
    height: 124px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #eaf8ff, #f1faf6);
}

.mf-explore-card.is-author .mf-explore-media::after {
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(25, 97, 119, .12));
}

.mf-explore-card.is-author .mf-explore-media img {
    width: 82px;
    height: 82px;
    border: 4px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 9px 22px rgba(16, 112, 154, .18);
}

.mf-explore-badge {
    position: absolute !important;
    left: 12px;
    bottom: 10px;
    z-index: 2 !important;
    display: inline-flex !important;
    width: auto !important;
    min-height: 22px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: #0b83b9;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mf-explore-body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding: 16px 17px 15px;
}

.mf-explore-card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 43px;
    margin: 0;
    color: var(--mf-text) !important;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    line-height: 1.34;
    font-weight: 800;
    letter-spacing: -.025em;
    text-transform: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mf-explore-description {
    display: -webkit-box;
    overflow: hidden;
    min-height: 36px;
    margin: 7px 0 0;
    color: var(--mf-muted) !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
    font-weight: 500;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mf-explore-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-top: auto;
    padding: 12px 0 0;
    border-top: 1px solid var(--mf-line);
}

.mf-explore-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #63737c;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.mf-explore-stat i {
    flex: 0 0 auto;
    color: #1597d0;
    font-size: 10px;
}

.mf-explore-stat b {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
}

.mf-explore-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: #0e88bf;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.mf-explore-cta i {
    font-size: 9px;
    transition: transform .2s ease;
}

.mf-explore-card:hover .mf-explore-cta i {
    transform: translateX(3px);
}

.mf-explore-status,
.mf-explore-empty {
    margin: 4px 0 20px;
    padding: 16px;
    border: 1px solid rgba(0, 161, 242, .13);
    border-radius: 13px;
    background: rgba(0, 161, 242, .035);
    color: #667780;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Skeleton */
.mf-explore-loading {
    min-height: 350px;
}

.mf-skeleton-heading {
    width: min(430px, 72%);
}

.mf-skeleton,
.mf-skeleton-card {
    background: linear-gradient(100deg, #eef2f4 20%, #f8fafb 38%, #eef2f4 56%);
    background-size: 220% 100%;
    animation: mfExploreShimmer 1.25s linear infinite;
}

.mf-skeleton-kicker {
    width: 130px;
    height: 10px;
    border-radius: 5px;
}

.mf-skeleton-title {
    width: 360px;
    max-width: 100%;
    height: 28px;
    margin-top: 10px;
    border-radius: 7px;
}

.mf-skeleton-card {
    cursor: default !important;
}

.mf-skeleton-card::before {
    background: linear-gradient(300deg, rgba(67, 204, 255, .45), rgba(67, 204, 255, .08)) !important;
}

.mf-skeleton-media {
    display: block;
    width: 100%;
    height: 142px;
}

.mf-skeleton-body {
    padding: 18px;
}

.mf-skeleton-line {
    display: block;
    height: 11px;
    margin-bottom: 11px;
    border-radius: 6px;
}

.mf-skeleton-line-lg { width: 86%; }
.mf-skeleton-line-md { width: 68%; }
.mf-skeleton-line-sm { width: 42%; margin-top: 38px; }

[data-authors-grid] {
    transition: opacity .14s ease, transform .14s ease;
}

[data-authors-grid].is-changing {
    opacity: .18;
    transform: translateY(3px);
}

@keyframes mfExploreShimmer {
    to { background-position-x: -220%; }
}

@media (max-width: 767px) {
    .mf-file-explore {
        padding-top: 34px;
    }

    .mf-explore-head {
        align-items: flex-start;
        gap: 13px;
        margin-bottom: 18px;
    }

    .mf-explore-head h2 {
        font-size: 24px;
    }

    .mf-explore-shuffle {
        margin-top: 2px;
        padding: 8px 10px;
        font-size: 0;
    }

    .mf-explore-shuffle i {
        font-size: 12px;
    }

    .mf-owner-inline-copy strong {
        max-width: 180px;
    }

    .mf-file-explore a.links-explore-block.common-block.mf-explore-card,
    .mf-file-explore .mf-explore-card {
        min-height: 0 !important;
        height: auto !important;
    }

    .mf-explore-media,
    .mf-skeleton-media {
        flex-basis: 160px;
        height: 160px;
    }

    .mf-explore-card.is-author .mf-explore-media {
        flex-basis: 138px;
        height: 138px;
    }
}

@media (max-width: 480px) {
    .mf-explore-head {
        flex-wrap: wrap;
    }

    .mf-view-all {
        margin-bottom: 0;
    }

    .mf-owner-inline-copy strong {
        max-width: 145px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mf-file-explore *,
    .mf-file-explore *::before,
    .mf-file-explore *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
