.org-chart-wrapper {
    cursor: grab;
}

.org-chart-wrapper:active {
    cursor: grabbing;
}

#lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.org-node-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.card {
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s, opacity 0.3s;
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.children-container {
    margin-top: 50px;
}

.level-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* Espaço entre o lado esquerdo e direito */
    align-items: start;
}

/* Estilos de Interatividade */
.card.inactive {
    opacity: 0.3;
}

.card.active {
    background-color: #3b82f6 !important;
    /* blue-500 */
    border-color: #2563eb !important;
    /* blue-600 */
}

.card.active h3,
.card.active p {
    color: white !important;
}

#lines-svg path {
    transition: stroke 0.3s, stroke-width 0.3s, opacity 0.3s;
}

#lines-svg path.inactive {
    opacity: 0.2;
}

#lines-svg path.active {
    stroke: #2563eb;
    /* blue-600 */
    stroke-width: 2.5;
}

/* Aviso Panning */
.aviso-panning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    color: #1e3a8a;
    font-size: 1.25rem;
    font-weight: 500;
    z-index: 20;
    text-align: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.aviso-panning.escondendo {
    opacity: 0;
}

/* ================================================== */
/* ====== NOVAS CLASSES (SUBSTITUINDO TAILWIND) ====== */
/* ================================================== */

/* --- Layout e Contêineres --- */
.flex-container {
    display: flex;
}
.flex-column {
    flex-direction: column;
}
.items-center {
    align-items: center;
}
.items-start {
    align-items: flex-start;
}
.justify-center {
    justify-content: center;
}
.justify-start {
    justify-content: flex-start;
}
.justify-end {
    justify-content: flex-end;
}
.gap-10 {
    gap: 2.5rem; /* 40px */
}
.gap-24 {
    gap: 6rem; /* 96px */
}
.w-full {
    width: 100%;
}
/* Adiciona margem entre os filhos diretos para simular o 'space-y' */
.space-y-10 > * + * {
    margin-top: 2.5rem; /* 40px */
}


/* --- Estilos para os Cards --- */
.org-card {
    width: 15rem; /* 240px */
    text-align: center;
    padding: 1rem; /* 16px */
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb; /* border-gray-200 */
    cursor: pointer;
    background-color: #ffffff; /* bg-white */
}

.org-card__title {
    font-weight: 700; /* font-bold */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    color: #2563eb; /* text-blue-600 */
}

.org-card__text {
    font-size: 0.75rem; /* text-xs */
    line-height: 1rem;
    margin-top: 0.25rem; /* mt-1 */
    color: #374151; /* text-gray-700 */
}

/* Variação para o card principal (root) */
.org-card--root {
    background-color: #1f2937; /* bg-gray-800 */
    border-color: #374151; /* border-gray-700 */
}
.org-card--root .org-card__title {
    color: #ffffff; /* text-white */
}
.org-card--root .org-card__text {
    color: #d1d5db; /* text-gray-300 */
}

/* Variação para a entidade relacionada (related) */
.org-card--related {
    background-color: #4b5563; /* bg-gray-600 */
    border-color: #6b7280; /* border-gray-500 */
}
.org-card--related .org-card__title {
    color: #ffffff; /* text-white */
}
.org-card--related .org-card__text {
    color: #e5e7eb; /* text-gray-200 */
}

/* ======================================================= */
/* ====== ESTILOS PARA O HTML (SUBSTITUINDO TAILWIND) ====== */
/* ======================================================= */

/* --- Estilos para a Seção Principal e Título --- */
.secao-estrutura__container {
    max-width: 1280px; /* Largura máxima do container */
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
}
/* Media queries para padding responsivo */
@media (min-width: 640px) {
    .secao-estrutura__container {
        padding: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .secao-estrutura__container {
        padding: 2rem;
    }
}

.secao-estrutura__title-wrapper {
    margin-bottom: 0.75rem;
}

.secao-estrutura__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    text-align: center;
    color: #111827;
}
/* Media query para o título em telas maiores */
@media (min-width: 768px) {
    .secao-estrutura__title {
        font-size: 2.25rem; /* 36px */
    }
}


/* --- Estilos para o Wrapper do Organograma --- */
/* (Combinado com a classe .org-chart-wrapper já existente) */
.org-chart-wrapper {
    height: 75vh;
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}

#org-container {
    position: relative;
    display: inline-block;
}

#org-root {
    padding: 2.5rem; /* p-10 */
    display: inline-block;
}

/* --- Estilos para os Controles (Zoom, Fullscreen, Download) --- */
.org-controls {
    position: absolute;
    display: flex;
    gap: 0.5rem; /* gap-2 */
    z-index: 10;
}

.org-controls--bottom-left {
    bottom: 1rem;
    left: 1rem;
    flex-direction: column;
}

.org-controls--top-right {
    top: 1rem;
    right: 1rem;
}

.org-controls__group {
    display: flex;
    background-color: #ffffff;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* shadow-md */
    border: 1px solid #e5e7eb;
}

.org-controls__button {
    background-color: #ffffff;
    color: #4b5563; /* text-gray-600 */
    padding: 0.5rem; /* p-2 */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.org-controls__button:hover {
    background-color: #f3f4f6; /* hover:bg-gray-100 */
}

.org-controls__button--zoom-out {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.org-controls__button--zoom-in {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-left: 1px solid #e5e7eb;
}

.org-controls__button--fullscreen {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}

.org-controls__button--fullscreen svg {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
}

.org-controls__button--download {
    padding: 0.5rem 1rem; /* py-2 px-4 */
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* font-semibold */
    color: #374151; /* text-gray-700 */
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
}