/**
 * Oportuna Services Widget Styles
 */

/* Main Wrapper & Sticky */
.oportuna-services-wrapper {
    position: relative;
    width: 100%;
}

.oportuna-services-wrapper--desktop {
    display: block;
}

.oportuna-services-container {
    background: rgb(2, 6, 23);
    color: rgb(255, 255, 255);
}

.oportuna-services-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oportuna-services-sticky .container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
}

.oportuna-services-sticky .container > div {
    width: 50%;
}

.oportuna-services-sticky .container > div:last-child {
    padding-left: 3rem;
}

.oportuna-services-mobile {
    display: none;
}

.oportuna-wheel {
    position: relative;
    width: 600px;
    height: 600px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.oportuna-wheel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7rem;
    height: 7rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
    transform: translate(-50%, -50%);
}

.oportuna-services-mobile-inner {
    max-width: 44rem;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.oportuna-services-cards-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

.oportuna-services-cards-card {
    height: 100%;
}

.oportuna-services-cards-subtitle {
    color: rgb(59, 130, 246);
}

.oportuna-services-cards-highlight {
    color: rgb(59, 130, 246);
}

.oportuna-services-cards .oportuna-services-mobile-card {
    transition: transform 500ms ease, box-shadow 500ms ease, border-color 250ms ease, background-color 250ms ease;
}

.oportuna-services-cards .oportuna-services-mobile-card::after {
    content: '';
    position: absolute;
    inset: -30% -40%;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.24), rgba(99, 102, 241, 0.0) 55%),
        radial-gradient(circle at 80% 40%, rgba(168, 85, 247, 0.18), rgba(168, 85, 247, 0.0) 55%),
        radial-gradient(circle at 50% 110%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.0) 60%);
    opacity: 0;
    transform: rotate(-8deg);
    transition: opacity 450ms ease;
    pointer-events: none;
}

.oportuna-services-cards .oportuna-services-mobile-icon {
    filter: none;
    opacity: 0.95;
}

.oportuna-services-cards .oportuna-services-mobile-link-icon {
    transition: transform 450ms ease, opacity 250ms ease;
}

.oportuna-services-cards .oportuna-services-mobile-cta {
    transition: transform 450ms ease, opacity 250ms ease;
}

@media (hover: hover) {
    .oportuna-services-cards .oportuna-services-mobile-card:hover {
        transform: translateY(-6px);
        border-color: rgba(99, 102, 241, 0.45);
        background: rgba(255, 255, 255, 0.075);
        box-shadow: 0 26px 70px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.18), 0 0 28px rgba(59, 130, 246, 0.18);
    }

    .oportuna-services-cards .oportuna-services-mobile-card:hover::before {
        opacity: 1;
    }

    .oportuna-services-cards .oportuna-services-mobile-card:hover::after {
        opacity: 1;
    }

    .oportuna-services-cards .oportuna-services-mobile-card:hover .oportuna-services-mobile-link-icon {
        opacity: 0.95;
        transform: translateX(3px);
    }

    .oportuna-services-cards .oportuna-services-mobile-card:hover .oportuna-services-mobile-cta {
        opacity: 1;
        transform: translateX(2px);
    }
}

.oportuna-services-mobile-card {
    display: block;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: inherit;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.oportuna-services-mobile-card:active {
    transform: translateY(1px) scale(0.99);
}

.oportuna-services-mobile-card::before {
    content: '';
    position: absolute;
    inset: -40% -60%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0));
    opacity: 0;
    transform: rotate(12deg);
    transition: opacity 350ms ease;
    pointer-events: none;
}

.oportuna-services-mobile-card:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.55);
    outline-offset: 3px;
}

.oportuna-services-mobile--animated .oportuna-services-mobile-card {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms ease, transform 600ms ease, border-color 250ms ease, background-color 250ms ease;
    transition-delay: var(--oportuna-delay, 0ms);
    will-change: transform, opacity;
}

.oportuna-services-mobile--animated .oportuna-services-mobile-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.oportuna-services-mobile--animated .oportuna-services-mobile-card.is-visible::before {
    opacity: 1;
}

.oportuna-services-mobile-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
}

@media (hover: hover) {
    .oportuna-services-mobile-card:hover {
        transform: translateY(-2px);
    }
}

.oportuna-services-mobile-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.oportuna-services-mobile-card-meta {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.oportuna-services-mobile-link-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex: 0 0 auto;
}

.oportuna-services-mobile-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    flex: 0 0 auto;
}

.oportuna-services-mobile-category {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.85;
}

.oportuna-services-mobile-title {
    font-size: 1.55rem;
    line-height: 1.15;
    margin: 0 0 0.6rem 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.oportuna-services-mobile-description {
    margin: 0;
    color: rgba(148, 163, 184, 1);
    line-height: 1.7;
    font-size: 1rem;
}

.oportuna-services-mobile-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
}

.oportuna-services-mobile-cta-icon {
    width: 18px;
    height: 18px;
}

@media (min-width: 420px) {
    .oportuna-services-mobile-title {
        font-size: 1.7rem;
    }
}

/* Wheel Styles */
.oportuna-wheel {
    transform-origin: center center;
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.05); /* Inner glow for depth */
}

.oportuna-wheel-item {
    transform-origin: center center;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 0 20px rgba(255, 255, 255, 0.05); /* Glass edge reflection */
}

/* Active State - Enhanced Glass Glow */
.oportuna-wheel-item.is-active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.3), /* Outer blue glow */
        inset 0 0 20px rgba(255, 255, 255, 0.2); /* Inner highlight */
    z-index: 10;
}

.oportuna-wheel-item.is-active .item-icon {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    transform: scale(1.3);
}

.oportuna-wheel-item.is-active .item-label {
    opacity: 1;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Content Transitions */
.oportuna-content-display {
    position: relative;
    min-height: 300px;
}

.oportuna-content-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 500ms ease, transform 500ms ease;
}

.oportuna-content-item.is-active {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Modern Typography Tweaks */
.oportuna-content-item h2 {
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .oportuna-services-wrapper--desktop {
        display: none;
    }

    .oportuna-services-mobile {
        display: block;
        background: rgb(2, 6, 23);
        color: rgb(255, 255, 255);
    }

    .oportuna-services-sticky {
        flex-direction: column;
        padding-top: 6rem;
    }
    
    .oportuna-wheel {
        width: 320px;
        height: 320px;
        margin-bottom: 3rem;
        background: rgba(255, 255, 255, 0.02); /* Lighter bg on mobile */
    }

    .oportuna-content-display {
        padding-left: 0;
        text-align: center;
        min-height: auto;
        padding-right: 1rem;
        padding-left: 1rem;
    }
    
    .oportuna-content-item p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .oportuna-content-item h2 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
}
