/* ==========================================================================
   Kidan Orbital Diagram Widget - Circular Layout with Overflow Support
   ========================================================================== */

/* Wrapper - Position relative to allow absolute positioning of content */
.kidan-orbital-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kidan-orbital-diagram {
    position: relative;
    margin: 0 auto;
    overflow: visible; /* Allow elements to overflow */
}

/* Orbital Path (Dotted Circle) */
.kidan-orbital-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Center Circle */
.kidan-orbital-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.kidan-orbital-center img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

/* Orbital Items */
.kidan-orbital-item {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
}

/* Item Circle */
.kidan-orbital-item-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kidan-orbital-item-circle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.kidan-orbital-item-circle img {
    object-fit: contain;
}

/* Labels */
.kidan-orbital-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
    z-index: 10;
}

/* Auto Label Positioning (Outside the circle) */
.kidan-orbital-label.label-auto {
    transform: translate(-50%, -50%);
}

/* Top Label */
.kidan-orbital-label.label-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 20px;
}

/* Right Label */
.kidan-orbital-label.label-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 20px;
    text-align: left;
}

/* Bottom Label */
.kidan-orbital-label.label-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 20px;
}

/* Left Label */
.kidan-orbital-label.label-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 20px;
    text-align: right;
}

/* Label Title */
.kidan-orbital-label-title {
    font-family: 'Gantari', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    color: #FFFFFF;
}

/* Label Description */
.kidan-orbital-label-desc {
    font-family: 'Gantari', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    max-width: 250px;
}

/* Arrow */
.kidan-orbital-arrow {
    position: absolute;
    pointer-events: none;
    z-index: 8;
}

/* Animations */
@keyframes kidan-orbital-float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

.kidan-orbital-item-circle {
    animation: kidan-orbital-float 3s ease-in-out infinite;
}

.kidan-orbital-item:nth-child(2) .kidan-orbital-item-circle {
    animation-delay: 0.5s;
}

.kidan-orbital-item:nth-child(3) .kidan-orbital-item-circle {
    animation-delay: 1s;
}

.kidan-orbital-item:nth-child(4) .kidan-orbital-item-circle {
    animation-delay: 1.5s;
}

.kidan-orbital-item:nth-child(5) .kidan-orbital-item-circle {
    animation-delay: 2s;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .kidan-orbital-diagram {
        transform: scale(0.8);
        transform-origin: center center;
    }
}

@media screen and (max-width: 768px) {
    .kidan-orbital-diagram {
        transform: scale(0.6);
    }

    .kidan-orbital-label-title {
        font-size: 16px;
    }

    .kidan-orbital-label-desc {
        font-size: 12px;
        max-width: 200px;
    }
}

@media screen and (max-width: 576px) {
    .kidan-orbital-diagram {
        transform: scale(0.5);
    }

    .kidan-orbital-label {
        display: none; /* Hide labels on very small screens */
    }
}

/* ==========================================================================
   Content Display Section - Floating/Overlay Mode
   ========================================================================== */

.kidan-orbital-content-display {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 500px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
}

.kidan-orbital-content-display.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
	max-width: 270px;
}

.kidan-content-arrow {
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: -20px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.kidan-content-arrow.show {
    opacity: 1;
    transform: translateX(0);
}

.kidan-orbital-content-item {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.kidan-orbital-content-item.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.kidan-orbital-content-image {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.kidan-orbital-content-item.active .kidan-orbital-content-image {
    opacity: 1;
    transform: scale(1);
}

.kidan-orbital-content-image img {
    display: block;
}

.kidan-orbital-content-title {
    font-family: 'Gantari', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.3;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.kidan-orbital-content-item.active .kidan-orbital-content-title {
    opacity: 1;
    transform: translateX(0);
}

.kidan-orbital-content-text {
    font-family: 'Gantari', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    margin: 0;
}

.kidan-orbital-content-item.active .kidan-orbital-content-text {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .kidan-orbital-content-title {
        font-size: 24px;
    }

    .kidan-orbital-content-text {
        font-size: 14px;
    }
}