:root {
    --orb-radius: 280px;
    /* Raio da órbita dos ícones */
}

body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header-services {
    background-color: var(--secondary-bg);
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    width: 100%;
    z-index: 1000;
}

.header-services .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.btn-header {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-header:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.interactive-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.services-orb {
    position: relative;
    width: 200px;
    height: 200px;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-text {
    width: 100%;
    height: 100%;
    background-color: var(--secondary-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    z-index: 10;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2.5rem;
    line-height: 1;
}

.center-text span {
    color: var(--primary-color);
}

.center-text .tagline {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 5px;
}

.service-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    margin: -70px;
    background-color: var(--secondary-bg);
    border: 2px solid #444;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    animation: float 6s ease-in-out infinite;
    text-align: center;
    padding: 10px;
    transform: rotate(calc(var(--angle) * 1deg)) translateX(var(--orb-radius)) rotate(calc(var(--angle) * -1deg));
}

/* CORREÇÃO: Posições definidas por atributo para garantir que cada item tenha seu lugar */
.service-node[data-key="apoio-utilizador-ti"] {
    --angle: 0;
    animation-delay: -1s;
}

.service-node[data-key="seguranca"] {
    --angle: 45;
    animation-delay: -2s;
}

.service-node[data-key="conectividade"] {
    --angle: 90;
    animation-delay: -3s;
}

.service-node[data-key="colaboracao"] {
    --angle: 135;
    animation-delay: -4s;
}

.service-node[data-key="automacao-condominial"] {
    --angle: 180;
    animation-delay: -5s;
}

.service-node[data-key="infraestrutura"] {
    --angle: 225;
    animation-delay: -6s;
}

.service-node[data-key="servicos-corporativos"] {
    --angle: 270;
    animation-delay: -7s;
}

.service-node[data-key="aplicacoes"] {
    --angle: 315;
    animation-delay: -8s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(calc(var(--angle) * 1deg)) translateX(var(--orb-radius)) rotate(calc(var(--angle) * -1deg));
    }

    50% {
        transform: translateY(-10px) rotate(calc(var(--angle) * 1deg)) translateX(var(--orb-radius)) rotate(calc(var(--angle) * -1deg));
    }

    100% {
        transform: translateY(0px) rotate(calc(var(--angle) * 1deg)) translateX(var(--orb-radius)) rotate(calc(var(--angle) * -1deg));
    }
}

.service-node .node-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.service-node .node-text {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.service-node:hover .node-icon {
    color: var(--text-color);
}

.service-node:hover .node-text {
    color: var(--primary-color);
}

.service-details-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    max-width: 500px;
    height: 100%;
    background-color: var(--secondary-bg);
    border-left: 1px solid #444;
    transform: translateX(100%);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 20;
    padding: 40px;
    overflow-y: auto;
}

.service-details-panel h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-details-panel .description,
.service-details-panel li {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-details-panel ul {
    padding-left: 20px;
}

.service-details-panel strong {
    color: var(--text-color);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.interactive-container.details-active .services-orb {
    transform: translateX(-40%);
}

.interactive-container.details-active .service-node {
    opacity: 0.3;
    transform: scale(0.5);
    animation: none;
}

.interactive-container.details-active .service-node.active {
    opacity: 1;
    transform: translateX(-150%) scale(1.2);
    animation: none;
}

.interactive-container.details-active .service-details-panel {
    transform: translateX(0);
}

@media (max-width: 1200px) {
    :root {
        --orb-radius: 220px;
    }
}

@media (max-width: 992px) {
    :root {
        --orb-radius: 180px;
    }

    .interactive-container.details-active .services-orb {
        transform: translateX(0);
    }

    .interactive-container.details-active .service-node.active {
        transform: translateY(-200px) scale(1.1);
    }

    .service-details-panel {
        width: 100%;
        max-width: none;
        top: 50%;
        height: 50%;
        transform: translateY(100%);
        padding: 20px;
    }

    .interactive-container.details-active .service-details-panel {
        transform: translateY(0);
    }

    .center-text {
        font-size: 2rem;
    }

    .service-node {
        width: 120px;
        height: 120px;
        margin: -60px;
        font-size: 1rem;
    }

    .service-node .node-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .interactive-container {
        flex-direction: column;
        padding: 40px 0;
        overflow-y: auto;
    }

    .services-orb {
        transform: scale(0.8);
        flex-shrink: 0;
        position: static;
        margin-bottom: 300px;
    }

    .service-node {
        animation: none !important;
    }
}