/* ================================
   CALCULADORA DE PRÉSTAMOS - CSS COMPLETO
   Optimizado con gradientes modernos y animaciones
   ================================ */

/* 1. RESET & GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --gradient-info: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. HEADER & NAVIGATION */
header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e6e9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header h1:hover {
    transform: scale(1.05);
}

header a {
    color: white;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 3. LANGUAGE SWITCHER MEJORADO */
.language-switcher {
    display: flex;
    gap: 4px;
    background: white;
    padding: 4px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.5em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.lang-btn.lang-active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    gap: 8px;
}

.lang-btn span {
    font-size: 0.55em;
    font-weight: 600;
    color: var(--text-dark);
}

.lang-btn.lang-active span {
    color: white;
}

/* 4. MAIN CONTENT LAYOUT */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. CONTENT PAGES */
.content-page {
    max-width: 900px;
    margin: 0 auto;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.content-page h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.content-page ul, .content-page ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.back-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.back-link::before {
    content: "←";
    font-size: 1.2em;
}

/* 6. HOMEPAGE GRID */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.calc-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-card:hover::before {
    transform: scaleX(1);
}

.calc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: #667eea;
}

.calc-card.active {
    border-color: #667eea;
}

.calc-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.calc-card.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.calc-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.calc-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.calc-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.calc-link {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.calc-link:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.calc-link.disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #fbbf24;
    color: #78350f;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* 7. FEATURES SECTION */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* 8. ADSENSE CONTAINERS */
.adsense-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-placeholder {
    color: #6c757d;
    font-size: 1.1rem;
}

/* 9. TAB NAVIGATION */
.tab-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: linear-gradient(to top, rgba(102, 126, 234, 0.1), transparent);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* 10. CALCULATOR FORM */
.calculator-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-calculate {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
}

.btn-calculate:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate:active {
    transform: translateY(-1px);
}

/* 11. RESULTS & CARDS */
.results-section {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.results-section.show {
    display: block;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border-left: 5px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:nth-child(1) {
    border-left-color: #667eea;
}

.result-card:nth-child(2) {
    border-left-color: #f56565;
}

.result-card:nth-child(3) {
    border-left-color: #48bb78;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.result-card h3 {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-card .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* 12. CHARTS & GRAPHICS */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    text-align: center;
}

.chart-container h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.chart-wrapper {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

#loanChart {
    max-height: 300px;
}

/* 13. AMORTIZATION TABLE */
.table-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
}

.btn-print {
    padding: 0.7rem 1.5rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.table-wrapper {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.amortization-table thead {
    position: sticky;
    top: 0;
    background: var(--gradient-primary);
    color: white;
    z-index: 10;
}

.amortization-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.amortization-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.amortization-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.amortization-table td {
    padding: 0.9rem 1rem;
    color: var(--text-dark);
}

.amortization-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.amortization-table tbody tr:nth-child(even):hover {
    background: rgba(102, 126, 234, 0.08);
}

/* 14. BREADCRUMBS */
.breadcrumb {
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* 15. INFO SECTION */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.info-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 16. RELATED TOOLS */
.related-tools {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.related-tools h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-link {
    display: block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.tool-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--primary-color);
    color: white;
}

/* 17. CONTACT BOX & FAQ */
.contact-box {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
}

.contact-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-box p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-contact {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* 18. FOOTER */
footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #e2e8f0;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

/* 19. COOKIE CONSENT BANNER */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    min-width: 300px;
    margin: 0;
    line-height: 1.6;
}

.cookie-content a {
    color: #90cdf4;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.cookie-accept {
    background: var(--gradient-success);
    color: white;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.cookie-decline {
    background: #4a5568;
    color: white;
}

.cookie-decline:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

/* 20. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    nav a {
        width: 100%;
        text-align: center;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .calculators-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }

    .table-wrapper {
        max-height: 400px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
    }

    .content-page h1 {
        font-size: 2rem;
    }

    .content-page h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 1.5rem;
    }

    .calculator-form {
        padding: 1.5rem;
    }

    .result-card .amount {
        font-size: 1.5rem;
    }

    .amortization-table {
        font-size: 0.85rem;
    }

    .amortization-table th,
    .amortization-table td {
        padding: 0.7rem 0.5rem;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    header, footer, .adsense-container, .btn-print, .cookie-consent, .back-link {
        display: none !important;
    }

    body {
        background: white;
    }

    section {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .table-wrapper {
        max-height: none;
        overflow: visible;
    }
}

/* Additional Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }
.visible { display: block; }

/* ================================
   21. NUEVOS ESTILOS PARA LAS 6 CALCULADORAS
   ================================ */

/* Para consolidación de deudas: input dinámico */
.debt-list {
    margin: 20px 0;
}

.debt-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.debt-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.debt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debt-item-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.remove-debt-btn {
    background: #f56565;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.remove-debt-btn:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

.add-debt-btn {
    background: #48bb78;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    width: 100%;
    margin-top: 10px;
}

.add-debt-btn:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Para comparaciones (consolidación, refinancing) */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.comparison-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparison-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.comparison-card.before {
    border-color: #f56565;
    background: rgba(245, 101, 101, 0.02);
}

.comparison-card.after {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.02);
}

.comparison-card.winner {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.05);
    box-shadow: 0 0 20px rgba(72, 187, 120, 0.2);
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-item:last-child {
    border-bottom: none;
}

.comparison-label {
    color: var(--text-light);
    font-weight: 500;
}

.comparison-value {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Para alertas/warnings */
.alert-box {
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    animation: fadeInUp 0.5s ease;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border: 2px solid #48bb78;
    color: #276749;
}

.alert-success::before {
    content: "✓ ";
    font-size: 1.2em;
    margin-right: 8px;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid #fbbf24;
    color: #92400e;
}

.alert-warning::before {
    content: "⚠️ ";
    font-size: 1.2em;
    margin-right: 8px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    color: #991b1b;
}

.alert-danger::before {
    content: "⚠ ";
    font-size: 1.2em;
    margin-right: 8px;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border: 2px solid #4299e1;
    color: #1e40af;
}

.alert-info::before {
    content: "ℹ️ ";
    font-size: 1.2em;
    margin-right: 8px;
}

/* Related grid mejorado */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.related-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
}

.related-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Savings progress bar */
.progress-bar-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 30px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-success);
    border-radius: 10px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* Projection table for investments */
.projection-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.projection-table th,
.projection-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.projection-table th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
}

.projection-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Cashflow indicator */
.cashflow-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 20px 0;
}

.cashflow-indicator.positive {
    background: rgba(72, 187, 120, 0.1);
    border: 2px solid #48bb78;
    color: #276749;
}

.cashflow-indicator.negative {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    color: #991b1b;
}

.cashflow-icon {
    font-size: 2rem;
}

/* Break-even point display */
.break-even-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

.break-even-box h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.break-even-box .value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.break-even-box p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Calculator card responsive */
.calculator-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

/* Input group for dynamic forms */
.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* Responsive adjustments for new components */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .break-even-box .value {
        font-size: 2rem;
    }
}
