/**
 * Core Layout & Container - Matching TMD Theme
 */
/* Colors matching TMD theme */
:root {
    /* Colors */
    --primary-color: #006ed1; /* --tmd-accent */
    --primary-hover: #005bb5; /* --tmd-accent-hover */
    --text-color: #444; /* --tmd-text */
    --text-light: #86868b; /* --tmd-gray */
    --border-color: #e0e0e0; /* --tmd-border */
    --error-color: #dc3545;
    --success-color: #28a745;
    --white: #fff; /* --tmd-white */
    --heading-color: #1d1d1f; /* --tmd-heading */
    --background-color: #f5f5f7; /* --tmd-primary */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --border-radius-sm: 5px;
    --border-radius-md: 8px; /* --tmd-radius */
    --border-radius-lg: 12px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Heading Sizes */
    --heading-xl: 2rem; /* 32px */
    --heading-lg: 1.5rem; /* 24px */
    --heading-md: 1.25rem; /* 20px */
    --heading-sm: 1.125rem; /* 18px */
    --heading-xs: 1rem; /* 16px */
}

/* Base Reset */
.calculator-container *,
.calculator-container *::before,
.calculator-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Container - Matching TMD Theme */
.calculator-container {
    width: 100%;
    max-width: 1000px !important;
    border: 1px solid var(--tmd-border);
    margin: 10rem auto;
    padding: 5rem;
    background: var(--background-color); /* --tmd-primary */
    border-radius: var(--border-radius-md);
}

/* Form Layout */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

/* Step Container */
.step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-normal),
        transform var(--transition-normal);
}

.step.active {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    opacity: 1;
    transform: translateY(0);
}

/**
 * Form Elements
 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    border: none;
    padding: 0;
    margin-top: var(--spacing-sm);
}

.form-label,
legend.form-label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9375rem;
    display: block;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Text Inputs & Textareas - Matching TMD Theme */
.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem 0.5rem 0.9rem; /* Matching TMD theme padding */
    font-size: 1rem; /* --font-base */
    line-height: 1.5;
    color: var(--text-color); /* --tmd-text */
    background: rgba(245, 245, 247, 0.85); /* Matching TMD theme background */
    border: 1.5px solid var(--border-color); /* --tmd-border, matching TMD theme */
    border-radius: var(--border-radius-md); /* --tmd-radius */
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; /* Matching TMD theme */
    outline: none;
    box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.02); /* Matching TMD theme shadow */
    margin-bottom: 0;
    box-sizing: border-box;
}

.form-control:hover {
    border-color: var(--primary-color); /* --tmd-accent */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color); /* --tmd-accent */
    background: #fff; /* Matching TMD theme focus background */
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.08); /* Matching TMD theme focus shadow */
    z-index: 1;
}

.form-control::placeholder {
    color: #999;
    opacity: 0.7;
}

/* Select Inputs */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
}

.radio-option,
.checkbox-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-sm);
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.05);
}

/* Custom Radio Buttons - Matching TMD Theme */
.radio-option input[type='radio'] {
    appearance: none;
    width: 1.25em; /* Matching TMD theme checkbox size */
    height: 1.25em;
    border: 2px solid var(--border-color); /* --tmd-border */
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    transition: border-color 0.22s, box-shadow 0.22s, background 0.22s; /* Matching TMD theme */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); /* Matching TMD theme checkbox shadow */
}

.radio-option input[type='radio']:checked {
    border-color: var(--primary-color); /* --tmd-accent */
    background-color: var(--white);
    box-shadow: inset 0 0 0 5px var(--primary-color); /* --tmd-accent */
}

.radio-option input[type='radio']:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18); /* Matching TMD theme focus */
}

/* Custom Checkboxes - Matching TMD Theme */
.checkbox-option input[type='checkbox'] {
    appearance: none;
    width: 1.25em; /* Matching TMD theme checkbox size */
    height: 1.25em;
    border: 2px solid var(--border-color); /* --tmd-border */
    border-radius: 12px; /* Matching TMD theme checkbox radius */
    margin: 0;
    cursor: pointer;
    transition: border-color 0.22s, box-shadow 0.22s, background 0.22s; /* Matching TMD theme */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); /* Matching TMD theme checkbox shadow */
    flex-shrink: 0;
    min-width: 1.25em;
    min-height: 1.25em;
}

.checkbox-option input[type='checkbox']:checked {
    border-color: var(--primary-color); /* --tmd-accent */
    background-color: var(--primary-color); /* --tmd-accent */
}

/* Checkbox checkmark (after checked) - Matching TMD Theme */
.checkbox-option input[type='checkbox']:checked::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.32em;
    height: 0.62em;
    border: solid #fff;
    border-width: 0 0.18em 0.18em 0;
    border-radius: 1px;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

/* Labels - Matching TMD Theme */
.radio-option label,
.checkbox-option label {
    font-size: 0.97rem; /* --font-sm */
    color: var(--text-light); /* --tmd-gray */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin-bottom: 0.35em;
    display: block;
    font-weight: 500;
}

/* Help Text */
.form-text {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: var(--spacing-xs);
}

/* Info Notes */
.info-note {
    background-color: rgba(74, 144, 226, 0.1);
    border-left: 1px solid var(--primary-color);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-color);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* Conditional Fields */
.conditional-field {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.conditional-field:not([hidden]) {
    max-height: 500px;
    opacity: 1;
    margin-top: var(--spacing-md);
}

.form-control:focus-visible,
input[type='radio']:focus-visible,
input[type='checkbox']:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

/**
 * Progress Bar & Step Indicators - Matching Digital Strategy Profiler
 */
.step-progress {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

/* Progress Bar - Matching DSP Style */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 0;
    flex: 1;
}

.progress-step-indicator {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem; /* Smaller numbering */
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
    z-index: 1;
}

.progress-step-active .progress-step-indicator {
    background: #006ed1; /* --tmd-accent */
    color: white;
    border-color: #006ed1; /* --tmd-accent */
    box-shadow: 0 0 0 3px rgba(0, 110, 209, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 3px rgba(0, 110, 209, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0, 110, 209, 0.4);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(0, 110, 209, 0.2);
        transform: scale(1);
    }
}

.progress-step-completed .progress-step-indicator {
    background: #005bb5; /* --tmd-accent-hover */
    color: white;
    border-color: #005bb5; /* --tmd-accent-hover */
}

/* Progress line between steps */
.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12.5px; /* Adjusted to 12.5px (half of 25px) */
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
    transform: translateX(12.5px); /* Adjusted to 12.5px */
}

.progress-step-completed:not(:last-child):after {
    background: #005bb5; /* --tmd-accent-hover */
}

/**
 * Buttons & Actions
 */
.button-group {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.6rem 1.8rem; /* Matching TMD theme button padding */
    border: none;
    border-radius: var(--border-radius-md); /* --tmd-radius */
    font-size: 1rem; /* --font-base */
    font-weight: 600; /* Matching TMD theme button weight */
    line-height: 1.1; /* Matching TMD theme button line-height */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; /* Matching TMD theme */
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 110, 225, 0.1); /* Matching TMD theme button shadow */
}

.btn-primary {
    background: var(--primary-color); /* --tmd-accent */
    color: var(--white);
    border: 2px solid var(--primary-color); /* --tmd-accent */
}

.btn-primary:hover {
    background: var(--primary-hover); /* --tmd-accent-hover */
    transform: translateY(-2px); /* Matching TMD theme button hover */
    box-shadow: 0 8px 24px rgba(0, 110, 225, 0.2); /* Matching TMD theme button hover shadow */
}

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

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

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-loading 0.8s linear infinite;
}

@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

/**
 * Tooltips & Validation States
 */

/* Tooltip Container */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: var(--spacing-sm);
    cursor: help;
    z-index: 10000; /* Ensure tooltip container is above progress bar */
}

/* Tooltip Icon */
.tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    position: relative;
}

.tooltip-icon {
    content: '?';
}

/* Tooltip Text */
.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 300px;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background: #333;
    color: var(--white);
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: var(--border-radius-sm);
    z-index: 9999; /* Increased z-index to ensure tooltips appear above all elements */
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
}

/* Tooltip Arrow */
.tooltip-text::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #333;
}

/* Show Tooltip */
.tooltip:hover .tooltip-text,
.tooltip:focus-within .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Form Validation States */
.form-control.is-invalid {
    border-color: var(--error-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

/* Error Messages */
.field-error {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--error-color);
    font-size: 0.875rem;
}

.field-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: var(--spacing-xs);
}

/* Radio & Checkbox Group Error Handling */
.radio-group .field-error,
.checkbox-group .field-error {
    margin-top: var(--spacing-sm);
    margin-left: var(--spacing-sm);
}

/* Form Error Message */
.form-error {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background: #fff3f3;
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius-sm);
    color: var(--error-color);
}

.form-error::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
}

/* Update heading styles */
h2.step-heading {
    font-size: var(--heading-md);
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Update fieldset styles to remove default borders */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Notifications */
.form-notification {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.form-notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-notification.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Communication Preferences - Consent Checkboxes */
.consent-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.consent-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.consent-option:hover {
    background: #fff;
    border-color: var(--primary-color);
}

/* Custom Checkbox Design */
.consent-option input[type='checkbox'] {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.consent-option input[type='checkbox']:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.consent-option input[type='checkbox']:hover {
    border-color: var(--primary-color);
}

.consent-option input[type='checkbox']:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(53, 72, 202, 0.1);
}

/* Checkbox Label */
.consent-option label {
    font-size: 0.9375rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1.4;
}

/* Error State */
.consent-option.has-error {
    border-color: var(--error-color);
    background: #fff3f3;
}

.consent-option.has-error input[type='checkbox'] {
    border-color: var(--error-color);
}

/* Error Message Position */
.consent-group .field-error {
    margin-top: var(--spacing-xs);
    margin-left: calc(22px + var(--spacing-md));
}

/* Update fieldset styles */
fieldset.form-group {
    border: none;
    padding: 0;
    margin: 0;
    margin-bottom: var(--spacing-md);
}

/* Notifications */
.form-notification {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.form-notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-notification.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Animation for notifications */
.form-notification {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/**
 * Grouped Media Queries
 */

/* Screen Size Breakpoints */
@media screen and (max-width: 840px) {
    .calculator-container {
        margin-left: var(--spacing-lg) !important;
        margin-right: var(--spacing-lg) !important;
        padding: var(--spacing-lg);
        border-radius: var(--border-radius-sm);
        width: auto;
        max-width: calc(100% - (var(--spacing-lg) * 2)) !important;
    }
}

@media screen and (max-width: 768px) {
    .form-control {
        padding: 0.625rem 0.875rem;
    }

    .radio-option,
    .checkbox-option {
        padding: var(--spacing-sm);
    }

    .tooltip-text {
        min-width: 160px;
        max-width: 260px;
    }

    .step-heading {
        font-size: var(--heading-md);
    }
}

@media screen and (max-width: 480px) {
    .calculator-container {
        margin-left: var(--spacing-md) !important;
        margin-right: var(--spacing-md) !important;
        margin-top: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-md);
        max-width: calc(100% - (var(--spacing-md) * 2)) !important;
    }

    .calculator-form {
        gap: var(--spacing-lg);
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .step-heading {
        font-size: var(--heading-sm);
    }
}

/* Print Styles */
@media print {
    .calculator-container {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .step:not(.active) {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .tooltip-icon {
        border: 1px solid currentColor;
    }

    .form-control.is-invalid,
    .form-control.is-valid {
        border: 2px solid currentColor;
    }

    .form-control,
    .radio-option input[type='radio'],
    .checkbox-option input[type='checkbox'] {
        border: 2px solid currentColor;
    }

    .btn {
        border: 1px solid currentColor;
    }
}

/* Touch Device Optimization */
@media (hover: none) {
    .tooltip-text {
        display: none;
    }

    .tooltip:active .tooltip-text {
        display: block;
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ================================
   Calculator Header Styles
================================ */
.calculator-header {
    text-align: start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.calculator-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.calculator-description {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.4;
    max-width: 600px;
    margin: 0;
}

/* ================================
   SEO Content Section
================================ */
.cost-calculator-seo-content {
    margin-top: 7rem;
    padding: 3rem 0;
    border-top: 1px solid #e0e0e0;
}

.seo-content-wrapper {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.seo-content-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.3;
}

.seo-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.seo-content-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.seo-content-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.seo-content-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.seo-content-benefits {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.benefits-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 0.75rem;
}

.benefits-list li {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.seo-content-cta {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

.cta-text {
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Responsive SEO Content */
@media (max-width: 699.98px) {
    .cost-calculator-seo-content {
        margin-top: 3rem;
        padding: 2rem 0;
    }

    .seo-content-wrapper {
        padding: 0 0.5rem;
    }

    .calculator-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .calculator-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .calculator-description {
        font-size: 1rem;
    }

    .seo-content-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: start;
    }

    .seo-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .seo-content-item {
        padding: 1.25rem;
    }

    .seo-content-benefits {
        padding: 1.5rem;
    }

    .benefits-title {
        text-align: start;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .benefits-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .seo-content-cta {
        padding: 1.5rem;
    }

    .cta-text {
        font-size: 1rem;
    }
}
