/* ============================================
   MODERN ROI SECTION
   ============================================ */

.roi-section {
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 50%, #f9fafb 100%);
}

.roi-section .section-header {
    margin-bottom: 2rem;
}

.roi-section .section-title {
    margin-bottom: 0.5rem;
}

.roi-section .section-description {
    margin-bottom: 0;
}

.roi-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.4;
}

.orb-roi-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -200px;
    right: -200px;
}

.orb-roi-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -150px;
    left: -150px;
}

.text-center {
    text-align: center;
}

/* Stats Grid */
.roi-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 1.5rem;
    position: relative;
}

.roi-stat-card {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.roi-stat-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.stat-glow {
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-2xl);
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.4s ease;
}

.roi-stat-card:hover .stat-glow {
    opacity: 0.4;
}

.stat-icon-wrapper {
    margin-bottom: 0.75rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    position: relative;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: inherit;
    filter: blur(10px);
    opacity: 0.5;
    z-index: -1;
}

.roi-stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(10deg);
}

.stat-content {
    width: 100%;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.stat-unit {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: block;
}

.stat-label {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.5;
}

/* ROI Calculator */
.roi-calculator {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    position: relative;
}

.roi-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.calculator-header {
    padding: 1.5rem 2rem 1.25rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calculator-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.calculator-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.calculator-body {
    padding: 1.5rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.calc-row:hover {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.highlight-row {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.highlight-row:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

.calc-label-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.calc-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calc-label {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-700);
}

.calc-value-box {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calc-value-box.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.calc-number {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--gray-900);
    font-variant-numeric: tabular-nums;
}

.highlight .calc-number {
    color: white;
}

.calc-unit {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-600);
}

.highlight .calc-unit {
    color: rgba(255, 255, 255, 0.9);
}

.calc-divider {
    text-align: center;
    margin: 1.5rem 0;
}

.divider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.calculator-result {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-top: 2px solid #86efac;
    text-align: center;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-lg);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    margin-bottom: 1rem;
}

.result-text {
    font-size: var(--font-size-lg);
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.result-text strong {
    color: #059669;
    font-weight: 800;
}

.calculator-cta {
    padding: 1.5rem 2rem;
    text-align: center;
    background: white;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .roi-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .roi-section {
        padding: 4rem 0;
    }

    .roi-stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 3rem 0;
    }

    .roi-stat-card {
        padding: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .calculator-header {
        padding: 2rem;
        flex-direction: column;
        text-align: center;
    }

    .calculator-title {
        font-size: var(--font-size-xl);
    }

    .calculator-body {
        padding: 2rem;
    }

    .calc-row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .calc-label-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .calculator-result {
        padding: 2rem;
    }

    .calculator-cta {
        padding: 1.5rem 2rem 2rem;
    }
}

@media (max-width: 480px) {
    .roi-stat-card {
        padding: 1.5rem;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .calculator-header {
        padding: 1.5rem;
    }

    .calculator-icon {
        width: 48px;
        height: 48px;
    }

    .calculator-icon svg {
        width: 24px;
        height: 24px;
    }

    .calculator-title {
        font-size: var(--font-size-lg);
    }

    .calculator-body {
        padding: 1.5rem;
    }

    .calc-row {
        padding: 1rem;
    }

    .calc-icon {
        font-size: 1.25rem;
        width: 40px;
        height: 40px;
    }

    .calc-label {
        font-size: var(--font-size-base);
    }

    .calc-number {
        font-size: 1.25rem;
    }

    .result-badge {
        font-size: var(--font-size-base);
        padding: 0.625rem 1.25rem;
    }

    .result-text {
        font-size: var(--font-size-base);
    }
}

/* Hover effects for interactive feel */
.roi-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.roi-stat-card:hover::after {
    opacity: 1;
}

/* Pulse animation for emphasis */
@keyframes pulse-soft {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    }
}

.roi-calculator {
    animation: pulse-soft 3s ease-in-out infinite;
}

.roi-calculator:hover {
    animation: none;
}
