/* Service Highlights Widget Styles */
.budi-service-highlights__wrapper {
    position: relative;
}

/* Background Pattern */
.budi-service-highlights__wrapper {
    position: relative;
}

.budi-service-highlights__wrapper>* {
    position: relative;
    z-index: 1;
}


/* Header Section */
.budi-service-highlights__header {
    margin-bottom: 60px;
}

.budi-service-highlights__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0B3753;
    margin-bottom: 20px;
    line-height: 1.2;
}

.budi-service-highlights__description {
    font-size: 1.1rem;
    color: #6D6C6C;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.budi-service-highlights__description a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.budi-service-highlights__description a:hover {
    color: #0056b3;
}

/* Cards Grid */
.budi-service-highlights__grid {
    margin-bottom: 60px;
}

.budi-service-highlights__cards-wrapper {
    min-height: 550px;
    margin: 0 auto;
    position: relative;
    max-width: 930px;
    width: 100%;
}

.budi-service-highlights__card-circle {
    position: absolute;
    top: 15px;
    right: 15px;
    animation: bounce 2s ease-in-out;
    animation-play-state: paused;
}

/* Individual Cards */
.budi-service-highlights__card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 30px 0px #0B37531A;
    border: 0px;
    position: absolute;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 180px;
}

.budi-service-highlights__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.budi-service-highlights__card.active {
    background: linear-gradient(220.26deg, #FFFFFF -57.35%, #0B3753 88.31%);
    color: #ffffff;
    /* transform: scale(1.05); */
}

/* Center Card (Larger) */
.budi-service-highlights__card--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px 25px;
    min-height: 180px;
    width: 200px;
    background: linear-gradient(135deg, #0B3753 0%, #1a4a6b 100%);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(11, 55, 83, 0.3);
    z-index: 2;
}

.budi-service-highlights__card--center:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(11, 55, 83, 0.4);
}

.budi-service-highlights__card--center.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    transform: scale(1.08);
}

/* Custom positioning styles - these will override the default nth-child positioning */
/* .budi-service-highlights__card[style*="top:"] {
    bottom: auto !important;
}

.budi-service-highlights__card[style*="left:"] {
    right: auto !important;
}

.budi-service-highlights__card[style*="right:"] {
    left: auto !important;
}

.budi-service-highlights__card[style*="bottom:"] {
    top: auto !important;
} */

/* Reset transform when custom positioning is used */
.budi-service-highlights__card[style*="top:"][style*="left:"] {
    transform: none !important;
}

.budi-service-highlights__card[style*="top:"][style*="right:"] {
    transform: none !important;
}

.budi-service-highlights__card[style*="bottom:"][style*="left:"] {
    transform: none !important;
}

.budi-service-highlights__card[style*="bottom:"][style*="right:"] {
    transform: none !important;
}

/* Card Icon */
.budi-service-highlights__card-icon {
    margin-bottom: 15px;
    position: relative;
    opacity: 0;
    animation: bounceIn 0.8s ease forwards;
    animation-play-state: paused;
}

.budi-service-highlights__icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* .budi-service-highlights__card:not(.budi-service-highlights__card--center) .budi-service-highlights__icon {
    filter: brightness(0) saturate(100%) invert(0.4);
} */

.budi-service-highlights__card.active .budi-service-highlights__icon {
    filter: brightness(0) saturate(100%) invert(1);
}

.budi-service-highlights__card .budi-service-highlights__card-circle svg {
    transition: all 0.3s ease;
}

.budi-service-highlights__card.active .budi-service-highlights__card-circle svg circle {
    stroke: #fff;
}

/* Circle animations - path coloring effect */
.budi-service-highlights__card-circle svg circle:nth-child(1) {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0.3;
    animation: drawCircle 0.3s ease-in-out forwards;
    animation-delay: 1s;
    animation-play-state: paused;
}

.budi-service-highlights__card-circle svg circle:nth-child(2) {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0.3;
    animation: drawCircle 0.3s ease-in-out forwards;
    animation-delay: 1.2s;
    animation-play-state: paused;
}

.budi-service-highlights__card-circle svg circle:nth-child(3) {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0.3;
    animation: drawCircle 0.3s ease-in-out forwards;
    animation-delay: 1.4s;
    animation-play-state: paused;
}

.budi-service-highlights__card--center .budi-service-highlights__icon {
    width: 60px;
    height: 60px;
}

/* Card Title */
.budi-service-highlights__card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    opacity: 0;
    animation: fadeInCustom 0.6s ease forwards;
    animation-delay: 0.2s;
    animation-play-state: paused;
}

.budi-service-highlights__card--center .budi-service-highlights__card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Content Section */
.budi-service-highlights__content {
    position: relative;
}

.budi-service-highlights__content-item {
    display: none;
    max-width: 900px;
    margin-inline: auto;
}

.budi-service-highlights__content-item.active {
    display: block;
}

.budi-service-highlights__content-wrapper {
    text-align: center;
    color: #6D6C6C;
    font-weight: 500;
    font-size: 26px;
    line-height: 1.6em;
}

.budi-service-highlights__content-wrapper span {
    color: var(--color-sub);
}

/* Animations */
@keyframes fadeInCustom {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* New animations for icon and title */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation delays for different cards */
.budi-service-highlights__card:nth-child(1) .budi-service-highlights__card-icon {
    animation-delay: 0.1s;
}

.budi-service-highlights__card:nth-child(1) .budi-service-highlights__card-title {
    animation-delay: 0.3s;
}

.budi-service-highlights__card:nth-child(2) .budi-service-highlights__card-icon {
    animation-delay: 0.2s;
}

.budi-service-highlights__card:nth-child(2) .budi-service-highlights__card-title {
    animation-delay: 0.4s;
}

.budi-service-highlights__card:nth-child(3) .budi-service-highlights__card-icon {
    animation-delay: 0.3s;
}

.budi-service-highlights__card:nth-child(3) .budi-service-highlights__card-title {
    animation-delay: 0.5s;
}

.budi-service-highlights__card:nth-child(4) .budi-service-highlights__card-icon {
    animation-delay: 0.4s;
}

.budi-service-highlights__card:nth-child(4) .budi-service-highlights__card-title {
    animation-delay: 0.6s;
}

.budi-service-highlights__card:nth-child(5) .budi-service-highlights__card-icon {
    animation-delay: 0.5s;
}

.budi-service-highlights__card:nth-child(5) .budi-service-highlights__card-title {
    animation-delay: 0.7s;
}

.budi-service-highlights__card:nth-child(6) .budi-service-highlights__card-icon {
    animation-delay: 0.6s;
}

.budi-service-highlights__card:nth-child(6) .budi-service-highlights__card-title {
    animation-delay: 0.8s;
}

.budi-service-highlights__card:nth-child(7) .budi-service-highlights__card-icon {
    animation-delay: 0.7s;
}

.budi-service-highlights__card:nth-child(7) .budi-service-highlights__card-title {
    animation-delay: 0.9s;
}

.budi-service-highlights__card:nth-child(8) .budi-service-highlights__card-icon {
    animation-delay: 0.8s;
}

.budi-service-highlights__card:nth-child(8) .budi-service-highlights__card-title {
    animation-delay: 1.0s;
}

/* Loading State */
.budi-service-highlights__wrapper.loading {
    pointer-events: none;
}

.budi-service-highlights__wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.1);
    }

    50% {
        transform: scale(0.9);
    }

    75% {
        transform: scale(1.05);
    }
}

@keyframes drawCircle {
    0% {
        stroke-dashoffset: 100;
        opacity: 0.3;
    }

    25% {
        stroke-dashoffset: 75;
        opacity: 0.5;
    }

    50% {
        stroke-dashoffset: 50;
        opacity: 0.7;
    }

    75% {
        stroke-dashoffset: 25;
        opacity: 0.9;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Animation trigger class */
.budi-service-highlights__wrapper.animate-on-scroll .budi-service-highlights__card-icon {
    animation-play-state: running;
}

.budi-service-highlights__wrapper.animate-on-scroll .budi-service-highlights__card-title {
    animation-play-state: running;
}

.budi-service-highlights__wrapper.animate-on-scroll .budi-service-highlights__card-circle {
    animation-play-state: running;
}

.budi-service-highlights__wrapper.animate-on-scroll .budi-service-highlights__card-circle svg circle {
    animation-play-state: running;
}

@media screen and (max-width: 809px) {
    .budi-service-highlights__cards-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .budi-service-highlights__card {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 120px !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }

    .budi-service-highlights__cards-wrapper>.budi-service-highlights__card:nth-child(3n) {
        grid-column: span 2;
    }

    .budi-service-highlights__card-icon{
        width: 45px !important;
        height: 45px !important;
    }

    .budi-service-highlights__card-title{
        font-size: 18px !important;
    }

    .budi-service-highlights__card-title{
        font-size: 22px;
        line-height: 1.4;
    }

    .budi-service-highlights__grid{
        margin-bottom: 40px;
    }
}