/**
 * TFISOFT CMS FREE 
 * www.tfisoft.com.br
 * @version 1.0.0
 * @author Moreira / DevKinG 
 * @copyright (c) 2026 TFISFOT, All Rights Reserved
 *
 */
/* ============================================================
   TFISOFT V34 | MU HARD POWER
   RANKINGS DARK FANTASY - CSS visual inspirado na referencia
   Instalar em: public_html/css/tfi-ranking-cards.css
   ============================================================ */

/* TITULO PRINCIPAL */
.page-title:has(+ .rankings_menu),
.page-title:has(~ .tfi-ranking-cards) {
    position: relative;
    margin: 12px 0 24px;
    padding: 37px 12px 21px;
    text-align: center;
    border-bottom: 1px solid #a16a32;
    background: radial-gradient(ellipse at center bottom, rgba(174, 97, 28, 0.15), transparent 65%);
}
.page-title:has(+ .rankings_menu) span,
.page-title:has(~ .tfi-ranking-cards) span {
    color: #f7cc7e !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(26px, 4vw, 39px);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 #4d250c,
        0 3px 12px rgba(242, 156, 57, 0.65);
}
.page-title:has(+ .rankings_menu)::before,
.page-title:has(~ .tfi-ranking-cards)::before {
    content: "♛";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #f5be64;
    font-size: 42px;
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 166, 50, 0.65);
}
.page-title:has(+ .rankings_menu)::after,
.page-title:has(~ .tfi-ranking-cards)::after {
    content: "✦";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 12px;
    background: #141015;
    color: #ffd079;
    font-size: 22px;
    text-shadow: 0 0 12px #ffab35;
}

/* MENU DE SELECAO */
.rankings_menu {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 16px 0 24px !important;
    padding: 14px !important;
    border: 1px solid #60402c !important;
    border-radius: 12px;
    background: linear-gradient(160deg, #1b1518, #100e13) !important;
    box-shadow: inset 0 1px 0 #6c4b302b;
}
.rankings_menu span {
    display: none !important;
}
.rankings_menu a {
    display: inline-flex !important;
    flex: 1 1 112px;
    align-items: center;
    justify-content: center;
    min-height: 55px;
    margin: 0 !important;
    padding: 10px 8px !important;
    border: 1px solid #79513b !important;
    border-radius: 8px !important;
    background: linear-gradient(155deg, #33272a, #1a151b) !important;
    color: #f1d0a0 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.35;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 #ffffff13,
        0 4px 10px #0005;
    transition:
        transform 0.2s,
        border-color 0.2s,
        box-shadow 0.2s;
}
.rankings_menu a:hover,
.rankings_menu a.active,
.rankings_menu a[aria-current="page"] {
    transform: translateY(-2px);
    border-color: #ffcb69 !important;
    background: linear-gradient(145deg, #d99635, #81400d 60%, #49210f) !important;
    color: #fff5db !important;
    box-shadow:
        inset 0 1px 0 #fff6c066,
        0 0 17px #ed9b3d88,
        0 4px 13px #0009;
}
.rankings_menu a:focus-visible,
.tfi-ranking-card a:focus-visible {
    outline: 2px solid #ffd28a;
    outline-offset: 3px;
}

/* GRADE DOS CARDS */
.tfi-ranking-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 22px 0 28px;
}
.tfi-ranking-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 22px 13px 18px;
    overflow: hidden;
    border: 1px solid #ad7139;
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 12%, #422b1e77, transparent 54%),
        linear-gradient(150deg, #231a1b, #130f14 62%, #21161a);
    color: #f5e6d0;
    text-align: center;
    box-shadow:
        inset 0 0 0 1px #f7b65e20,
        0 8px 20px #0009;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}
.tfi-ranking-card::after {
    content: "";
    position: absolute;
    right: 15px;
    bottom: 0;
    left: 15px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f9b54e, transparent);
    box-shadow: 0 0 11px #f6a63d88;
    pointer-events: none;
}
.tfi-ranking-card:hover {
    transform: translateY(-4px);
    border-color: #f2bc69;
    box-shadow:
        inset 0 0 0 1px #ffcc7a3b,
        0 12px 24px #000b,
        0 0 16px #cc81322b;
}
.tfi-ranking-place {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 8px 13px;
    border-right: 1px solid #f4b465;
    border-bottom: 1px solid #f4b465;
    border-radius: 10px 0 9px 0;
    background: linear-gradient(145deg, #9d3919, #4a160f);
    color: #ffe3ad;
    font-size: 16px;
    font-weight: 900;
    text-shadow: 0 1px 3px #000;
    box-shadow: 0 2px 10px #0007;
}

/* FOTO E MOLDURA DECORATIVA */
.tfi-ranking-avatar {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 118px;
    min-width: 118px;
    margin: 4px auto 20px;
    border: 3px solid #d5a45c;
    border-radius: 50%;
    background: #100d12;
    box-shadow:
        0 0 0 3px #362419,
        0 0 0 5px #946335,
        0 5px 15px #000a;
}
.tfi-ranking-avatar::before,
.tfi-ranking-avatar::after {
    position: absolute;
    z-index: -1;
    bottom: -21px;
    color: #d79a40;
    font-family: Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    text-shadow:
        0 2px 5px #000,
        0 0 9px #c18a35a0;
    pointer-events: none;
}
.tfi-ranking-avatar::before {
    content: "❧";
    left: -15px;
    transform: rotate(-30deg);
}
.tfi-ranking-avatar::after {
    content: "❧";
    right: -15px;
    transform: scaleX(-1) rotate(-30deg);
}
.tfi-ranking-avatar .tfi-ranking-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}
.tfi-ranking-avatar .tfi-ranking-fallback img,
.tfi-ranking-avatar .rankings-class-image,
.tfi-ranking-avatar .tfi-ranking-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
}
.tfi-ranking-avatar .tfi-ranking-photo {
    position: absolute;
    inset: 0;
}
.tfi-ranking-avatar:hover {
    border-color: #ffe2a0;
}

/* NOME, STATUS E PONTUACAO */
.tfi-ranking-name {
    max-width: 100%;
    margin: 3px 0 7px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.tfi-ranking-name a,
.tfi-ranking-name a:visited {
    color: #ffd17a !important;
    text-decoration: none !important;
    text-shadow: 0 1px 5px #000;
}
.tfi-ranking-name a:hover {
    color: #fff1c8 !important;
}
.tfi-ranking-online {
    margin-bottom: 13px;
    color: #c5bfbd;
    font-size: 12px;
}
.tfi-ranking-online.online {
    color: #3df47b;
}
.tfi-ranking-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #81552f;
}
.tfi-ranking-stat span {
    color: #e7b969;
    font-size: 13px;
}
.tfi-ranking-stat strong {
    color: #ffd17a;
    font-size: 25px;
    font-weight: 900;
    text-shadow:
        0 2px 4px #000,
        0 0 10px #c7803555;
}

/* GUILDS: aproveita os mesmos cards */
.tfi-ranking-guild-logo img,
.tfi-ranking-avatar .guild-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* RESPONSIVIDADE */
@media (max-width: 760px) {
    .tfi-ranking-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tfi-ranking-card {
        padding: 24px 8px 16px;
    }
    .tfi-ranking-avatar {
        width: 95px;
        height: 95px;
        min-width: 95px;
        margin-bottom: 17px;
    }
    .tfi-ranking-avatar::before,
    .tfi-ranking-avatar::after {
        font-size: 31px;
        bottom: -17px;
    }
    .tfi-ranking-name {
        font-size: 15px;
    }
    .rankings_menu a {
        flex: 1 1 115px;
        min-height: 48px;
    }
}
@media (max-width: 370px) {
    .tfi-ranking-cards {
        grid-template-columns: 1fr;
    }
    .tfi-ranking-avatar {
        width: 112px;
        height: 112px;
        min-width: 112px;
    }
}

/* ============================================================
   TFISOFT MEDIEVAL PREMIUM - CAMADA DE ACABAMENTO
   PNG transparente sobre a foto real, sem substituir o upload
   ============================================================ */

.tfi-ranking-cards {
    gap: 17px;
}
.tfi-ranking-card {
    border: 2px solid #bd7929;
    border-radius: 7px;
    background:
        radial-gradient(ellipse at 50% 18%, #392019 0%, transparent 62%),
        linear-gradient(145deg, #231718, #0f0b10 65%, #24130f);
    box-shadow:
        inset 0 0 0 2px #4c270f,
        inset 0 0 24px #0009,
        0 0 0 1px #5a341a,
        0 9px 24px #000a;
}
.tfi-ranking-card::before {
    content: "";
    position: absolute;
    inset: 5px;
    pointer-events: none;
    border: 1px solid #d99b453d;
    background:
        linear-gradient(135deg, #ffe3a6 0 3px, transparent 4px) top left / 24px 24px no-repeat,
        linear-gradient(225deg, #ffe3a6 0 3px, transparent 4px) top right / 24px 24px no-repeat,
        linear-gradient(45deg, #ffe3a6 0 3px, transparent 4px) bottom left / 24px 24px no-repeat,
        linear-gradient(315deg, #ffe3a6 0 3px, transparent 4px) bottom right / 24px 24px no-repeat;
}
.tfi-ranking-avatar {
    width: 122px;
    height: 122px;
    min-width: 122px;
    margin: 12px auto 31px;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    isolation: isolate;
    overflow: visible;
}
.tfi-ranking-avatar .tfi-ranking-fallback {
    z-index: 0;
}
.tfi-ranking-avatar .tfi-ranking-photo {
    z-index: 1;
}
.tfi-ranking-avatar::before {
    display: none;
}
.tfi-ranking-avatar::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: -35px;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: url("../../../../img/rankings/moldura-medieval-premium.png") center / contain
        no-repeat;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}
.tfi-ranking-avatar .tfi-ranking-fallback,
.tfi-ranking-avatar .tfi-ranking-photo {
    border-radius: 50%;
    overflow: hidden;
}
.tfi-ranking-place {
    z-index: 4;
    border-radius: 0 0 8px 0;
    background: linear-gradient(140deg, #b84916, #641b0e 75%);
}
.tfi-ranking-name {
    position: relative;
    z-index: 4;
}
.tfi-ranking-stat {
    border-color: #a16a32;
}
.tfi-ranking-stat strong {
    color: #ffd87e;
    text-shadow: 0 0 9px #b96a25a0;
}
.rankings_menu a {
    border-color: #9a632d !important;
}
.rankings_menu a:hover,
.rankings_menu a.active,
.rankings_menu a[aria-current="page"] {
    background: linear-gradient(#e0a33b, #8c3c0e 65%, #4c1c0c) !important;
    box-shadow:
        inset 0 1px 0 #fff1b0,
        0 0 14px #ffae3a !important;
}
@media (max-width: 760px) {
    .tfi-ranking-avatar {
        width: 100px;
        height: 100px;
        min-width: 100px;
        margin-bottom: 26px;
    }
    .tfi-ranking-avatar::after {
        inset: -29px;
    }
}
