/**
 * CidadeTur BR - Estilos da Sidebar
 * Navegação, menu e componentes da barra lateral
 */

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    color: var(--white);
    overflow: visible;
    transition: width 0.3s ease, margin-left 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    min-height: 100vh;
    height: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-background);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    padding: 20px 15px 65px 80px;
    background-color: var(--sidebar-background);
    flex: 1;
    overflow: visible;
    min-height: 100vh;
    will-change: transform;
}

/* Elemento invisível criado pelo JavaScript para fazer o body crescer */
#sidebar-height-spacer {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}

/* Texto Vertical */
.vertical-text {
    position: absolute;
    left: -98px;
    top: 72vh;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    font-size: 25px;
    line-height: 1;
    color: #b2b2b2;
    letter-spacing: 0px;
    z-index: 10;
}

/* Navbar dentro da Sidebar */
.sidebar-navbar {
    background-color: white;
    flex-shrink: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    will-change: transform;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 15px;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.navbar-title {
    flex: 1;
    margin-left: 28px;
}

.navbar-title h1 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-btn {
    background-color: #9db4cd;
    border: none;
    width: 40px;
    height: 60px;
    margin-top: 15px;
    padding-top: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    color: white;
    border-radius: 2px;
}

.navbar-btn:hover {
    background-color: #5A7B9F;
}

#btnMenu svg {
    height: 24px;
    width: 24px;
}

.navbar-btn svg {
    width: 20px;
    height: 20px;
}

/* Barra de Busca */
.search-bar {
    max-height: 0;
    overflow: hidden;
    background-color: #F5F5F5;
    transition: max-height 0.3s ease;
}

.search-bar.active {
    max-height: 60px;
    border-top: 1px solid #D0D0D0;
}

.search-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.search-container button {
    background-color: var(--primary-blue);
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    color: white;
    transition: background-color 0.3s;
}

.search-container button:hover {
    background-color: var(--dark-blue);
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

/* Scrollbar do body aparece na borda direita da tela */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Para Firefox */
html,
body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1);
}

/* Header da Sidebar */
.sidebar-header {
    display: flex;
    align-items: center;
    background-color: var(--primary-blue);
    padding: 20px 15px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    margin-bottom: 3px;
}

.separator {
    width: 100%;
    height: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px 5px;
    border: solid 1px white;
    border-radius: 10px;
}

.logo-img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Menu Principal */
.menu-principal {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-link {
    text-decoration: none;
    color: var(--white);
    padding: 2px 15px;
    font-size: 13px;
    transition: background-color 0.3s;
    display: block;
}

.menu-link:hover {
    text-decoration: underline;
}

.menu-link.active {
    text-decoration: underline;
}

/* Seções do Menu */
.menu-section.cidades-turisticas .menu-section-title {
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    margin-bottom: 15px;
}

.menu-section.categorias-noticias .menu-section-title {     
    background-color: var(--light-blue); 
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
}

.menu-section.outra-categoria .menu-section-title {  
    background-color: var(--light-blue);
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
}

.menu-section-title {
    width: 100%;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    text-align: left;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
    font-weight: normal;    
    border-radius: 10px;
}

.menu-section-title:hover {
    background-color: var(--light-blue);
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.3s;
    margin-left: 10px;
}

.toggle-icon.rotated {
    transform: rotate(-180deg);
}

.menu-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.15);
}

.menu-section-content.active {
    max-height: 1000px;
}

/* Últimas Notícias */
.ultimas-noticias {
    padding: 20px;
}

.secao-titulo {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--white);
}

.noticia-card {
    background-color: var(--dark-blue);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.noticia-imagem {
    width: 100%;
    height: 100px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.noticia-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder para imagens de notícias */
.noticia-imagem::before {
    content: '📰';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    opacity: 0.3;
}

.noticia-imagem img[src=""],
.noticia-imagem img:not([src]) {
    display: none;
}

.noticia-imagem:has(img[src=""]),
.noticia-imagem:not(:has(img[src])) {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    position: relative;
}

.noticia-conteudo {
    padding: 12px;
}

.noticia-titulo {
    font-size: 13px;
    color: var(--text-yellow);
    margin-bottom: 10px;
    line-height: 1.4;
}

.noticia-info {
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 4px;
}

/* Botão Exibir Mais */
.btn-exibir-mais {
    width: 100%;
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-exibir-mais:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

