/* ROI Calculator */

.roi-hero {
    position: relative;
    background-image: url('../images/gradient1.jpg');
    background-size: cover;
    background-position: center center;
    border-radius: 2rem;
    padding: 3rem 2rem;
    max-width: 1450px;
    margin: 0.5rem auto 2rem;
    text-align: center;
}

.roi-hero h1 {
    font-family: mollen-bold, sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: #4D5D6E;
    margin-bottom: 0.75rem;
}

.roi-hero p {
    font-size: 1.1rem;
    line-height: 1.55;
    color: #4D5D6E;
    opacity: 0.92;
    max-width: 680px;
    margin: 0 auto 1rem;
}

.roi-hero-note {
    font-size: 0.92rem;
    opacity: 0.75;
    max-width: 620px;
}

.roi-section {
    padding: 0 0 3rem;
}

.roi-summary {
    background: #fff;
    border: 1px solid #DEE5EC;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(77, 93, 110, 0.08);
}

.roi-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.roi-summary-stat {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.roi-summary-stat--highlight {
    background: linear-gradient(180deg, #eef4fc 0%, #f8fafb 100%);
    border-radius: 0.75rem;
    border: 1px solid rgba(74, 124, 155, 0.2);
}

.roi-summary-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8391A1;
    margin-bottom: 0.35rem;
}

.roi-summary-value {
    font-family: mollen-bold, sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    color: #4D5D6E;
    line-height: 1.2;
}

.roi-summary-stat--highlight .roi-summary-value {
    color: #356580;
}

.roi-summary-sub {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #DEE5EC;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.roi-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.roi-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    background: #eef2f6;
    border-radius: 999px;
    border: 1px solid #DEE5EC;
}

.roi-tab {
    border: none;
    background: transparent;
    color: #4D5D6E;
    font-family: mollen-bold, sans-serif;
    font-size: 0.92rem;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.roi-tab.is-active {
    background: #fff;
    color: #000a10;
    box-shadow: 0 2px 8px rgba(77, 93, 110, 0.12);
}

.roi-reset-btn {
    border: 1px solid #DEE5EC;
    background: #fff;
    color: #4D5D6E;
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
    border-radius: var(--btn-radius, 0.5rem);
    cursor: pointer;
}

.roi-reset-btn:hover {
    background: #eef2f5;
}

.roi-panel-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
}

.roi-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.roi-input-group {
    background: #fff;
    border: 1px solid #DEE5EC;
    border-radius: 1rem;
    overflow: hidden;
}

.roi-input-group-title {
    font-family: mollen-bold, sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4D5D6E;
    background: #f4f6f9;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #DEE5EC;
    margin: 0;
}

.roi-field-list {
    padding: 0.5rem 0;
}

.roi-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.75rem 1.15rem;
    border-bottom: 1px solid #eef2f6;
}

.roi-field:last-child {
    border-bottom: none;
}

.roi-field-label {
    font-size: 0.92rem;
    color: #4D5D6E;
    line-height: 1.4;
}

.roi-field-hint {
    display: block;
    font-size: 0.78rem;
    color: #8391A1;
    margin-top: 0.15rem;
}

.roi-field-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 7.5rem;
}

.roi-field-input {
    width: 6.5rem;
    text-align: right;
    border: 1px solid #DEE5EC;
    border-radius: 0.45rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.92rem;
    color: #000a10;
    background: #f0f6fc;
}

.roi-field-input:focus {
    outline: 2px solid rgba(74, 124, 155, 0.35);
    border-color: #4a7c9b;
    background: #fff;
}

.roi-field-suffix {
    font-size: 0.82rem;
    color: #8391A1;
    min-width: 2rem;
}

.roi-field--fixed {
    background: #f8fafb;
}

.roi-field-fixed-value {
    font-family: mollen-bold, sans-serif;
    font-size: 0.92rem;
    color: #4D5D6E;
    white-space: nowrap;
}

.roi-results {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border: 1px solid #DEE5EC;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(77, 93, 110, 0.08);
}

.roi-results-header {
    background: linear-gradient(135deg, #4D5D6E 0%, #5a6d7e 100%);
    color: #fff;
    padding: 1.15rem 1.25rem;
}

.roi-results-header h2 {
    font-family: mollen-bold, sans-serif;
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
}

.roi-results-header p {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0;
}

.roi-results-body {
    padding: 0.5rem 0;
}

.roi-result-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #eef2f6;
}

.roi-result-row span:first-child {
    color: #4D5D6E;
    line-height: 1.4;
}

.roi-result-row span:last-child {
    font-family: mollen-bold, sans-serif;
    color: #356580;
    white-space: nowrap;
}

.roi-result-row--subhead {
    background: #f8fafb;
    font-family: mollen-bold, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8391A1;
}

.roi-result-row--subhead span:last-child {
    color: #8391A1;
}

.roi-result-row--total {
    background: #eef4fc;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.roi-result-row--total span:first-child {
    font-family: mollen-bold, sans-serif;
    font-size: 1rem;
}

.roi-result-row--total span:last-child {
    font-size: 1.35rem;
    color: #2d5a73;
}

.roi-investment {
    margin-top: 2rem;
    background: #fff;
    border: 1px solid #DEE5EC;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

.roi-investment h3 {
    font-family: mollen-bold, sans-serif;
    font-size: 1rem;
    color: #4D5D6E;
    margin-bottom: 1rem;
}

.roi-investment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 520px;
}

.roi-projection {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.roi-projection table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.roi-projection th,
.roi-projection td {
    padding: 0.65rem 0.85rem;
    text-align: right;
    border-bottom: 1px solid #eef2f6;
}

.roi-projection th:first-child,
.roi-projection td:first-child {
    text-align: left;
    color: #4D5D6E;
}

.roi-projection th {
    font-family: mollen-bold, sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8391A1;
    background: #f8fafb;
}

.roi-assumptions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #DEE5EC;
}

.roi-assumptions h2 {
    font-family: mollen-bold, sans-serif;
    font-size: 1.5rem;
    color: #4D5D6E;
    margin-bottom: 0.5rem;
}

.roi-assumptions-lead {
    color: #8391A1;
    font-size: 0.95rem;
    max-width: 720px;
    margin-bottom: 1.5rem;
}

.roi-assumption-block {
    margin-bottom: 1rem;
    border: 1px solid #DEE5EC;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.roi-assumption-block > summary {
    list-style: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: none;
    background: #f8fafb;
    font-family: mollen-bold, sans-serif;
    font-size: 0.95rem;
    color: #4D5D6E;
    text-align: left;
    cursor: pointer;
}

.roi-assumption-block > summary::-webkit-details-marker {
    display: none;
}

.roi-assumption-block > summary::after {
    content: "+";
    font-size: 1.25rem;
    color: #8391A1;
    flex-shrink: 0;
}

.roi-assumption-block[open] > summary::after {
    content: "−";
}

.roi-assumption-body {
    padding: 0 1.15rem 1rem;
}

.roi-assumption-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.roi-assumption-table th,
.roi-assumption-table td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eef2f6;
    line-height: 1.45;
}

.roi-assumption-table th {
    font-family: mollen-bold, sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8391A1;
}

.roi-disclaimer {
    margin-top: 1.5rem;
    padding: 1rem 1.15rem;
    background: #f8fafb;
    border-radius: 0.75rem;
    border: 1px solid #DEE5EC;
    font-size: 0.88rem;
    color: #8391A1;
    line-height: 1.55;
}

.roi-cta {
    text-align: center;
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
    border-radius: 1rem;
    border: 1px solid #DEE5EC;
}

.roi-cta h3 {
    font-family: mollen-bold, sans-serif;
    font-size: 1.35rem;
    color: #4D5D6E;
    margin-bottom: 0.5rem;
}

.roi-cta p {
    color: #8391A1;
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .roi-summary-grid,
    .roi-summary-sub {
        grid-template-columns: repeat(2, 1fr);
    }

    .roi-panel-layout {
        grid-template-columns: 1fr;
    }

    .roi-results {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .roi-hero {
        border-radius: 1rem;
        padding: 2rem 1.25rem;
    }

    .roi-summary-grid,
    .roi-summary-sub {
        grid-template-columns: 1fr;
    }

    .roi-field {
        grid-template-columns: 1fr;
    }

    .roi-field-input-wrap {
        justify-content: flex-start;
    }

    .roi-investment-grid {
        grid-template-columns: 1fr;
    }

    .roi-assumption-table {
        font-size: 0.8rem;
    }

    .roi-assumption-table thead {
        display: none;
    }

    .roi-assumption-table tr {
        display: block;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #eef2f6;
    }

    .roi-assumption-table td {
        display: block;
        border: none;
        padding: 0.2rem 0;
    }

    .roi-assumption-table td::before {
        content: attr(data-label);
        display: block;
        font-family: mollen-bold, sans-serif;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #8391A1;
        margin-bottom: 0.15rem;
    }
}
