/* =========================
   ISOLAMENTO DO TEMA (SEM GP)
========================= */
.tg-container,
.tg-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================
   GRID BASE – TODOS OS GRUPOS
   → SEMPRE DETERMINÍSTICO
========================= */
.tg-grid {
    display: grid;
    gap: 20px;
    align-items: stretch;
}

/* Desktop */
@media (min-width: 1024px) {
    .tg-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .tg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .tg-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   GRID DE DESTAQUES
========================= */
.tg-grid-featured {
    display: grid;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    max-width: 1200px;
    margin: auto;
}

/* Desktop */
@media (min-width: 1024px) {
    .tg-grid-featured {
        grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .tg-grid-featured {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .tg-grid-featured {
        grid-template-columns: 1fr;
    }
}

.tg-featured-wrapper {
    margin-bottom: 40px;
}

/* =========================
   CARD – PADRONIZAÇÃO TOTAL
========================= */
.tg-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #111;
    color: #fff;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    text-align: center;

    opacity: 1;
    transform: none;
    animation: fadeUp .6s ease forwards;
    will-change: transform, opacity;
}

.tg-card.is-animated {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp .6s ease forwards;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   AVATAR (NÃO DITA ALTURA)
========================= */
.tg-avatar {
    display: flex;
    justify-content: center;
}

.tg-avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 10px auto;
    display: block;
    transition: transform .25s ease;
}

.tg-card:hover .tg-avatar img {
    transform: scale(1.05);
}

/* =========================
   CONTEÚDO (FLEX VERTICAL)
========================= */
.tg-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* título com espaço reservado */
.tg-title {
    min-height: 42px;
    line-height: 1.3;
}

.tg-title a {
    color: #fff;
    text-decoration: none;
}

.tg-title a:hover {
    text-decoration: underline;
}

/* categoria SEMPRE ocupa espaço */
.tg-category {
    min-height: 16px;
    font-size: 13px;
    opacity: .7;
    margin-top: 4px;
}

/* botão sempre no fundo */
.tg-content .tg-btn {
    margin-top: auto;
}

/* =========================
   BOTÕES
========================= */
.tg-btn {
    display: block;
    padding: 8px;
    border-radius: 4px;
    background: #ff2ea6;
    color: #fff;
    font-weight: bold;
    text-align: center;
}

.tg-btn-big {
    font-size: 18px;
    padding: 14px;
}

/* =========================
   BADGE DE DESTAQUE
========================= */
.tg-badge {
    position: absolute;
    top: 10px;
    left: -30px;
    padding: 4px 40px;
    font-size: 11px;
    font-weight: bold;
    transform: rotate(-45deg);
    z-index: 5;
}

.tg-badge-featured {
    background: #ff0066;
    color: #fff;
}

/* =========================
   SINGLE
========================= */
.tg-single {
    width: 100%;
    padding: 20px;
    min-width: 0;
}

.tg-single-desc {
    min-height: 80px;
}


.tg-single-card {
    background: #111;
    color: #fff;
    padding: 20px;
    border-radius: 6px;
    min-height: 600px; /* AJUSTÁVEL */
    display: flex;
    flex-direction: column;
}

.tg-single-meta span {
    margin-right: 10px;
    font-size: 14px;
    opacity: .8;
}

.tg-single-thumb img {
    width: 100%;
    margin: 15px 0;
    border-radius: 6px;
}

.tg-single-category {
    font-size: 14px;
    opacity: .75;
    margin-bottom: 10px;
}

.tg-single-rules {
    margin-top: 30px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 6px;
    min-height: 80px;
}

/* =========================
   LAYOUT SINGLE + SIDEBAR
   (ANTI AD INSERTER)
========================= */
.tg-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start; /* CRÍTICO */
}

@media (max-width: 900px) {
    .tg-single-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SIDEBAR – TRAVA TOTAL
========================= */

.tg-single-sidebar {
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    gap: 20px;
}

/* trava QUALQUER mídia injetada */
.tg-single-sidebar img,
.tg-single-sidebar iframe,
.tg-single-sidebar ins,
.tg-single-sidebar embed,
.tg-single-sidebar video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.tg-single-desc.is-empty {
    min-height: 80px;
}

/* evita inline quebrando layout */
.tg-single-sidebar * {
    box-sizing: border-box;
}

/* =========================
   BOXES DA SIDEBAR
========================= */
.tg-sidebar-box {
    background: #111;
    color: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    width: 100%;
}

.tg-sidebar-box h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

/* =========================
   RELACIONADOS
========================= */
.tg-related {
    margin-top: 50px;
}

/* meta / views sempre ocupam espaço */
.tg-meta {
    min-height: 18px;
    font-size: 13px;
    opacity: .8;
    margin-top: 6px;
}

/* =========================
   ANTI AD INSERTER (HARD)
========================= */

.tg-sidebar-ads,
.tg-sidebar-ads * {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* mídia injetada */
.tg-sidebar-ads img,
.tg-sidebar-ads iframe,
.tg-sidebar-ads ins,
.tg-sidebar-ads embed,
.tg-sidebar-ads video {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* remove floats malditos */
.tg-sidebar-ads * {
    float: none !important;
    clear: both !important;
}
