/* Globe 3D Styles - Temporary until SCSS is compiled */
.home #globe-canvas-container {
    position: absolute;
    top: 10px; /* Mover globo 10px para baixo */
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    min-height: 100%;
    background: #221E27; /* Mesmo background do site */
}

.home #globe-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    /* pointer-events será gerenciado via JavaScript */
}

/* Garantir que o menu e submenu fiquem acima do canvas */
.home nav,
.home nav ol.menu,
.home nav .submenu {
    position: relative;
    z-index: 50 !important; /* Muito acima do canvas (z-index: 1) */
}

/* Área do menu - desativar pointer-events do canvas nesta área */
.home nav {
    pointer-events: auto !important;
}

.home nav ol.menu {
    pointer-events: auto !important;
}

.home nav .submenu {
    pointer-events: auto !important;
}

/* Submenu agora aparece acima do menu - não interfere com o globo */
body:has(section.home) nav ol.menu li,
section.home ~ * nav ol.menu li,
.home nav ol.menu li {
    position: relative;
}

body:has(section.home) nav ol.menu li .submenu,
section.home ~ * nav ol.menu li .submenu,
.home nav ol.menu li .submenu {
    top: 100% !important;
    margin-top: 0px !important;
}

/* Manter submenu visível quando hover no item OU no submenu */
body:has(section.home) nav ol.menu li:hover .submenu,
body:has(section.home) nav ol.menu li .submenu:hover,
section.home ~ * nav ol.menu li:hover .submenu,
section.home ~ * nav ol.menu li .submenu:hover,
.home nav ol.menu li:hover .submenu,
.home nav ol.menu li .submenu:hover {
    display: flex !important;
}

.home #globe-label-container {
    position: absolute;
    top: 0; /* Será sobrescrito pelo JS */
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.home #globe-label-container.visible {
    opacity: 1;
}

.home .globe-label-box {
    border: 1px solid #888888;
    background: rgba(19, 17, 28, 0.4);
    backdrop-filter: blur(3px);
    padding: 8px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #00A0FF;
    position: relative;
    white-space: nowrap;
}

/* Linha removida */
/* .home .globe-label-box::before {
    content: '';
    position: absolute;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 50px;
    background-color: #888888;
} */

.home .globe-location-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 300;
    font-size: 0.9rem;
    margin-left: 0;
    padding-left: 0;
}

.home .globe-location-sub svg {
    stroke: white;
    width: 16px;
    height: 16px;
}

/* Layout vertical dos labels: nome do projeto acima, localização abaixo */

/* Layer de legenda de projetos */
.home #globe-projects-legend {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    background: rgba(34, 30, 39, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #615F5F;
    border-radius: 8px;
    padding: 20px;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.home #globe-projects-legend.visible {
    opacity: 1;
    pointer-events: all;
}

.home #globe-projects-legend h3 {
    color: #00A0FF;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #615F5F;
}

.home #globe-projects-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home #globe-projects-legend ul li {
    padding: 10px 0;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.home #globe-projects-legend ul li:hover {
    color: #00A0FF;
}

.home #globe-projects-legend ul li.active {
    color: #00A0FF;
    font-weight: 500;
}

/* View de tecnologias */
.home #globe-projects-legend .globe-technologies-view {
    margin-top: 10px;
}

.home #globe-projects-legend .globe-tech-item {
    padding: 8px 12px;
    margin: 6px 0;
    background: rgba(0, 160, 255, 0.1);
    border: 1px solid rgba(0, 160, 255, 0.3);
    border-radius: 4px;
    color: #00A0FF;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.home #globe-projects-legend .globe-tech-item:hover {
    background: rgba(0, 160, 255, 0.2);
    border-color: rgba(0, 160, 255, 0.5);
}

/* Media queries para #globe-projects-legend */
/* A partir de 1351px: posicionamento customizado */
@media (min-width: 1351px) {
    .home #globe-projects-legend {
        right: 10%;
        top: 42%;
        transform: none;
    }
}

/* Inferior a 1350px: esconder a layer */
@media (max-width: 1350px) {
    .home #globe-projects-legend {
        display: none !important;
    }
}

/* Mobile: esconder globo 3D e mostrar imagem estática */
@media (max-width: 768px) {
    .home #globe-canvas-container {
        display: none !important;
    }

    .home .globe-static-fallback {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        z-index: 1;
        max-width: 100%;
        height: auto;
    }

    .home #globe-projects-legend {
        display: none !important;
    }

    .home #globe-label-container {
        display: none !important;
    }

    /* Reduzir z-index do centerText em mobile para não ficar por cima do menu (menu mobile tem z-index: 100) */
    .home .centerText {
        z-index: 1 !important;
    }

    .home .centerText h1,
    .home .centerText h3 {
        z-index: 1 !important;
        position: relative !important;
    }
}

/* Desktop only - posicionamento do h1 e h3 */
@media (min-width: 769px) {
    .home .centerText {
        z-index: 15 !important;
        padding-top: 60px !important;
    }
    
    .home .centerText h1 {
        margin-top: 90px !important;
        margin-bottom: 0 !important; /* Remover qualquer margin-bottom */
        margin-left: 0 !important;
        margin-right: 0 !important;
        font-size: 29px !important;
        text-shadow: 0 4px 20px rgba(19, 17, 28, 1) !important;
        position: relative !important;
        z-index: 16 !important;
    }

    .home .centerText h3 {
        margin-top: 20px !important; /* Reduzido para ficar mais próximo do h1 */
        margin-bottom: 0 !important; /* Remover qualquer margin-bottom */
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-shadow: 0 4px 20px rgba(19, 17, 28, 1) !important;
        position: relative !important;
        z-index: 16 !important;
    }
}

