﻿/* ============================================================
   VARIÁVEIS GLOBAIS
   ============================================================ */
:root {
    --radius: 10px;
    --sombra: 0 2px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   RESET E BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #12141f; } /* evita gap visível acima do header escuro */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2d3748;
    background: #f4f5f7;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   TOAST (balão de notificação)
   ============================================================ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #1e1b4b;
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 9999;
    animation: toastEntrar 0.35s ease;
    white-space: nowrap;
}

.toast-saindo {
    animation: toastSair 0.4s ease forwards;
}

@keyframes toastEntrar {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastSair {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ============================================================
   CABEÇALHO — BARRA SUPERIOR (saldo, idioma, login)
   ============================================================ */
.header-topo {
    background: #12141f;
    padding: 8px 0;
    font-size: 13px;
    color: #8892b0;
}

.header-topo .container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.header-saldo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00b894;
    font-weight: 600;
}

/* Dropdown de idioma */
.dropdown-idioma {
    position: relative;
}

.dropdown-idioma-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: #8892b0;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: border-color 0.2s, color 0.2s;
}

.dropdown-idioma-btn:hover {
    border-color: #6c5ce7;
    color: #ffffff;
}

.dropdown-idioma-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #1a1d2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    min-width: 140px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.dropdown-idioma.aberto .dropdown-idioma-menu {
    display: block;
}

.dropdown-idioma-menu a {
    display: block;
    padding: 10px 16px;
    color: #8892b0;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}

.dropdown-idioma-menu a:hover {
    background: rgba(108,92,231,0.2);
    color: #ffffff;
}

.dropdown-idioma-menu a.ativo {
    color: #6c5ce7;
    font-weight: 600;
}

.btn-login-topo {
    background: #6c5ce7;
    color: #ffffff !important;
    padding: 5px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-login-topo:hover { background: #5a4bd1; }

/* ============================================================
   DROPDOWN DO USUÁRIO LOGADO
   ============================================================ */
.user-dropdown { position: relative; }

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 99px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: background 0.2s;
    color: #ffffff;
}

.user-dropdown-btn:hover,
.user-dropdown.aberto .user-dropdown-btn {
    background: rgba(255,255,255,0.15);
}

.user-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.user-avatar-inicial {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #6c5ce7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-avatar-grande {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.user-nome-curto {
    font-size: 13px;
    font-weight: 600;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chevron {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.user-dropdown.aberto .user-chevron { transform: rotate(180deg); }

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #1a1d2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    min-width: 220px;
    z-index: 999;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    padding: 6px 0;
}

.user-dropdown.aberto .user-dropdown-menu { display: block; }

.user-dropdown-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.user-dropdown-info-texto {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-dropdown-info-texto strong {
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-info-texto small {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-divisor {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}

.udm-icone {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.user-dropdown-sair { color: #fc8181; }

.user-dropdown-sair:hover {
    background: rgba(252,129,129,0.08);
    color: #fc8181;
}

/* ============================================================
   CABEÇALHO — BARRA PRINCIPAL (logo, menu, busca)
   ============================================================ */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-principal {
    background: #1a1d2e;
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-principal .container {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo span { color: #6c5ce7; }

/* Logo como imagem */
.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Versão branca: usada no cabeçalho e rodapé (fundo escuro) */
.logo-img-branco {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

/* Logo menor no rodapé */
.logo-img-rodape {
    height: 40px;
}

nav.menu-principal {
    flex: 1;
    display: flex;
    gap: 4px;
}

nav.menu-principal a {
    color: #8892b0;
    font-size: 14px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 7px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

nav.menu-principal a:hover,
nav.menu-principal a.ativo {
    color: #ffffff;
    background: rgba(255,255,255,0.07);
}

.busca-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    width: 260px;
    transition: border-color 0.2s;
}

.busca-form:focus-within {
    border-color: #6c5ce7;
}

.busca-form input {
    background: none;
    border: none;
    outline: none;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 13px;
    width: 100%;
}

.busca-form input::placeholder { color: rgba(255,255,255,0.38); }

.busca-form button {
    background: none;
    border: none;
    padding: 8px 12px;
    color: #4a5568;
    cursor: pointer;
    font-size: 15px;
    transition: color 0.2s;
}

.busca-form button:hover { color: #6c5ce7; }

/* ============================================================
   CARROSSEL
   ============================================================ */
.carrossel {
    position: relative;
    overflow: hidden;
    background: #12141f;
    height: 420px;
}

.carrossel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slide-1 { background: linear-gradient(135deg, #1a1d2e 0%, #2d1b69 100%); }
.slide-2 { background: linear-gradient(135deg, #1a1d2e 0%, #00403a 100%); }
.slide-3 { background: linear-gradient(135deg, #1a1d2e 0%, #3d1a00 100%); }

.slide-valign-top    { align-items: flex-start; padding-top: 48px; }
.slide-valign-middle { align-items: center; }
.slide-valign-bottom { align-items: flex-end; padding-bottom: 48px; }

.slide-conteudo {
    text-align: center;
    color: #ffffff;
    max-width: 640px;
    padding: 0 24px;
    z-index: 2;
    position: relative;
}

.slide-conteudo h2 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.slide-conteudo p {
    font-size: 17px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
    line-height: 1.7;
}

.btn-slide {
    display: inline-block;
    background: #6c5ce7;
    color: #ffffff;
    padding: 13px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn-slide:hover {
    background: #5a4bd1;
    transform: translateY(-2px);
}

/* Decoração de fundo dos slides */
.slide::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    opacity: 0.06;
    background: #ffffff;
    top: -150px; right: -100px;
}

/* Navegação do carrossel */
.carrossel-prev,
.carrossel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ffffff;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
}

.carrossel-prev { left: 20px; }
.carrossel-next { right: 20px; }
.carrossel-prev:hover,
.carrossel-next:hover { background: rgba(108,92,231,0.5); }

.carrossel-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carrossel-dots button {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.carrossel-dots button.ativo {
    background: #6c5ce7;
    transform: scale(1.3);
}

/* ============================================================
   SEÇÕES DE DESTAQUE (3 colunas)
   ============================================================ */
.secoes-destaque {
    padding: 48px 0;
}

.secoes-destaque .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card-secao {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-secao-topo {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-secao-icone {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.icone-resgate  { background: rgba(0,184,148,0.12); }
.icone-blog     { background: rgba(108,92,231,0.12); }
.icone-mercado  { background: rgba(253,121,168,0.12); }

.card-secao-topo h3 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
}

.card-secao-corpo {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-secao-corpo p {
    font-size: 14px;
    color: #718096;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

/* Card resgate */
.resgate-quantidade {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,184,148,0.08);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.resgate-quantidade strong {
    font-size: 22px;
    font-weight: 800;
    color: #00b894;
}

.resgate-quantidade span {
    font-size: 13px;
    color: #718096;
}

.btn-resgate {
    display: block;
    text-align: center;
    background: #00b894;
    color: #ffffff;
    padding: 11px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-resgate:hover { background: #00a381; }
.btn-resgate:disabled {
    background: #e2e8f0;
    color: #718096;
    cursor: default;
}

/* Imagem de capa full-width no topo do card (sem padding, sem borda) */
.card-capa-full {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Card blog */
.blog-post-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #f4f5f7;
}

.blog-post-titulo {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.4;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6c5ce7;
    font-size: 13px;
    font-weight: 600;
    transition: gap 0.2s;
}

.btn-link:hover { gap: 8px; }

/* Card mercado */
.mercado-item-img {
    width: 100%;
    height: 130px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1d2e, #2d1b69);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.mercado-item-nome {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mercado-item-preco {
    font-size: 20px;
    font-weight: 800;
    color: #6c5ce7;
    margin-bottom: 4px;
}

.mercado-item-criador {
    font-size: 12px;
    color: #718096;
    margin-bottom: 16px;
}

.btn-ver-item {
    display: block;
    text-align: center;
    background: #6c5ce7;
    color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-ver-item:hover { background: #5a4bd1; }

.btn-primario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #6c5ce7;
    color: #ffffff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.btn-primario:hover  { background: #5a4bd1; }
.btn-primario:active { transform: scale(.98); }

.btn-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #6c5ce7;
    border: 1.5px solid #6c5ce7;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-secundario:hover { background: #f5f3ff; }

/* ============================================================
   RODAPÉ
   ============================================================ */
footer {
    background: #12141f;
    color: #8892b0;
    padding: 48px 0 24px;
    margin-top: 48px;
}

.rodape-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.rodape-sobre .logo {
    margin-bottom: 14px;
    display: block;
}

.rodape-sobre p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 300px;
}

.rodape-col h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.rodape-col ul { list-style: none; }

.rodape-col ul li {
    margin-bottom: 9px;
}

.rodape-col ul li a {
    font-size: 14px;
    color: #8892b0;
    transition: color 0.2s;
}

.rodape-col ul li a:hover { color: #ffffff; }

.rodape-fundo {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ============================================================
   RESPONSIVO (telas menores que 768px)
   ============================================================ */
@media (max-width: 768px) {
    .secoes-destaque .container {
        grid-template-columns: 1fr;
    }

    .rodape-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    nav.menu-principal {
        display: none;
    }

    .busca-form {
        width: 100%;
    }

    .slide-conteudo h2 {
        font-size: 28px;
    }

    .carrossel { height: 320px; }
}
