/* ==========================================================================
   ROI CALCULATOR PAGE
   ========================================================================== */

   :root {
    --primary-blue: #0052cc;
    --hero-gradient: linear-gradient(135deg, #0061ff 0%, #0033aa 100%);
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning-bg: #fff7ed;
    --warning-text: #c2410c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
}

/* ==========================================================================
   GLOBAL RESET / BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-main);
    line-height: 1.7;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: underline;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section-padding {
    padding: 64px 0;
}

.section-spacing {
    margin-top: 32px;
}

.bg-light {
    background: var(--bg-light);
}

/* ==========================================================================
   HERO / BREADCRUMB
   ========================================================================== */

.hero {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 28px 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 0.92rem;
    opacity: 0.96;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.92);
}

.breadcrumb .current {
    color: rgba(255, 255, 255, 0.88);
}

.hero-content {
    max-width: 820px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.12;
    margin: 0 0 16px;
    color: var(--white);
}

.hero-lead {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 1.05rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #f8fbff;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

main .btn-secondary {
    color: var(--text-main);
    background: var(--white);
    border-color: var(--border-color);
}

main .btn-secondary:hover {
    background: var(--bg-light);
}

.button-row,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* ==========================================================================
   GENERIC CARDS / TYPOGRAPHY
   ========================================================================== */

.intro-strip {
    padding-top: 32px;
    padding-bottom: 0;
}

.section-card,
.calculator-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 28px;
}

.section-card h2,
.calculator-card h2 {
    margin: 0 0 14px;
    font-size: 1.72rem;
    line-height: 1.3;
    color: var(--text-main);
}

.section-card h3,
.calculator-card h3,
.section-card h4,
.calculator-card h4 {
    color: var(--text-main);
    margin-top: 0;
}

.section-card p:last-child,
.calculator-card p:last-child {
    margin-bottom: 0;
}


.mini-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white);
}

.dark-label {
    color: var(--text-muted);
}

/* ==========================================================================
   CALCULATOR LAYOUT
   ========================================================================== */

.calculator-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.card-heading h2 {
    margin-bottom: 8px;
    font-size: 1.55rem;
}

.card-heading p {
    margin: 0;
    color: var(--text-muted);
}

.card-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.mode-switch {
    display: inline-flex;
    gap: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.mode-btn {
    border: none;
    background: transparent;
    color: var(--text-main);
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.helper-strip {
    background: #f8fbff;
    border: 1px solid rgba(0, 82, 204, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.helper-strip p {
    margin: 0;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
}

.form-group small {
    color: var(--text-muted);
    line-height: 1.5;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.hidden-group {
    display: none;
}

.formula-summary {
    margin-top: 20px;
}

.formula-box {
    margin: 20px 0;
    background: #f8fbff;
    border: 1px solid rgba(0, 82, 204, 0.12);
    padding: 22px;
    border-radius: 12px;
    text-align: center;
}

.formula-box.compact {
    margin: 0;
    padding: 18px;
}

.formula-box p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.info-callout {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-callout.neutral {
    background: #f8fbff;
}

.info-callout.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(4, 120, 87, 0.18);
}

.info-callout.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: rgba(194, 65, 12, 0.18);
}

.info-callout.danger {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(185, 28, 28, 0.18);
}

.form-message {
    display: none;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.form-message.error {
    display: block;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(185, 28, 28, 0.18);
}

.form-message.success {
    display: block;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(4, 120, 87, 0.18);
}

/* ==========================================================================
   RESULTS
   ========================================================================== */

.results-placeholder {
    text-align: center;
    padding: 44px 18px;
}

.placeholder-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    font-size: 1.6rem;
}

.hidden {
    display: none !important;
}

.results-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.result-primary h3 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.1;
    margin: 8px 0 10px;
    color: var(--primary-blue);
}

.result-primary p {
    margin: 0;
    color: var(--text-muted);
}

.interpretation-badge {
    min-width: 158px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: right;
    background: var(--bg-light);
}

.interpretation-badge strong {
    display: block;
    margin-top: 8px;
    font-size: 1.2rem;
}

.interpretation-badge.positive {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(4, 120, 87, 0.18);
}

.interpretation-badge.negative {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(185, 28, 28, 0.18);
}

.interpretation-badge.moderate {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: rgba(194, 65, 12, 0.18);
}

.interpretation-badge.neutral {
    background: var(--bg-light);
    color: var(--text-main);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.result-tile {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.result-tile span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.result-tile strong {
    font-size: 1.18rem;
    color: var(--text-main);
}

.result-explainer {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fbfdff;
    padding: 18px;
    margin-top: 18px;
}

.result-explainer h4 {
    margin-bottom: 8px;
}

.result-explainer p {
    margin: 0;
    color: var(--text-muted);
}

/* ==========================================================================
   TABLES / LISTS / CONTENT BLOCKS
   ========================================================================== */

.table-wrap {
    overflow-x: auto;
    margin: 20px 0;
}

.info-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.info-table th {
    background: #f1f5f9;
    font-weight: 700;
}

.feature-list {
    margin: 18px 0;
    padding-left: 18px;
}

.feature-list li {
    margin-bottom: 10px;
}

.numbered-list {
    padding-left: 20px;
    margin: 18px 0;
}

.numbered-list li {
    margin-bottom: 10px;
}

.mini-cards {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.mini-cards.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
}

.mini-card h3 {
    font-size: 1.04rem;
    margin-bottom: 10px;
}

.comparison-grid,
.related-grid,
.warning-list {
    display: grid;
    gap: 16px;
}

.comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.comparison-card,
.warning-item,
.related-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
}

.comparison-card,
.warning-item {
    padding: 20px;
}

.warning-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.warning-item {
    background: #fffdfa;
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-card {
    display: block;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.related-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    color: var(--text-main);
}

.related-card p {
    margin: 0 0 14px;
    color: var(--text-muted);
}

.related-card span {
    color: var(--primary-blue);
    font-weight: 700;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.faq-question {
    width: 100%;
    border: none;
    background: var(--white);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 700;
    transition: var(--transition);
}

.faq-question:hover {
    background: #f8fbff;
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fcfdff;
}

.faq-answer p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--text-muted);
}

/* ==========================================================================
   CTA
   ========================================================================== */

.final-cta-card {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 34px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.final-cta-card h2 {
    color: var(--white);
    margin-bottom: 12px;
}

.final-cta-card p {
    max-width: 760px;
    margin: 0 auto 22px;
    color: rgba(255, 255, 255, 0.92);
}

.final-cta-card .hero-actions {
    justify-content: center;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
    .calculator-layout,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-cards.three-col,
    .warning-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .hero {
        padding: 24px 0 52px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-card,
    .calculator-card,
    .final-cta-card {
        padding: 22px;
    }

    .form-grid.two-col,
    .results-grid,
    .mini-cards.three-col,
    .related-grid,
    .warning-list {
        grid-template-columns: 1fr;
    }

    .results-top {
        flex-direction: column;
        align-items: stretch;
    }

    .interpretation-badge {
        text-align: left;
    }

    .button-row,
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .card-heading {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 14px;
    }

    .breadcrumb {
        font-size: 0.84rem;
    }

    .hero h1 {
        font-size: 1.95rem;
    }

    .section-card h2,
    .calculator-card h2 {
        font-size: 1.5rem;
    }

    .result-primary h3 {
        font-size: 2rem;
    }

    .mode-switch {
        display: grid;
        width: 100%;
    }
}