@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
* {
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
}
body {
    height: 100vh;
    display: grid;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    background-color: #000000;
	background-image: url(../media/woven.png);
}
.tree {
    width: 100%;
    height: auto;
    text-align: center;
}
.tree ul {
    padding-top: 20px;
    position: relative;
    transition: .5s;
}
.tree li {
    display: inline-table;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 10px;
    transition: .5s;
}
.tree li::before, .tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 1px solid #ccc;
    width: 51%;
    height: 10px;
}
.tree li::after {
    right: auto;
    left: 50%;
    border-left: 1px solid #ccc;
}
.tree li:only-child::after, .tree li:only-child::before {
    display: none;
}
.tree li:only-child {
    padding-top: 0;
}
.tree li:first-child::before, .tree li:last-child::after {
    border: 0 none;
}
.tree li:last-child::before {
    border-right: 1px solid #ccc;
    border-radius: 0 5px 0 0;
    -webkit-border-radius: 0 5px 0 0;
    -moz-border-radius: 0 5px 0 0;
}
.tree li:first-child::after {
    border-radius: 5px 0 0 0;
    -webkit-border-radius: 5px 0 0 0;
    -moz-border-radius: 5px 0 0 0;
}
.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 1px solid #ccc;
    width: 0;
    height: 20px;
}

.tree li a img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px !important;
    border-radius: 100px;
    margin: auto;
}
.tree li a span {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    background: #544800; /* Cor dourada mais escura inicial */
    color: #fff; /* Cor do texto ajustada para contraste */
}

/* Estilo do elemento base com min-width */
.tree li a {
    min-width: 170px;
    position: relative;
    border: 1px solid #ccc;
    padding: 10px;
    display: inline-grid;
    border-radius: 5px;
    text-decoration-line: none;
    transition: .5s;
    background: #675700;
    color: #fff;
    align-items: center;
}

/* Estilo da setinha (caret) - Estado normal (expandido) */
.caret {
    position: absolute;
    right: 10px;
    top: 20%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff; /* Para baixo por padrão */
    border-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Estado colapsado: seta para cima (sem hover) */
.has-children.collapsed .caret {
    border-top: 0;
    border-bottom: 5px solid #fff;
}

/* Hover no estado expandido: seta para cima */
.tree li a:hover .caret {
    border-top: 0;
    border-bottom: 5px solid #fff;
}

/* Hover no estado colapsado: seta para baixo */
.tree li.has-children.collapsed a:hover .caret {
    border-top: 5px solid #fff;
    border-bottom: 0;
}

/* Hover no estado colapsado: seta para baixo */
.tree li a:hover .has-children.collapsed .caret {
    border-top: 5px solid #fff;
    border-bottom: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

/* Hover section */
.tree li a:hover, .tree li a:hover span, .tree li a:hover+ul li a {
    background: #a48e00;
    color: #000;
    border: 1px solid #94a0b4;
}

/* Esconder os descendentes quando colapsado (maior especificidade) */
.tree .has-children.collapsed > ul {
    display: none !important; /* Força o colapso inicial */
}

/* Garantir que os filhos sejam visíveis por padrão */
.tree ul {
    display: block;
}


/* Tooltip para imagens */
.tree li a img[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%; /* Aparece acima da imagem */
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Opcional: Tooltip para o <a> (se desejar manter as dicas nos links também) */
.tree li a[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 95%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}






.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Contêiner para a imagem e o botão */
.lightbox-image-container {
    position: relative; /* Define o contexto para o posicionamento absoluto do botão */
    max-width: 90%;
    max-height: 80vh;
}

/* Imagem dentro da lightbox */
.lightbox-content {
    max-width: 100%; /* Ajustado para caber no contêiner */
    max-height: 80vh;
    margin: 0 auto;
    display: block;
    border: 5px solid #fff;
    border-radius: 5px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #ccc;
}

.caption {
    color: #fff;
    font-size: 16px;
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    max-width: 90%;
}

.download-btn {
    position: absolute;
    bottom: 10px; /* Sobreposto na parte inferior da imagem */
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    z-index: 1100; /* Acima da imagem */
    transition: 0.3s;
}

.download-btn:hover {
    opacity: 0.8; /* Efeito hover mais sutil para SVG */
}

/* Estilo para o ícone SVG */
.download-icon {
    width: 48px; /* Define um tamanho fixo */
    height: 48px;
    display: block; /* Garante que a imagem seja tratada como bloco */
}

.text_intro {
    position: relative;
    color: #fff;
    text-align: center;
    width: 100%;
    margin: auto;
}


/* Personalização da Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #181818;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #a48e00; /* Amarelo */
    border-radius: 3px;
    border: 1px solid #CCB000;
}

::-webkit-scrollbar-thumb:hover {
    background: #2b2500; /* Amarelo mais escuro no hover */
}

/* Para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #a48e00 #181818;
}






/* === BOTÃO TOGGLE === */
.layout-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 8px 15px;
    background: #a48e00;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
}

/* === CORREÇÃO ESPECÍFICA PARA QUEBRAS === */
body.extended-mode {
    overflow-x: auto;
}

body.extended-mode .tree ul {
    white-space: nowrap !important;
    display: block !important;
}

body.extended-mode .tree li {
    display: inline-block !important;
    float: none !important;
    vertical-align: top !important;
}

body.extended-mode .tree li a {
    white-space: normal !important;
}



.toggle-all {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 8px 15px;
    background: #a48e00;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    transition: all 0.3s ease;
}

.toggle-all:hover {
    background: #675700;
    color: #fff;
}

.layout-toggle, .toggle-all {
	width: 140px;
}