.mortgage-amortization-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
}

.mortgage-amortization-header {
    position: relative !important;
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    height: auto;
    position: relative;
    z-index: 0 !important;
    background-color: rgba(0, 93, 104, 0.1);
}

.mortgage-amortization-title h1 {
    color: var(--color3);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.mortgage-amortization-title p {
    color: var(--color3);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.mortgage-amortization-percentage-display {
    margin-top: 10px;
    font-weight: 600;
    color: var(--color3);
}

.mortgage-amortization-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.mortgage-amortization-form {
    padding: 2rem;
    border-radius: 12px;
    padding-right: 0px;
    padding-left: 0px;
}

.mortgage-amortization-field {
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

/* Clases para mostrar/ocultar campos */
.mortgage-amortization-field-hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
    overflow: hidden;
    transform: translateY(-10px);
}

.mortgage-amortization-field-visible {
    opacity: 1;
    visibility: visible;
    height: auto;
    transform: translateY(0);
}

.mortgage-amortization-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.mortgage-amortization-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.mortgage-amortization-input-group input[type="number"] {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background-color: #fff;
}

.mortgage-amortization-input-group input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mortgage-amortization-currency {
    position: absolute;
    right: 1rem;
    color: #6b7280;
    font-weight: 600;
    pointer-events: none;
    right: 35px;
    top: 29px;
}

.mortgage-amortization-slider-container {
    margin-top: 1rem;
}

.mortgage-amortization-slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 93, 104, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.mortgage-amortization-slider-container input[type="range"]::-webkit-slider-thumb {
   -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--color3);
    cursor: pointer;
}

.mortgage-amortization-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.mortgage-amortization-slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mortgage-amortization-toggle-btn[aria-pressed="true"],
.mortgage-amortization-toggle-btn.mortgage-amortization-active {
  background: white;
  color: var(--color3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mortgage-amortization-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(0, 93, 104, 0.6);
}

.mortgage-amortization-radio-group {
    display: flex;
    gap: 10px;
    background-color: rgba(0, 93, 104, 0.1);
    border-radius: 8px;
    padding: 5px;
}

.mortgage-amortization-button-group {
    display: flex;
    gap: 10px;
    background-color: rgba(0, 93, 104, 0.1);
    border-radius: 8px;
    padding: 5px;
    margin-top: 12px;
    margin-bottom: 2rem;
}

.mortgage-amortization-toggle-btn.mortgage-expenses-active {
    background: white;
    color: var(--color3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mortgage-amortization-toggle-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--color3);
    border: none;
    background-color: transparent;
}

.mortgage-amortization-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.mortgage-amortization-radio:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.mortgage-amortization-radio-active {
    border-color: #3b82f6 !important;
    background-color: #f0f7ff !important;
}

.mortgage-amortization-radio input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #3b82f6;
}

.mortgage-amortization-radio input[type="radio"]:checked + span {
    color: #3b82f6;
    font-weight: 600;
}

.mortgage-amortization-euribor-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #f0f7ff;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.mortgage-amortization-euribor-info small {
    color: #374151;
    line-height: 1.4;
}

.mortgage-amortization-euribor-info span {
    font-weight: 600;
    color: #3b82f6;
}

.mortgage-amortization-calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mortgage-amortization-calculate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.mortgage-amortization-calculate-btn:active {
    transform: translateY(0);
}

.mortgage-amortization-results {
    padding: 2rem;
    border-radius: 12px;
    min-height: 400px;
    padding-left: 0px;
    padding-right: 0px;
}

.mortgage-amortization-results h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color3);
    margin-bottom: 0.2rem;
}

.mortgage-amortization-results > p {
    color: #64748b;
    margin-bottom: 2rem;
    font-weight: 500;
}

.mortgage-amortization-results-flex {
    display: flex;
    gap: 1rem;
    margin-bottom: 25px;
    justify-content: space-between;
}

.mortgage-amortization-amount{
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.mortgage-amortization-amount .fraction,
.mortgage-amortization-amount .currency,
.mortgage-amortization-amount .suffix{
  font-size: 1.4rem;
  opacity: .7;
  vertical-align: baseline;
  margin-left: .05em;
}
.mortgage-amortization-amount .currency {
    position: static;
    right: 30px;
    font-weight: 600;
    color: #374151;
    pointer-events: none;
    bottom: 14px;
}

.cta-button-info {
    background-color: var(--color3);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
    width: 100%;
    margin-bottom: 10px;
}

.cta-button-info:hover {
    transform: translateY(-2px);
    background-color: var(--color1);
}

.mortgage-amortization-result-card {
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
    width: 100%;
}

.mortgage-amortization-result-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color3);
    margin-bottom: 10px;
}

.mortgage-amortization-result-value {
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.mortgage-amortization-details span.tae{
    color: unset;
}
.mortgage-amortization-currency{
    color: var(--color3);
}

.mortgage-amortization-amount {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    display: inline-block;
    min-width: 200px;
    white-space: nowrap;
    font-weight: 400;
}
.mortgage-amortization-details{
    margin-bottom: 20px;
}

.mortgage-amortization-subtitle {
    color: var(--color3);
    font-size: 14px;
    font-weight: 500;
}

.mortgage-amortization-details p {
    margin: 0.5rem 0;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 400;
}

.mortgage-amortization-details span {
    font-weight: 400;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .mortgage-amortization-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .mortgage-amortization-container {
        padding: 1rem;
    }
    
    .mortgage-amortization-radio-group {
        grid-template-columns: 1fr;
    }
    
    .mortgage-amortization-header {
        flex-direction: column;
        text-align: center;
    }
    
    .mortgage-amortization-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .mortgage-amortization-title h2 {
        font-size: 1.5rem;
    }
    .mortgage-amortization-results-flex {
    display: flex;
    gap: 1rem;
    margin-bottom: 25px;
    justify-content: space-between;
    flex-direction: column;
}
}

.mortgage-amortization-amount .pretty-amount{
  display: inline-flex;
  align-items: flex-start; /* sube € y /mes con los decimales */
  line-height: 1;
  letter-spacing: 0;
}

/* Decimales pequeños y elevados */
.mortgage-amortization-amount .pretty-amount .fraction{
  font-size: 0.75em;
  margin-left: .12em;   /* donde iba la coma */
  opacity: .8;
  font-weight: 400;
}

/* € y /mes a la misma altura que los decimales */
.mortgage-amortization-amount .pretty-amount .currency{
  font-size: 0.70em;
  transform: translateY(-0.35em);
  opacity: .7;
  font-weight: 400;
  white-space: nowrap;
  color: var(--neutro2);
}
.mortgage-amortization-amount .pretty-amount .suffix{
  font-size: 0.70em;
  transform: translateY(-0.35em);
  opacity: .7;
  font-weight: 400;
  white-space: nowrap;
}
.cuota-plazo, .tiempo-ahorrado, #nueva-cuota, #reduccion-mensual{
    color: var(--color3);
    font-weight: 700 !important;
}