/* Hodnosti (ranks) page - rank cards.
   Reuses the site's red/dark identity (#7d2128, dark overlays).
   Rank icons live in imgs/ranks/*.webp (256x256, transparent). */

.ranks-list {
    display: grid;
    gap: clamp(16px, 2.5vw, 24px);
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

.roles-heading {
    margin: clamp(36px, 6vw, 64px) 0 8px;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    color: #fff;
    text-align: left;
}

.screenshot-showcase {
    width: 100%;
    max-width: 50%;
    margin: clamp(20px, 3vw, 32px) auto 0;
    padding: 0;
    border: 6px solid #7d2128;
    border-radius: 8px;
    background: transparent !important;
    overflow: hidden;
    line-height: 0;
}

.screenshot-showcase img {
    display: block;
    width: 100%;
    height: auto;
}

.rank-card {
    display: flex;
    align-items: stretch;
    gap: clamp(16px, 2.5vw, 28px);
    background-color: rgba(4, 5, 5, 0.64);
    border: 1px solid rgba(125, 33, 40, 0.5);
    border-left: 5px solid #7d2128;
    border-radius: 12px;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
    padding: clamp(14px, 2vw, 20px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 33, 40, 0.85);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.rank-card__media {
    flex: 0 0 clamp(96px, 20%, 150px);
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: clamp(6px, 1.4vw, 12px);
    border-radius: 10px;
}

.rank-card__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.rank-card__img--monochrome {
    filter: brightness(0) invert(1);
}

.rank-card__count {
    color: #fff;
    font-size: clamp(0.72rem, 1.6vw, 0.85rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

/* Placeholder for ranks without an icon (e.g. REKRUT). */
.rank-card__media--empty {
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
}

.rank-card__noimg {
    font-size: clamp(0.72rem, 1.6vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    text-align: center;
}

.rank-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.rank-card__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.rank-card__name {
    margin: 0;
    font-size: clamp(1.4rem, 3.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1;
}

.rank-card__tag {
    font-size: clamp(0.7rem, 1.5vw, 0.78rem);
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #fff;
}

.rank-card__desc {
    margin: 0;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    line-height: 1.55;
    color: #fff;
}

.rank-card__desc + .rank-card__desc {
    margin-top: 0.75rem;
}

@media screen and (max-width: 640px) {
    .rank-card {
        flex-direction: column;
        border-left: 1px solid rgba(125, 33, 40, 0.5);
        border-top: 5px solid #7d2128;
    }

    .rank-card__media {
        flex-basis: auto;
        width: clamp(96px, 30vw, 140px);
        align-self: flex-start;
    }
}
