/* Mentor Circle Layout */
.mentor-circle-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 1;
    margin: 60px auto;
    border-radius: 50%;
}

/* On mobile, fallback to a grid */
@media (max-width: 768px) {
    .mentor-circle-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px 20px;
        aspect-ratio: unset;
        height: auto;
    }
}

.mentor-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;
    height: 35%;
    border-radius: 50%;
    overflow: visible;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mentor-hub-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 86, 179, 0.6);
    border: 5px solid #0056b3;
    transition: border-color 0.3s ease;
    background: #fff;
}

.mentor-hub-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mentor-hub:hover {
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 20;
}

.mentor-hub:hover .mentor-hub-img-wrapper {
    border-color: #e53935;
}

/* Tooltip for Hub */
.mentor-hub::after {
    content: attr(data-name);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.mentor-hub:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .mentor-hub {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 180px;
        height: 180px;
        margin-bottom: 20px;
        flex: 0 0 100%;
    }
    .mentor-hub img {
        margin: 0 auto;
        display: block;
        border-radius: 50%;
    }
}

.mentor-node {
    position: absolute;
    width: 22%;
    height: 22%;
    border-radius: 50%;
    overflow: visible;
    z-index: 15;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.mentor-node-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background: #fff;
    transition: border-color 0.3s ease;
}

.mentor-node-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mentor-node:hover {
    transform: scale(1.15);
    z-index: 20;
}

.mentor-node:hover .mentor-node-img-wrapper {
    border-color: #e53935;
}

/* Tooltip */
.mentor-node::after {
    content: attr(data-name);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.mentor-node:hover::after {
    opacity: 1;
}

/* Angles calculation for 8 nodes */
.mentor-1 { top: 0%; left: 39%; }
.mentor-2 { top: 11%; left: 66.5%; }
.mentor-3 { top: 39%; left: 78%; }
.mentor-4 { top: 66.5%; left: 66.5%; }
.mentor-5 { top: 78%; left: 39%; }
.mentor-6 { top: 66.5%; left: 11%; }
.mentor-7 { top: 39%; left: 0%; }
.mentor-8 { top: 11%; left: 11%; }

/* Connectors */
.mentor-connector {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 39%;
    height: 3px;
    background: linear-gradient(90deg, #0056b3 0%, transparent 100%);
    transform-origin: 0 50%;
    z-index: 5;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}
.conn-1 { transform: rotate(-90deg); }
.conn-2 { transform: rotate(-45deg); }
.conn-3 { transform: rotate(0deg); }
.conn-4 { transform: rotate(45deg); }
.conn-5 { transform: rotate(90deg); }
.conn-6 { transform: rotate(135deg); }
.conn-7 { transform: rotate(180deg); }
.conn-8 { transform: rotate(225deg); }

@media (max-width: 768px) {
    .mentor-circle-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 40px 15px;
        aspect-ratio: unset;
        height: auto;
        border-radius: 0;
        margin: 20px auto;
        padding: 10px;
    }
    
    .mentor-hub {
        position: relative;
        top: auto;
        left: auto;
        transform: none !important;
        width: 160px;
        height: 160px;
        margin-bottom: 30px;
        flex: 0 0 160px;
    }
    
    .mentor-hub:hover {
        transform: scale(1.15) !important;
    }

    .mentor-hub::after {
        opacity: 1;
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: transparent;
        color: #333;
        font-weight: bold;
        box-shadow: none;
        text-align: center;
        font-size: 0.8rem;
        white-space: normal;
        width: 150px;
        line-height: 1.2;
    }
    
    .mentor-node {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100px !important;
        height: 100px !important;
        flex: 0 0 100px;
    }
    
    .mentor-node::after {
        opacity: 1;
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: transparent;
        color: #333;
        font-weight: bold;
        box-shadow: none;
        text-align: center;
        font-size: 0.8rem;
        white-space: normal;
        width: 120px;
        line-height: 1.2;
    }
    
    .mentor-connector {
        display: none !important;
    }
}
