/* ============================================
   CALCULADORAS - FINANZASDURAN
   ============================================ */

/* Hero Section */
.calculators-hero {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    padding: 90px 0 60px;
    text-align: center;
    color: white;
}

.calculators-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculators-hero .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    opacity: 0.95;
}

.calculators-hero .hero-description {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
}

/* Calculators Section */
.calculators-section {
    padding: 60px 0 100px;
    background: #f8f9fa;
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.tab-btn i {
    font-size: 1.5rem;
}

.tab-btn:hover {
    border-color: #d4af37;
    background: #fffdf7;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    border-color: #d4af37;
    color: #1a2332;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

/* Calculator Content */
.calculator-content {
    display: none;
}

.calculator-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Calculator Inputs */
.calculator-inputs {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.calculator-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a2332;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 0.95rem;
}

.input-group label i {
    color: #d4af37;
    margin-right: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a2332;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-suffix {
    position: absolute;
    right: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    pointer-events: none;
}

.input-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.input-help strong {
    color: #d4af37;
    font-weight: 600;
}

/* Tipo de Interés Selector */
.tipo-interes-selector {
    margin: 2rem 0;
}

.tipo-interes-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1rem;
}

.tipo-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.tipo-btn {
    padding: 0.875rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.tipo-btn:hover {
    border-color: #d4af37;
    background: #fffdf7;
}

.tipo-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    border-color: #d4af37;
    color: #1a2332;
}

.tipo-content {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.tipo-content.active {
    display: block;
}

.tipo-total {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    color: #2c3e50;
}

.tipo-total strong {
    color: #d4af37;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Columna única para tipos de interés */
.interes-solo-column {
    margin-top: 1.5rem;
}

/* Impacto del retraso (debajo del botón calcular) */
.impacto-retraso-bottom {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d9 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.impacto-retraso-header-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: #1a2332;
    margin-bottom: 1rem;
}

.impacto-retraso-header-compact i {
    color: #d4af37;
    font-size: 1.1rem;
}

/* Coste de retraso preview (debajo del input) */
.coste-retraso-preview {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.coste-retraso-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
}

.coste-retraso-content {
    flex: 1;
}

.coste-retraso-label {
    font-size: 0.9rem;
    color: #1a2332;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.coste-retraso-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.coste-retraso-note {
    display: block;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Calculate Button */
.btn-calculate {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a2332;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-calculate i {
    margin-right: 0.5rem;
}

/* Grid: Ingreso mínimo + Botones */
.ingreso-botones-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0 1rem 0;
}

.ingreso-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

/* Botones de acción en resultados */
.action-buttons-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-secondary-action {
    padding: 1rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a2332;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-outline-action {
    padding: 1rem;
    background: white;
    color: #1a2332;
    border: 2px solid #d4af37;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-secondary-action:hover,
.btn-outline-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.btn-outline-action:hover {
    background: #fffdf7;
}

/* Responsive */
@media (max-width: 900px) {
    .ingreso-botones-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Calculator Results */
.calculator-results {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.results-container {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.results-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a2332;
}

/* Result Highlight */
.result-highlight {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
}

.result-highlight .result-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-highlight .result-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a2332;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.result-item i {
    font-size: 1.75rem;
    color: #d4af37;
}

.result-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.result-value-sm {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a2332;
}

/* Alerts */
.alert-info,
.alert-success {
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.alert-info i,
.alert-success i {
    font-size: 1.5rem;
    margin-top: 0.125rem;
}

.alert-info i {
    color: #2196f3;
}

.alert-success i {
    color: #4caf50;
}

.alert-info strong,
.alert-success strong {
    color: #1a2332;
}

.alert-info small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Chart Container */
.chart-container {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.chart-container canvas {
    max-height: 600px;
    min-height: 500px;
}

/* Simulator Box */
.simulator-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.simulator-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a2332;
}

.simulator-box h4 i {
    color: #d4af37;
    margin-right: 0.5rem;
}

.simulator-grid {
    display: grid;
    gap: 1rem;
}

.simulator-item {
    padding: 1rem;
    background: white;
    border-radius: 10px;
}

.simulator-item strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 0.95rem;
}

.simulator-item > div {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.8;
}

.simulator-item > div strong {
    display: inline;
    color: #d4af37;
    font-weight: 700;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-top: 2rem;
}

.cta-box p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cta-box .cta-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.cta-box .btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a2332;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.cta-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.cta-box .btn i {
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-three-col-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .calculators-hero {
        padding: 100px 0 60px;
    }

    .calculators-hero .hero-title {
        font-size: 2rem;
    }

    .calculators-hero .hero-subtitle {
        font-size: 1.2rem;
    }

    .calculator-tabs {
        gap: 0.75rem;
    }

    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .tab-btn i {
        font-size: 1.25rem;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 1.5rem;
    }

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

    .result-highlight .result-value {
        font-size: 2rem;
    }

    .tipo-buttons {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calculators-hero .hero-title {
        font-size: 1.75rem;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn {
        padding: 0.875rem 1rem;
    }

    .result-highlight .result-value {
        font-size: 1.75rem;
    }
}

/* ============================================
   LAYOUT DE 3 COLUMNAS (NUEVO)
   Calculadora | Resultados | Gráfica
   ============================================ */

/* ============================================
   LAYOUT DE 2 COLUMNAS + GRÁFICA ABAJO (NUEVO)
   Calculadora | Resultados
   ─────────────────────────
         Gráfica (full width)
   ============================================ */

.calculator-three-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Columna 1: Calculadora (Inputs) */
.calc-column-inputs {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

/* Columna 2: Resultados */
.calc-column-results {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

/* Columna 3: Gráfica (ocupa todo el ancho abajo) */
.calc-column-chart {
    grid-column: 1 / -1; /* Ocupa ambas columnas */
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.calc-column-chart-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a2332;
    text-align: center;
}

.calc-column-chart-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Canvas para Chart.js */
.chart-canvas-container {
    position: relative;
    height: 500px; /* Aumentado de 400px a 500px para mejor visualización */
    margin-bottom: 1.5rem;
}

.chart-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Info Box dentro de la gráfica */
.chart-info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.chart-info-box i {
    color: #2196f3;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.chart-info-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1a2332;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.chart-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chart-info-list li {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #1a2332;
    padding: 0.375rem 0;
    border-bottom: 1px solid rgba(33, 150, 243, 0.1);
}

.chart-info-list li:last-child {
    border-bottom: none;
}

/* Guía de Líneas (Dinámica) */
.chart-legend-guide {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d9 100%);
    border: 2px solid #d4af37;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.chart-legend-guide h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-legend-guide h4 i {
    color: #d4af37;
}

.legend-items-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.legend-item-row {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.legend-item-row:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legend-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.legend-line-indicator {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-line-indicator.dashed {
    background: repeating-linear-gradient(
        to right,
        currentColor 0,
        currentColor 5px,
        transparent 5px,
        transparent 10px
    );
}

.legend-item-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.legend-item-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
    white-space: nowrap;
}

/* Título del punto clickeado */
.legend-point-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legend-point-title i {
    margin-right: 0.5rem;
}

.legend-back-link {
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.legend-back-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* Info extra del punto */
.legend-info-extra {
    background: #f0f4ff;
    border: 2px solid #667eea;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.legend-info-extra .info-item {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.legend-info-extra .info-item i {
    color: #667eea;
    margin-right: 0.5rem;
}

.legend-info-extra .info-item strong {
    color: #1a2332;
}

/* Responsive para la guía de líneas */
@media (max-width: 768px) {
    .legend-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .legend-item-left {
        width: 100%;
    }
    
    .legend-item-value {
        align-self: flex-end;
    }
}

/* Control de Inflación */
.inflation-control {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.inflation-control-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.inflation-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inflation-input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #1a2332;
}

.inflation-input-wrapper input:focus {
    outline: none;
    border-color: #d4af37;
}

.inflation-input-wrapper span {
    font-weight: 700;
    color: #d4af37;
    font-size: 1.1rem;
}

/* Leyenda de Inflación */
.inflation-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #2c3e50;
}

.legend-color {
    width: 30px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.nominal {
    background: #1a2332;
}

.legend-color.real {
    background: #e5c158;
    background-image: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.3) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.3) 75%);
    background-size: 8px 8px;
}

/* Responsive para 3 columnas */
@media (max-width: 1400px) {
    .calculator-three-col-layout {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .calc-column-chart {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .calculator-three-col-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calc-column-chart {
        grid-column: auto;
    }
    
    .chart-canvas-container {
        height: 300px;
    }
}

/* ============================================
   BOTONES EN FILA (CALCULAR + AMORTIZAR)
   ============================================ */

.buttons-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.buttons-row .btn {
    flex: 1;
    padding: 1.125rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: none;
    text-align: center;
}

.buttons-row .btn-calculate {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a2332;
}

.buttons-row .btn-secondary {
    background: white;
    color: #1a2332;
    border: 2px solid #d4af37;
}

.buttons-row .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.buttons-row .btn i {
    margin-right: 0.5rem;
}

/* Responsive botones */
@media (max-width: 768px) {
    .buttons-row {
        flex-direction: column;
    }
}

/* ============================================
   SECCIÓN DE AMORTIZACIÓN EXTRAORDINARIA
   ============================================ */

.amortizacion-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    border: 2px solid #e9ecef;
}

.amortizacion-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 0.5rem;
}

.amortizacion-intro {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.amortizacion-inputs {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.amortizacion-tipo-selector {
    margin: 1.5rem 0;
}

.amortizacion-tipo-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1rem;
}

.amortizacion-tipo-selector .tipo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* 3 botones en una fila */
.tipo-buttons-three {
    grid-template-columns: 1fr 1fr 1fr !important;
}

/* Campos Comunes: Rentabilidad y Retraso */
.campos-comunes-inversion {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #e0e0e0;
}

/* Sección de Impacto del Retraso */
.impacto-retraso-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d9 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.impacto-retraso-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.impacto-retraso-header i {
    color: #d4af37;
    font-size: 1.3rem;
}

.impacto-retraso-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0;
}

.impacto-retraso-intro {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.impacto-retraso-section .input-group {
    margin-bottom: 0;
}

.impacto-retraso-section .input-help {
    background: rgba(212, 175, 55, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
    display: block;
}

/* Resultados debajo de la gráfica */
#results-amortizacion-container {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

/* Resultados de Amortización */
.amortizacion-results {
    animation: slideIn 0.5s ease;
}

.results-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Comparación Antes vs Después */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.comparison-column {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.comparison-column.before {
    border-left: 4px solid #dc3545;
}

.comparison-column.after {
    border-left: 4px solid #28a745;
}

.comparison-header {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comparison-column.before .comparison-header {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.comparison-column.after .comparison-header {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.comparison-item:last-child {
    border-bottom: none;
}

.comparison-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.comparison-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
}

.comparison-value.highlight {
    color: #28a745;
}

/* Caja de Ahorro */
.ahorro-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    margin-bottom: 1rem;
}

.ahorro-icon {
    font-size: 3rem;
}

.ahorro-content {
    flex: 1;
}

.ahorro-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.ahorro-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Paneles de inversión (mensual/única) */
.amortizacion-panel {
    display: none;
}

.amortizacion-panel.active {
    display: block;
}

/* Sección de Retraso Simple (en inputs principales) */
.retraso-simple-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.retraso-simple-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.retraso-simple-title i {
    color: #ffc107;
}

.retraso-simple-intro {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-warning i {
    font-size: 1.5rem;
    color: #ff9800;
    margin-top: 0.2rem;
}

.alert-warning strong {
    color: #1a2332;
    display: block;
    margin-bottom: 0.25rem;
}

.alert-warning div {
    flex: 1;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Caja de intersección destacada */
.intersection-highlight {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.intersection-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.intersection-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 0.75rem;
}

.intersection-date {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.intersection-date strong {
    color: #1a2332;
    font-weight: 700;
}

.intersection-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2332;
    margin-top: 0.5rem;
}

/* Columnas: Inversión vs Deuda */
.comparison-column.investment {
    border-left: 4px solid #28a745;
}

.comparison-column.debt {
    border-left: 4px solid #dc3545;
}

.comparison-column.investment .comparison-header {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.comparison-column.debt .comparison-header {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.comparison-value.highlight.green {
    color: #28a745;
    font-size: 1.3rem;
}

.comparison-value.highlight.red {
    color: #dc3545;
    font-size: 1.3rem;
}

/* Caja de ahorro verde (libertad financiera) */
.ahorro-box.green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.ahorro-sublabel {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

/* Impacto del Retraso */
.impacto-retraso-container {
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.impacto-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2332;
    text-align: center;
    margin-bottom: 1.5rem;
}

.comparison-column.start-now {
    border-left: 4px solid #28a745;
}

.comparison-column.start-later {
    border-left: 4px solid #dc3545;
}

.comparison-column.start-now .comparison-header {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.comparison-column.start-later .comparison-header {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Caja de coste del retraso */
.coste-retraso-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    margin-top: 1.5rem;
}

.coste-icon {
    font-size: 3rem;
}

.coste-content {
    flex: 1;
}

.coste-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 0.5rem;
}

.coste-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.coste-sublabel {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Responsive para amortización */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .ahorro-box {
        flex-direction: column;
        text-align: center;
    }
    
    .amortizacion-tipo-selector .tipo-buttons {
        grid-template-columns: 1fr;
    }
}

