/**
 * CidadeTur BR - Estilos Base
 * Reset, variáveis CSS e estrutura global
 */

/* ============================================
   RESET E CONFIGURAÇÕES GLOBAIS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

:root {
    /* Cores principais */
    --primary-blue: #ffffff;
    --dark-blue: #1E3A5F;
    --text-link: #0000FF;
    --light-blue: #9db4cd;
    --gray-bg: #B8B8B8;
    --red-accent: #E53935;
    --yellow-accent: #fde55d;
    --white: #FFFFFF;
    --text-black: #000000;
    --text-body: #474747;
    --text-light: #CCCCCC;
    --text-light-hover: #FFCC00;
    --text-yellow: #fde55d;

    /* Paleta CidadeTur */
    --ct-orange: #FFCC99;
    --ct-gray-btn: #CBD3D7; /* cinza original dos botões da index */
    --ct-btn-hover: #FFCC00; /* hover original dos botões da index */
    --ct-suggested: #FFFFBC;
    --ct-news-title: #003399;
    --ct-places-title: #006633;
    --ct-info-text: #333333;

    /* Cores para o Index 2 */
    --light-green: #aad4aa;

    /* Tamanhos */
    --sidebar-width: 430px;
    --sidebar-collapsed: 0px;
    --sidebar-background: #e4e4e4;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--gray-bg);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
}

.content-html p,
.content-html li,
.content-html td,
.content-html span,
.news-content p,
.post-body p,
.post-body li,
.post-body td,
.ecossistema-content p,
.ecossistema-content li {
    font-size: 16px;
    line-height: 1.5;
}

/* Botão SUBIR (voltar ao topo) */
.btn-subir {
    /* Desktop: sobre a faixa vertical CIDADETUR.COM.BR, alinhado com a linha da data (pág. 1 do PDF) */
    position: fixed;
    bottom: 62px;
    left: 8px;
    width: 40px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.25);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002; /* visível também com o campo do menu aberto */
    z-index: 9999;
    transition: opacity 0.3s, background-color 0.3s;
}

.btn-subir:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.btn-subir.visible {
    display: flex;
}

/* Aba recolhida = banner ocupa a tela inteira (sem rolagem): não faz sentido
   o botão "voltar ao topo". Some enquanto a aba está recolhida. */
body.sidebar-collapsed-no-scroll .btn-subir {
    display: none !important;
}

/* Mobile (pág. 20 do PDF): centralizado no rodapé, mais largo/esticado na
   horizontal e só aparece depois de rolar a página
   (imagem "botao para o topo no meio em resolução mobile"). */
@media (max-width: 800px) {
    .btn-subir {
        display: none;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 88px;
        height: 36px;
    }

    .btn-subir.visible {
        display: flex;
    }
}

/* Autor da Foto: último da pilha, na linha da data sobre o banner */
.photo-author-btn {
    position: absolute;
    bottom: 70px;
    left: 15px;
    width: 132px;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    z-index: 100;
    /* O botão também pode ser um <a> (link do autor direto no botão) */
    display: inline-block;
    text-decoration: none;
}

.photo-author-btn .photo-author-tooltip {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    top: 70%;
    transform: translateY(-50%);
    background-color: #fde55d;
    color: #333;
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 3px;
}

.photo-author-btn:hover .photo-author-tooltip {
    display: block;
}

/* Listar Perfis | Listar Cidades (topo do banner) */
.banner-lists {
    position: absolute;
    top: 18px;
    right: 60px;
    z-index: 20;
    text-align: right;
}

.banner-lists-links {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.banner-lists-link {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-shadow: inherit;
}

.banner-lists-link:hover,
.banner-lists-link.active {
    color: #FFFFFF;
    text-decoration: underline;
}

.banner-lists-sep {
    opacity: 0.7;
}

.banner-lists-panel {
    margin-top: 8px;
    margin-left: auto;
    width: 260px;
    /* Quadro vai até o rodapé do monitor (correção 13/07): o .banner-lists fica
       a 18px do topo do banner (100vh); ~43px = topo dos links + margem. */
    height: calc(100vh - 43px - 18px);
    max-height: none;
    overflow-y: auto;
    background: #FFFFFF;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.banner-lists-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.banner-lists-ul li a {
    display: block;
    padding: 7px 12px;
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.banner-lists-ul li a:hover {
    background-color: var(--ct-suggested, #FFFFBC);
}

.banner-lists-empty {
    padding: 10px 12px;
    color: #666666;
    font-size: 13px;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.container {
    display: flex;
    min-height: 100vh;
    height: auto;
    position: relative;
    overflow: visible;
    /* O container precisa ter altura suficiente para o scroll funcionar */
}

/* ============================================
   GUARDAS DE LARGURA — conteúdo publicado
   Mídia e tabelas vindas do editor HTML nunca
   podem estourar a largura da coluna
   ============================================ */

.sidebar-content img,
.sidebar-content iframe,
.sidebar-content video,
.sidebar-content embed,
.sidebar-content object {
    max-width: 100%;
}

.bloco4-text img,
.menu-section-content img {
    height: auto;
}

.bloco4-text table,
.menu-section-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
