/* --- Interactive ROI Calculator Section --- */
.calculator-section {
    padding: 80px 0;
    background: transparent;
    /* Changed from fixed color to allow background bleed if needed, or keeping it strictly contained */
    position: relative;
    overflow: hidden;
    /* Prevent spillover */
    box-sizing: border-box;
}

.calculator-section * {
    box-sizing: border-box;
    /* Force box model */
}

.calc-container {
    max-width: 900px;
    width: 90%;
    /* Ensure it doesn't touch edges on mobile */
    margin: 0 auto;
    background: rgba(11, 35, 65, 0.8);
    /* Darker opacity for better text contrast if bg is weird */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.calc-header {
    text-align: center;
    margin-bottom: 40px;
}

/* Ensure headings don't break layout */
.calc-header h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    /* Responsive font size */
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.calc-header p {
    color: #a0aec0;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Wider min-width */
    gap: 30px;
    margin-bottom: 40px;
}

.input-group label {
    display: block;
    color: #e2e8f0;
    margin-bottom: 10px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    display: flex;
    /* Flexbox to keep input and symbol aligned */
    align-items: center;
}

.input-wrapper:focus-within {
    border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    padding-right: 30px;
    /* Space for symbol */
}

.currency-symbol {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    pointer-events: none;
}

/* Range Slider Styling */
input[type=range] {
    width: 100%;
    margin-top: 15px;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    /* Required for webkit */
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #00d2ff;
    cursor: pointer;
    margin-top: -8px;
    /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Firefox overrides */
input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: none;
    border-radius: 50%;
    background: #00d2ff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.results-display {
    background: linear-gradient(135deg, #0b2341 0%, #001a33 100%);
    border-radius: 20px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item h4 {
    color: #a0aec0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.result-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    /* Responsive text */
    font-weight: 800;
    color: #00d2ff;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    word-break: break-word;
    /* Prevent overflow */
}

.potential-badge {
    position: absolute;
    top: 20px;
    right: -65px;
    background: #ff4757;
    color: white;
    padding: 8px 0;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 200px;
    text-align: center;
    z-index: 5;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .calc-container {
        padding: 25px 20px;
    }

    .results-display {
        grid-template-columns: 1fr;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }
}