/* =============================================================
   Agents — val-vpesports theme  v1.0
   archive-vpe_agent.php  +  single-vpe_agent.php
   BEM: agents-* (archive)  agent-* (single)
   ============================================================= */

/* ── Archive: wrapper ──────────────────────────────────────── */

.agents-main { position: relative; }

/* ── Archive: Hero ─────────────────────────────────────────── */

.agents-hero {
    position: relative;
    z-index: 1;
    padding: 5rem 0 3.5rem;
    overflow: hidden;
}

.agents-hero__glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 380px;
    background: radial-gradient(ellipse at center, rgba(255, 70, 85, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.agents-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.agents-hero__eyebrow {
    font-size: 0.67rem;
    letter-spacing: 0.22em;
    color: var(--primary);
    margin: 0;
}

.agents-hero__title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    margin: 0;
    line-height: 1;
}

.agents-hero__title em {
    color: var(--primary);
    font-style: normal;
}

.agents-hero__sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.agents-hero__seo-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.65;
    max-width: 72ch;
    margin: 0 0 1.75rem;
}

/* ── Archive: Role filter ──────────────────────────────────── */

.agents-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.agents-filter__btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    padding: 0.5rem 1.4rem;
    cursor: pointer;
    clip-path: polygon(7px 0%, 100% 0%, calc(100% - 7px) 100%, 0% 100%);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-transform: uppercase;
    user-select: none;
}

.agents-filter__btn:hover {
    border-color: rgba(255, 70, 85, 0.5);
    color: var(--foreground);
}

.agents-filter__btn.is-active {
    background: rgba(255, 70, 85, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Archive: Grid ─────────────────────────────────────────── */

.agents-grid-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0 7rem;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.agents-empty {
    text-align: center;
    padding: 7rem 0;
    color: var(--muted);
}

.agents-empty .text-tech {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ── Agent Card ────────────────────────────────────────────── */

.agent-card {
    position: relative;
    display: block;
    height: 400px;
    overflow: hidden;
    text-decoration: none;
    background: #06101a;
    cursor: pointer;
    transition: transform 0.35s ease;
}

.agent-card:hover { transform: translateY(-7px); }

/* Glow border on hover */
.agent-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--agent-accent, var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 4;
}

.agent-card:hover::after { opacity: 0.65; }

/* Background image */
.agent-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: brightness(0.55) saturate(1.15);
    transition: transform 0.55s ease, filter 0.35s;
}

.agent-card:hover .agent-card__bg {
    transform: scale(1.06);
    filter: brightness(0.68) saturate(1.3);
}

.agent-card__bg--fallback {
    background: linear-gradient(135deg, #1a060d 0%, #07111a 100%);
}

/* Dark-to-transparent gradient overlay */
.agent-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(6, 16, 26, 1)    0%,
        rgba(6, 16, 26, 0.55) 42%,
        rgba(6, 16, 26, 0.05) 100%
    );
    z-index: 1;
}

/* Portrait */
.agent-card__portrait {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 88%;
    width: auto;
    max-width: 115%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.55));
    transition: transform 0.4s ease;
    z-index: 2;
}

.agent-card:hover .agent-card__portrait {
    transform: translateX(-50%) scale(1.05) translateY(-5px);
}

/* HUD corner brackets */
.agent-card__corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--agent-accent, var(--primary));
    border-style: solid;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 5;
}

.agent-card:hover .agent-card__corner { opacity: 1; }
.agent-card__corner--tl { top: 9px;    left: 9px;    border-width: 2px 0 0 2px; }
.agent-card__corner--tr { top: 9px;    right: 9px;   border-width: 2px 2px 0 0; }
.agent-card__corner--bl { bottom: 9px; left: 9px;    border-width: 0 0 2px 2px; }
.agent-card__corner--br { bottom: 9px; right: 9px;   border-width: 0 2px 2px 0; }

/* Info bar */
.agent-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.1rem 1rem;
    z-index: 3;
}

.agent-card__role {
    display: block;
    font-size: 0.57rem;
    letter-spacing: 0.22em;
    color: var(--agent-accent, var(--primary));
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

.agent-card__name {
    font-size: 1.35rem;
    color: var(--foreground);
    margin: 0 0 0.55rem;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.agent-card__abilities {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.agent-card__ability-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.agent-card:hover .agent-card__ability-icon { opacity: 0.95; }

.agent-card__cta {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--agent-accent, var(--primary));
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s, transform 0.25s;
}

.agent-card:hover .agent-card__cta {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================
   Single Agent
   ============================================================= */

.agent-main { position: relative; }

/* ── Hero ──────────────────────────────────────────────────── */

.agent-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg,
        var(--a1, #1a0a14) 0%,
        var(--a2, #0f1923) 45%,
        var(--a3, #07111a) 75%,
        var(--a4, #040d14) 100%
    );
}

.agent-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.28) saturate(1.1);
}

.agent-hero__gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(7, 17, 26, 0.97) 36%, rgba(7, 17, 26, 0.22) 100%),
        linear-gradient(to top,   rgba(7, 17, 26, 1)    0%,  transparent 55%);
}

.agent-hero__scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.04) 2px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
}

.agent-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 600px 1fr;
    align-items: center;
    gap: 3rem;
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
}

/* Portrait */
.agent-hero__portrait-wrap {
    height: 760px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
}

.agent-hero__portrait {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.65));
    animation: agentFloat 4.5s ease-in-out infinite;
}

@keyframes agentFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}

/* Text info */
.agent-hero__info { padding-right: 2rem; }

.agent-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 1.75rem;
}

.agent-hero__breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.agent-hero__breadcrumb a:hover { color: var(--primary); }

.agent-hero__role {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    border: 1px solid rgba(255, 70, 85, 0.35);
    padding: 0.28rem 0.8rem;
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    margin-bottom: 0.9rem;
}

.agent-hero__role-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(37%) sepia(80%) saturate(1500%) hue-rotate(318deg) brightness(1.1);
}

.agent-hero__name {
    font-size: clamp(3rem, 6.5vw, 5.5rem);
    color: var(--foreground);
    margin: 0 0 1.5rem;
    line-height: 1;
    text-shadow: 0 0 60px rgba(255, 70, 85, 0.22), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.agent-hero__lore {
    font-size: 0.95rem;
    line-height: 1.72;
    color: rgba(236, 232, 225, 0.8);
    max-width: 540px;
    margin: 0 0 1.25rem;
}

.agent-hero__lore-extra {
    font-size: 0.88rem;
    line-height: 1.68;
    color: var(--muted);
    max-width: 520px;
    margin: 0 0 2rem;
    border-left: 2px solid rgba(255, 70, 85, 0.4);
    padding-left: 1rem;
    font-style: normal;
}

.agent-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.agent-hero__back:hover { color: var(--primary); }

/* ── Section header (shared) ───────────────────────────────── */

.agent-section-header { margin-bottom: 2.5rem; }

.agent-section-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--primary);
    margin: 0 0 0.6rem;
}

.agent-section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 0;
    line-height: 1.05;
}

.agent-section-title em { color: var(--primary); font-style: normal; }

/* ── Abilities section ─────────────────────────────────────── */

.agent-abilities {
    position: relative;
    z-index: 1;
    padding: 5.5rem 0 6rem;
    background: rgba(4, 13, 20, 0.5);
}

.agent-abilities__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Ability card */
.ability-card {
    position: relative;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.25s, background 0.25s;
}

/* Left accent bar */
.ability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.ability-card:hover::before { transform: scaleY(1); }

.ability-card:hover {
    border-color: rgba(255, 70, 85, 0.3);
    background: rgba(255, 70, 85, 0.04);
}

/* Ultimate — full-width row, always highlighted */
.ability-card--ult {
    grid-column: 1 / -1;
    border-color: rgba(255, 70, 85, 0.22);
    background: rgba(255, 70, 85, 0.06);
}

.ability-card--ult::before { transform: scaleY(1); }

.ability-card--passive { opacity: 0.8; }

.ability-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ability-card__icon-wrap {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    background: rgba(255, 70, 85, 0.1);
    border: 1px solid rgba(255, 70, 85, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px;
    box-sizing: border-box;
    transition: background 0.2s;
}

.ability-card--ult .ability-card__icon-wrap {
    width: 62px;
    height: 62px;
    background: rgba(255, 70, 85, 0.18);
    border-color: rgba(255, 70, 85, 0.4);
}

.ability-card:hover .ability-card__icon-wrap {
    background: rgba(255, 70, 85, 0.16);
}

.ability-card__icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ability-card__meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ability-card__key {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.ability-card__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--foreground);
    margin: 0;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.ability-card--ult .ability-card__name { font-size: 1.25rem; }

.ability-card__desc {
    font-size: 0.82rem;
    line-height: 1.68;
    color: var(--muted);
    margin: 0;
}

/* ── Top Players ───────────────────────────────────────────── */

.agent-top-players {
    position: relative;
    z-index: 1;
    padding: 5rem 0 6rem;
}

.agent-top-players__wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.agent-top-players__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.agent-top-players__table th {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--primary);
    padding: 0.85rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 70, 85, 0.25);
    background: rgba(255, 70, 85, 0.04);
    white-space: nowrap;
}

.agent-top-players__table td {
    padding: 0.9rem 1.25rem;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
}

.agent-top-players__table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.agent-top-players__num { color: var(--muted) !important; font-size: 0.65rem; }

.agent-rank-badge {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: var(--primary);
    border: 1px solid rgba(255, 70, 85, 0.35);
    padding: 0.18rem 0.6rem;
}

/* ── Agent nav (prev / all / next) ────────────────────────── */

.agent-nav {
    position: relative;
    z-index: 1;
    padding-bottom: 5rem;
}

.agent-nav__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}

.agent-nav__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    transition: border-color 0.25s, background 0.25s;
    min-width: 0;
}

.agent-nav__link--next {
    justify-content: flex-end;
    flex-direction: row-reverse;
    text-align: right;
}

.agent-nav__link:hover {
    border-color: rgba(255, 70, 85, 0.4);
    background: rgba(255, 70, 85, 0.04);
}

.agent-nav__thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    object-position: center bottom;
    filter: brightness(0.68) saturate(0.85);
    flex-shrink: 0;
    transition: filter 0.25s;
}

.agent-nav__link:hover .agent-nav__thumb { filter: brightness(1) saturate(1.1); }

.agent-nav__dir {
    display: block;
    font-size: 0.57rem;
    letter-spacing: 0.18em;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.agent-nav__name {
    display: block;
    font-size: 1rem;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-nav__all {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-decoration: none;
    padding: 0.9rem 1.5rem;
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.agent-nav__all:hover { color: var(--primary); border-color: rgba(255, 70, 85, 0.4); }

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 1199px) {
    .agents-grid { grid-template-columns: repeat(3, 1fr); }
    .agent-hero__inner { grid-template-columns: 460px 1fr; gap: 2rem; }
    .agent-hero__portrait-wrap { height: 620px; }
}

@media (max-width: 899px) {
    .agents-grid { grid-template-columns: repeat(2, 1fr); }

    .agent-hero__inner { grid-template-columns: 1fr; text-align: center; }
    .agent-hero__portrait-wrap { height: 340px; order: -1; margin: 0 auto; }
    .agent-hero__role { margin: 0 auto 0.9rem; }
    .agent-hero__lore,
    .agent-hero__lore-extra { margin-left: auto; margin-right: auto; }
    .agent-hero__lore-extra { border-left: none; border-top: 2px solid rgba(255,70,85,.4); padding: 1rem 0 0; }
    .agent-hero__breadcrumb,
    .agent-hero__back { justify-content: center; }
    .agent-hero__info { padding-right: 0; }

    .agent-abilities__grid { grid-template-columns: 1fr; }
    .ability-card--ult { grid-column: 1; }

    .agent-nav__inner { grid-template-columns: 1fr 1fr; }
    .agent-nav__all { display: none; }
}

@media (max-width: 599px) {
    .agents-grid { grid-template-columns: repeat(2, 1fr); }
    .agent-card { height: 300px; }
    .agent-card__name { font-size: 1.1rem; }

    .agent-hero { min-height: auto; }
    .agent-hero__portrait-wrap { height: 280px; }

    .agent-nav__inner { grid-template-columns: 1fr; }
    .agent-nav__link--next { flex-direction: row; text-align: left; justify-content: flex-start; }
}
