/* =========================================================
   EQUIP ARCHIVE — restyling card equipaggiamento
   Prefisso: eqa-   (nessuna regola esce da qui)
   ========================================================= */

.eqa-card {
    --eqa-cyan: #22d3ee;
    --eqa-cyan-soft: rgba(34, 211, 238, 0.35);
    --eqa-cyan-faint: rgba(34, 211, 238, 0.10);
    --eqa-bg: rgba(6, 18, 31, 0.88);
    --eqa-bg-cell: rgba(10, 30, 48, 0.75);
    --eqa-text: #d7e6f0;
    --eqa-muted: #7f98ab;
    --eqa-green: #4ade80;
    --eqa-red: #f87171;

    position: relative;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    margin: 0 0 18px;
    padding: 16px;
    background: var(--eqa-bg);
    border: 1px solid var(--eqa-cyan-soft);
    border-left: 3px solid var(--eqa-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.08), inset 0 0 40px rgba(34, 211, 238, 0.04);
    color: var(--eqa-text);
    transition: box-shadow .25s ease, border-color .25s ease;
}

.eqa-card:hover {
    border-color: var(--eqa-cyan);
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.18), inset 0 0 40px rgba(34, 211, 238, 0.06);
}

/* ---------- Immagine con cornice HUD ---------- */

.eqa-media {
    position: relative;
    width: 260px;
    height: 260px;
    padding: 6px;
    border: 1px solid var(--eqa-cyan-faint);
    background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.12), transparent 70%);
    align-self: start;
}

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

/* angolari: in alto a sinistra e in basso a destra */
.eqa-media::before,
.eqa-media::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--eqa-cyan);
    filter: drop-shadow(0 0 4px var(--eqa-cyan));
    pointer-events: none;
    transition: width .25s ease, height .25s ease;
}
.eqa-media::before { top: -2px;    left: -2px;  border-right: none; border-bottom: none; }
.eqa-media::after  { bottom: -2px; right: -2px; border-left: none;  border-top: none; }

.eqa-card:hover .eqa-media::before,
.eqa-card:hover .eqa-media::after {
    width: 40px;
    height: 40px;
}

/* etichetta categoria sull'immagine */
.eqa-media-tag {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 2px 8px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--eqa-cyan);
    background: rgba(2, 10, 18, 0.85);
    border: 1px solid var(--eqa-cyan-soft);
}

/* ---------- Corpo ---------- */

.eqa-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.eqa-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--eqa-cyan-faint);
}

.eqa-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}

.eqa-type {
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--eqa-muted);
}

/* ---------- Griglia specifiche ---------- */

.eqa-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 6px;
}

.eqa-spec {
    padding: 6px 10px;
    background: var(--eqa-bg-cell);
    border-top: 1px solid var(--eqa-cyan-faint);
}

.eqa-spec-wide {
    grid-column: span 2;
}

.eqa-spec-label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--eqa-cyan);
}

.eqa-spec-value {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--eqa-text);
}

.eqa-spec-value.eqa-pos { color: var(--eqa-green); }
.eqa-spec-value.eqa-neg { color: var(--eqa-red); }

/* ---------- Modalità di fuoco come chip ---------- */

.eqa-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.eqa-chip {
    padding: 2px 9px;
    font-size: 11px;
    letter-spacing: .5px;
    color: var(--eqa-cyan);
    background: var(--eqa-cyan-faint);
    border: 1px solid var(--eqa-cyan-soft);
    border-radius: 2px;
}

/* ---------- Target + prerequisiti in una riga ---------- */

.eqa-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 22px;
    font-size: 13px;
}

.eqa-meta-label {
    margin-right: 8px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--eqa-green);
}

.eqa-meta i {
    margin-right: 6px;
    color: var(--eqa-text);
}

.eqa-rank {
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
}

.eqa-none {
    color: var(--eqa-muted);
    font-style: italic;
}

/* ---------- Descrizione comprimibile ---------- */

.eqa-desc {
    padding: 8px 12px;
    background: rgba(2, 10, 18, 0.55);
    border-left: 2px solid var(--eqa-cyan-soft);
}

.eqa-desc-text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #b9cad6;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eqa-desc.eqa-open .eqa-desc-text {
    display: block;
    -webkit-line-clamp: unset;
}

.eqa-desc-toggle {
    margin-top: 4px;
    padding: 0;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--eqa-cyan);
    background: none;
    border: none;
    cursor: pointer;
}

.eqa-desc-toggle:hover { text-shadow: 0 0 6px var(--eqa-cyan); }

.eqa-desc-toggle[hidden] { display: none; }

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
    .eqa-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    .eqa-media {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1 / 1;
        justify-self: center;
    }
    .eqa-head {
        flex-direction: column;
        gap: 2px;
    }
}

/* =========================================================
   Attivo solo sulle card con classe eqa-zoomable (pagina mecha)
   ========================================================= */

/* ---------- card ingrandibili: affordance ---------- */

.eqa-zoomable .eqa-media {
    cursor: zoom-in !important;
    overflow: hidden;
}

.eqa-zoomable .eqa-media img {
    cursor: zoom-in !important;
    transition: transform .3s ease, filter .3s ease;
}

.eqa-zoomable:hover .eqa-media img {
    transform: scale(1.04);
    filter: brightness(1.12);
}

/* badge lente, sempre visibile (utile su mobile) */
.eqa-zoomable .eqa-media-zoom {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #22d3ee;
    background: rgba(2, 10, 18, 0.85);
    border: 1px solid rgba(34, 211, 238, 0.45);
    pointer-events: none;
    transition: box-shadow .25s ease, color .25s ease;
}

.eqa-zoomable:hover .eqa-media-zoom {
    color: #fff;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}

.eqa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: rgba(2, 8, 16, 0.92);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    cursor: zoom-out;
}

.eqa-lightbox.eqa-lb-open {
    opacity: 1;
    visibility: visible;
}

.eqa-lightbox img {
    max-width: min(92vw, 1300px);
    max-height: calc(100vh - 110px);
    object-fit: contain;
    border: 1px solid rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.18);
    transform: scale(.97);
    transition: transform .2s ease;
}

.eqa-lightbox.eqa-lb-open img {
    transform: scale(1);
}

.eqa-lb-caption {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #22d3ee;
    text-align: center;
}

.eqa-lb-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 38px;
    color: #22d3ee;
    background: rgba(6, 18, 31, 0.9);
    border: 1px solid rgba(34, 211, 238, 0.45);
    cursor: pointer;
}

.eqa-lb-close:hover {
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

@media (max-width: 720px) {
    .eqa-lightbox { padding: 10px; }
    .eqa-lightbox img { max-width: 100%; max-height: calc(100vh - 90px); }
}