/* =====================================================================
   FILES FAMILY — shared page module
   Used by: files.html, maps.html, weapons.html, player-models.html
   Includes all family components, responsive states and interactive states.
   Shared shell dependencies copied from page-specific.css are retained there
   for pages that have not migrated to this module.
===================================================================== */

/* =====================================================================
   PAGE 4 — files.html
   File catalogue: category tiles, intro, filters and page-specific responsive layout.
   Depends on: SHARED MODULE — FILE CARDS / GRID / PAGINATION below.
===================================================================== */

/* =========================================================
   FILES PAGE
========================================================= */

.files-page .breadcrumbs {
    margin-bottom: 12px;
}

.files-page .breadcrumbs a {
    color: var(--text-secondary);
}

.files-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.files-category-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 10px 12px;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--topbar-surface), #1c1f21 70%);
    color: var(--text-contrast);
    overflow: hidden;
    transition: .2s ease;
}

.files-category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, rgba(var(--accent-rgb), .04), transparent 48%);
}

.files-category-card:hover,
.files-category-card.is-active {
    color: var(--white);
    border-color: rgba(var(--accent-rgb), .42);
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(var(--accent-rgb), .10), #1c1f21 70%);
}

.files-category-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--overlay-border);
    background: var(--surface-deep);
    box-shadow: 0 6px 18px rgba(var(--black-rgb), .24);
}

.files-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.files-category-copy {
    min-width: 0;
}

.files-category-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #777f86;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.files-category-copy strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
}

.files-category-copy small {
    display: block;
    color: #92999f;
    font-size: 10px;
    line-height: 1.4;
}

.files-category-arrow {
    position: relative;
    z-index: 1;
    color: var(--accent-soft);
    font-size: 18px;
    transition: transform .2s ease;
}

.files-category-card:hover .files-category-arrow {
    transform: translateX(3px);
}

.files-intro {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-dark);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(var(--accent-rgb), .07), var(--surface-article) 62%);
    box-shadow: inset 0 1px 0 var(--overlay-section-highlight);
}

.files-intro-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(var(--accent-rgb), .12);
    border: 1px solid rgba(var(--accent-rgb), .25);
    color: var(--accent-light);
    font-size: 21px;
}

.files-intro-content h1 {
    margin: 0 0 4px;
    color: var(--text-contrast);
    font-size: 21px;
    line-height: 1.25;
}

.files-intro-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.files-intro-stat {
    text-align: right;
    white-space: nowrap;
}

.files-intro-stat strong {
    display: block;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.files-intro-stat span {
    color: #747d84;
    font-size: 10px;
}





.files-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.files-filter button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #303438;
    border-radius: 8px;
    background: var(--topbar-surface);
    color: #979fa5;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.files-filter button:hover,
.files-filter button.is-active {
    color: var(--white);
    border-color: rgba(var(--accent-rgb), .35);
    background: rgba(var(--accent-rgb), .12);
}

@media (max-width: 900px) {
    .files-categories {
        grid-template-columns: 1fr;
    }

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

    .files-intro-stat {
        display: none;
    }

    
}

@media (max-width: 600px) {
    .files-category-card {
        min-height: 78px;
    }

    .files-category-thumb {
        width: 58px;
        height: 58px;
    }

    .files-intro {
        gap: 11px;
        padding: 15px;
    }

    .files-intro-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .files-intro-content h1 {
        font-size: 18px;
    }

    .files-intro-content p {
        font-size: 11px;
        line-height: 1.6;
    }

    .files-filter {
        width: 100%;
    }

    .files-filter button {
        flex: 1 1 calc(50% - 3px);
    }
}

/* Files page link accents are included in the shared file-card module where applicable. */

/* =========================================================
   SHARED MODULE — FILE CARDS / GRID / PAGINATION
   Used by: files.html, weapons.html, maps.html
   Include this section together with the relevant page section.
========================================================= */

.files-list-section {
    margin-bottom: 18px;
}

.files-section-kicker {
    display: block;
    margin-bottom: 3px;
    color: #777f86;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}

.files-card {
    overflow: hidden;
    border: 1px solid var(--border-article);
    border-radius: 12px;
    background: var(--bg);
    transition: .2s ease;
}

.files-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .35);
    box-shadow: 0 15px 35px rgba(var(--black-rgb), .23);
}

.files-card-image {
    position: relative;
    display: block;
    margin: 10px 10px 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    background: var(--bg-dark);
}

.files-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(var(--hero-vignette-rgb), .52));
    pointer-events: none;
}

.files-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .25s ease;
}

.files-card:hover .files-card-image img {
    transform: scale(1.035);
    filter: saturate(1.04) brightness(1.03);
}

.files-card-badge {
    position: absolute;
    left: 9px;
    top: 9px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(15,17,19,.76);
    backdrop-filter: blur(6px);
    color: var(--text-contrast);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
}

.files-card-body {
    padding: 22px;
}

.files-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.files-card-title {
    display: block;
margin-top: 20px;
    margin-bottom: 6px;
    color: var(--text-contrast);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.files-card-title:hover {
    color: var(--accent-light);
}

.files-card-body p {
    min-height: 58px;
    margin: 0px;
    color: #899197;
    font-size: 11px;
    line-height: 1.55;
}

.files-card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-light);
    text-decoration-color: rgba(var(--accent-light-rgb), .42);
    font-size: 11px;
    font-weight: 700;
}

.files-card-link span {
    transition: transform .18s ease;
}

.files-card-link:hover span {
    transform: translateX(3px);
}

.files-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 0 0;
}

.files-pagination a,
.files-pagination span {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid #2d3134;
    border-radius: 8px;
    background: #232628;
    color: #929aa0;
    font-size: 11px;
    font-weight: 700;
}

.files-pagination a:hover,
.files-pagination a.is-current {
    color: var(--white);
    border-color: rgba(var(--accent-rgb), .42);
    background: rgba(var(--accent-rgb), .16);
}

.files-pagination .next {
    padding: 0 12px;
}

@media (max-width: 980px) {
    .files-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 600px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared file-card hover accent. */
.files-card-link:hover {
    color: var(--accent-pale);
    text-decoration-color: currentColor;
}

/* =====================================================================
   PAGE 5 — weapons.html
   Weapon model type selector, page intro, sorting and weapon-specific card overrides.
   Dependency: SHARED MODULE — FILE CARDS / GRID / PAGINATION above.
===================================================================== */

/* =========================================================
   WEAPON MODELS CATEGORY
========================================================= */

.weapon-page .breadcrumbs {
    margin-bottom: 12px;
}

.weapon-page .breadcrumbs a {
    color: var(--text-secondary);
}

.weapon-browser {
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    padding: 16px 18px 14px;
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(var(--accent-rgb), .08), var(--surface-article) 58%);
    box-shadow: inset 0 1px 0 var(--overlay-section-highlight);
}

.weapon-browser::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 9% 0%, rgba(var(--accent-rgb), .10), transparent 26%),
        linear-gradient(120deg, rgba(255,255,255,.018), transparent 36%);
}

.weapon-browser-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.weapon-browser-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--text-contrast);
    font-size: 21px;
    line-height: 1.2;
}

.weapon-browser-title::first-letter {
    color: var(--accent-light);
}

.weapon-browser-copy {
    margin: 10px 0 0 5px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 760px;
}

.weapon-browser-count {
    flex: 0 0 auto;
    min-width: 94px;
    padding: 8px 10px;
    border: 1px solid rgba(var(--accent-rgb), .20);
    border-radius: 10px;
    background: rgba(var(--accent-rgb), .06);
    text-align: center;
}

.weapon-browser-count strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    line-height: 1;
}

.weapon-browser-count span {
    display: block;
    margin-top: 4px;
    color: #747d84;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.weapon-type-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.weapon-type {
    position: relative;
    min-width: 0;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px 9px;
    border: 1px solid #2a2d30;
    border-radius: 10px;
    background: linear-gradient(180deg, #232629, #1d2022);
    color: #c4c9cd;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
    overflow: hidden;
}

.weapon-type::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.022), transparent 55%);
}

.weapon-type:hover,
.weapon-type.is-active {
    color: var(--white);
    border-color: rgba(var(--accent-rgb), .46);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), .14), #1f2225);
    transform: translateY(-2px);
}

.weapon-type.is-active {
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .08);
}

.weapon-type-icon {
    flex: 0 0 auto;
    width: 115px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weapon-type-icon img {
    display: block;
    width: 115px;
    height: 42px;
    object-fit: contain;
}

.weapon-type span:last-child {
    position: relative;
    z-index: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}




















.weapon-page .files-grid {
    gap: 18px;
}

.weapon-page .files-card {
    background: var(--bg);
    border-color: #1e1e1e;
}

.weapon-page .files-card-image {
    aspect-ratio: 16 / 9;
}

.weapon-page .files-card-body {
    padding: 11px 13px 13px;
}

.weapon-page .files-card-title {
    font-size: 15px;
    font-weight: 600;
}

.weapon-page .files-card-body p {
    min-height: 58px;
}

.weapon-page .files-card-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed #272727;
    text-decoration: none;
}

.weapon-page .files-card-badge {
    color: var(--text);
    border-color: rgba(var(--accent-rgb), .22);
    background: rgba(20,22,24,.84);
}

.weapon-pagination {
    margin-top: 18px;
}

/* 1366px: keep the weapon cards in 2 rows while preserving the compact browser */
@media (max-width: 1366px) {
    .weapon-type-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .weapon-browser-head {
        align-items: flex-start;
    }

    .weapon-browser-count {
        display: none;
    }

    .weapon-type-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .weapon-type {
        min-height: 78px;
    }

    .weapon-type-icon,
    .weapon-type-icon img {
        width: 115px;
        height: 42px;
    }

    

    
}

@media (max-width: 680px) {
    .weapon-browser {
        padding: 14px;
    }

    .weapon-browser-title {
        font-size: 18px;
    }

    .weapon-browser-copy {
        margin: 8px 0 0 2px;
        font-size: 12px;
    }

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

    .weapon-type {
        min-height: 76px;
        padding: 9px 7px;
    }

    .weapon-type span:last-child {
        font-size: 12px;
    }

    

    

    

    

}

@media (max-width: 420px) {
    .weapon-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .weapon-type {
        min-height: 74px;
        padding: 8px 5px;
        gap: 6px;
    }

    .weapon-type-icon,
    .weapon-type-icon img {
        width: 105px;
        height: 38px;
    }

    .weapon-type span:last-child {
        font-size: 11px;
    }
}

/* =====================================================================
   PAGE 6 — maps.html
   Map categories, type cards, map intro, sorting and pagination.
   Dependency: SHARED MODULE — FILE CARDS / GRID / PAGINATION above.
===================================================================== */

/* =========================================================
   MAPS CATEGORY
========================================================= */

.map-page .breadcrumbs {
    margin-bottom: 12px;
}

.map-browser {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(var(--accent-rgb), .07), var(--surface-article) 64%);
    box-shadow: inset 0 1px 0 var(--overlay-section-highlight);
}

.map-browser-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.map-browser-title {
    margin: 0 0 6px;
    color: var(--text-contrast);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.map-browser-copy {
    max-width: 790px;
    margin: 0 0 0 3px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.map-browser-count {
    min-width: 118px;
    padding: 11px 14px;
    border: 1px solid rgba(var(--accent-rgb), .18);
    border-radius: 11px;
    background: var(--overlay-inset);
    text-align: center;
}

.map-browser-count strong {
    display: block;
    color: var(--text);
    font-size: 22px;
    line-height: 1;
}

.map-browser-count span {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
}

.map-type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.map-type {
    position: relative;
    display: grid;
    grid-template-columns: 82px minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 92px;
    padding: 9px;
    overflow: hidden;
    border: 1px solid #2b2e31;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--overlay-soft), rgba(255,255,255,.012));
    color: var(--text-emphasis);
    text-decoration: none;
    transition: .2s ease;
}

.map-type::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), .07), transparent 55%);
    opacity: 0;
    transition: opacity .2s ease;
}

.map-type:hover,
.map-type.is-active {
    border-color: rgba(var(--accent-rgb), .38);
    background: linear-gradient(145deg, rgba(var(--accent-rgb), .11), var(--overlay-faint));
    transform: translateY(-2px);
}

.map-type:hover::after,
.map-type.is-active::after {
    opacity: 1;
}

.map-type-image {
    width: 82px;
    height: 74px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--overlay-border);
    background: #111315;
}

.map-type-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.map-type-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.map-type-copy span {
    display: inline-flex;
    margin-bottom: 4px;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(var(--accent-rgb), .13);
    color: var(--accent-light);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.map-type-copy strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-emphasis);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.map-type-copy small {
    display: block;
    color: #838c93;
    font-size: 9px;
    line-height: 1.35;
}

.map-type-arrow {
    position: relative;
    z-index: 1;
    align-self: end;
    padding: 0 3px 2px 0;
    color: var(--accent-soft);
    font-size: 17px;
    transition: transform .2s ease;
}

.map-type:hover .map-type-arrow {
    transform: translateX(3px);
}

.map-page .files-card-link {
    color: var(--accent-light);
}

.map-pagination {
    margin-top: 2px;
}

@media (max-width: 1120px) {
    .map-type-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 900px) {
    .map-browser-head {
        flex-direction: column;
    }

    .map-browser-count {
        min-width: 0;
        width: fit-content;
    }

    

    

    
}

@media (max-width: 600px) {
    .map-browser {
        padding: 14px;
    }

    .map-browser-title {
        font-size: 20px;
    }

    .map-browser-copy {
        font-size: 12px;
    }

    .map-type-grid {
        grid-template-columns: 1fr;
    }

    .map-type {
        grid-template-columns: 92px minmax(0,1fr) auto;
        min-height: 96px;
    }

    .map-type-image {
        width: 92px;
        height: 78px;
    }

    .map-type-copy strong {
        font-size: 14px;
    }

    .map-type-copy small {
        font-size: 10px;
    }

    

    

    

    
}

/* Map page card links inherit the shared files-card style. */

/* =========================================================
   PLAYER MODELS — dedicated catalogue refinements
========================================================= */
.player-models-page .weapon-browser-copy { max-width: 700px; }
.player-models-page .files-card-image { background: var(--surface-related-media); }
.player-models-page .files-card-image img { object-fit: cover; }

/* Shared shell adjustments still required by the files family. These remain in page-specific.css for other pages. */
.site > .main-layout {
    padding-top: 18px;
}

.site-footer-intro,
.site-footer-directory {
    background: linear-gradient(145deg, #171b1e, #141719 70%, #15191b);
}

.files-dropdown .dropdown a.is-current {
    color: var(--accent-light);
    background: rgba(var(--accent-rgb), .10);
    border-color: rgba(var(--accent-rgb), .22);
}

