/* =============================================
   ORBITAL SECTION
   ============================================= */

.orbital-section {
    padding: 2rem 2rem 6rem;
    position: relative;
    overflow-x: hidden;
}

.orbital-section .section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.orbital-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    max-width: 1100px;
    margin: 0 auto;
    transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
    transform: translateX(193px);
}

.orbital-wrapper.has-active {
    transform: translateX(0);
}

/* ---- Stage ---- */
.orbital-stage {
    position: relative;
    width: 560px;
    height: 560px;
    flex-shrink: 0;
}

/* ---- Orbit Rings (decorative) ---- */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.orbit-ring-1 {
    width: 462px;
    height: 462px;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.orbit-ring-2 {
    width: 312px;
    height: 312px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- Center Orb ---- */
.orbital-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    z-index: 5;
}

.center-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 33%, #9180f0, #2563eb 52%, #0e3a8c);
    box-shadow:
        0 0 32px rgba(107, 33, 214, 0.7),
        0 0 70px rgba(26, 111, 232, 0.35),
        inset 0 2px 5px rgba(255, 255, 255, 0.25);
    z-index: 3;
}

.center-core::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(7px);
}

.center-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(107, 33, 214, 0.32);
    animation: orb-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: 2;
}

.center-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(107, 33, 214, 0.38);
    animation: orb-pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes orb-ping {
    0%        { transform: scale(1);   opacity: 0.65; }
    80%, 100% { transform: scale(2.6); opacity: 0; }
}

@keyframes orb-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.4; }
    50%      { transform: scale(1.35); opacity: 0.08; }
}

/* ---- Nodes ---- */
.orbital-node {
    position: absolute;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    will-change: left, top;
}

.node-icon-wrap {
    position: relative;
    z-index: 2;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(180, 180, 205, 0.78);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease,
        color 0.3s ease;
}

.node-icon-wrap svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
}

.node-label {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.71rem;
    font-family: var(--font-body);
    white-space: nowrap;
    letter-spacing: 0.35px;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.label-short {
    color: rgba(175, 175, 200, 0.62);
    transition: opacity 0.3s ease;
    opacity: 1;
}

.label-full {
    position: absolute;
    color: rgba(230, 230, 250, 0.95);
    font-weight: 600;
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease;
    text-shadow: 0 0 10px rgba(107, 33, 214, 0.5);
    white-space: nowrap;
}

.orbital-node:hover .label-short {
    opacity: 0;
}

.orbital-node.is-active .label-short {
    color: #fff;
    font-weight: 600;
}

.orbital-node:hover .label-full {
    opacity: 1;
    clip-path: inset(0 -10% 0 -10%);
}

.orbital-node:hover .node-icon-wrap {
    background: rgba(107, 33, 214, 0.16);
    border-color: rgba(107, 33, 214, 0.52);
    box-shadow:
        0 0 24px rgba(107, 33, 214, 0.42),
        0 5px 20px rgba(0, 0, 0, 0.5);
    transform: scale(1.13);
    color: #fff;
}

.orbital-node.is-active .node-icon-wrap {
    background: rgba(107, 33, 214, 0.22);
    border-color: var(--primary);
    box-shadow:
        0 0 38px rgba(107, 33, 214, 0.68),
        0 0 14px rgba(107, 33, 214, 0.38),
        0 5px 20px rgba(0, 0, 0, 0.5);
    transform: scale(1.24);
    color: #fff;
}

.connection-line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(107, 33, 214, 0.8), rgba(26, 111, 232, 0.8));
    transform: translateY(-50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 8px rgba(107, 33, 214, 0.6);
}

.orbital-node.is-docked .connection-line {
    width: 106px;
    transition-delay: 0s;
}

/* ---- Detail Card ---- */
.orbital-detail {
    width: 330px;
    flex-shrink: 0;
    position: relative;
    background: rgba(8, 8, 10, 0.86);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(107, 33, 214, 0.1);
    opacity: 0;
    transform: translateX(-10px) scale(0.96);
    pointer-events: none;
    transition: height 0.35s ease, opacity 0.38s ease, transform 0.38s ease;
    overflow: hidden;
}

.orbital-detail.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

.detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.detail-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.detail-badge-cat {
    display: inline-block;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(107, 33, 214, 0.95);
    background: rgba(107, 33, 214, 0.1);
    border: 1px solid rgba(107, 33, 214, 0.28);
    border-radius: 20px;
    padding: 0.22rem 0.8rem;
    margin-bottom: 0.85rem;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    padding-right: 2.2rem;
}

.detail-content-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 0.25rem;
}

/* ---- Detail Card Content Animation ---- */
@keyframes contentFadeSlideIn {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes contentFadeSlideOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-8px); }
}

.content-animating .detail-badge-cat,
.content-animating .detail-title,
.content-animating .detail-content-text {
    animation: contentFadeSlideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.content-animating .detail-badge-cat { animation-delay: 0.05s; }
.content-animating .detail-title { animation-delay: 0.15s; }
.content-animating .detail-content-text { animation-delay: 0.25s; }

.content-hiding .detail-badge-cat,
.content-hiding .detail-title,
.content-hiding .detail-content-text {
    animation: contentFadeSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
    .orbital-wrapper {
        flex-direction: column;
        gap: 2.5rem;
        transform: none;
    }

    .orbital-wrapper.has-active {
        transform: none;
    }

    .connection-line {
        width: 2px;
        height: 0;
        transform: translateX(-50%);
        background: linear-gradient(180deg, rgba(107, 33, 214, 0.8), rgba(26, 111, 232, 0.8));
    }

    .orbital-node.is-docked .connection-line {
        width: 2px;
        height: 90px;
    }

    .orbital-detail {
        width: 100%;
        max-width: 500px;
        transform: translateY(10px) scale(0.97);
    }

    .orbital-detail.is-visible {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .orbital-section {
        padding: 4rem 1.25rem;
    }

    .orbital-stage {
        width: 320px;
        height: 320px;
    }

    .orbit-ring-1 {
        width: 264px;
        height: 264px;
    }

    .orbit-ring-2 {
        width: 178px;
        height: 178px;
    }

    .orbital-center {
        width: 56px;
        height: 56px;
    }

    .orbital-node.is-docked .connection-line {
        height: 70px;
    }

    .orbital-detail {
        max-width: 340px;
    }
}
