:root {
    --bg-page: #F8FAFC;
    --bg-hero-start: #F0FDFA;
    --bg-hero-end: #F1F5F9;
    --bg-card: #FFFFFF;
    --primary-accent: #0D9488;
    --primary-accent-light: #CCFBF1;
    --text-dark: #1E293B;
    --text-medium: #475569;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --error-bg: #FEF2F2;
    --error-text: #DC2626;
    --warning-bg: #FFFBEB;
    --warning-text: #B45309;
    --success-bg: #ECFDF5;
    --success-text: #065F46;
    --info-bg: #EFF6FF;
    --info-text: #1E40AF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-medium);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
    color: var(--text-dark);
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

h2.section-title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: 1.25rem;
}

h3.subsection-title {
    font-size: clamp(1rem, 3vw, 1.1rem);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation */
.navbar {
    background-color: var(--bg-card);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem clamp(0.75rem, 3vw, 1rem);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 32px;
    width: auto;
}

.brand-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* Navigation Toggle */
.nav-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Navigation Slider */
.nav-slider {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
}

.nav-slider.active {
    right: 0;
}

.slider-content {
    padding: 1.5rem;
    height: 100%;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.slider-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.slider-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-link {
    display: block;
    padding: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.slider-link:hover, .slider-link.active {
    background-color: var(--primary-accent-light);
    color: var(--primary-accent);
}

/* Overlay when slider is open */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Layout */
main {
    padding: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

.card {
    background-color: var(--bg-card);
    border-radius: 0.75rem;
    padding: clamp(0.75rem, 3vw, 1.25rem);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.main-card {
    border-top: 4px solid var(--primary-accent);
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    main {
        padding: 1rem;
    }
    .main-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 2rem;
    }
}

/* Form Styles */
.form-section {
    width: 100%;
    overflow: hidden;
}

.form-section label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8rem, 2.5vw, 0.875rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-section input,
.form-section select {
    width: 100%;
    max-width: 100%;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    background-color: var(--bg-page);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.form-section input:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px var(--primary-accent-light);
}

/* Debt Entry Styles */
#debt-entries {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

#debt-entries .debt-entry {
    background-color: var(--bg-page);
    padding: clamp(0.75rem, 2.5vw, 1rem);
    border-radius: 0.75rem;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.debt-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.remove-debt-btn {
    background: none;
    border: none;
    color: var(--error-text);
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.remove-debt-btn:hover {
    transform: scale(1.2);
}

.debt-entry-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    width: 100%;
}

.debt-entry-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .debt-entry-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(0.5rem, 2vw, 0.75rem);
    }
}

@media (min-width: 768px) {
    .debt-entry-grid {
        grid-template-columns: 1fr;
    }
}

.add-debt-button {
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-page);
    color: var(--primary-accent);
    border: 2px dashed var(--primary-accent);
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 0.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    box-sizing: border-box;
}

.add-debt-button:hover {
    background-color: var(--primary-accent-light);
    border-style: solid;
}

/* Strategy Selection */
.strategy-selection {
    margin-bottom: 1rem;
    width: 100%;
}

.strategy-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.strategy-option {
    display: flex;
    flex-direction: column;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 0.5rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.strategy-option:hover {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
}

.strategy-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.strategy-desc {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--text-medium);
    margin-top: 0.25rem;
}

/* Payment Section */
.payment-section {
    width: 100%;
    margin-bottom: 1rem;
}

.payment-section > div {
    margin-bottom: 1rem;
    width: 100%;
}

/* Calculate Button */
.calculate-button {
    width: 100%;
    max-width: 100%;
    background-color: var(--primary-accent);
    color: white;
    padding: clamp(0.75rem, 3vw, 1rem);
    border: none;
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.calculate-button:hover {
    background-color: #0b8378;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Results Display */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    margin-bottom: 1.5rem;
    width: 100%;
}

@media (min-width: 480px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.result-box {
    text-align: center;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    background-color: var(--bg-page);
    border-radius: 0.5rem;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.result-box:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-box.primary {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
}

.result-label {
    font-size: clamp(0.7rem, 2vw, 0.75rem);
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: clamp(0.875rem, 3vw, 1.25rem);
    font-weight: 700;
    color: var(--text-dark);
    word-wrap: break-word;
    line-height: 1.2;
}

/* Message Boxes */
.message-box {
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    width: 100%;
    box-sizing: border-box;
}

.message-box i {
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    word-wrap: break-word;
}

.error-box {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-text);
}

.warning-box {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-text);
}

.success-box {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-text);
}

.info-box {
    background-color: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-text);
}

/* Chart Styles */
.chart-container {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.chart-actions {
    display: flex;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    flex-wrap: wrap;
}

.chart-action-btn {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.5rem, 2vw, 0.75rem);
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.chart-action-btn i {
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
}

.chart-action-btn:hover {
    background: var(--primary-accent-light);
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

.chart-wrapper {
    border-radius: 0.5rem;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    height: clamp(200px, 40vw, 300px);
    max-height: 400px;
    background-color: white;
    border: 1px solid var(--border-color);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Payment Schedule */
.schedule-container {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

#payment-schedule {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    min-width: 300px;
}

#payment-schedule th,
#payment-schedule td {
    padding: clamp(0.375rem, 1.5vw, 0.5rem);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

#payment-schedule th {
    background-color: var(--bg-page);
    font-weight: 600;
    color: var(--text-dark);
    position: sticky;
    top: 0;
}

#payment-schedule tr:hover td {
    background-color: var(--primary-accent-light);
}

/* Minimum Payment Warning */
.min-payment-warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 0.5rem;
    font-size: clamp(0.7rem, 2vw, 0.75rem);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--warning-text);
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.min-payment-warning i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Content Sections */
.content-section {
    margin-top: 2rem;
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 992px) {
    .content-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.content-main, .content-sidebar {
    width: 100%;
    max-width: 100%;
}

.method-explanation {
    margin-bottom: 1.5rem;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    border-radius: 0.5rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.method-explanation h3 {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.method-explanation h3 i {
    color: var(--primary-accent);
}

.method-explanation p {
    margin-bottom: 0.5rem;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
}

.method-explanation ol {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.method-explanation ol li {
    margin-bottom: 0.5rem;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
}

.method-explanation strong {
    color: var(--text-dark);
}

.tips-list {
    list-style-type: none;
}

.tips-list li {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    position: relative;
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-accent);
    font-weight: bold;
}

.tips-list h3 {
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    margin-bottom: 0.25rem;
}

.tips-list p {
    font-size: clamp(0.75rem, 2vw, 0.8125rem);
    color: var(--text-medium);
}

/* FIXED FAQ STYLES - WORKING PROPERLY */
.faq-item {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-card);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
}

.faq-item.active {
    border-color: var(--primary-accent);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: clamp(1rem, 3vw, 1.25rem);
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    transition: all 0.3s ease;
    gap: 1rem;
}

.faq-question:hover {
    background-color: var(--primary-accent-light);
    color: var(--primary-accent);
}

.faq-question i {
    color: var(--primary-accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-page);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 clamp(1rem, 3vw, 1.25rem) clamp(1rem, 3vw, 1.25rem);
    margin: 0;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    color: var(--text-medium);
    line-height: 1.6;
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

/* Remove the problematic opacity transitions */
.faq-item.active .faq-answer p {
    opacity: 1;
    transform: translateY(0);
}

.success-story {
    margin-bottom: 1.25rem;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 0.5rem;
    background-color: var(--bg-page);
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.story-header i {
    font-size: 1.5rem;
    color: var(--primary-accent);
    flex-shrink: 0;
}

.story-header h3 {
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    margin-bottom: 0.125rem;
}

.story-meta {
    font-size: clamp(0.7rem, 1.8vw, 0.75rem);
    color: var(--text-light);
}

.success-story p {
    font-size: clamp(0.75rem, 2vw, 0.8125rem);
    font-style: italic;
    color: var(--text-medium);
}

/* Small Icons */
.small-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Hero Section */
.hero-section {
    padding: clamp(1.5rem, 5vw, 2.5rem) clamp(0.75rem, 3vw, 1rem) clamp(2rem, 5vw, 3.5rem);
    background-image: linear-gradient(120deg, var(--bg-hero-start), var(--bg-hero-end));
    position: relative;
    overflow: hidden;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(0.75rem, 3vw, 1rem);
}

.hero-text p {
    font-size: clamp(0.875rem, 3vw, 1.1rem);
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-accent);
    color: white;
    padding: clamp(0.625rem, 2.5vw, 0.75rem) clamp(1.25rem, 4vw, 1.75rem);
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(13, 148, 136, 0.1);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem clamp(0.75rem, 3vw, 1rem);
    margin-top: 2rem;
    background-color: var(--bg-hero-end);
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.footer .disclaimer {
    max-width: 600px;
    margin: 0.75rem auto;
    font-size: clamp(0.7rem, 2vw, 0.75rem);
    opacity: 0.8;
}

/* Extra small screens */
@media (max-width: 360px) {
    main {
        padding: 0.5rem;
    }
    
    .card {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .debt-entry {
        padding: 0.5rem;
    }
    
    .chart-wrapper {
        height: 160px;
        padding: 0.25rem;
    }
    
    .chart-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .chart-action-btn {
        justify-content: center;
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .result-box {
        padding: 0.5rem 0.25rem;
    }
    
    .hero-section {
        padding: 1rem 0.5rem 1.5rem;
    }
    
    .faq-question {
        padding: 0.75rem;
    }
    
    .faq-answer p {
        padding: 0 0.75rem 0.75rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .chart-wrapper {
        height: 140px;
    }
    
    .debt-entry-grid {
        gap: 0.5rem;
    }
    
    .strategy-options {
        gap: 0.5rem;
    }
    
    .method-explanation {
        padding: 0.5rem;
    }
    
    .faq-question {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Animations */
.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure all containers don't overflow */
.calculator-container,
.form-section,
.results-section,
.chart-container,
.schedule-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Fix input width issues on very small screens */
@media (max-width: 400px) {
    .form-section input,
    .form-section select,
    .add-debt-button,
    .calculate-button {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .debt-entry-grid > div {
        min-width: 0;
    }
    
    .strategy-option {
        min-width: 0;
    }
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 90%;
    width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--primary-accent);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background-color: var(--primary-accent);
    color: white;
    border: none;
}

.modal-btn-primary:hover {
    background-color: #0b8378;
}

.modal-btn-secondary {
    background-color: var(--bg-page);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background-color: #e2e8f0;
}

/* Simple Chart Container */
.simple-charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .simple-charts-container {
        grid-template-columns: 1fr 1fr;
    }
}

.simple-chart {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.simple-chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.simple-chart-wrapper {
    height: 200px;
    position: relative;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .main-card, .main-card * {
        visibility: visible;
    }
    .main-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
    }
    .chart-actions, .hero-section, .footer, .content-section {
        display: none;
    }
    .main-grid {
        display: block;
    }
    .form-section {
        display: none;
    }
    .results-section {
        width: 100%;
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.breadcrumb a {
    color: var(--primary-accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Schema.org structured data */
.ld-data {
    display: none;
}
/* Add this to your styles.css file */
.debt-types {
    color: #4a5568; /* Matching your existing text color */
    font-size: 0.9rem;
    margin: 8px 0 16px;
    padding: 8px 12px;
    background-color: #f7fafc; /* Light background */
    border-radius: 6px;
    display: inline-block;
    border-left: 3px solid var(--primary-accent); /* Using your accent color */
    font-weight: 500;
}

/* For the separator between debt types */
.debt-types::before {
    content: "✓ ";
    color: var(--primary-accent); /* Using your accent color */
    margin-right: 4px;
}

.debt-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.debt-types span {
    background-color: #edf2f7;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* If you want to add icons */
.debt-types .credit-cards::before {
    content: "💳 ";
}
.debt-types .personal-loans::before {
    content: "💰 ";
}
.debt-types .auto-loans::before {
    content: "🚗 ";
}
.debt-types .student-loans::before {
    content: "🎓 ";
}
.debt-types .mortgages::before {
    content: "🏠 ";
}
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0D9488;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.consolidation-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0fdfa;
    border-radius: 0.5rem;
    border: 1px solid #ccfbf1;
}

.lump-sum-section {
    margin-top: 1rem;
}

.paid-row {
    background-color: #f0fdfa;
}

.input-help {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.min-payment-warning.success {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #065f46;
}

.min-payment-warning.warning {
    background-color: #fffbeb;
    color: #b45309;
    border-color: #b45309;
}

/* Variable Payments Section */
.variable-payments-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

#variable-payments-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.variable-payment-entry {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    position: relative;
}

.variable-payment-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.variable-payment-row label {
    font-size: 0.75rem;
    color: #64748b;
}

.remove-variable-payment-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.remove-variable-payment-btn:hover {
    transform: scale(1.2);
}

.add-variable-payment-button {
    width: 100%;
    background-color: #f1f5f9;
    color: #0d9488;
    border: 2px dashed #0d9488;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.add-variable-payment-button:hover {
    background-color: #ccfbf1;
    border-style: solid;
}

/* Responsive adjustments for variable payments */
@media (max-width: 480px) {
    .variable-payment-entry {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .variable-payment-row {
        width: 100%;
    }
    
    .remove-variable-payment-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}
.tool-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
  }
  
  .tool-link {
    background-color: white;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
  }
  
  .tool-link:hover {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
  }
  
  .tool-link.active {
    background-color: var(--primary-accent);
    color: white;
    border-color: var(--primary-accent);
  }
  /* Tool Links - ADD THESE STYLES */
.tool-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  
  .tool-link {
    background-color: white;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
  }
  
  .tool-link:hover {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
  }
  
  .tool-link.active {
    background-color: var(--primary-accent);
    color: white;
    border-color: var(--primary-accent);
  }
  
  /* Tools Grid - ADD THESE STYLES */
  .tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .tool-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-page);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
  }
  
  .tool-card:hover {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
  }
  
  .tool-card.active {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
  }
  
  .tool-card i {
    font-size: 1.25rem;
    color: var(--primary-accent);
    margin-top: 0.125rem;
    flex-shrink: 0;
  }
  
  .tool-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  .tool-card p {
    font-size: 0.75rem;
    color: var(--text-medium);
    margin: 0;
  }
  
  /* Footer Links - ADD THESE STYLES */
  .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
  }
  
  .footer-links a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 500;
  }
  
  .footer-links a:hover {
    text-decoration: underline;
  }
  
  /* Responsive adjustments */
  @media (max-width: 480px) {
    .tool-links {
      flex-direction: column;
      align-items: center;
    }
    
    .footer-links {
      flex-direction: column;
      gap: 0.5rem;
    }
  }

/* Mobile Styles */
@media (max-width: 768px) {
  .nav-slider {
    width: 100%;
  }
}
.brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .brand-link:hover {
      text-decoration: none;
      color: inherit;
    }
  
  /* Related Tools Section */
  .related-tools-section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
    background-color: var(--bg-page);
  }
  
  .related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .related-tool-card {
    background-color: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
  }
  
  .related-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }
  
  .related-tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-accent);
    font-size: 1.5rem;
  }
  
  .related-tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
  }
  
  .related-tool-card p {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .related-tool-button {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid #28a745;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  }
  
  .related-tool-button:hover {
    background: linear-gradient(135deg, #218838, #28a745) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
    border-color: #218838;
    color: white !important;
    text-decoration: none !important;
  }
  
  .related-tool-button:focus {
    outline: none;
    text-decoration: none !important;
    color: white !important;
  }
  