/* Features Section - Core Background */
.features-section {
    padding: 1.5rem 0 4rem 0;
    /* compact for in-hero placement */
    position: relative;
    overflow: visible;
    /* allow soft glows not to be cut */
    background: transparent !important;
    /* let hero gradient show through */
}

/* Ensure container elements are transparent */
.features-section .container,
.features-section .features-orbit-grid,
.features-section .features-circular-container,
.features-section .orbit-container,
.features-section .circular-features {
    background: transparent !important;
}

/* Normalize layout centering inside this section */
.features-section .container {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Features Section - Updated for new layout */
.features-section {
    padding: 0;
    /* remove padding for hero integration */
    position: relative;
    overflow: visible;
    background: transparent !important;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Features Content Container */
.features-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* reduced from 2rem to minimize empty space */
    width: 100%;
    max-width: 600px;
    /* increased from 500px to 600px to match larger grid */
    background: transparent !important;
    margin: 0 auto;
    /* ensure it's centered */
}

/* Make only the orbit column a perfect square with a visible outline */
.features-orbit-grid {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 600px;
    /* increased from 500px to 600px for larger grid */
    margin: -2rem auto 0 auto;
    /* shifted up by 2rem */
    outline: none;
    /* remove square grid outline */
    box-sizing: border-box;
}


/* Features Heading */
.features-heading {
    text-align: center;
    margin-bottom: 1rem;
    background: transparent !important;
}

.features-heading-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: #ffffff;
    margin: 0 0 1rem 0;
    text-shadow: none;
    /* remove blur effect */
    line-height: 1.1;
}

.features-heading-title .title-highlight {
    /* multi-colored refined gradient (teal → blue → violet → pink) */
    background: linear-gradient(135deg, #22D3EE 0%, #60A5FA 35%, #A78BFA 70%, #F472B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    /* crisp text */
}



/* Sliding Feature Wrapper - Contains arrows and container */
.sliding-feature-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem auto 0 auto;
}

/* Sliding Feature Boxes */
.sliding-feature-container {
    flex: 1;
    width: 100%;
    height: auto;
    /* allow height to grow with content */
    min-height: 120px;
    /* baseline height */
    position: relative;
    overflow-x: hidden;
    /* hide horizontal overflow for slide effect */
    overflow-y: hidden;
    /* hide vertical scrollbar */
    border-radius: 12px;
    background: transparent;
    /* no card background */
    /* Remove boundary line for sliding messages */
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.sliding-feature-track {
    display: flex;
    width: 100%;
    height: auto;
    /* let track height follow its tallest child */
    align-items: stretch;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sliding-feature-item {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    /* allow each slide to grow with its content */
    display: flex;
    align-items: center;
    /* center content vertically */
    justify-content: center;
    /* center content horizontally */
    padding: clamp(0.5rem, 2vw, 1rem);
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.9;
    transform: none;
    background: transparent;
    /* no card fill */
}

.sliding-feature-item.active {
    opacity: 1;
}

.sliding-feature-item:hover {
    opacity: 1;
}

.feature-icon {
    margin-right: 0;
    /* remove margin since icon is hidden */
    display: none !important;
    /* hide the entire icon container */
    align-items: center;
    justify-content: center;
}


.feature-content {
    flex: 1;
    color: white;
    text-align: center;
    /* center the text content */
}

.feature-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
    color: #F3F4F6;
    /* premium light */
    margin: 0 0 0.5rem 0;
    text-shadow: none;
    text-align: center;
    /* center the title */
}

.feature-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
    color: #D1D5DB;
    /* soft silver */
    opacity: 0.7;
    /* Reduced from 0.8 to avoid competing with hero text */
    line-height: 1.4;
    margin: 0;
    text-shadow: none;
    text-align: center;
    /* center the description */
}


/* Navigation Buttons - Positioned outside content */
.sliding-nav-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.sliding-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 1);
}

.sliding-nav-prev {
    order: 1;
}

.sliding-feature-container {
    order: 2;
}

.sliding-nav-next {
    order: 3;
}

/* Right Column - Circular Orbit Container */
.features-orbit-grid {
    display: flex;
    justify-content: center;
    /* horizontal center */
    align-items: center;
    /* vertical center */
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    background: transparent !important;
    overflow: visible;
    /* allow orbit to render outside without clipping */
}

/* Subtle square background image inside the orbit grid */
.features-orbit-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/brain.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    /* reduced back to 60% to fit better in square */
    opacity: 0.95;
    filter:
        drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 20px rgba(59, 130, 246, 0.22));
    /* Reduced glow by ~10% for enterprise calm */
    mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: scale(1.02);
    /* subtle pop-up effect */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Ensure the orbit container remains perfectly centered and ignores inline left/top/transform */
#orbit-features {
    position: relative;
    margin: 0 auto;
    max-width: 588px;
    /* keeps it from overflowing */
    width: 100%;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}


/* Circular Features Container */
.features-circular-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    /* always a perfect square */
    width: 100%;
    max-width: 600px;
    /* increased from 420px to better utilize space */
    margin: 0 auto;
    background: transparent;
    z-index: 2;
    overflow: hidden;
    /* prevent extra space highlight from flex children */
}

/* Allow overflow on small screens so circular-features can expand */
@media (max-width: 768px) {
    .features-circular-container {
        overflow: visible !important;
    }

    .orbit-container {
        overflow: visible !important;
    }
}

/* Animated Orbit Container */
.orbit-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    /* always a perfect square */
    width: 100%;
    max-width: 600px;
    /* increased from 420px to better utilize space */
    margin: 0 auto;
    background: transparent;
    /* Ensure stable center point for orbit */
    transform-style: preserve-3d;
    overflow: visible !important;
    /* Prevent cropping */
}

.orbit-ring {
    position: absolute;
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    animation: rotate 60s linear infinite;
    pointer-events: none;
    display: none;
    /* Hide orbit lines */
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.3),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.orbit-ring-1 {
    width: 550px;
    /* increased to match larger square */
    height: 550px;
    animation-duration: 80s;
    animation-direction: normal;
}

.orbit-ring-2 {
    width: 650px;
    /* increased to match larger square */
    height: 650px;
    animation-duration: 100s;
    animation-direction: normal;
}

.orbit-ring-3 {
    width: 750px;
    /* increased to match larger square */
    height: 750px;
    animation-duration: 120s;
    animation-direction: normal;
}

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

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

/* Center Core Features */
.core-features-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
    /* Hide the center icon */
}

.core-feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(96, 165, 250, 0.5);
    border-radius: 50%;
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.2);
}

.core-feature-title {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
    color: #C4B5FD;
    /* soft violet, avoids yellow */
    margin: 0 0 0.5rem 0;
    text-shadow: none;
}

.core-feature-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
    color: #E5E7EB;
    /* refined silver */
    margin: 0;
    opacity: 0.8;
}

/* Circular Features Orbit */
.circular-features {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    /* ensure it always stays square */
    background: transparent;
    /* Keep orbit content perfectly centered */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Increase circular-features size on small screens */
@media (max-width: 768px) {
    .circular-features {
        width: 110% !important;
        height: 110% !important;
        min-width: 110%;
        min-height: 110%;
    }
}

@media (max-width: 480px) {
    .circular-features {
        width: 120% !important;
        height: 120% !important;
        min-width: 120%;
        min-height: 120%;
    }
}


.feature-orbit-card {
    position: absolute;
    width: var(--orbit-card-size, 120px);
    height: var(--orbit-card-size, 120px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    transition: all 0.4s ease;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        /* subtle depth */
        0 0 20px rgba(59, 130, 246, 0.15);
    /* soft blue aura */
}

/* Subtle inner highlight for glass depth */
.feature-orbit-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.15),
            transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.feature-orbit-card:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(96, 165, 250, 0.18);
    z-index: 5;
}

.orbit-card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
    /* sit above glow layers */
}

.orbit-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.orbit-title {
    font-size: 1.1rem;
    /* increased for larger cards */
    font-weight: 600;
    color: #FFFFFF;
    margin: 0;
    /* Improve legibility on light backgrounds */
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55);
    line-height: 1.2;
    text-align: center;
    position: relative;
    z-index: 2;
    /* Above the ::before highlight */
}


/* Mathematical Circular Positioning for Orbit Cards */
.feature-orbit-card {
    /* Ensure smooth circular motion and prevent scaling issues */
    will-change: transform, border-color, box-shadow, z-index;
    transform-origin: center center;
    /* Positioning will be handled entirely by JavaScript */
    left: 0;
    top: 0;
    margin: 0;
}

.feature-orbit-card:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(96, 165, 250, 0.18);
    z-index: 5;
}



/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .feature-orbit-card {
        animation: none !important;
        transition: none !important;
    }

    .orbit-title {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    }
}

/* High contrast mode: avoid soft glows, keep crisp text */
@media (prefers-contrast: high) {
    .feature-orbit-card {
        box-shadow: none;
        background: #ffffff;
        border: 2px solid #000;
    }

    .orbit-title {
        color: #000;
        text-shadow: none;
    }
}

/* Orbit positioning will be handled by JavaScript for mathematical precision */



/* Responsive orbit adjustments */
@media (max-width: 768px) {
    .orbit-ring-1 {
        width: 300px;
        height: 300px;
    }

    .orbit-ring-2 {
        width: 350px;
        height: 350px;
    }

    .orbit-ring-3 {
        width: 400px;
        height: 400px;
    }

    .feature-orbit-card {
        width: 90px;
        height: 90px;
    }
}


/* Responsive Design for Circular Features */
@media (max-width: 1200px) {
    .features-heading-title {
        font-size: 3rem;
    }

    .core-feature-card {
        width: 160px;
        height: 160px;
    }

    .orbit-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {

    .features-heading-title {
        font-size: 2.5rem;
    }



    .sliding-feature-wrapper {
        max-width: min(460px, 92vw);
        gap: 0.5rem;
    }

    .sliding-feature-container {
        height: 96px;
        border-radius: 12px;
    }


    .feature-title {
        font-size: 1.4rem;
    }

    .feature-description {
        font-size: 1.15rem;
    }


    .sliding-nav-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .features-orbit-grid {
        order: 2;
        width: 90%;
        /* slightly smaller on mobile */
        max-width: 500px;
        /* increased from 420px to 500px for larger mobile grid */
        margin: 0 auto;
        /* center within parent */
    }

    .orbit-container {
        width: 90%;
        /* smaller on mobile */
        max-width: 500px;
        /* increased from 420px to 500px for larger mobile container */
    }

    /* Make orbit rings smaller on mobile */
    .orbit-ring-1 {
        width: 240px;
        height: 240px;
    }

    .orbit-ring-2 {
        width: 300px;
        height: 300px;
    }

    .orbit-ring-3 {
        width: 360px;
        height: 360px;
    }

    /* Arrows are now outside, no padding needed */

    .core-feature-card {
        width: 120px;
        height: 120px;
        padding: 1rem;
    }

    .core-feature-title {
        font-size: 1.5rem;
    }

    .core-feature-subtitle {
        font-size: 1rem;
    }

    .orbit-title {
        font-size: 0.8rem;
        /* adjusted for smaller cards */
    }

}

@media (max-width: 520px) {

    /* Stack hero layout vertically on very small screens */
    .hero-layout {
        flex-direction: column;
    }

    .hero-text-section,
    .features-section {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .features-heading-title {
        font-size: 2rem;
    }



    .sliding-feature-wrapper {
        max-width: 94vw;
        gap: 0.4rem;
    }

    .sliding-feature-container {
        height: 84px;
        border-radius: 10px;
    }


    .feature-title {
        font-size: 1.1rem;
    }

    .feature-description {
        font-size: 0.95rem;
    }


    .sliding-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .features-orbit-grid {
        width: 85%;
        /* even smaller on very small screens */
        max-width: 450px;
        /* increased from 380px to 450px for larger small screen grid */
        margin: 0 auto;
        overflow: visible;
    }

    .orbit-container {
        width: 85%;
        /* even smaller on very small screens */
        max-width: 450px;
        /* increased from 380px to 450px for larger small screen container */
    }

    /* Further reduce orbit size */
    .orbit-ring-1 {
        width: 200px;
        height: 200px;
    }

    .orbit-ring-2 {
        width: 260px;
        height: 260px;
    }

    .orbit-ring-3 {
        width: 320px;
        height: 320px;
    }

    /* Arrows are now outside, no padding needed */

    .core-feature-card {
        width: 100px;
        height: 100px;
        padding: 0.8rem;
    }

    .feature-orbit-card {
        width: 75px;
        height: 75px;
        /* Positioning handled by JavaScript */
    }

    .core-feature-title {
        font-size: 1.2rem;
    }

    .core-feature-subtitle {
        font-size: 0.9rem;
    }

    .orbit-title {
        font-size: 0.7rem;
        /* adjusted for smallest screens */
    }

}

/* --- Fix for orbit clipping on smaller screens --- */
@media (max-width: 768px) {

    .features-orbit-grid,
    .features-circular-container,
    .orbit-container {
        overflow: visible !important;
        aspect-ratio: auto !important;
        /* allow flexible height */
        min-height: 300px;
        /* reduced from 420px to minimize empty space */
        padding: 0;
        /* remove padding */
        margin: 0 auto;
        /* center only */
    }

    /* Reduce padding to eliminate empty space */
    .features-section {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Reduce gap between elements on mobile */
    .features-content {
        gap: 0.5rem !important;
    }

    /* Center the orbit fully inside screen width */
    #orbit-features {
        max-width: 95vw !important;
        margin: 0 auto;
    }

    /* circular-features size increased via media query above */

    /* Scale down orbit cards slightly to fit */
    .feature-orbit-card {
        width: 85px !important;
        height: 85px !important;
    }

}

/* Extra fine-tune for very small phones */
@media (max-width: 480px) {
    .features-circular-container {
        min-height: 200px !important;
        /* further reduced to minimize empty space */
        padding: 0 !important;
        /* remove all padding */
        margin: 0 auto !important;
        /* center only */
    }

    /* circular-features size increased via media query above */

    .feature-orbit-card {
        width: 75px !important;
        height: 75px !important;
    }

    /* Further reduce spacing on very small screens */
    .features-section {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }

    .features-content {
        gap: 0.25rem !important;
    }
}

/* Maintain proportional size on smaller screens */
@media (max-width: 768px) {

    .features-circular-container,
    .orbit-container {
        max-width: 450px;
        /* increased from 300px to better utilize space */
    }
}

@media (max-width: 480px) {

    .features-circular-container,
    .orbit-container {
        max-width: 350px;
        /* increased from 240px to better utilize space */
    }
}