.mortgage-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
}

.mortgage-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-header h1 {
    color: var(--color3);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.mortgage-header p {
    color: var(--color3);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--color3);
    font-size: 1rem !important;
    font-weight: 400 !important;
    margin: 0 auto;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.form-section {
    border-radius: 15px;
}

.results-section {
    border-radius: 15px;
    position: sticky;
    top: 20px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.input-group.select-wrapper {
  position: relative;
}

.input-group.select-wrapper select {
  width: 100%;
  padding: 10px 40px 10px 12px; /* espacio a la derecha */
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: var(--color1);
  appearance: none;       /* quitar flecha nativa */
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* flecha personalizada */
.input-group.select-wrapper::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 73%;
  width: 8px;
  height: 8px;
  pointer-events: none;
  transform: translateY(-50%) rotate(-45deg);
  border-left: 2px solid var(--color3);
  border-bottom: 2px solid var(--color3);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color3);
    background: white;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.currency, .unit {
    position: absolute;
    right: 35px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color3);
    top: 27px;
}

.slider-container {
    margin-top: 15px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e8ed;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4ecdc4;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4ecdc4;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.percentage-display {
    margin-top: 10px;
    font-weight: 600;
    color: var(--color3);
}

.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #4ecdc4;
}

.radio-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.interest-type {
    margin-bottom: 15px;
}

select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #4ecdc4;
    background: white;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.results-header {
    display: flex;
    margin-bottom: 5px;
    background-color: rgba(0, 93, 104, 0.1);
    border-radius: 8px;
    padding: 5px;
    margin-top: 15px;
}

.results-header .tab{
    color: var(--color3);
}

.results-header-tipo {
    display: flex;
    margin-bottom: 20px;
    background-color: rgba(0, 93, 104, 0.1);
    border-radius: 8px;
    padding: 5px;
    margin-top: 15px;
}

.results-header-tipo .tab{
    color: var(--color3);
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.tab.active {
    background: white;
    color: var(--color3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cuota-display {
    margin-bottom: 30px;
    border-radius: 12px;
}

.cuota-label {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.cuota-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color3);
    margin-bottom: 10px;
}

.tin-display {
    color: #2c3e50;
    font-weight: 300;
}

.breakdown {
    margin-bottom: 25px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #cacaca;
}


.item-label {
    font-weight: 300;
    color: #2c3e50;
}

.item-value {
    font-weight: 700;
    color: var(--color3);
}

.visual-breakdown {
    margin-bottom: 25px;
}

.chart-container {
    background-color: rgba(0, 93, 104, 0.2);
    padding: 30px;
    border-radius: 10px;
}

.chart-bar {
    height: 30px;
    display: flex;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-segment {
    height: 100%;
    transition: all 0.5s ease;
}

.chart-segment.ahorro {
    background-color: var(--color3);
}

.chart-segment.financiar {
    background-color: #27E8FF;
}

.chart-segment.gastos {
    background-color: var(--color1);
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
}

.chart-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--color3);
}

.chart-label::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.chart-label.ahorro::before {
    background-color: var(--color3);
}

.chart-label.financiar::before {
    background-color: #27E8FF;
}

.chart-label.gastos::before {
    background-color: var(--color1);
}

.additional-info {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.info-item {
    margin-bottom: 8px;
    color: #2c3e50;
}

.action-button {
    text-align: center;
    margin-bottom: 20px;
    background-color: rgba(0, 93, 104, 0.2);
    padding: 30px;
    border-radius: 10px;
}

.cta-button {
    background-color: var(--color3);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    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:hover {
    transform: translateY(-2px);
    background-color: var(--color1);
}

.help-text {
    font-size: 0.9rem;
    margin: 0;
}

.textollamada {
    font-size: 0.9rem;
}

.titulollamada {
    font-size: 1.1em;
    font-weight: 800;
    margin-bottom: calc(var(--tamanio-base) * 0.5rem);
}

.amortization-link {
    text-align: center;
}

.amortization-link a {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.amortization-link a:hover {
    color: #44a08d;
    text-decoration: underline;
}

.amortization-table {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.amortization-table h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.amortization-table table {
    width: 100%;
    border-collapse: collapse;
}

.amortization-table th, 
.amortization-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e1e8ed;
}

.amortization-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.close-table {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-table:hover {
    background: #c0392b;
}

.disclaimer {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color3);
    margin-bottom: calc(var(--tamanio-base) * 1rem);
}

.disclaimer p{
    line-height: normal;
    font-size: 1em;
    margin-bottom: 0px;
}

.disclaimer img{
    width: 40px; 
    vertical-align: middle; 
    margin-right: 8px;
}

.slider-container input[type="range"]{
    background-color: rgba(0, 93, 104, 0.2);
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--color3);
    cursor: pointer;
}

.slider-labels span{
    color: rgba(0, 93, 104, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .results-section {
        position: static;
    }
    
    .mortgage-header h1 {
        font-size: 2rem;
    }
    
    .cuota-amount {
        font-size: 2rem;
    }
    
    .mortgage-calculator-container {
        padding: 15px;
        margin: 10px;
    }
    
    .form-section, .results-section {
        padding: 20px;
    }
}

