/* CSS do cabeçalho/menu (antes inline em nav/_nav_mobile.php), na mesma ordem. */
.mobile-user-avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ccc; object-fit: cover; }
                    .icons-wrapper { display: flex; align-items: center; justify-content: center; }
                    .separator { width: 1px; height: 18px; background-color: #717171; margin: 0 5px; }
                    .mobile-search { display: flex; align-items: center; }
/* =========================================================
   ALINHAMENTO DA LOGO NO HEADER MOBILE
   Mantém o SVG exatamente igual; corrige apenas a posição.
   ========================================================= */
.mobile-header-main-row {
    position: relative;
}

/*
 * Encaixe de segurança ativado somente quando houver sobreposição real.
 * Em aparelhos com espaço suficiente, nenhuma destas regras é aplicada.
 */
.mobile-header-main-row.mobile-logo-safe-fit .democratico-mobile-logo {
    position: absolute;
    left: var(--mobile-logo-safe-left);
    width: var(--mobile-logo-safe-width);
    max-width: var(--mobile-logo-safe-width);
    overflow: hidden;
    justify-content: flex-start;
    transform: translateY(-3px);
    z-index: 1;
}

.mobile-header-main-row.mobile-logo-safe-fit .democratico-mobile-logo-svg {
    width: 210px;
    max-width: 100%;
    height: 45px;
    margin-left: 0;
    flex-shrink: 1;
}

.democratico-mobile-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    align-self: center;
    height: 45px;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;

    /* Correção óptica: a arte vetorial estava parecendo baixa */
    transform: translateY(-3px);
}

.democratico-mobile-logo-svg {
    width: 210px;
    height: 45px;
    display: block;
    flex-shrink: 0;
    margin-left: -30px;
}

/* Garante que os três blocos do header compartilhem o mesmo eixo vertical */
.mobile-header-main-row > .mobile-menu-button,
.mobile-header-main-row > .icons-wrapper {
    align-self: center;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
}

/* Container que imita o tamanho do seu SVG original (25x25) */
.hamburger-icon-wrapper {
    position: relative;
    width: 25px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Estilo das 3 linhas */
.hamburger-icon-wrapper span {
    position: absolute;
    width: 22px; /* Largura das linhas do seu SVG original */
    height: 2px;
    background-color: #222222;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Posições iniciais para formar o hambúrguer (y4, y11, y18 do seu SVG) */
.hamburger-icon-wrapper span:nth-child(1) { transform: translateY(-7px); }
.hamburger-icon-wrapper span:nth-child(2) { transform: translateY(0); }
.hamburger-icon-wrapper span:nth-child(3) { transform: translateY(7px); }




/* --- ESTILO REFINADO DO MENU LATERAL --- */
.nav-mobile {
    position: fixed;

    width: 310px; /* Largura levemente menor para parecer mais elegante */
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    
    /* Estado Inicial: Escondido e levemente deslocado */
    transform: translateX(-100%);
    visibility: hidden;
    
    /* Transição de "Saída" (quando fecha) */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0s linear 0.4s;
    
    box-shadow: 0 0 40px rgba(0,0,0,0);
}

/* Estado Aberto (.active) */
.nav-mobile.active {
    transform: translateX(0);
    visibility: visible;
    
    /* Transição de "Entrada" (quando abre) */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0s linear 0s;
                
    box-shadow: 15px 0 50px rgba(0,0,0,0.1); /* Sombra suave ao abrir */
}

/* --- EFEITO AO ABRIR (X) --- */
/* Quando o body tem a classe menu-open */
.menu-open .hamburger-icon-wrapper span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.menu-open .hamburger-icon-wrapper span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-open .hamburger-icon-wrapper span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

/* Limpeza para evitar conflitos com estilos antigos */
.mobile-menu-button {
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.mobile-menu-button .icon-menu { display: none !important; }
/* Container de ícones - ADICIONADO PADDING NA DIREITA */
.icons-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    padding-right: 15px; /* ISSO AFASTA O ÍCONE DA BORDA DO CELULAR */
}

.separator { 
    width: 1px; 
    height: 18px; 
    background-color: #ddd; 
    margin: 0 10px; 
}

/* Container do Avatar - Tamanho harmonioso */
/* ── ESTADO NÃO LOGADO: avatar genérico + badge LOGIN ── */
.avatar-container-fixed {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    object-fit: cover;
}

.badge-login-text {
    position: absolute;
    bottom: -2px;
    right: -3px;
    background-color: #003087;
    border: 1.5px solid #fff;
    font-size: 7px;
    font-weight: 900;
    color: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.1;
    letter-spacing: 0.2px;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* ── AVATAR MORPH: foto → círculo X ───────────────── */
.avatar-morph-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Foto circular */
.avatar-morph-img {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ccc;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease;
    z-index: 2;
}

/* Círculo azul sólido (fundo do X) */
.avatar-morph-circle {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #003087;
    opacity: 0;
    transform: scale(0.6);
    transition:
        opacity 0.28s ease,
        transform 0.28s ease;
    z-index: 1;
}

/* Badge/ícone */
.badge-morph {
    position: absolute;
    bottom: -2px;
    right: -3px;
    background-color: #003087;
    border: 1.5px solid #fff;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    overflow: hidden;
    transition:
        width 0.3s cubic-bezier(0.34,1.4,0.64,1),
        height 0.3s cubic-bezier(0.34,1.4,0.64,1),
        bottom 0.3s ease,
        right 0.3s ease,
        border-radius 0.3s ease,
        border-color 0.3s ease;
}

/* Linhas SVG dentro do badge */
.badge-morph svg {
    position: absolute;
    transition:
        transform 0.32s cubic-bezier(0.34,1.4,0.64,1),
        opacity 0.2s ease;
    flex-shrink: 0;
}

/* Linha horizontal do + */
.badge-morph .icon-plus-h {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}
/* Linha vertical do + */
.badge-morph .icon-plus-v {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ── ESTADO ABERTO (classe .pdrop-open no botão) ── */
.pdrop-toggle-btn.pdrop-open .avatar-morph-img {
    opacity: 0;
    transform: scale(0.5);
}
.pdrop-toggle-btn.pdrop-open .avatar-morph-circle {
    opacity: 1;
    transform: scale(1);
}

/* Badge cresce para cobrir tudo e some a borda */
.pdrop-toggle-btn.pdrop-open .badge-morph {
    width: 36px;
    height: 36px;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    border-color: transparent;
    background: #003087;
}

/* Horizontal vira primeira diagonal */
.pdrop-toggle-btn.pdrop-open .badge-morph .icon-plus-h {
    transform: rotate(45deg) scale(1.3);
}
/* Vertical vira segunda diagonal */
.pdrop-toggle-btn.pdrop-open .badge-morph .icon-plus-v {
    transform: rotate(45deg) scale(1.3);
}

.menu-button-avatar {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    outline: none !important;
    cursor: pointer;
}
.menu-button-avatar:active .avatar-morph-wrap {
    transform: scale(0.92);
    transition: transform 0.1s ease;
}
.profile-item-ficticio a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.profile-item-ficticio img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #003087;
    transition: transform 0.2s ease;
}

.profile-item-ficticio a:active img {
    transform: scale(0.9); /* Efeito de clique no celular */
}
/* GRID DE CATEGORIAS EM CARDS */
.modern-cat-grid { 
    display: grid; 
    gap: 12px; 
}
.cat-card-node { 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 16px; 
    overflow: hidden; 
    transition: all 0.3s ease;
}
.cat-card-hidden { display: none; } /* Esconde categorias extras */

.cat-card-main { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 15px; 
}
.cat-card-link { 
    font-weight: 700; 
    color: #222 !important; 
    font-size: 14px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
}
.cat-card-dot { 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    margin-right: 8px; 
}
.btn-card-expand { 
    background: #f8f9fa; 
    border: none; 
    border-radius: 8px; 
    width: 28px; 
    height: 28px; 
    transition: 0.3s; 
    color: #777; 
    display: flex;
    align-items: center;
    justify-content: center;
}

/* GAVETA DE SUBCATEGORIAS */
.cat-card-subs { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    background: #fdfdfd; 
}
.cat-card-node.active .cat-card-subs { 
    max-height: 600px; 
    border-top: 1px solid #f5f5f5; 
}
.cat-card-node.active .btn-card-expand { 
    transform: rotate(180deg); 
    background: #003087; 
    color: #fff; 
}

.cat-subs-inner { 
    padding: 10px 15px 15px 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.sub-link-modern { 
    font-size: 13px; 
    color: #666 !important; 
    text-decoration: none; 
}
.view-all-link { 
    color: #003087 !important; 
    font-weight: 700; 
    border-top: 1px dashed #eee; 
    padding-top: 8px; 
    margin-top: 5px; 
}
.btn-view-all-cats { 
    background: #eee; 
    border: none; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 700; 
    color: #555; 
}

/* Esconde o X por padrão */
.mobile-menu-button .icon-close { display: none; }
/* Quando o menu estiver aberto */
.menu-open .mobile-menu-button .icon-hamburger { display: none; }
.menu-open .mobile-menu-button .icon-close { display: block; }

/* ESTILOS DA BUSCA TELA CHEIA */
.header-mobile { position: relative; background: #fff; }
.mobile-search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #ffffff; display: flex; flex-direction: column;
    z-index: 9999; transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}
.search-active .mobile-search-overlay { transform: translateY(0); visibility: visible; }
.search-overlay-header { padding: 10px 15px; border-bottom: 1px solid #eee; display: flex; align-items: center; background: #fff; }
.search-overlay-body { flex: 1; overflow-y: auto; padding: 20px 15px; background: #fcfcfc; }
.search-full-form { display: flex; align-items: center; width: 100%; gap: 10px; }
.btn-close-search-modern { background: none; border: none; padding: 5px; cursor: pointer; }
.search-input-pill {
    flex: 1; display: flex; align-items: center; background: #f1f3f4;
    border-radius: 50px; padding: 3px 3px 3px 15px; border: 1px solid #e0e0e0;
}
.input-modern-field { flex: 1; background: transparent; border: none; outline: none; height: 40px; font-size: 16px; width: 100%; }
.btn-submit-modern-circle {
    background: #003087; border: none; width: 38px; height: 38px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Estilos Sociais dentro do Search */
.social-search-section { margin-bottom: 30px; }
.social-section-title { font-size: 17px; font-weight: 700; color: #222; margin-bottom: 15px; }
.btn-clear-ficticio { background: none; border: none; color: #003087; font-size: 13px; font-weight: 600; }
.recent-list-ficticio { list-style: none; padding: 0; }
.recent-list-ficticio li { padding: 12px 0; border-bottom: 1px solid #eee; font-size: 15px; color: #444; display: flex; align-items: center; }
.profiles-scroll-ficticio { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.profiles-scroll-ficticio::-webkit-scrollbar { display: none; }
.profile-item-ficticio { text-align: center; min-width: 75px; }
.profile-item-ficticio img { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; border: 2px solid #003087; margin-bottom: 5px; }
.profile-item-ficticio span { font-size: 12px; font-weight: 600; color: #333; }
.trending-item-ficticio { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; flex-direction: column; }
.trending-cat { font-size: 11px; color: #777; }
.trending-name { font-size: 15px; font-weight: 700; color: #111; }
.trending-posts { font-size: 11px; color: #777; }

/* ===== ESTILOS DOS RESULTADOS AJAX (MOBILE) ===== */
.mob-ajax-loading {
    padding: 20px 15px;
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mob-ajax-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #eee;
    border-top-color: #003087;
    border-radius: 50%;
    animation: mobSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes mobSpin { to { transform: rotate(360deg); } }

.mob-ajax-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    font-weight: 900;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
    display: block;
}

/* Resultado de post */
.mob-res-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    border-bottom: 1px solid #f3f3f3;
    gap: 12px;
}
.mob-res-item:last-child { border-bottom: none; }
.mob-res-img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
    flex-shrink: 0;
}
.mob-res-title {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

/* Resultado de perfil inline */
.mob-user-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 8px 0 4px;
    scrollbar-width: none;
}
.mob-user-list::-webkit-scrollbar { display: none; }
.mob-user-item {
    text-decoration: none;
    text-align: center;
    min-width: 65px;
}
.mob-user-item img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid #003087;
    object-fit: cover;
    margin-bottom: 4px;
}
.mob-user-item span {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 65px;
    text-overflow: ellipsis;
}

.mob-no-results {
    padding: 30px 15px;
    text-align: center;
    color: #888;
    font-size: 15px;
}
.mob-no-results strong {
    display: block;
    font-size: 17px;
    color: #333;
    margin-bottom: 5px;
}
/* --- ESTILOS DO MENU LATERAL (ORIGINAIS) --- */
.sidebar-host-style { padding: 0; list-style: none; text-align: left; }
.nav-link-item {
    display: flex; padding: 18px 20px !important; font-size: 17px; font-weight: 500;
    color: #222 !important; text-decoration: none !important; border-radius: 14px;
    margin-bottom: 5px; transition: background-color 0.2s ease;
    text-align: left; justify-content: space-between; align-items: center;
}
.nav-link-item[aria-expanded="true"], .active-page { background-color: #f3f3f3 !important; }
.arrow-indicator { font-size: 12px; transition: transform 0.3s; }
.nav-link-item[aria-expanded="true"] .arrow-indicator { transform: rotate(180deg); }
.submenu-list-container {
    list-style: none; padding: 5px 0 10px 25px; margin-left: 30px;
    border-left: 1px solid #ddd; text-align: left; overflow: hidden;
}
.sub-link-item {
    display: block; padding: 12px 18px !important; font-size: 16px;
    color: #444 !important; text-decoration: none !important; border-radius: 14px;
    margin-bottom: 4px; transition: all 0.2s; text-align: left;
}
.sub-link-item.active-page { background-color: #f3f3f3 !important; color: #000 !important; }
.nav-mobile-inner { padding: 20px 15px; background: #fff; }
/* Only the profile circle; the original header, menus, + and LOGIN badge stay in place. */
.avatar-morph-wrap>.dn-original-profile-ring,.avatar-container-fixed>.dn-original-profile-ring{position:absolute;inset:-4px;width:44px;height:44px;pointer-events:none;z-index:3;stroke:none!important}
.avatar-morph-wrap>.avatar-morph-img{inset:2px;width:32px;height:32px;border:0;border-radius:50%}
.avatar-container-fixed>.avatar-img-small{width:32px;height:32px;border:0;border-radius:50%;object-fit:cover}
.pdrop-open .avatar-morph-wrap>.dn-original-profile-ring{opacity:0}
/* Keep the restored layout and original control positions. Only icon appearance changes. */
.profile-dropdown .avatar-morph-wrap>.avatar-morph-img,
.profile-dropdown-mobile .avatar-morph-wrap>.avatar-morph-img{opacity:1!important;transform:none!important;inset:2px;width:32px;height:32px;border:0;border-radius:50%;object-fit:cover}
.profile-dropdown .avatar-morph-wrap>.dn-original-profile-ring,
.profile-dropdown-mobile .avatar-morph-wrap>.dn-original-profile-ring{opacity:1!important;position:absolute;inset:-4px;width:44px;height:44px;pointer-events:none;stroke:none!important}
.avatar-container-fixed>.dn-original-profile-ring{position:absolute;inset:-4px;width:44px;height:44px;pointer-events:none;stroke:none!important}
#headerMobileMain .mobile-search-button>svg{width:26px;height:26px;stroke:#555b63;stroke-width:1.7}
.dns-btn-go>svg{width:22px;height:22px;stroke-width:1.7}
