.castillo-calculadora {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.castillo-calculadora h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    line-height: normal;
}

.castillo-calculadora h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #4CAF50, #45a049);
    border-radius: 2px;
}

.campo-calculadora {
    margin-bottom: 25px;
}

.campo-calculadora label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 16px;
}

.campo-calculadora input,
.campo-calculadora select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
}

.campo-calculadora input:focus,
.campo-calculadora select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.campo-calculadora input::placeholder {
    color: #95a5a6;
}

.input-group {
    display: flex;
    gap: 15px;
}

.input-group input {
    flex: 3;
}

.input-group select {
    flex: 2;
}

.botones-calculadora {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

button.cambiar-btn {
    color: white;
    border: 1px solid #e0e0e0;
}

.botones-calculadora button {
    flex: 1;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calcular-btn {
    background: linear-gradient(to right, #4CAF50, #45a049);
    color: white;
}

.reset-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

.calcular-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.resultados {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 5px;
    margin-top: 30px;
    display: none;
}

.resultado-item {
    margin-bottom: 25px;
}

.resultado-item h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resultado-item h3 i {
    color: #4CAF50;
}

.grid-costes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.coste-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.coste-box:hover {
    transform: translateY(-5px);
}

.coste-box .periodo {
    display: block;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.coste-box .valor {
    display: inline-block;
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}

.coste-box .unidad {
    color: #4CAF50;
    font-weight: 500;
}

.unidades-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.unidad-option {
    flex: 1;
    position: relative;
}

.unidad-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.unidad-option label {
    display: block;
    padding: 10px;
    text-align: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unidad-option input[type="radio"]:checked + label {
    background: #015AA3;
    color: white;
    border-color: #015AA3;
}

.unidad-option:hover label {
    border-color: #4CAF50;
}

.input-potencia {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .castillo-calculadora {
        margin: 5px;
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group select {
        width: 100%;
    }
    
    .grid-costes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-costes {
        grid-template-columns: 1fr;
    }
    
    .botones-calculadora {
        flex-direction: column;
    }
}

.cambiar-datos {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cambiar-btn {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cambiar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.cambiar-btn i {
    font-size: 18px;
}

/* Añadir clase específica para iconos en el frontend */
.with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Estilos específicos para la calculadora KWh a Euros */
.calculadora-kwh-euros .coste-total {
    text-align: center;
    font-size: 32px;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.calculadora-kwh-euros .coste-total .valor {
    color: #2c3e50;
    font-weight: bold;
    margin-right: 5px;
}

.calculadora-kwh-euros .coste-total .unidad {
    color: #4CAF50;
    font-weight: 500;
}

/* Estilos para los iconos */
.castillo-calculadora i.fa {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.1em;
}

.resultado-item h3 i.fa {
    color: #015AA3;
}

.botones-calculadora i.fa {
    font-size: 1.2em;
}

.cambiar-btn i.fa {
    font-size: 1.1em;
}

/* Estilos para los iconos SVG */
.castillo-calculadora .icon {
    display: none;
}

.resultado-item h3 .icon {
    width: 20px;
    height: 20px;
    fill: #015AA3;
    margin-right: 8px;
}

.cambiar-btn .icon {
    width: 18px;
    height: 18px;
}

/* Estilos para la calculadora de potencia */
.calculadora-potencia .seccion-calculadora {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.calculadora-potencia .seccion-calculadora h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.grid-electrodomesticos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.electrodomestico-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.electrodomestico-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.electrodomestico-item label {
    font-size: 0.95em;
    color: #34495e;
}

.potencia-recomendada {
    text-align: center;
    font-size: 2em;
    margin: 20px 0;
    color: #2c3e50;
}

.potencia-normalizada {
    text-align: center;
    margin: 15px 0;
    color: #015AA3;
    font-weight: 500;
}

.recomendacion-texto {
    background: #e8f4ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: #2c3e50;
    font-size: 0.95em;
    line-height: 1.5;
}

.calculo-detalle {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.resultado-final {
    background: #e8f4ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.resultado-final h3 {
    color: #015AA3;
    margin-bottom: 10px;
    display: grid;
}

.nota-potencia {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.recomendacion-detallada {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recomendacion-detallada h4 {
    color: #2c3e50;
    margin: 20px 0 10px;
    font-size: 1.1em;
}

.recomendacion-detallada ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.recomendacion-detallada li {
    margin: 5px 0;
    color: #34495e;
}

.calculo-explicacion {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calculo-explicacion h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.calculo-explicacion ol {
    margin-left: 5px;
    list-style-type: decimal;
}

.calculo-explicacion li {
    margin: 15px 0;
    color: #34495e;
    line-height: 1.4;
}

.calculo-explicacion li strong {
    color: #015AA3;
}

.calculo-explicacion li small {
    display: block;
    color: #666;
    margin-top: 3px;
    font-size: 0.9em;
    padding-left: 5px;
}

/* Estilos para la grid de calculadoras */
.castillo-calculadoras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.calculadora-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.calculadora-card:hover {
    transform: translateY(-5px);
}

.calculadora-icon {
    width: 60px;
    height: 60px;
    background: #e8f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.calculadora-icon i {
    font-size: 24px;
    color: #015AA3;
}

.calculadora-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.calculadora-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.calculadora-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(to right, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.calculadora-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    color: black;
}

.calculadora-btn i {
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .castillo-calculadoras-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Estilos específicos para la calculadora de coches eléctricos */
.calculadora-coches .slider-value {
    display: inline-block;
    background: #015AA3;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: 10px;
    vertical-align: middle;
}

.calculadora-coches input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.calculadora-coches .ayuda-texto {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 5px;
}

.calculadora-coches .grid-resultados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.calculadora-coches .resultado-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calculadora-coches .resultado-box i {
    font-size: 24px;
    color: #015AA3;
    margin-bottom: 10px;
}

.calculadora-coches .resultado-box h4 {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 1em;
}

.calculadora-coches .resultado-box .valor {
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: bold;
}

.calculadora-coches .modo-carga-valor {
    text-align: center;
    font-size: 1.2em;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.calculadora-coches .modo-lenta {
    background: #27ae60;
}

.calculadora-coches .modo-semi {
    background: #f39c12;
}

.calculadora-coches .modo-rapida {
    background: #e74c3c;
}

.calculadora-coches .modo-super {
    background: #8e44ad;
}

.calculadora-coches .detalles-calculo {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Estilos para los resultados de la calculadora de bicicletas */
.calculadora-bicicletas .grid-resultados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.calculadora-bicicletas .resultado-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calculadora-bicicletas .resultado-box i {
    font-size: 24px;
    color: #015AA3;
    margin-bottom: 10px;
}

.calculadora-bicicletas .resultado-box h4 {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 1em;
}

.calculadora-bicicletas .resultado-box .valor {
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: bold;
}

.calculadora-bicicletas .detalles-calculo {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.calculadora-bicicletas .cambiar-datos {
    text-align: center;
    margin-top: 20px;
}

.calculadora-bicicletas .cambiar-btn {
    background: #015AA3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.calculadora-bicicletas .cambiar-btn:hover {
    background: #014882;
}

/* Estilos para la calculadora de factura */
.calculadora-factura .desglose-factura {
    background: #f8f9fa;
    padding: 3px;
    border-radius: 10px;
    margin-top: 20px;
}

.calculadora-factura .resultado-seccion {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calculadora-factura .resultado-seccion h4 {
    color: #015AA3;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.calculadora-factura .detalle-calculo {
    margin-left: 15px;
}

.calculadora-factura .detalle-calculo p {
    margin: 5px 0;
    color: #666;
}

.calculadora-factura .total-seccion {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #2c3e50 !important;
    font-weight: 500;
}

.calculadora-factura .total-factura {
    background: #e8f4ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.calculadora-factura .total-factura h4 {
    color: #015AA3;
    font-size: 1.3em;
    margin: 0;
}

.calculadora-factura .total-factura span {
    font-weight: bold;
    font-size: 1.2em;
}

.calculadora-factura .detalle-calculo span {
    float: right;
    color: #2c3e50;
    font-weight: 500;
}

.calculadora-factura .nota-precios {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.9em;
}

.calculadora-factura .nota-precios p {
    margin-bottom: 10px;
    color: #2c3e50;
}

.calculadora-factura .nota-precios ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.calculadora-factura .nota-precios i {
    color: #015AA3;
    margin-right: 5px;
} 