/* Variables y configuración base */
:root {
    --form-width: 700px;
    --form-padding: 2rem;
    --input-height: 45px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow-suave: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medio: 0 4px 20px rgba(0,0,0,0.15);
}

/* Hero Section */
.empresa-hero {
    margin-top: 80px;
    height: 40vh;
    min-height: 300px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 0 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Formulario de Presupuesto */
.presupuesto-formulario {
    max-width: var(--form-width);
    width: 90%;
    margin: -50px auto 3rem;
    padding: var(--form-padding);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medio);
    position: relative;
}

/* Secciones del formulario */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: var(--secondary-color);
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Inputs y Selects */
.form-group input,
.form-group select {
    width: 100%;
    height: var(--input-height);
    padding: 0 1rem;
    border: 1px solid #ddd;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

/* Input de código postal */
#codigo-postal {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Select personalizado */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

/* Container de metros cuadrados */
#metros-container {
    transition: var(--transition);
}

#metros {
    text-align: right;
    padding-right: 1rem;
}

/* Resultado del presupuesto */
.presupuesto-resultado {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.presupuesto-resultado h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.precio-container {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin: 1rem 0;
}

/* Lista de servicios agregados */
.servicios-agregados {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-suave);
}

.servicios-lista {
    margin: 1rem 0;
}

.servicio-item {
    padding: 1rem;
    background: white;
    border-radius: calc(var(--border-radius) / 2);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-suave);
}

.servicio-info {
    flex: 1;
}

.servicio-precio {
    font-weight: bold;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-eliminar {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.btn-eliminar:hover {
    color: #c82333;
    transform: scale(1.1);
}

/* Total del presupuesto */
.total-presupuesto {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #dee2e6;
    text-align: right;
}

.precio-total-container {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Botones de acción */
.botones-accion {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    flex: 1;
}

.btn-primary {
    flex: 1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-suave);
}

/* Checkbox de privacidad */
.privacy-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.privacy-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.privacy-check label {
    font-size: 0.9rem;
    margin: 0;
}

.privacy-check a {
    color: var(--secondary-color);
    text-decoration: none;
}

.privacy-check a:hover {
    text-decoration: underline;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .presupuesto-formulario {
        width: 95%;
        padding: 1.5rem;
        margin-top: -30px;
    }

    .form-section {
        padding: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select {
        height: 42px;
        font-size: 0.9rem;
    }

    .botones-accion {
        flex-direction: column;
    }

    .precio-container {
        font-size: 2rem;
    }

    .servicio-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .servicio-precio {
        justify-content: center;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Estados de validación */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #dc3545;
}

.form-group input:valid:not([type="checkbox"]),
.form-group select:valid {
    border-color: #28a745;
}

/* Focus visible para accesibilidad */
.form-group input:focus-visible,
.form-group select:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Nota informativa */
.nota {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}
.invalid {
    border-color: #ff0000;
    background-color: #fff0f0;
}

.error-message {
    color: #ff0000;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}