/*
Theme Name: Black League Theme
Theme URI: https://blackleague.awt.xyz
Description: Tema personalizado para o grupo de Magic: The Gathering Black League.
Author: Black League
Version: 1.0
Text Domain: blackleague
*/

/* ---------- RESET BÁSICO ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top, #262636 0, #14141a 35%, #050507 100%);
    color: #f5f5f5;
}

/* Links genéricos */
a {
    color: #d4af37;
    text-decoration: none;
}
a:hover {
    color: #ffffff;
}

/* ---------- HEADER / NAV ---------- */
header.site-header {
    background-color: #000;
    border-bottom: 2px solid #d4af37;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .brand img.logo {
    height: 150px;
    max-height: 150px;
    width: auto;
}

header .brand span {
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #d4af37;
    font-size: 2.00rem;
    text-transform: uppercase;
}

nav.primary-nav {
    display: flex;
    align-items: center;
}

nav.primary-nav a {
    text-decoration: none;
    color: #d4af37;
    font-weight: 600;
    font-size: 1.30rem;
    position: relative;
    padding-bottom: 8px;
    transition: 0.25s;
    margin: 0 12px;
}

nav.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #f3d47a);
    transition: width 0.25s;
}

nav.primary-nav a:hover {
    color: #ffffff;
}

nav.primary-nav a:hover::after {
    width: 100%;
}

/* ---------- HAMBURGER ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.hamburger span {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: #d4af37;
    transition: 0.3s;
}

/* ---------- HERO ---------- */
.hero {
    padding: 25px 12px 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.badge {
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 6px 14px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.17em;
    color: #f3d47a;
    background: rgba(0, 0, 0, 0.7);
}

.hero h1 {
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    color: #d4af37;
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero p {
    max-width: 680px;
    font-size: 1.05rem;
    color: #b3b3c2;
    margin-bottom: 26px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- BOTÕES ---------- */
.btn {
    border-radius: 999px;
    padding: 10px 22px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #f3d47a);
    color: #000;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}
.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* ---------- LAYOUT PRINCIPAL ---------- */
main {
    padding: 0 24px 60px;
}

section.section-block {
    max-width: 1120px;
    margin: 0 auto 50px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.7));
    border-radius: 18px;
    padding: 32px 26px 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
}

section.section-block h2 {
    color: #d4af37;
    font-size: 1.7rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-block h2 i {
    font-size: 1.3rem;
}

.section-block p {
    color: #b3b3c2;
    font-size: 0.98rem;
    margin-bottom: 18px;
}

/* ---------- CARDS ---------- */
.card-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 18px;
}

.card {
    background: rgba(0, 0, 0, 0.65);
    border-radius: 14px;
    padding: 20px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.25s;
}

.card:hover {
    border-color: #d4af37;
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.card-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: radial-gradient(circle, #f3d47a, #d4af37);
    color: #000;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.card p {
    margin: 0;
    font-size: 0.94rem;
}

/* ---------- RANKING ---------- */
.ranking-placeholder {
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 16px 18px;
    font-size: 0.9rem;
    color: #b3b3c2;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- INSTAGRAM / PATROCINADORES ---------- */
.insta-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.95rem;
}

.insta-handle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.5);
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: 0.25s;
}

.insta-handle i {
    color: #ff7a9c;
}

.insta-handle:hover {
    border-color: #d4af37;
    transform: translateY(-2px);
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.sponsor-item {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
}
.sponsor-item img {
    max-width: 100%;
    height: auto;
}

/* ---------- CONTATO ---------- */
form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

label {
    font-size: 0.85rem;
    color: #b3b3c2;
    margin-bottom: 4px;
    display: inline-block;
}

input, textarea {
    width: 100%;
    padding: 10px 11px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s;
}

input:focus, textarea:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-footnote {
    font-size: 0.8rem;
    color: #b3b3c2;
    margin-top: 4px;
}

/* ---------- FOOTER ---------- */
footer.site-footer {
    background: #000;
    border-top: 2px solid #d4af37;
    padding: 26px 20px 32px;
    text-align: center;
    font-size: 0.85rem;
    color: #b3b3c2;
}

/* ---------- ANIMAÇÕES ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- PÁGINAS INTERNAS ---------- */
.page-wrapper,
.single-wrapper,
.archive-wrapper {
    max-width: 1120px;
    margin: 40px auto;
    padding: 24px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 768px) {
    header .brand img.logo {
        height: 110px;
    }
    header.site-header {
        padding-inline: 18px;
    }

    nav.primary-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 12px 18px 18px;
        background: rgba(0, 0, 0, 0.97);
        border-bottom: 1px solid rgba(212, 175, 55, 0.4);
        flex-direction: column;
        align-items: flex-start;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    nav.primary-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ===========================================
   ESTILO BLACK LEAGUE PARA TABLEPRESS
   (FUNCIONA NA HOME E NO RANKING COMPLETO)
   =========================================== */

/* Estilo base da tabela */
.ranking-blackleague {
    width: 100% !important;
    border-collapse: collapse !important;
    background: transparent !important;
    color: #f5f5f5 !important;
}

/* Cabeçalho dourado */
.ranking-blackleague thead th {
    background: linear-gradient(135deg, #d4af37, #f3d47a) !important;
    color: #000 !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid rgba(0,0,0,0.4) !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

/* Células */
.ranking-blackleague tbody td {
    padding: 8px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    white-space: nowrap;
}

/* Linhas alternadas - aplicadas no TD */
.ranking-blackleague tbody tr:nth-child(odd) td {
    background-color: #000000 !important; /* preto */
}
.ranking-blackleague tbody tr:nth-child(even) td {
    background-color: #1a1a1a !important; /* cinza escuro */
}

/* Destaque da primeira coluna */
.ranking-blackleague tbody td:first-child {
    color: #f3d47a !important;
    font-weight: 700 !important;
}

/* ===========================
   HOME – mostrar só 3 colunas
   =========================== */
.ranking-placeholder table.ranking-blackleague th:nth-child(n+4),
.ranking-placeholder table.ranking-blackleague td:nth-child(n+4) {
    display: none !important;
}

/* ===============================
   RANKING COMPLETO – mostrar tudo
   =============================== */
.fulltable th,
.fulltable td {
    display: table-cell !important;
}

/* ===============================
   SCROLL RESPONSIVO DA TABELA
   =============================== */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: #111;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}
