/**
 * Circular Services Block Widget Styles
 */

 .circular-services-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.circle-item-wrapper {
    /* Core shape properties */
    flex-basis: 20%;
    flex-shrink: 0;
    flex-grow: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: transparent;
    box-sizing: border-box;

    /* Default border (overridden by controls) */
    border: 3px solid #CBCBCB;
    
    /* Content alignment */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* * Padding is now controlled by the Elementor widget 
     * The 'padding: 20px;' rule has been REMOVED from here.
     */
    
    overflow: hidden;
}

.circle-item-content {
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.circle-heading {
    margin: 0 0 0.5em 0; /* em-based margin is fine */
    font-weight: bold;
    /* * Font-size is now controlled by Group Typography (base)
     * and the JS (dynamic shrinking).
     * The 'font-size: 1.25em;' rule has been REMOVED.
     */
}

.circle-description {
    margin: 0;
    /* * Font-size is now controlled by Group Typography (base)
     * and the JS (dynamic shrinking).
     * The 'font-size: 1em;' rule has been REMOVED.
     */
}

/* --- SVG Border for First Circle --- */
.circle-first-svg {
    /* Hide the regular border for first circle */
    border: none !important;
    /* Allow SVG to be fully visible without clipping */
    overflow: visible;
}

.circle-first-svg .circle-svg-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stays above the SVG border */
.circle-first-svg .circle-item-content {
    position: relative;
    z-index: 1;
}

/* --- Glowing Effect for Last Circle --- */
.circle-item-wrapper:last-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(56.39% 56.04% at 50% 50%, rgba(184, 255, 0, 0.70) 0%, rgba(255, 255, 255, 0.00) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stays above the glow */
.circle-item-wrapper:last-child .circle-item-content {
    position: relative;
    z-index: 1;
}


/* --- Mobile Viewport --- */
@media (max-width: 767px) {
    .circular-services-wrapper {
        flex-direction: column;
        align-items: center;
        /* Add padding-bottom to prevent overflow into next container */
        /* This accounts for negative margins and ensures proper spacing */
        padding-bottom: 75px;
        /* Add margin-bottom as additional safety */
        margin-bottom: 25px;
        /* Ensure proper containment - wrapper should contain all visual content */
        overflow: visible;
        position: relative;
        /* Ensure wrapper calculates height including negative margins */
        min-height: fit-content;
    }
    
    .circle-item-wrapper {
        flex-basis: auto;
        width: 70%;
        max-width: 300px;
        /* Ensure each circle maintains its own space */
        position: relative;
        /* Prevent circles from breaking out */
        flex-shrink: 0;
    }
    
    .circle-item-wrapper + .circle-item-wrapper {
        margin-left: 0;
    }
    
    /* Ensure last circle has proper spacing */
    .circle-item-wrapper:last-child {
        margin-bottom: 0;
    }
}