/* Contenedor Principal */
.solar-calc-wrapper {
    background-color: #111827; /* Fondo oscuro profundo */
    color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Inter', -apple-system, sans-serif;
}

.solar-calc-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
}

/* Columna Izquierda: Input */
.calc-sidebar {
    flex: 1;
    background: #1f2937;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-label {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.amount-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffb800!important; /* Amarillo vibrante */
    margin: 0 0 20px 0;
}

/* Slider Personalizado */
#solar-slider {
    width: 100%;
    height: 8px;
    background: #374151;
    border-radius: 5px;
    outline: none;
    accent-color: #ffb800;
}

.range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #b0b2b6;
    margin-top: 10px;
}

.main-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.stat-item {
    background: #111827;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-item span {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f3f4f6;
}

.stat-item p {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 5px 0 0;
}

.enlace-cotizar {
    background: #78FB6A !important;
    color: #000 !important;
    border: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    width: 100%;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.2s;
}

.enlace-cotizar:visited {
    color: #000 !important;
}

.enlace-cotizar:hover {
    transform: translateY(-2px);
    background: #f5af00 !important;
}

/* Columna Derecha: Resultados */
.calc-results {
    flex: 1.2;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.res-card {
    background: #1f2937;
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.res-card small {
    display: block;
    font-size: 0.75rem;
    color: #f3f4f6;
    margin-bottom: 5px;
}

.res-card span {
    font-weight: bold;
    font-size: 1.1rem;
}

.res-card.green span { color: #4ade80; }
.res-card.yellow span { color: #ffb800; }
.res-card.blue span { color: #60a5fa; }

/* Caja de Sistema Recomendado */
.recommended-box {
    background: #1f2937;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.icon-box {
    background: #374151;
    padding: 10px;
    border-radius: 8px;
    font-size: 1.2rem;
}

.rec-header h4 {
    margin: 5px 0 0;
    font-size: 1.2rem;
    color: #f3f4f6;
}

.saving-20-years {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.saving-20-years p {
    color: #4ade80;
    margin: 0;
    font-size: 0.9rem;
}

.saving-20-years h3 {
    color: #4ade80;
    font-size: 1.8rem;
    margin: 10px 0 0;
    font-weight: 800;
}

.co2-text {
    text-align: center;
    color: #4ade80;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Ajustes para adaptabilidad (Mobile First / Responsive) */

@media (max-width: 850px) {
    .solar-calc-container {
        flex-direction: column; /* Apila las columnas principales */
        gap: 20px;
        padding: 10px;
    }

    .calc-sidebar, .calc-results {
        width: 100%; /* Ocupan todo el ancho disponible */
        flex: none;
    }

    .amount-title {
        font-size: 2rem; /* Reduce un poco el tamaño del monto para que no rompa la línea */
        text-align: center;
    }

    .results-grid {
        grid-template-columns: 1fr; /* Una tarjeta por fila en móviles pequeños */
        gap: 10px;
    }

    /* Opcional: Si quieres que en tablets se vean 2 columnas y en móvil 1 */
    @media (min-width: 480px) and (max-width: 849px) {
        .results-grid {
            grid-template-columns: 1fr 1fr;
        }
        .res-card.blue {
            grid-column: span 2; /* La tarjeta de retorno ocupa el ancho doble */
        }
    }

    .rec-header {
        flex-direction: column;
        text-align: center;
    }

    .icon-box {
        margin: 0 auto 10px;
    }

    .saving-20-years h3 {
        font-size: 1.5rem;
    }
}

/* Ajuste fino para el Slider en móviles */
input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px; /* Hacer el círculo del slider más grande para que sea fácil de tocar con el dedo */
}